public sealed class IAMClientImpl : IAMClient
IAM client wrapper implementation, for convenient use.
Namespace
Google.Cloud.Iam.Admin.V1Assembly
Google.Cloud.Iam.Admin.V1.dll
Remarks
Creates and manages Identity and Access Management (IAM) resources.
You can use this service to work with all of the following resources:
- Service accounts, which identify an application or a virtual machine (VM) instance rather than a person
- Service account keys, which service accounts use to authenticate with Google APIs
- IAM policies for service accounts, which specify the roles that a member has for the service account
- IAM custom roles, which help you limit the number of permissions that you grant to members
In addition, you can use this service to complete the following tasks, among others:
- Test whether a service account can use specific permissions
- Check which roles you can grant for a specific resource
- Lint, or validate, condition expressions in an IAM policy
Constructors
IAMClientImpl(IAM.IAMClient, IAMSettings)
public IAMClientImpl(IAM.IAMClient grpcClient, IAMSettings settings)
Constructs a client wrapper for the IAM service, with the specified gRPC client and settings.
Parameters | |
---|---|
Name | Description |
grpcClient | IAM.IAMClient The underlying gRPC client. |
settings | IAMSettings The base IAMSettings used within this client. |
Properties
GrpcClient
public override IAM.IAMClient GrpcClient { get; }
The underlying gRPC IAM client
Property Value | |
---|---|
Type | Description |
IAM.IAMClient |
Methods
CreateRole(CreateRoleRequest, CallSettings)
public override Role CreateRole(CreateRoleRequest request, CallSettings callSettings = null)
Creates a new custom [Role][google.iam.admin.v1.Role].
Parameters | |
---|---|
Name | Description |
request | CreateRoleRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Role | The RPC response. |
CreateRoleAsync(CreateRoleRequest, CallSettings)
public override Task<Role> CreateRoleAsync(CreateRoleRequest request, CallSettings callSettings = null)
Creates a new custom [Role][google.iam.admin.v1.Role].
Parameters | |
---|---|
Name | Description |
request | CreateRoleRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Role> | A Task containing the RPC response. |
CreateServiceAccount(CreateServiceAccountRequest, CallSettings)
public override ServiceAccount CreateServiceAccount(CreateServiceAccountRequest request, CallSettings callSettings = null)
Creates a [ServiceAccount][google.iam.admin.v1.ServiceAccount].
Parameters | |
---|---|
Name | Description |
request | CreateServiceAccountRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
ServiceAccount | The RPC response. |
CreateServiceAccountAsync(CreateServiceAccountRequest, CallSettings)
public override Task<ServiceAccount> CreateServiceAccountAsync(CreateServiceAccountRequest request, CallSettings callSettings = null)
Creates a [ServiceAccount][google.iam.admin.v1.ServiceAccount].
Parameters | |
---|---|
Name | Description |
request | CreateServiceAccountRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<ServiceAccount> | A Task containing the RPC response. |
CreateServiceAccountKey(CreateServiceAccountKeyRequest, CallSettings)
public override ServiceAccountKey CreateServiceAccountKey(CreateServiceAccountKeyRequest request, CallSettings callSettings = null)
Creates a [ServiceAccountKey][google.iam.admin.v1.ServiceAccountKey].
Parameters | |
---|---|
Name | Description |
request | CreateServiceAccountKeyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
ServiceAccountKey | The RPC response. |
CreateServiceAccountKeyAsync(CreateServiceAccountKeyRequest, CallSettings)
public override Task<ServiceAccountKey> CreateServiceAccountKeyAsync(CreateServiceAccountKeyRequest request, CallSettings callSettings = null)
Creates a [ServiceAccountKey][google.iam.admin.v1.ServiceAccountKey].
Parameters | |
---|---|
Name | Description |
request | CreateServiceAccountKeyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<ServiceAccountKey> | A Task containing the RPC response. |
DeleteRole(DeleteRoleRequest, CallSettings)
public override Role DeleteRole(DeleteRoleRequest request, CallSettings callSettings = null)
Deletes a custom [Role][google.iam.admin.v1.Role].
When you delete a custom role, the following changes occur immediately:
- You cannot bind a member to the custom role in an IAM [Policy][google.iam.v1.Policy].
- Existing bindings to the custom role are not changed, but they have no effect.
- By default, the response from [ListRoles][google.iam.admin.v1.IAM.ListRoles] does not include the custom role.
You have 7 days to undelete the custom role. After 7 days, the following changes occur:
- The custom role is permanently deleted and cannot be recovered.
- If an IAM policy contains a binding to the custom role, the binding is permanently removed.
Parameters | |
---|---|
Name | Description |
request | DeleteRoleRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Role | The RPC response. |
DeleteRoleAsync(DeleteRoleRequest, CallSettings)
public override Task<Role> DeleteRoleAsync(DeleteRoleRequest request, CallSettings callSettings = null)
Deletes a custom [Role][google.iam.admin.v1.Role].
When you delete a custom role, the following changes occur immediately:
- You cannot bind a member to the custom role in an IAM [Policy][google.iam.v1.Policy].
- Existing bindings to the custom role are not changed, but they have no effect.
- By default, the response from [ListRoles][google.iam.admin.v1.IAM.ListRoles] does not include the custom role.
You have 7 days to undelete the custom role. After 7 days, the following changes occur:
- The custom role is permanently deleted and cannot be recovered.
- If an IAM policy contains a binding to the custom role, the binding is permanently removed.
Parameters | |
---|---|
Name | Description |
request | DeleteRoleRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Role> | A Task containing the RPC response. |
DeleteServiceAccount(DeleteServiceAccountRequest, CallSettings)
public override void DeleteServiceAccount(DeleteServiceAccountRequest request, CallSettings callSettings = null)
Deletes a [ServiceAccount][google.iam.admin.v1.ServiceAccount].
Warning: After you delete a service account, you might not be able to undelete it. If you know that you need to re-enable the service account in the future, use [DisableServiceAccount][google.iam.admin.v1.IAM.DisableServiceAccount] instead.
If you delete a service account, IAM permanently removes the service account 30 days later. Google Cloud cannot recover the service account after it is permanently removed, even if you file a support request.
To help avoid unplanned outages, we recommend that you disable the service account before you delete it. Use [DisableServiceAccount][google.iam.admin.v1.IAM.DisableServiceAccount] to disable the service account, then wait at least 24 hours and watch for unintended consequences. If there are no unintended consequences, you can delete the service account.
Parameters | |
---|---|
Name | Description |
request | DeleteServiceAccountRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
DeleteServiceAccountAsync(DeleteServiceAccountRequest, CallSettings)
public override Task DeleteServiceAccountAsync(DeleteServiceAccountRequest request, CallSettings callSettings = null)
Deletes a [ServiceAccount][google.iam.admin.v1.ServiceAccount].
Warning: After you delete a service account, you might not be able to undelete it. If you know that you need to re-enable the service account in the future, use [DisableServiceAccount][google.iam.admin.v1.IAM.DisableServiceAccount] instead.
If you delete a service account, IAM permanently removes the service account 30 days later. Google Cloud cannot recover the service account after it is permanently removed, even if you file a support request.
To help avoid unplanned outages, we recommend that you disable the service account before you delete it. Use [DisableServiceAccount][google.iam.admin.v1.IAM.DisableServiceAccount] to disable the service account, then wait at least 24 hours and watch for unintended consequences. If there are no unintended consequences, you can delete the service account.
Parameters | |
---|---|
Name | Description |
request | DeleteServiceAccountRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
DeleteServiceAccountKey(DeleteServiceAccountKeyRequest, CallSettings)
public override void DeleteServiceAccountKey(DeleteServiceAccountKeyRequest request, CallSettings callSettings = null)
Deletes a [ServiceAccountKey][google.iam.admin.v1.ServiceAccountKey]. Deleting a service account key does not revoke short-lived credentials that have been issued based on the service account key.
Parameters | |
---|---|
Name | Description |
request | DeleteServiceAccountKeyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
DeleteServiceAccountKeyAsync(DeleteServiceAccountKeyRequest, CallSettings)
public override Task DeleteServiceAccountKeyAsync(DeleteServiceAccountKeyRequest request, CallSettings callSettings = null)
Deletes a [ServiceAccountKey][google.iam.admin.v1.ServiceAccountKey]. Deleting a service account key does not revoke short-lived credentials that have been issued based on the service account key.
Parameters | |
---|---|
Name | Description |
request | DeleteServiceAccountKeyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
DisableServiceAccount(DisableServiceAccountRequest, CallSettings)
public override void DisableServiceAccount(DisableServiceAccountRequest request, CallSettings callSettings = null)
Disables a [ServiceAccount][google.iam.admin.v1.ServiceAccount] immediately.
If an application uses the service account to authenticate, that application can no longer call Google APIs or access Google Cloud resources. Existing access tokens for the service account are rejected, and requests for new access tokens will fail.
To re-enable the service account, use [EnableServiceAccount][google.iam.admin.v1.IAM.EnableServiceAccount]. After you re-enable the service account, its existing access tokens will be accepted, and you can request new access tokens.
To help avoid unplanned outages, we recommend that you disable the service account before you delete it. Use this method to disable the service account, then wait at least 24 hours and watch for unintended consequences. If there are no unintended consequences, you can delete the service account with [DeleteServiceAccount][google.iam.admin.v1.IAM.DeleteServiceAccount].
Parameters | |
---|---|
Name | Description |
request | DisableServiceAccountRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
DisableServiceAccountAsync(DisableServiceAccountRequest, CallSettings)
public override Task DisableServiceAccountAsync(DisableServiceAccountRequest request, CallSettings callSettings = null)
Disables a [ServiceAccount][google.iam.admin.v1.ServiceAccount] immediately.
If an application uses the service account to authenticate, that application can no longer call Google APIs or access Google Cloud resources. Existing access tokens for the service account are rejected, and requests for new access tokens will fail.
To re-enable the service account, use [EnableServiceAccount][google.iam.admin.v1.IAM.EnableServiceAccount]. After you re-enable the service account, its existing access tokens will be accepted, and you can request new access tokens.
To help avoid unplanned outages, we recommend that you disable the service account before you delete it. Use this method to disable the service account, then wait at least 24 hours and watch for unintended consequences. If there are no unintended consequences, you can delete the service account with [DeleteServiceAccount][google.iam.admin.v1.IAM.DeleteServiceAccount].
Parameters | |
---|---|
Name | Description |
request | DisableServiceAccountRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
EnableServiceAccount(EnableServiceAccountRequest, CallSettings)
public override void EnableServiceAccount(EnableServiceAccountRequest request, CallSettings callSettings = null)
Enables a [ServiceAccount][google.iam.admin.v1.ServiceAccount] that was disabled by [DisableServiceAccount][google.iam.admin.v1.IAM.DisableServiceAccount].
If the service account is already enabled, then this method has no effect.
If the service account was disabled by other means—for example, if Google disabled the service account because it was compromised—you cannot use this method to enable the service account.
Parameters | |
---|---|
Name | Description |
request | EnableServiceAccountRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
EnableServiceAccountAsync(EnableServiceAccountRequest, CallSettings)
public override Task EnableServiceAccountAsync(EnableServiceAccountRequest request, CallSettings callSettings = null)
Enables a [ServiceAccount][google.iam.admin.v1.ServiceAccount] that was disabled by [DisableServiceAccount][google.iam.admin.v1.IAM.DisableServiceAccount].
If the service account is already enabled, then this method has no effect.
If the service account was disabled by other means—for example, if Google disabled the service account because it was compromised—you cannot use this method to enable the service account.
Parameters | |
---|---|
Name | Description |
request | EnableServiceAccountRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
GetIamPolicy(GetIamPolicyRequest, CallSettings)
public override Policy GetIamPolicy(GetIamPolicyRequest request, CallSettings callSettings = null)
Gets the IAM policy that is attached to a [ServiceAccount][google.iam.admin.v1.ServiceAccount]. This IAM policy specifies which members have access to the service account.
This method does not tell you whether the service account has been granted
any roles on other resources. To check whether a service account has role
grants on a resource, use the getIamPolicy
method for that resource. For
example, to view the role grants for a project, call the Resource Manager
API's
projects.getIamPolicy
method.
Parameters | |
---|---|
Name | Description |
request | GetIamPolicyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Policy | The RPC response. |
GetIamPolicyAsync(GetIamPolicyRequest, CallSettings)
public override Task<Policy> GetIamPolicyAsync(GetIamPolicyRequest request, CallSettings callSettings = null)
Gets the IAM policy that is attached to a [ServiceAccount][google.iam.admin.v1.ServiceAccount]. This IAM policy specifies which members have access to the service account.
This method does not tell you whether the service account has been granted
any roles on other resources. To check whether a service account has role
grants on a resource, use the getIamPolicy
method for that resource. For
example, to view the role grants for a project, call the Resource Manager
API's
projects.getIamPolicy
method.
Parameters | |
---|---|
Name | Description |
request | GetIamPolicyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Policy> | A Task containing the RPC response. |
GetRole(GetRoleRequest, CallSettings)
public override Role GetRole(GetRoleRequest request, CallSettings callSettings = null)
Gets the definition of a [Role][google.iam.admin.v1.Role].
Parameters | |
---|---|
Name | Description |
request | GetRoleRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Role | The RPC response. |
GetRoleAsync(GetRoleRequest, CallSettings)
public override Task<Role> GetRoleAsync(GetRoleRequest request, CallSettings callSettings = null)
Gets the definition of a [Role][google.iam.admin.v1.Role].
Parameters | |
---|---|
Name | Description |
request | GetRoleRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Role> | A Task containing the RPC response. |
GetServiceAccount(GetServiceAccountRequest, CallSettings)
public override ServiceAccount GetServiceAccount(GetServiceAccountRequest request, CallSettings callSettings = null)
Gets a [ServiceAccount][google.iam.admin.v1.ServiceAccount].
Parameters | |
---|---|
Name | Description |
request | GetServiceAccountRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
ServiceAccount | The RPC response. |
GetServiceAccountAsync(GetServiceAccountRequest, CallSettings)
public override Task<ServiceAccount> GetServiceAccountAsync(GetServiceAccountRequest request, CallSettings callSettings = null)
Gets a [ServiceAccount][google.iam.admin.v1.ServiceAccount].
Parameters | |
---|---|
Name | Description |
request | GetServiceAccountRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<ServiceAccount> | A Task containing the RPC response. |
GetServiceAccountKey(GetServiceAccountKeyRequest, CallSettings)
public override ServiceAccountKey GetServiceAccountKey(GetServiceAccountKeyRequest request, CallSettings callSettings = null)
Gets a [ServiceAccountKey][google.iam.admin.v1.ServiceAccountKey].
Parameters | |
---|---|
Name | Description |
request | GetServiceAccountKeyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
ServiceAccountKey | The RPC response. |
GetServiceAccountKeyAsync(GetServiceAccountKeyRequest, CallSettings)
public override Task<ServiceAccountKey> GetServiceAccountKeyAsync(GetServiceAccountKeyRequest request, CallSettings callSettings = null)
Gets a [ServiceAccountKey][google.iam.admin.v1.ServiceAccountKey].
Parameters | |
---|---|
Name | Description |
request | GetServiceAccountKeyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<ServiceAccountKey> | A Task containing the RPC response. |
LintPolicy(LintPolicyRequest, CallSettings)
public override LintPolicyResponse LintPolicy(LintPolicyRequest request, CallSettings callSettings = null)
Lints, or validates, an IAM policy. Currently checks the [google.iam.v1.Binding.condition][google.iam.v1.Binding.condition] field, which contains a condition expression for a role binding.
Successful calls to this method always return an HTTP 200 OK
status code,
even if the linter detects an issue in the IAM policy.
Parameters | |
---|---|
Name | Description |
request | LintPolicyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
LintPolicyResponse | The RPC response. |
LintPolicyAsync(LintPolicyRequest, CallSettings)
public override Task<LintPolicyResponse> LintPolicyAsync(LintPolicyRequest request, CallSettings callSettings = null)
Lints, or validates, an IAM policy. Currently checks the [google.iam.v1.Binding.condition][google.iam.v1.Binding.condition] field, which contains a condition expression for a role binding.
Successful calls to this method always return an HTTP 200 OK
status code,
even if the linter detects an issue in the IAM policy.
Parameters | |
---|---|
Name | Description |
request | LintPolicyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<LintPolicyResponse> | A Task containing the RPC response. |
ListRoles(ListRolesRequest, CallSettings)
public override PagedEnumerable<ListRolesResponse, Role> ListRoles(ListRolesRequest request, CallSettings callSettings = null)
Lists every predefined [Role][google.iam.admin.v1.Role] that IAM supports, or every custom role that is defined for an organization or project.
Parameters | |
---|---|
Name | Description |
request | ListRolesRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListRolesResponse, Role> | A pageable sequence of Role resources. |
ListRolesAsync(ListRolesRequest, CallSettings)
public override PagedAsyncEnumerable<ListRolesResponse, Role> ListRolesAsync(ListRolesRequest request, CallSettings callSettings = null)
Lists every predefined [Role][google.iam.admin.v1.Role] that IAM supports, or every custom role that is defined for an organization or project.
Parameters | |
---|---|
Name | Description |
request | ListRolesRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListRolesResponse, Role> | A pageable asynchronous sequence of Role resources. |
ListServiceAccountKeys(ListServiceAccountKeysRequest, CallSettings)
public override ListServiceAccountKeysResponse ListServiceAccountKeys(ListServiceAccountKeysRequest request, CallSettings callSettings = null)
Lists every [ServiceAccountKey][google.iam.admin.v1.ServiceAccountKey] for a service account.
Parameters | |
---|---|
Name | Description |
request | ListServiceAccountKeysRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
ListServiceAccountKeysResponse | The RPC response. |
ListServiceAccountKeysAsync(ListServiceAccountKeysRequest, CallSettings)
public override Task<ListServiceAccountKeysResponse> ListServiceAccountKeysAsync(ListServiceAccountKeysRequest request, CallSettings callSettings = null)
Lists every [ServiceAccountKey][google.iam.admin.v1.ServiceAccountKey] for a service account.
Parameters | |
---|---|
Name | Description |
request | ListServiceAccountKeysRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<ListServiceAccountKeysResponse> | A Task containing the RPC response. |
ListServiceAccounts(ListServiceAccountsRequest, CallSettings)
public override PagedEnumerable<ListServiceAccountsResponse, ServiceAccount> ListServiceAccounts(ListServiceAccountsRequest request, CallSettings callSettings = null)
Lists every [ServiceAccount][google.iam.admin.v1.ServiceAccount] that belongs to a specific project.
Parameters | |
---|---|
Name | Description |
request | ListServiceAccountsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListServiceAccountsResponse, ServiceAccount> | A pageable sequence of ServiceAccount resources. |
ListServiceAccountsAsync(ListServiceAccountsRequest, CallSettings)
public override PagedAsyncEnumerable<ListServiceAccountsResponse, ServiceAccount> ListServiceAccountsAsync(ListServiceAccountsRequest request, CallSettings callSettings = null)
Lists every [ServiceAccount][google.iam.admin.v1.ServiceAccount] that belongs to a specific project.
Parameters | |
---|---|
Name | Description |
request | ListServiceAccountsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListServiceAccountsResponse, ServiceAccount> | A pageable asynchronous sequence of ServiceAccount resources. |
PatchServiceAccount(PatchServiceAccountRequest, CallSettings)
public override ServiceAccount PatchServiceAccount(PatchServiceAccountRequest request, CallSettings callSettings = null)
Patches a [ServiceAccount][google.iam.admin.v1.ServiceAccount].
Parameters | |
---|---|
Name | Description |
request | PatchServiceAccountRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
ServiceAccount | The RPC response. |
PatchServiceAccountAsync(PatchServiceAccountRequest, CallSettings)
public override Task<ServiceAccount> PatchServiceAccountAsync(PatchServiceAccountRequest request, CallSettings callSettings = null)
Patches a [ServiceAccount][google.iam.admin.v1.ServiceAccount].
Parameters | |
---|---|
Name | Description |
request | PatchServiceAccountRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<ServiceAccount> | A Task containing the RPC response. |
QueryAuditableServices(QueryAuditableServicesRequest, CallSettings)
public override QueryAuditableServicesResponse QueryAuditableServices(QueryAuditableServicesRequest request, CallSettings callSettings = null)
Returns a list of services that allow you to opt into audit logs that are not generated by default.
To learn more about audit logs, see the Logging documentation.
Parameters | |
---|---|
Name | Description |
request | QueryAuditableServicesRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
QueryAuditableServicesResponse | The RPC response. |
QueryAuditableServicesAsync(QueryAuditableServicesRequest, CallSettings)
public override Task<QueryAuditableServicesResponse> QueryAuditableServicesAsync(QueryAuditableServicesRequest request, CallSettings callSettings = null)
Returns a list of services that allow you to opt into audit logs that are not generated by default.
To learn more about audit logs, see the Logging documentation.
Parameters | |
---|---|
Name | Description |
request | QueryAuditableServicesRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<QueryAuditableServicesResponse> | A Task containing the RPC response. |
QueryGrantableRoles(QueryGrantableRolesRequest, CallSettings)
public override PagedEnumerable<QueryGrantableRolesResponse, Role> QueryGrantableRoles(QueryGrantableRolesRequest request, CallSettings callSettings = null)
Lists roles that can be granted on a Google Cloud resource. A role is grantable if the IAM policy for the resource can contain bindings to the role.
Parameters | |
---|---|
Name | Description |
request | QueryGrantableRolesRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<QueryGrantableRolesResponse, Role> | A pageable sequence of Role resources. |
QueryGrantableRolesAsync(QueryGrantableRolesRequest, CallSettings)
public override PagedAsyncEnumerable<QueryGrantableRolesResponse, Role> QueryGrantableRolesAsync(QueryGrantableRolesRequest request, CallSettings callSettings = null)
Lists roles that can be granted on a Google Cloud resource. A role is grantable if the IAM policy for the resource can contain bindings to the role.
Parameters | |
---|---|
Name | Description |
request | QueryGrantableRolesRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<QueryGrantableRolesResponse, Role> | A pageable asynchronous sequence of Role resources. |
QueryTestablePermissions(QueryTestablePermissionsRequest, CallSettings)
public override PagedEnumerable<QueryTestablePermissionsResponse, Permission> QueryTestablePermissions(QueryTestablePermissionsRequest request, CallSettings callSettings = null)
Lists every permission that you can test on a resource. A permission is testable if you can check whether a member has that permission on the resource.
Parameters | |
---|---|
Name | Description |
request | QueryTestablePermissionsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<QueryTestablePermissionsResponse, Permission> | A pageable sequence of Permission resources. |
QueryTestablePermissionsAsync(QueryTestablePermissionsRequest, CallSettings)
public override PagedAsyncEnumerable<QueryTestablePermissionsResponse, Permission> QueryTestablePermissionsAsync(QueryTestablePermissionsRequest request, CallSettings callSettings = null)
Lists every permission that you can test on a resource. A permission is testable if you can check whether a member has that permission on the resource.
Parameters | |
---|---|
Name | Description |
request | QueryTestablePermissionsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<QueryTestablePermissionsResponse, Permission> | A pageable asynchronous sequence of Permission resources. |
SetIamPolicy(SetIamPolicyRequest, CallSettings)
public override Policy SetIamPolicy(SetIamPolicyRequest request, CallSettings callSettings = null)
Sets the IAM policy that is attached to a [ServiceAccount][google.iam.admin.v1.ServiceAccount].
Use this method to grant or revoke access to the service account. For example, you could grant a member the ability to impersonate the service account.
This method does not enable the service account to access other resources. To grant roles to a service account on a resource, follow these steps:
- Call the resource's
getIamPolicy
method to get its current IAM policy. - Edit the policy so that it binds the service account to an IAM role for the resource.
- Call the resource's
setIamPolicy
method to update its IAM policy.
For detailed instructions, see Granting roles to a service account for specific resources.
Parameters | |
---|---|
Name | Description |
request | SetIamPolicyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Policy | The RPC response. |
SetIamPolicyAsync(SetIamPolicyRequest, CallSettings)
public override Task<Policy> SetIamPolicyAsync(SetIamPolicyRequest request, CallSettings callSettings = null)
Sets the IAM policy that is attached to a [ServiceAccount][google.iam.admin.v1.ServiceAccount].
Use this method to grant or revoke access to the service account. For example, you could grant a member the ability to impersonate the service account.
This method does not enable the service account to access other resources. To grant roles to a service account on a resource, follow these steps:
- Call the resource's
getIamPolicy
method to get its current IAM policy. - Edit the policy so that it binds the service account to an IAM role for the resource.
- Call the resource's
setIamPolicy
method to update its IAM policy.
For detailed instructions, see Granting roles to a service account for specific resources.
Parameters | |
---|---|
Name | Description |
request | SetIamPolicyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Policy> | A Task containing the RPC response. |
SignBlob(SignBlobRequest, CallSettings)
[Obsolete]
public override SignBlobResponse SignBlob(SignBlobRequest request, CallSettings callSettings = null)
Note: This method is deprecated. Use the
signBlob
method in the IAM Service Account Credentials API instead. If you currently
use this method, see the migration
guide for
instructions.
Signs a blob using the system-managed private key for a [ServiceAccount][google.iam.admin.v1.ServiceAccount].
Parameters | |
---|---|
Name | Description |
request | SignBlobRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
SignBlobResponse | The RPC response. |
SignBlobAsync(SignBlobRequest, CallSettings)
[Obsolete]
public override Task<SignBlobResponse> SignBlobAsync(SignBlobRequest request, CallSettings callSettings = null)
Note: This method is deprecated. Use the
signBlob
method in the IAM Service Account Credentials API instead. If you currently
use this method, see the migration
guide for
instructions.
Signs a blob using the system-managed private key for a [ServiceAccount][google.iam.admin.v1.ServiceAccount].
Parameters | |
---|---|
Name | Description |
request | SignBlobRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<SignBlobResponse> | A Task containing the RPC response. |
SignJwt(SignJwtRequest, CallSettings)
[Obsolete]
public override SignJwtResponse SignJwt(SignJwtRequest request, CallSettings callSettings = null)
Note: This method is deprecated. Use the
signJwt
method in the IAM Service Account Credentials API instead. If you currently
use this method, see the migration
guide for
instructions.
Signs a JSON Web Token (JWT) using the system-managed private key for a [ServiceAccount][google.iam.admin.v1.ServiceAccount].
Parameters | |
---|---|
Name | Description |
request | SignJwtRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
SignJwtResponse | The RPC response. |
SignJwtAsync(SignJwtRequest, CallSettings)
[Obsolete]
public override Task<SignJwtResponse> SignJwtAsync(SignJwtRequest request, CallSettings callSettings = null)
Note: This method is deprecated. Use the
signJwt
method in the IAM Service Account Credentials API instead. If you currently
use this method, see the migration
guide for
instructions.
Signs a JSON Web Token (JWT) using the system-managed private key for a [ServiceAccount][google.iam.admin.v1.ServiceAccount].
Parameters | |
---|---|
Name | Description |
request | SignJwtRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<SignJwtResponse> | A Task containing the RPC response. |
TestIamPermissions(TestIamPermissionsRequest, CallSettings)
public override TestIamPermissionsResponse TestIamPermissions(TestIamPermissionsRequest request, CallSettings callSettings = null)
Tests whether the caller has the specified permissions on a [ServiceAccount][google.iam.admin.v1.ServiceAccount].
Parameters | |
---|---|
Name | Description |
request | TestIamPermissionsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TestIamPermissionsResponse | The RPC response. |
TestIamPermissionsAsync(TestIamPermissionsRequest, CallSettings)
public override Task<TestIamPermissionsResponse> TestIamPermissionsAsync(TestIamPermissionsRequest request, CallSettings callSettings = null)
Tests whether the caller has the specified permissions on a [ServiceAccount][google.iam.admin.v1.ServiceAccount].
Parameters | |
---|---|
Name | Description |
request | TestIamPermissionsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<TestIamPermissionsResponse> | A Task containing the RPC response. |
UndeleteRole(UndeleteRoleRequest, CallSettings)
public override Role UndeleteRole(UndeleteRoleRequest request, CallSettings callSettings = null)
Undeletes a custom [Role][google.iam.admin.v1.Role].
Parameters | |
---|---|
Name | Description |
request | UndeleteRoleRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Role | The RPC response. |
UndeleteRoleAsync(UndeleteRoleRequest, CallSettings)
public override Task<Role> UndeleteRoleAsync(UndeleteRoleRequest request, CallSettings callSettings = null)
Undeletes a custom [Role][google.iam.admin.v1.Role].
Parameters | |
---|---|
Name | Description |
request | UndeleteRoleRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Role> | A Task containing the RPC response. |
UndeleteServiceAccount(UndeleteServiceAccountRequest, CallSettings)
public override UndeleteServiceAccountResponse UndeleteServiceAccount(UndeleteServiceAccountRequest request, CallSettings callSettings = null)
Restores a deleted [ServiceAccount][google.iam.admin.v1.ServiceAccount].
Important: It is not always possible to restore a deleted service account. Use this method only as a last resort.
After you delete a service account, IAM permanently removes the service account 30 days later. There is no way to restore a deleted service account that has been permanently removed.
Parameters | |
---|---|
Name | Description |
request | UndeleteServiceAccountRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
UndeleteServiceAccountResponse | The RPC response. |
UndeleteServiceAccountAsync(UndeleteServiceAccountRequest, CallSettings)
public override Task<UndeleteServiceAccountResponse> UndeleteServiceAccountAsync(UndeleteServiceAccountRequest request, CallSettings callSettings = null)
Restores a deleted [ServiceAccount][google.iam.admin.v1.ServiceAccount].
Important: It is not always possible to restore a deleted service account. Use this method only as a last resort.
After you delete a service account, IAM permanently removes the service account 30 days later. There is no way to restore a deleted service account that has been permanently removed.
Parameters | |
---|---|
Name | Description |
request | UndeleteServiceAccountRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<UndeleteServiceAccountResponse> | A Task containing the RPC response. |
UpdateRole(UpdateRoleRequest, CallSettings)
public override Role UpdateRole(UpdateRoleRequest request, CallSettings callSettings = null)
Updates the definition of a custom [Role][google.iam.admin.v1.Role].
Parameters | |
---|---|
Name | Description |
request | UpdateRoleRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Role | The RPC response. |
UpdateRoleAsync(UpdateRoleRequest, CallSettings)
public override Task<Role> UpdateRoleAsync(UpdateRoleRequest request, CallSettings callSettings = null)
Updates the definition of a custom [Role][google.iam.admin.v1.Role].
Parameters | |
---|---|
Name | Description |
request | UpdateRoleRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Role> | A Task containing the RPC response. |
UpdateServiceAccount(ServiceAccount, CallSettings)
public override ServiceAccount UpdateServiceAccount(ServiceAccount request, CallSettings callSettings = null)
Note: We are in the process of deprecating this method. Use [PatchServiceAccount][google.iam.admin.v1.IAM.PatchServiceAccount] instead.
Updates a [ServiceAccount][google.iam.admin.v1.ServiceAccount].
You can update only the display_name
and description
fields.
Parameters | |
---|---|
Name | Description |
request | ServiceAccount The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
ServiceAccount | The RPC response. |
UpdateServiceAccountAsync(ServiceAccount, CallSettings)
public override Task<ServiceAccount> UpdateServiceAccountAsync(ServiceAccount request, CallSettings callSettings = null)
Note: We are in the process of deprecating this method. Use [PatchServiceAccount][google.iam.admin.v1.IAM.PatchServiceAccount] instead.
Updates a [ServiceAccount][google.iam.admin.v1.ServiceAccount].
You can update only the display_name
and description
fields.
Parameters | |
---|---|
Name | Description |
request | ServiceAccount The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<ServiceAccount> | A Task containing the RPC response. |
UploadServiceAccountKey(UploadServiceAccountKeyRequest, CallSettings)
public override ServiceAccountKey UploadServiceAccountKey(UploadServiceAccountKeyRequest request, CallSettings callSettings = null)
Creates a [ServiceAccountKey][google.iam.admin.v1.ServiceAccountKey], using a public key that you provide.
Parameters | |
---|---|
Name | Description |
request | UploadServiceAccountKeyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
ServiceAccountKey | The RPC response. |
UploadServiceAccountKeyAsync(UploadServiceAccountKeyRequest, CallSettings)
public override Task<ServiceAccountKey> UploadServiceAccountKeyAsync(UploadServiceAccountKeyRequest request, CallSettings callSettings = null)
Creates a [ServiceAccountKey][google.iam.admin.v1.ServiceAccountKey], using a public key that you provide.
Parameters | |
---|---|
Name | Description |
request | UploadServiceAccountKeyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<ServiceAccountKey> | A Task containing the RPC response. |