public sealed class AccessApprovalServiceClientImpl : AccessApprovalServiceClient
AccessApprovalService client wrapper implementation, for convenient use.
Namespace
Google.Cloud.AccessApproval.V1Assembly
Google.Cloud.AccessApproval.V1.dll
Remarks
This API allows a customer to manage accesses to cloud resources by Google personnel. It defines the following resource model:
- The API has a collection of
[ApprovalRequest][google.cloud.accessapproval.v1.ApprovalRequest]
resources, named
approvalRequests/{approval_request}
- The API has top-level settings per Project/Folder/Organization, named
accessApprovalSettings
The service also periodically emails a list of recipients, defined at the Project/Folder/Organization level in the accessApprovalSettings, when there is a pending ApprovalRequest for them to act on. The ApprovalRequests can also optionally be published to a Pub/Sub topic owned by the customer (contact support if you would like to enable Pub/Sub notifications).
ApprovalRequests can be approved or dismissed. Google personnel can only access the indicated resource or resources if the request is approved (subject to some exclusions: https://cloud.google.com/access-approval/docs/overview#exclusions).
Note: Using Access Approval functionality will mean that Google may not be able to meet the SLAs for your chosen products, as any support response times may be dramatically increased. As such the SLAs do not apply to any service disruption to the extent impacted by Customer's use of Access Approval. Do not enable Access Approval for projects where you may require high service availability and rapid response by Google Cloud Support.
After a request is approved or dismissed, no further action may be taken on it. Requests with the requested_expiration in the past or with no activity for 14 days are considered dismissed. When an approval expires, the request is considered dismissed.
If a request is not approved or dismissed, we call it pending.
Constructors
AccessApprovalServiceClientImpl(AccessApproval.AccessApprovalClient, AccessApprovalServiceSettings)
public AccessApprovalServiceClientImpl(AccessApproval.AccessApprovalClient grpcClient, AccessApprovalServiceSettings settings)
Constructs a client wrapper for the AccessApprovalService service, with the specified gRPC client and settings.
Parameters | |
---|---|
Name | Description |
grpcClient | AccessApproval.AccessApprovalClient The underlying gRPC client. |
settings | AccessApprovalServiceSettings The base AccessApprovalServiceSettings used within this client. |
Properties
GrpcClient
public override AccessApproval.AccessApprovalClient GrpcClient { get; }
The underlying gRPC AccessApprovalService client
Property Value | |
---|---|
Type | Description |
AccessApproval.AccessApprovalClient |
Methods
ApproveApprovalRequest(ApproveApprovalRequestMessage, CallSettings)
public override ApprovalRequest ApproveApprovalRequest(ApproveApprovalRequestMessage request, CallSettings callSettings = null)
Approves a request and returns the updated ApprovalRequest.
Returns NOT_FOUND if the request does not exist. Returns FAILED_PRECONDITION if the request exists but is not in a pending state.
Parameters | |
---|---|
Name | Description |
request | ApproveApprovalRequestMessage 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 |
ApprovalRequest | The RPC response. |
ApproveApprovalRequestAsync(ApproveApprovalRequestMessage, CallSettings)
public override Task<ApprovalRequest> ApproveApprovalRequestAsync(ApproveApprovalRequestMessage request, CallSettings callSettings = null)
Approves a request and returns the updated ApprovalRequest.
Returns NOT_FOUND if the request does not exist. Returns FAILED_PRECONDITION if the request exists but is not in a pending state.
Parameters | |
---|---|
Name | Description |
request | ApproveApprovalRequestMessage 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<ApprovalRequest> | A Task containing the RPC response. |
DeleteAccessApprovalSettings(DeleteAccessApprovalSettingsMessage, CallSettings)
public override void DeleteAccessApprovalSettings(DeleteAccessApprovalSettingsMessage request, CallSettings callSettings = null)
Deletes the settings associated with a project, folder, or organization. This will have the effect of disabling Access Approval for the project, folder, or organization, but only if all ancestors also have Access Approval disabled. If Access Approval is enabled at a higher level of the hierarchy, then Access Approval will still be enabled at this level as the settings are inherited.
Parameters | |
---|---|
Name | Description |
request | DeleteAccessApprovalSettingsMessage The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
DeleteAccessApprovalSettingsAsync(DeleteAccessApprovalSettingsMessage, CallSettings)
public override Task DeleteAccessApprovalSettingsAsync(DeleteAccessApprovalSettingsMessage request, CallSettings callSettings = null)
Deletes the settings associated with a project, folder, or organization. This will have the effect of disabling Access Approval for the project, folder, or organization, but only if all ancestors also have Access Approval disabled. If Access Approval is enabled at a higher level of the hierarchy, then Access Approval will still be enabled at this level as the settings are inherited.
Parameters | |
---|---|
Name | Description |
request | DeleteAccessApprovalSettingsMessage 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. |
DismissApprovalRequest(DismissApprovalRequestMessage, CallSettings)
public override ApprovalRequest DismissApprovalRequest(DismissApprovalRequestMessage request, CallSettings callSettings = null)
Dismisses a request. Returns the updated ApprovalRequest.
NOTE: This does not deny access to the resource if another request has been made and approved. It is equivalent in effect to ignoring the request altogether.
Returns NOT_FOUND if the request does not exist.
Returns FAILED_PRECONDITION if the request exists but is not in a pending state.
Parameters | |
---|---|
Name | Description |
request | DismissApprovalRequestMessage 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 |
ApprovalRequest | The RPC response. |
DismissApprovalRequestAsync(DismissApprovalRequestMessage, CallSettings)
public override Task<ApprovalRequest> DismissApprovalRequestAsync(DismissApprovalRequestMessage request, CallSettings callSettings = null)
Dismisses a request. Returns the updated ApprovalRequest.
NOTE: This does not deny access to the resource if another request has been made and approved. It is equivalent in effect to ignoring the request altogether.
Returns NOT_FOUND if the request does not exist.
Returns FAILED_PRECONDITION if the request exists but is not in a pending state.
Parameters | |
---|---|
Name | Description |
request | DismissApprovalRequestMessage 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<ApprovalRequest> | A Task containing the RPC response. |
GetAccessApprovalServiceAccount(GetAccessApprovalServiceAccountMessage, CallSettings)
public override AccessApprovalServiceAccount GetAccessApprovalServiceAccount(GetAccessApprovalServiceAccountMessage request, CallSettings callSettings = null)
Retrieves the service account that is used by Access Approval to access KMS keys for signing approved approval requests.
Parameters | |
---|---|
Name | Description |
request | GetAccessApprovalServiceAccountMessage 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 |
AccessApprovalServiceAccount | The RPC response. |
GetAccessApprovalServiceAccountAsync(GetAccessApprovalServiceAccountMessage, CallSettings)
public override Task<AccessApprovalServiceAccount> GetAccessApprovalServiceAccountAsync(GetAccessApprovalServiceAccountMessage request, CallSettings callSettings = null)
Retrieves the service account that is used by Access Approval to access KMS keys for signing approved approval requests.
Parameters | |
---|---|
Name | Description |
request | GetAccessApprovalServiceAccountMessage 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<AccessApprovalServiceAccount> | A Task containing the RPC response. |
GetAccessApprovalSettings(GetAccessApprovalSettingsMessage, CallSettings)
public override AccessApprovalSettings GetAccessApprovalSettings(GetAccessApprovalSettingsMessage request, CallSettings callSettings = null)
Gets the settings associated with a project, folder, or organization.
Parameters | |
---|---|
Name | Description |
request | GetAccessApprovalSettingsMessage 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 |
AccessApprovalSettings | The RPC response. |
GetAccessApprovalSettingsAsync(GetAccessApprovalSettingsMessage, CallSettings)
public override Task<AccessApprovalSettings> GetAccessApprovalSettingsAsync(GetAccessApprovalSettingsMessage request, CallSettings callSettings = null)
Gets the settings associated with a project, folder, or organization.
Parameters | |
---|---|
Name | Description |
request | GetAccessApprovalSettingsMessage 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<AccessApprovalSettings> | A Task containing the RPC response. |
GetApprovalRequest(GetApprovalRequestMessage, CallSettings)
public override ApprovalRequest GetApprovalRequest(GetApprovalRequestMessage request, CallSettings callSettings = null)
Gets an approval request. Returns NOT_FOUND if the request does not exist.
Parameters | |
---|---|
Name | Description |
request | GetApprovalRequestMessage 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 |
ApprovalRequest | The RPC response. |
GetApprovalRequestAsync(GetApprovalRequestMessage, CallSettings)
public override Task<ApprovalRequest> GetApprovalRequestAsync(GetApprovalRequestMessage request, CallSettings callSettings = null)
Gets an approval request. Returns NOT_FOUND if the request does not exist.
Parameters | |
---|---|
Name | Description |
request | GetApprovalRequestMessage 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<ApprovalRequest> | A Task containing the RPC response. |
InvalidateApprovalRequest(InvalidateApprovalRequestMessage, CallSettings)
public override ApprovalRequest InvalidateApprovalRequest(InvalidateApprovalRequestMessage request, CallSettings callSettings = null)
Invalidates an existing ApprovalRequest. Returns the updated ApprovalRequest.
NOTE: This does not deny access to the resource if another request has been made and approved. It only invalidates a single approval.
Returns FAILED_PRECONDITION if the request exists but is not in an approved state.
Parameters | |
---|---|
Name | Description |
request | InvalidateApprovalRequestMessage 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 |
ApprovalRequest | The RPC response. |
InvalidateApprovalRequestAsync(InvalidateApprovalRequestMessage, CallSettings)
public override Task<ApprovalRequest> InvalidateApprovalRequestAsync(InvalidateApprovalRequestMessage request, CallSettings callSettings = null)
Invalidates an existing ApprovalRequest. Returns the updated ApprovalRequest.
NOTE: This does not deny access to the resource if another request has been made and approved. It only invalidates a single approval.
Returns FAILED_PRECONDITION if the request exists but is not in an approved state.
Parameters | |
---|---|
Name | Description |
request | InvalidateApprovalRequestMessage 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<ApprovalRequest> | A Task containing the RPC response. |
ListApprovalRequests(ListApprovalRequestsMessage, CallSettings)
public override PagedEnumerable<ListApprovalRequestsResponse, ApprovalRequest> ListApprovalRequests(ListApprovalRequestsMessage request, CallSettings callSettings = null)
Lists approval requests associated with a project, folder, or organization. Approval requests can be filtered by state (pending, active, dismissed). The order is reverse chronological.
Parameters | |
---|---|
Name | Description |
request | ListApprovalRequestsMessage 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<ListApprovalRequestsResponse, ApprovalRequest> | A pageable sequence of ApprovalRequest resources. |
ListApprovalRequestsAsync(ListApprovalRequestsMessage, CallSettings)
public override PagedAsyncEnumerable<ListApprovalRequestsResponse, ApprovalRequest> ListApprovalRequestsAsync(ListApprovalRequestsMessage request, CallSettings callSettings = null)
Lists approval requests associated with a project, folder, or organization. Approval requests can be filtered by state (pending, active, dismissed). The order is reverse chronological.
Parameters | |
---|---|
Name | Description |
request | ListApprovalRequestsMessage 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<ListApprovalRequestsResponse, ApprovalRequest> | A pageable asynchronous sequence of ApprovalRequest resources. |
UpdateAccessApprovalSettings(UpdateAccessApprovalSettingsMessage, CallSettings)
public override AccessApprovalSettings UpdateAccessApprovalSettings(UpdateAccessApprovalSettingsMessage request, CallSettings callSettings = null)
Updates the settings associated with a project, folder, or organization. Settings to update are determined by the value of field_mask.
Parameters | |
---|---|
Name | Description |
request | UpdateAccessApprovalSettingsMessage 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 |
AccessApprovalSettings | The RPC response. |
UpdateAccessApprovalSettingsAsync(UpdateAccessApprovalSettingsMessage, CallSettings)
public override Task<AccessApprovalSettings> UpdateAccessApprovalSettingsAsync(UpdateAccessApprovalSettingsMessage request, CallSettings callSettings = null)
Updates the settings associated with a project, folder, or organization. Settings to update are determined by the value of field_mask.
Parameters | |
---|---|
Name | Description |
request | UpdateAccessApprovalSettingsMessage 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<AccessApprovalSettings> | A Task containing the RPC response. |