Class AccessApprovalServiceClientImpl (1.4.0)

public sealed class AccessApprovalServiceClientImpl : AccessApprovalServiceClient

AccessApprovalService client wrapper implementation, for convenient use.

Inheritance

Object > AccessApprovalServiceClient > AccessApprovalServiceClientImpl

Namespace

Google.Cloud.AccessApproval.V1

Assembly

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
NameDescription
grpcClientAccessApproval.AccessApprovalClient

The underlying gRPC client.

settingsAccessApprovalServiceSettings

The base AccessApprovalServiceSettings used within this client.

Properties

GrpcClient

public override AccessApproval.AccessApprovalClient GrpcClient { get; }

The underlying gRPC AccessApprovalService client

Property Value
TypeDescription
AccessApproval.AccessApprovalClient
Overrides

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
NameDescription
requestApproveApprovalRequestMessage

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
ApprovalRequest

The RPC response.

Overrides

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
NameDescription
requestApproveApprovalRequestMessage

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<ApprovalRequest>

A Task containing the RPC response.

Overrides

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
NameDescription
requestDeleteAccessApprovalSettingsMessage

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Overrides

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
NameDescription
requestDeleteAccessApprovalSettingsMessage

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Overrides

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
NameDescription
requestDismissApprovalRequestMessage

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
ApprovalRequest

The RPC response.

Overrides

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
NameDescription
requestDismissApprovalRequestMessage

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<ApprovalRequest>

A Task containing the RPC response.

Overrides

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
NameDescription
requestGetAccessApprovalServiceAccountMessage

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
AccessApprovalServiceAccount

The RPC response.

Overrides

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
NameDescription
requestGetAccessApprovalServiceAccountMessage

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<AccessApprovalServiceAccount>

A Task containing the RPC response.

Overrides

GetAccessApprovalSettings(GetAccessApprovalSettingsMessage, CallSettings)

public override AccessApprovalSettings GetAccessApprovalSettings(GetAccessApprovalSettingsMessage request, CallSettings callSettings = null)

Gets the settings associated with a project, folder, or organization.

Parameters
NameDescription
requestGetAccessApprovalSettingsMessage

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
AccessApprovalSettings

The RPC response.

Overrides

GetAccessApprovalSettingsAsync(GetAccessApprovalSettingsMessage, CallSettings)

public override Task<AccessApprovalSettings> GetAccessApprovalSettingsAsync(GetAccessApprovalSettingsMessage request, CallSettings callSettings = null)

Gets the settings associated with a project, folder, or organization.

Parameters
NameDescription
requestGetAccessApprovalSettingsMessage

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<AccessApprovalSettings>

A Task containing the RPC response.

Overrides

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
NameDescription
requestGetApprovalRequestMessage

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
ApprovalRequest

The RPC response.

Overrides

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
NameDescription
requestGetApprovalRequestMessage

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<ApprovalRequest>

A Task containing the RPC response.

Overrides

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
NameDescription
requestInvalidateApprovalRequestMessage

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
ApprovalRequest

The RPC response.

Overrides

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
NameDescription
requestInvalidateApprovalRequestMessage

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<ApprovalRequest>

A Task containing the RPC response.

Overrides

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
NameDescription
requestListApprovalRequestsMessage

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListApprovalRequestsResponse, ApprovalRequest>

A pageable sequence of ApprovalRequest resources.

Overrides

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
NameDescription
requestListApprovalRequestsMessage

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListApprovalRequestsResponse, ApprovalRequest>

A pageable asynchronous sequence of ApprovalRequest resources.

Overrides

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
NameDescription
requestUpdateAccessApprovalSettingsMessage

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
AccessApprovalSettings

The RPC response.

Overrides

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
NameDescription
requestUpdateAccessApprovalSettingsMessage

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<AccessApprovalSettings>

A Task containing the RPC response.

Overrides