Class AccessApprovalServiceClient (2.1.0)

public abstract class AccessApprovalServiceClient

AccessApprovalService client wrapper, for convenient use.

Inheritance

Object > AccessApprovalServiceClient

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.

Properties

DefaultEndpoint

public static string DefaultEndpoint { get; }

The default endpoint for the AccessApprovalService service, which is a host of "accessapproval.googleapis.com" and a port of 443.

Property Value
TypeDescription
String

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default AccessApprovalService scopes.

Property Value
TypeDescription
IReadOnlyList<String>
Remarks

The default AccessApprovalService scopes are:

GrpcClient

public virtual AccessApproval.AccessApprovalClient GrpcClient { get; }

The underlying gRPC AccessApprovalService client

Property Value
TypeDescription
AccessApproval.AccessApprovalClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
TypeDescription
ServiceMetadata

Methods

ApproveApprovalRequest(ApproveApprovalRequestMessage, CallSettings)

public virtual 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.

Example
// Create client
AccessApprovalServiceClient accessApprovalServiceClient = AccessApprovalServiceClient.Create();
// Initialize request argument(s)
ApproveApprovalRequestMessage request = new ApproveApprovalRequestMessage
{
    ApprovalRequestName = ApprovalRequestName.FromProjectApprovalRequest("[PROJECT]", "[APPROVAL_REQUEST]"),
    ExpireTime = new Timestamp(),
};
// Make the request
ApprovalRequest response = accessApprovalServiceClient.ApproveApprovalRequest(request);

ApproveApprovalRequestAsync(ApproveApprovalRequestMessage, CallSettings)

public virtual 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.

Example
// Create client
AccessApprovalServiceClient accessApprovalServiceClient = await AccessApprovalServiceClient.CreateAsync();
// Initialize request argument(s)
ApproveApprovalRequestMessage request = new ApproveApprovalRequestMessage
{
    ApprovalRequestName = ApprovalRequestName.FromProjectApprovalRequest("[PROJECT]", "[APPROVAL_REQUEST]"),
    ExpireTime = new Timestamp(),
};
// Make the request
ApprovalRequest response = await accessApprovalServiceClient.ApproveApprovalRequestAsync(request);

ApproveApprovalRequestAsync(ApproveApprovalRequestMessage, CancellationToken)

public virtual Task<ApprovalRequest> ApproveApprovalRequestAsync(ApproveApprovalRequestMessage request, CancellationToken cancellationToken)

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.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<ApprovalRequest>

A Task containing the RPC response.

Example
// Create client
AccessApprovalServiceClient accessApprovalServiceClient = await AccessApprovalServiceClient.CreateAsync();
// Initialize request argument(s)
ApproveApprovalRequestMessage request = new ApproveApprovalRequestMessage
{
    ApprovalRequestName = ApprovalRequestName.FromProjectApprovalRequest("[PROJECT]", "[APPROVAL_REQUEST]"),
    ExpireTime = new Timestamp(),
};
// Make the request
ApprovalRequest response = await accessApprovalServiceClient.ApproveApprovalRequestAsync(request);

Create()

public static AccessApprovalServiceClient Create()

Synchronously creates a AccessApprovalServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use AccessApprovalServiceClientBuilder.

Returns
TypeDescription
AccessApprovalServiceClient

The created AccessApprovalServiceClient.

CreateAsync(CancellationToken)

public static Task<AccessApprovalServiceClient> CreateAsync(CancellationToken cancellationToken = default(CancellationToken))

Asynchronously creates a AccessApprovalServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use AccessApprovalServiceClientBuilder.

Parameter
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
Task<AccessApprovalServiceClient>

The task representing the created AccessApprovalServiceClient.

DeleteAccessApprovalSettings(AccessApprovalSettingsName, CallSettings)

public virtual void DeleteAccessApprovalSettings(AccessApprovalSettingsName name, 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
nameAccessApprovalSettingsName

Name of the AccessApprovalSettings to delete.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
AccessApprovalServiceClient accessApprovalServiceClient = AccessApprovalServiceClient.Create();
// Initialize request argument(s)
AccessApprovalSettingsName name = AccessApprovalSettingsName.FromProject("[PROJECT]");
// Make the request
accessApprovalServiceClient.DeleteAccessApprovalSettings(name);

DeleteAccessApprovalSettings(DeleteAccessApprovalSettingsMessage, CallSettings)

public virtual 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.

Example
// Create client
AccessApprovalServiceClient accessApprovalServiceClient = AccessApprovalServiceClient.Create();
// Initialize request argument(s)
DeleteAccessApprovalSettingsMessage request = new DeleteAccessApprovalSettingsMessage
{
    AccessApprovalSettingsName = AccessApprovalSettingsName.FromProject("[PROJECT]"),
};
// Make the request
accessApprovalServiceClient.DeleteAccessApprovalSettings(request);

DeleteAccessApprovalSettings(String, CallSettings)

public virtual void DeleteAccessApprovalSettings(string name, 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
nameString

Name of the AccessApprovalSettings to delete.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
AccessApprovalServiceClient accessApprovalServiceClient = AccessApprovalServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/accessApprovalSettings";
// Make the request
accessApprovalServiceClient.DeleteAccessApprovalSettings(name);

DeleteAccessApprovalSettingsAsync(AccessApprovalSettingsName, CallSettings)

public virtual Task DeleteAccessApprovalSettingsAsync(AccessApprovalSettingsName name, 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
nameAccessApprovalSettingsName

Name of the AccessApprovalSettings to delete.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
AccessApprovalServiceClient accessApprovalServiceClient = await AccessApprovalServiceClient.CreateAsync();
// Initialize request argument(s)
AccessApprovalSettingsName name = AccessApprovalSettingsName.FromProject("[PROJECT]");
// Make the request
await accessApprovalServiceClient.DeleteAccessApprovalSettingsAsync(name);

DeleteAccessApprovalSettingsAsync(AccessApprovalSettingsName, CancellationToken)

public virtual Task DeleteAccessApprovalSettingsAsync(AccessApprovalSettingsName name, CancellationToken cancellationToken)

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
nameAccessApprovalSettingsName

Name of the AccessApprovalSettings to delete.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
AccessApprovalServiceClient accessApprovalServiceClient = await AccessApprovalServiceClient.CreateAsync();
// Initialize request argument(s)
AccessApprovalSettingsName name = AccessApprovalSettingsName.FromProject("[PROJECT]");
// Make the request
await accessApprovalServiceClient.DeleteAccessApprovalSettingsAsync(name);

DeleteAccessApprovalSettingsAsync(DeleteAccessApprovalSettingsMessage, CallSettings)

public virtual 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.

Example
// Create client
AccessApprovalServiceClient accessApprovalServiceClient = await AccessApprovalServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteAccessApprovalSettingsMessage request = new DeleteAccessApprovalSettingsMessage
{
    AccessApprovalSettingsName = AccessApprovalSettingsName.FromProject("[PROJECT]"),
};
// Make the request
await accessApprovalServiceClient.DeleteAccessApprovalSettingsAsync(request);

DeleteAccessApprovalSettingsAsync(DeleteAccessApprovalSettingsMessage, CancellationToken)

public virtual Task DeleteAccessApprovalSettingsAsync(DeleteAccessApprovalSettingsMessage request, CancellationToken cancellationToken)

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.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
AccessApprovalServiceClient accessApprovalServiceClient = await AccessApprovalServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteAccessApprovalSettingsMessage request = new DeleteAccessApprovalSettingsMessage
{
    AccessApprovalSettingsName = AccessApprovalSettingsName.FromProject("[PROJECT]"),
};
// Make the request
await accessApprovalServiceClient.DeleteAccessApprovalSettingsAsync(request);

DeleteAccessApprovalSettingsAsync(String, CallSettings)

public virtual Task DeleteAccessApprovalSettingsAsync(string name, 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
nameString

Name of the AccessApprovalSettings to delete.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
AccessApprovalServiceClient accessApprovalServiceClient = await AccessApprovalServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/accessApprovalSettings";
// Make the request
await accessApprovalServiceClient.DeleteAccessApprovalSettingsAsync(name);

DeleteAccessApprovalSettingsAsync(String, CancellationToken)

public virtual Task DeleteAccessApprovalSettingsAsync(string name, CancellationToken cancellationToken)

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
nameString

Name of the AccessApprovalSettings to delete.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
AccessApprovalServiceClient accessApprovalServiceClient = await AccessApprovalServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/accessApprovalSettings";
// Make the request
await accessApprovalServiceClient.DeleteAccessApprovalSettingsAsync(name);

DismissApprovalRequest(DismissApprovalRequestMessage, CallSettings)

public virtual 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.

Example
// Create client
AccessApprovalServiceClient accessApprovalServiceClient = AccessApprovalServiceClient.Create();
// Initialize request argument(s)
DismissApprovalRequestMessage request = new DismissApprovalRequestMessage
{
    ApprovalRequestName = ApprovalRequestName.FromProjectApprovalRequest("[PROJECT]", "[APPROVAL_REQUEST]"),
};
// Make the request
ApprovalRequest response = accessApprovalServiceClient.DismissApprovalRequest(request);

DismissApprovalRequestAsync(DismissApprovalRequestMessage, CallSettings)

public virtual 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.

Example
// Create client
AccessApprovalServiceClient accessApprovalServiceClient = await AccessApprovalServiceClient.CreateAsync();
// Initialize request argument(s)
DismissApprovalRequestMessage request = new DismissApprovalRequestMessage
{
    ApprovalRequestName = ApprovalRequestName.FromProjectApprovalRequest("[PROJECT]", "[APPROVAL_REQUEST]"),
};
// Make the request
ApprovalRequest response = await accessApprovalServiceClient.DismissApprovalRequestAsync(request);

DismissApprovalRequestAsync(DismissApprovalRequestMessage, CancellationToken)

public virtual Task<ApprovalRequest> DismissApprovalRequestAsync(DismissApprovalRequestMessage request, CancellationToken cancellationToken)

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.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<ApprovalRequest>

A Task containing the RPC response.

Example
// Create client
AccessApprovalServiceClient accessApprovalServiceClient = await AccessApprovalServiceClient.CreateAsync();
// Initialize request argument(s)
DismissApprovalRequestMessage request = new DismissApprovalRequestMessage
{
    ApprovalRequestName = ApprovalRequestName.FromProjectApprovalRequest("[PROJECT]", "[APPROVAL_REQUEST]"),
};
// Make the request
ApprovalRequest response = await accessApprovalServiceClient.DismissApprovalRequestAsync(request);

GetAccessApprovalServiceAccount(GetAccessApprovalServiceAccountMessage, CallSettings)

public virtual 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.

Example
// Create client
AccessApprovalServiceClient accessApprovalServiceClient = AccessApprovalServiceClient.Create();
// Initialize request argument(s)
GetAccessApprovalServiceAccountMessage request = new GetAccessApprovalServiceAccountMessage { Name = "", };
// Make the request
AccessApprovalServiceAccount response = accessApprovalServiceClient.GetAccessApprovalServiceAccount(request);

GetAccessApprovalServiceAccount(String, CallSettings)

public virtual AccessApprovalServiceAccount GetAccessApprovalServiceAccount(string name, CallSettings callSettings = null)

Retrieves the service account that is used by Access Approval to access KMS keys for signing approved approval requests.

Parameters
NameDescription
nameString

Name of the AccessApprovalServiceAccount to retrieve.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
AccessApprovalServiceAccount

The RPC response.

Example
// Create client
AccessApprovalServiceClient accessApprovalServiceClient = AccessApprovalServiceClient.Create();
// Initialize request argument(s)
string name = "";
// Make the request
AccessApprovalServiceAccount response = accessApprovalServiceClient.GetAccessApprovalServiceAccount(name);

GetAccessApprovalServiceAccountAsync(GetAccessApprovalServiceAccountMessage, CallSettings)

public virtual 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.

Example
// Create client
AccessApprovalServiceClient accessApprovalServiceClient = await AccessApprovalServiceClient.CreateAsync();
// Initialize request argument(s)
GetAccessApprovalServiceAccountMessage request = new GetAccessApprovalServiceAccountMessage { Name = "", };
// Make the request
AccessApprovalServiceAccount response = await accessApprovalServiceClient.GetAccessApprovalServiceAccountAsync(request);

GetAccessApprovalServiceAccountAsync(GetAccessApprovalServiceAccountMessage, CancellationToken)

public virtual Task<AccessApprovalServiceAccount> GetAccessApprovalServiceAccountAsync(GetAccessApprovalServiceAccountMessage request, CancellationToken cancellationToken)

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.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<AccessApprovalServiceAccount>

A Task containing the RPC response.

Example
// Create client
AccessApprovalServiceClient accessApprovalServiceClient = await AccessApprovalServiceClient.CreateAsync();
// Initialize request argument(s)
GetAccessApprovalServiceAccountMessage request = new GetAccessApprovalServiceAccountMessage { Name = "", };
// Make the request
AccessApprovalServiceAccount response = await accessApprovalServiceClient.GetAccessApprovalServiceAccountAsync(request);

GetAccessApprovalServiceAccountAsync(String, CallSettings)

public virtual Task<AccessApprovalServiceAccount> GetAccessApprovalServiceAccountAsync(string name, CallSettings callSettings = null)

Retrieves the service account that is used by Access Approval to access KMS keys for signing approved approval requests.

Parameters
NameDescription
nameString

Name of the AccessApprovalServiceAccount to retrieve.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<AccessApprovalServiceAccount>

A Task containing the RPC response.

Example
// Create client
AccessApprovalServiceClient accessApprovalServiceClient = await AccessApprovalServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "";
// Make the request
AccessApprovalServiceAccount response = await accessApprovalServiceClient.GetAccessApprovalServiceAccountAsync(name);

GetAccessApprovalServiceAccountAsync(String, CancellationToken)

public virtual Task<AccessApprovalServiceAccount> GetAccessApprovalServiceAccountAsync(string name, CancellationToken cancellationToken)

Retrieves the service account that is used by Access Approval to access KMS keys for signing approved approval requests.

Parameters
NameDescription
nameString

Name of the AccessApprovalServiceAccount to retrieve.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<AccessApprovalServiceAccount>

A Task containing the RPC response.

Example
// Create client
AccessApprovalServiceClient accessApprovalServiceClient = await AccessApprovalServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "";
// Make the request
AccessApprovalServiceAccount response = await accessApprovalServiceClient.GetAccessApprovalServiceAccountAsync(name);

GetAccessApprovalSettings(AccessApprovalSettingsName, CallSettings)

public virtual AccessApprovalSettings GetAccessApprovalSettings(AccessApprovalSettingsName name, CallSettings callSettings = null)

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

Parameters
NameDescription
nameAccessApprovalSettingsName

The name of the AccessApprovalSettings to retrieve. Format: "{projects|folders|organizations}/{id}/accessApprovalSettings"

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
AccessApprovalSettings

The RPC response.

Example
// Create client
AccessApprovalServiceClient accessApprovalServiceClient = AccessApprovalServiceClient.Create();
// Initialize request argument(s)
AccessApprovalSettingsName name = AccessApprovalSettingsName.FromProject("[PROJECT]");
// Make the request
AccessApprovalSettings response = accessApprovalServiceClient.GetAccessApprovalSettings(name);

GetAccessApprovalSettings(GetAccessApprovalSettingsMessage, CallSettings)

public virtual 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.

Example
// Create client
AccessApprovalServiceClient accessApprovalServiceClient = AccessApprovalServiceClient.Create();
// Initialize request argument(s)
GetAccessApprovalSettingsMessage request = new GetAccessApprovalSettingsMessage
{
    AccessApprovalSettingsName = AccessApprovalSettingsName.FromProject("[PROJECT]"),
};
// Make the request
AccessApprovalSettings response = accessApprovalServiceClient.GetAccessApprovalSettings(request);

GetAccessApprovalSettings(String, CallSettings)

public virtual AccessApprovalSettings GetAccessApprovalSettings(string name, CallSettings callSettings = null)

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

Parameters
NameDescription
nameString

The name of the AccessApprovalSettings to retrieve. Format: "{projects|folders|organizations}/{id}/accessApprovalSettings"

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
AccessApprovalSettings

The RPC response.

Example
// Create client
AccessApprovalServiceClient accessApprovalServiceClient = AccessApprovalServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/accessApprovalSettings";
// Make the request
AccessApprovalSettings response = accessApprovalServiceClient.GetAccessApprovalSettings(name);

GetAccessApprovalSettingsAsync(AccessApprovalSettingsName, CallSettings)

public virtual Task<AccessApprovalSettings> GetAccessApprovalSettingsAsync(AccessApprovalSettingsName name, CallSettings callSettings = null)

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

Parameters
NameDescription
nameAccessApprovalSettingsName

The name of the AccessApprovalSettings to retrieve. Format: "{projects|folders|organizations}/{id}/accessApprovalSettings"

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<AccessApprovalSettings>

A Task containing the RPC response.

Example
// Create client
AccessApprovalServiceClient accessApprovalServiceClient = await AccessApprovalServiceClient.CreateAsync();
// Initialize request argument(s)
AccessApprovalSettingsName name = AccessApprovalSettingsName.FromProject("[PROJECT]");
// Make the request
AccessApprovalSettings response = await accessApprovalServiceClient.GetAccessApprovalSettingsAsync(name);

GetAccessApprovalSettingsAsync(AccessApprovalSettingsName, CancellationToken)

public virtual Task<AccessApprovalSettings> GetAccessApprovalSettingsAsync(AccessApprovalSettingsName name, CancellationToken cancellationToken)

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

Parameters
NameDescription
nameAccessApprovalSettingsName

The name of the AccessApprovalSettings to retrieve. Format: "{projects|folders|organizations}/{id}/accessApprovalSettings"

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<AccessApprovalSettings>

A Task containing the RPC response.

Example
// Create client
AccessApprovalServiceClient accessApprovalServiceClient = await AccessApprovalServiceClient.CreateAsync();
// Initialize request argument(s)
AccessApprovalSettingsName name = AccessApprovalSettingsName.FromProject("[PROJECT]");
// Make the request
AccessApprovalSettings response = await accessApprovalServiceClient.GetAccessApprovalSettingsAsync(name);

GetAccessApprovalSettingsAsync(GetAccessApprovalSettingsMessage, CallSettings)

public virtual 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.

Example
// Create client
AccessApprovalServiceClient accessApprovalServiceClient = await AccessApprovalServiceClient.CreateAsync();
// Initialize request argument(s)
GetAccessApprovalSettingsMessage request = new GetAccessApprovalSettingsMessage
{
    AccessApprovalSettingsName = AccessApprovalSettingsName.FromProject("[PROJECT]"),
};
// Make the request
AccessApprovalSettings response = await accessApprovalServiceClient.GetAccessApprovalSettingsAsync(request);

GetAccessApprovalSettingsAsync(GetAccessApprovalSettingsMessage, CancellationToken)

public virtual Task<AccessApprovalSettings> GetAccessApprovalSettingsAsync(GetAccessApprovalSettingsMessage request, CancellationToken cancellationToken)

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.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<AccessApprovalSettings>

A Task containing the RPC response.

Example
// Create client
AccessApprovalServiceClient accessApprovalServiceClient = await AccessApprovalServiceClient.CreateAsync();
// Initialize request argument(s)
GetAccessApprovalSettingsMessage request = new GetAccessApprovalSettingsMessage
{
    AccessApprovalSettingsName = AccessApprovalSettingsName.FromProject("[PROJECT]"),
};
// Make the request
AccessApprovalSettings response = await accessApprovalServiceClient.GetAccessApprovalSettingsAsync(request);

GetAccessApprovalSettingsAsync(String, CallSettings)

public virtual Task<AccessApprovalSettings> GetAccessApprovalSettingsAsync(string name, CallSettings callSettings = null)

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

Parameters
NameDescription
nameString

The name of the AccessApprovalSettings to retrieve. Format: "{projects|folders|organizations}/{id}/accessApprovalSettings"

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<AccessApprovalSettings>

A Task containing the RPC response.

Example
// Create client
AccessApprovalServiceClient accessApprovalServiceClient = await AccessApprovalServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/accessApprovalSettings";
// Make the request
AccessApprovalSettings response = await accessApprovalServiceClient.GetAccessApprovalSettingsAsync(name);

GetAccessApprovalSettingsAsync(String, CancellationToken)

public virtual Task<AccessApprovalSettings> GetAccessApprovalSettingsAsync(string name, CancellationToken cancellationToken)

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

Parameters
NameDescription
nameString

The name of the AccessApprovalSettings to retrieve. Format: "{projects|folders|organizations}/{id}/accessApprovalSettings"

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<AccessApprovalSettings>

A Task containing the RPC response.

Example
// Create client
AccessApprovalServiceClient accessApprovalServiceClient = await AccessApprovalServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/accessApprovalSettings";
// Make the request
AccessApprovalSettings response = await accessApprovalServiceClient.GetAccessApprovalSettingsAsync(name);

GetApprovalRequest(ApprovalRequestName, CallSettings)

public virtual ApprovalRequest GetApprovalRequest(ApprovalRequestName name, CallSettings callSettings = null)

Gets an approval request. Returns NOT_FOUND if the request does not exist.

Parameters
NameDescription
nameApprovalRequestName

The name of the approval request to retrieve. Format: "{projects|folders|organizations}/{id}/approvalRequests/{approval_request}"

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
ApprovalRequest

The RPC response.

Example
// Create client
AccessApprovalServiceClient accessApprovalServiceClient = AccessApprovalServiceClient.Create();
// Initialize request argument(s)
ApprovalRequestName name = ApprovalRequestName.FromProjectApprovalRequest("[PROJECT]", "[APPROVAL_REQUEST]");
// Make the request
ApprovalRequest response = accessApprovalServiceClient.GetApprovalRequest(name);

GetApprovalRequest(GetApprovalRequestMessage, CallSettings)

public virtual 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.

Example
// Create client
AccessApprovalServiceClient accessApprovalServiceClient = AccessApprovalServiceClient.Create();
// Initialize request argument(s)
GetApprovalRequestMessage request = new GetApprovalRequestMessage
{
    ApprovalRequestName = ApprovalRequestName.FromProjectApprovalRequest("[PROJECT]", "[APPROVAL_REQUEST]"),
};
// Make the request
ApprovalRequest response = accessApprovalServiceClient.GetApprovalRequest(request);

GetApprovalRequest(String, CallSettings)

public virtual ApprovalRequest GetApprovalRequest(string name, CallSettings callSettings = null)

Gets an approval request. Returns NOT_FOUND if the request does not exist.

Parameters
NameDescription
nameString

The name of the approval request to retrieve. Format: "{projects|folders|organizations}/{id}/approvalRequests/{approval_request}"

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
ApprovalRequest

The RPC response.

Example
// Create client
AccessApprovalServiceClient accessApprovalServiceClient = AccessApprovalServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/approvalRequests/[APPROVAL_REQUEST]";
// Make the request
ApprovalRequest response = accessApprovalServiceClient.GetApprovalRequest(name);

GetApprovalRequestAsync(ApprovalRequestName, CallSettings)

public virtual Task<ApprovalRequest> GetApprovalRequestAsync(ApprovalRequestName name, CallSettings callSettings = null)

Gets an approval request. Returns NOT_FOUND if the request does not exist.

Parameters
NameDescription
nameApprovalRequestName

The name of the approval request to retrieve. Format: "{projects|folders|organizations}/{id}/approvalRequests/{approval_request}"

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<ApprovalRequest>

A Task containing the RPC response.

Example
// Create client
AccessApprovalServiceClient accessApprovalServiceClient = await AccessApprovalServiceClient.CreateAsync();
// Initialize request argument(s)
ApprovalRequestName name = ApprovalRequestName.FromProjectApprovalRequest("[PROJECT]", "[APPROVAL_REQUEST]");
// Make the request
ApprovalRequest response = await accessApprovalServiceClient.GetApprovalRequestAsync(name);

GetApprovalRequestAsync(ApprovalRequestName, CancellationToken)

public virtual Task<ApprovalRequest> GetApprovalRequestAsync(ApprovalRequestName name, CancellationToken cancellationToken)

Gets an approval request. Returns NOT_FOUND if the request does not exist.

Parameters
NameDescription
nameApprovalRequestName

The name of the approval request to retrieve. Format: "{projects|folders|organizations}/{id}/approvalRequests/{approval_request}"

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<ApprovalRequest>

A Task containing the RPC response.

Example
// Create client
AccessApprovalServiceClient accessApprovalServiceClient = await AccessApprovalServiceClient.CreateAsync();
// Initialize request argument(s)
ApprovalRequestName name = ApprovalRequestName.FromProjectApprovalRequest("[PROJECT]", "[APPROVAL_REQUEST]");
// Make the request
ApprovalRequest response = await accessApprovalServiceClient.GetApprovalRequestAsync(name);

GetApprovalRequestAsync(GetApprovalRequestMessage, CallSettings)

public virtual 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.

Example
// Create client
AccessApprovalServiceClient accessApprovalServiceClient = await AccessApprovalServiceClient.CreateAsync();
// Initialize request argument(s)
GetApprovalRequestMessage request = new GetApprovalRequestMessage
{
    ApprovalRequestName = ApprovalRequestName.FromProjectApprovalRequest("[PROJECT]", "[APPROVAL_REQUEST]"),
};
// Make the request
ApprovalRequest response = await accessApprovalServiceClient.GetApprovalRequestAsync(request);

GetApprovalRequestAsync(GetApprovalRequestMessage, CancellationToken)

public virtual Task<ApprovalRequest> GetApprovalRequestAsync(GetApprovalRequestMessage request, CancellationToken cancellationToken)

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.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<ApprovalRequest>

A Task containing the RPC response.

Example
// Create client
AccessApprovalServiceClient accessApprovalServiceClient = await AccessApprovalServiceClient.CreateAsync();
// Initialize request argument(s)
GetApprovalRequestMessage request = new GetApprovalRequestMessage
{
    ApprovalRequestName = ApprovalRequestName.FromProjectApprovalRequest("[PROJECT]", "[APPROVAL_REQUEST]"),
};
// Make the request
ApprovalRequest response = await accessApprovalServiceClient.GetApprovalRequestAsync(request);

GetApprovalRequestAsync(String, CallSettings)

public virtual Task<ApprovalRequest> GetApprovalRequestAsync(string name, CallSettings callSettings = null)

Gets an approval request. Returns NOT_FOUND if the request does not exist.

Parameters
NameDescription
nameString

The name of the approval request to retrieve. Format: "{projects|folders|organizations}/{id}/approvalRequests/{approval_request}"

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<ApprovalRequest>

A Task containing the RPC response.

Example
// Create client
AccessApprovalServiceClient accessApprovalServiceClient = await AccessApprovalServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/approvalRequests/[APPROVAL_REQUEST]";
// Make the request
ApprovalRequest response = await accessApprovalServiceClient.GetApprovalRequestAsync(name);

GetApprovalRequestAsync(String, CancellationToken)

public virtual Task<ApprovalRequest> GetApprovalRequestAsync(string name, CancellationToken cancellationToken)

Gets an approval request. Returns NOT_FOUND if the request does not exist.

Parameters
NameDescription
nameString

The name of the approval request to retrieve. Format: "{projects|folders|organizations}/{id}/approvalRequests/{approval_request}"

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<ApprovalRequest>

A Task containing the RPC response.

Example
// Create client
AccessApprovalServiceClient accessApprovalServiceClient = await AccessApprovalServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/approvalRequests/[APPROVAL_REQUEST]";
// Make the request
ApprovalRequest response = await accessApprovalServiceClient.GetApprovalRequestAsync(name);

InvalidateApprovalRequest(InvalidateApprovalRequestMessage, CallSettings)

public virtual 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.

Example
// Create client
AccessApprovalServiceClient accessApprovalServiceClient = AccessApprovalServiceClient.Create();
// Initialize request argument(s)
InvalidateApprovalRequestMessage request = new InvalidateApprovalRequestMessage
{
    ApprovalRequestName = ApprovalRequestName.FromProjectApprovalRequest("[PROJECT]", "[APPROVAL_REQUEST]"),
};
// Make the request
ApprovalRequest response = accessApprovalServiceClient.InvalidateApprovalRequest(request);

InvalidateApprovalRequestAsync(InvalidateApprovalRequestMessage, CallSettings)

public virtual 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.

Example
// Create client
AccessApprovalServiceClient accessApprovalServiceClient = await AccessApprovalServiceClient.CreateAsync();
// Initialize request argument(s)
InvalidateApprovalRequestMessage request = new InvalidateApprovalRequestMessage
{
    ApprovalRequestName = ApprovalRequestName.FromProjectApprovalRequest("[PROJECT]", "[APPROVAL_REQUEST]"),
};
// Make the request
ApprovalRequest response = await accessApprovalServiceClient.InvalidateApprovalRequestAsync(request);

InvalidateApprovalRequestAsync(InvalidateApprovalRequestMessage, CancellationToken)

public virtual Task<ApprovalRequest> InvalidateApprovalRequestAsync(InvalidateApprovalRequestMessage request, CancellationToken cancellationToken)

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.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<ApprovalRequest>

A Task containing the RPC response.

Example
// Create client
AccessApprovalServiceClient accessApprovalServiceClient = await AccessApprovalServiceClient.CreateAsync();
// Initialize request argument(s)
InvalidateApprovalRequestMessage request = new InvalidateApprovalRequestMessage
{
    ApprovalRequestName = ApprovalRequestName.FromProjectApprovalRequest("[PROJECT]", "[APPROVAL_REQUEST]"),
};
// Make the request
ApprovalRequest response = await accessApprovalServiceClient.InvalidateApprovalRequestAsync(request);

ListApprovalRequests(FolderName, String, Nullable<Int32>, CallSettings)

public virtual PagedEnumerable<ListApprovalRequestsResponse, ApprovalRequest> ListApprovalRequests(FolderName parent, string pageToken = null, int? pageSize = null, 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
parentFolderName

The parent resource. This may be "projects/{project}", "folders/{folder}", or "organizations/{organization}".

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListApprovalRequestsResponse, ApprovalRequest>

A pageable sequence of ApprovalRequest resources.

Example
// Create client
AccessApprovalServiceClient accessApprovalServiceClient = AccessApprovalServiceClient.Create();
// Initialize request argument(s)
FolderName parent = FolderName.FromFolder("[FOLDER]");
// Make the request
PagedEnumerable<ListApprovalRequestsResponse, ApprovalRequest> response = accessApprovalServiceClient.ListApprovalRequests(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (ApprovalRequest item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListApprovalRequestsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ApprovalRequest item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<ApprovalRequest> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (ApprovalRequest item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListApprovalRequests(OrganizationName, String, Nullable<Int32>, CallSettings)

public virtual PagedEnumerable<ListApprovalRequestsResponse, ApprovalRequest> ListApprovalRequests(OrganizationName parent, string pageToken = null, int? pageSize = null, 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
parentOrganizationName

The parent resource. This may be "projects/{project}", "folders/{folder}", or "organizations/{organization}".

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListApprovalRequestsResponse, ApprovalRequest>

A pageable sequence of ApprovalRequest resources.

Example
// Create client
AccessApprovalServiceClient accessApprovalServiceClient = AccessApprovalServiceClient.Create();
// Initialize request argument(s)
OrganizationName parent = OrganizationName.FromOrganization("[ORGANIZATION]");
// Make the request
PagedEnumerable<ListApprovalRequestsResponse, ApprovalRequest> response = accessApprovalServiceClient.ListApprovalRequests(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (ApprovalRequest item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListApprovalRequestsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ApprovalRequest item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<ApprovalRequest> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (ApprovalRequest item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListApprovalRequests(ProjectName, String, Nullable<Int32>, CallSettings)

public virtual PagedEnumerable<ListApprovalRequestsResponse, ApprovalRequest> ListApprovalRequests(ProjectName parent, string pageToken = null, int? pageSize = null, 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
parentProjectName

The parent resource. This may be "projects/{project}", "folders/{folder}", or "organizations/{organization}".

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListApprovalRequestsResponse, ApprovalRequest>

A pageable sequence of ApprovalRequest resources.

Example
// Create client
AccessApprovalServiceClient accessApprovalServiceClient = AccessApprovalServiceClient.Create();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
// Make the request
PagedEnumerable<ListApprovalRequestsResponse, ApprovalRequest> response = accessApprovalServiceClient.ListApprovalRequests(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (ApprovalRequest item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListApprovalRequestsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ApprovalRequest item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<ApprovalRequest> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (ApprovalRequest item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListApprovalRequests(ListApprovalRequestsMessage, CallSettings)

public virtual 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.

Example
// Create client
AccessApprovalServiceClient accessApprovalServiceClient = AccessApprovalServiceClient.Create();
// Initialize request argument(s)
ListApprovalRequestsMessage request = new ListApprovalRequestsMessage
{
    ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
    Filter = "",
};
// Make the request
PagedEnumerable<ListApprovalRequestsResponse, ApprovalRequest> response = accessApprovalServiceClient.ListApprovalRequests(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (ApprovalRequest item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListApprovalRequestsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ApprovalRequest item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<ApprovalRequest> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (ApprovalRequest item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListApprovalRequests(String, String, Nullable<Int32>, CallSettings)

public virtual PagedEnumerable<ListApprovalRequestsResponse, ApprovalRequest> ListApprovalRequests(string parent, string pageToken = null, int? pageSize = null, 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
parentString

The parent resource. This may be "projects/{project}", "folders/{folder}", or "organizations/{organization}".

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListApprovalRequestsResponse, ApprovalRequest>

A pageable sequence of ApprovalRequest resources.

Example
// Create client
AccessApprovalServiceClient accessApprovalServiceClient = AccessApprovalServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
// Make the request
PagedEnumerable<ListApprovalRequestsResponse, ApprovalRequest> response = accessApprovalServiceClient.ListApprovalRequests(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (ApprovalRequest item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListApprovalRequestsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ApprovalRequest item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<ApprovalRequest> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (ApprovalRequest item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListApprovalRequestsAsync(FolderName, String, Nullable<Int32>, CallSettings)

public virtual PagedAsyncEnumerable<ListApprovalRequestsResponse, ApprovalRequest> ListApprovalRequestsAsync(FolderName parent, string pageToken = null, int? pageSize = null, 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
parentFolderName

The parent resource. This may be "projects/{project}", "folders/{folder}", or "organizations/{organization}".

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListApprovalRequestsResponse, ApprovalRequest>

A pageable asynchronous sequence of ApprovalRequest resources.

Example
// Create client
AccessApprovalServiceClient accessApprovalServiceClient = await AccessApprovalServiceClient.CreateAsync();
// Initialize request argument(s)
FolderName parent = FolderName.FromFolder("[FOLDER]");
// Make the request
PagedAsyncEnumerable<ListApprovalRequestsResponse, ApprovalRequest> response = accessApprovalServiceClient.ListApprovalRequestsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((ApprovalRequest item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListApprovalRequestsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ApprovalRequest item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<ApprovalRequest> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (ApprovalRequest item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListApprovalRequestsAsync(OrganizationName, String, Nullable<Int32>, CallSettings)

public virtual PagedAsyncEnumerable<ListApprovalRequestsResponse, ApprovalRequest> ListApprovalRequestsAsync(OrganizationName parent, string pageToken = null, int? pageSize = null, 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
parentOrganizationName

The parent resource. This may be "projects/{project}", "folders/{folder}", or "organizations/{organization}".

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListApprovalRequestsResponse, ApprovalRequest>

A pageable asynchronous sequence of ApprovalRequest resources.

Example
// Create client
AccessApprovalServiceClient accessApprovalServiceClient = await AccessApprovalServiceClient.CreateAsync();
// Initialize request argument(s)
OrganizationName parent = OrganizationName.FromOrganization("[ORGANIZATION]");
// Make the request
PagedAsyncEnumerable<ListApprovalRequestsResponse, ApprovalRequest> response = accessApprovalServiceClient.ListApprovalRequestsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((ApprovalRequest item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListApprovalRequestsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ApprovalRequest item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<ApprovalRequest> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (ApprovalRequest item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListApprovalRequestsAsync(ProjectName, String, Nullable<Int32>, CallSettings)

public virtual PagedAsyncEnumerable<ListApprovalRequestsResponse, ApprovalRequest> ListApprovalRequestsAsync(ProjectName parent, string pageToken = null, int? pageSize = null, 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
parentProjectName

The parent resource. This may be "projects/{project}", "folders/{folder}", or "organizations/{organization}".

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListApprovalRequestsResponse, ApprovalRequest>

A pageable asynchronous sequence of ApprovalRequest resources.

Example
// Create client
AccessApprovalServiceClient accessApprovalServiceClient = await AccessApprovalServiceClient.CreateAsync();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
// Make the request
PagedAsyncEnumerable<ListApprovalRequestsResponse, ApprovalRequest> response = accessApprovalServiceClient.ListApprovalRequestsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((ApprovalRequest item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListApprovalRequestsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ApprovalRequest item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<ApprovalRequest> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (ApprovalRequest item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListApprovalRequestsAsync(ListApprovalRequestsMessage, CallSettings)

public virtual 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.

Example
// Create client
AccessApprovalServiceClient accessApprovalServiceClient = await AccessApprovalServiceClient.CreateAsync();
// Initialize request argument(s)
ListApprovalRequestsMessage request = new ListApprovalRequestsMessage
{
    ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
    Filter = "",
};
// Make the request
PagedAsyncEnumerable<ListApprovalRequestsResponse, ApprovalRequest> response = accessApprovalServiceClient.ListApprovalRequestsAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((ApprovalRequest item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListApprovalRequestsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ApprovalRequest item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<ApprovalRequest> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (ApprovalRequest item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListApprovalRequestsAsync(String, String, Nullable<Int32>, CallSettings)

public virtual PagedAsyncEnumerable<ListApprovalRequestsResponse, ApprovalRequest> ListApprovalRequestsAsync(string parent, string pageToken = null, int? pageSize = null, 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
parentString

The parent resource. This may be "projects/{project}", "folders/{folder}", or "organizations/{organization}".

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListApprovalRequestsResponse, ApprovalRequest>

A pageable asynchronous sequence of ApprovalRequest resources.

Example
// Create client
AccessApprovalServiceClient accessApprovalServiceClient = await AccessApprovalServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
// Make the request
PagedAsyncEnumerable<ListApprovalRequestsResponse, ApprovalRequest> response = accessApprovalServiceClient.ListApprovalRequestsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((ApprovalRequest item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListApprovalRequestsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ApprovalRequest item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<ApprovalRequest> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (ApprovalRequest item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ShutdownDefaultChannelsAsync()

public static Task ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.

Returns
TypeDescription
Task

A task representing the asynchronous shutdown operation.

Remarks

After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.

UpdateAccessApprovalSettings(AccessApprovalSettings, FieldMask, CallSettings)

public virtual AccessApprovalSettings UpdateAccessApprovalSettings(AccessApprovalSettings settings, FieldMask updateMask, 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
settingsAccessApprovalSettings

The new AccessApprovalSettings.

updateMaskFieldMask

The update mask applies to the settings. Only the top level fields of AccessApprovalSettings (notification_emails &amp; enrolled_services) are supported. For each field, if it is included, the currently stored value will be entirely overwritten with the value of the field passed in this request.

For the FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask If this field is left unset, only the notification_emails field will be updated.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
AccessApprovalSettings

The RPC response.

Example
// Create client
AccessApprovalServiceClient accessApprovalServiceClient = AccessApprovalServiceClient.Create();
// Initialize request argument(s)
AccessApprovalSettings settings = new AccessApprovalSettings();
FieldMask updateMask = new FieldMask();
// Make the request
AccessApprovalSettings response = accessApprovalServiceClient.UpdateAccessApprovalSettings(settings, updateMask);

UpdateAccessApprovalSettings(UpdateAccessApprovalSettingsMessage, CallSettings)

public virtual 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.

Example
// Create client
AccessApprovalServiceClient accessApprovalServiceClient = AccessApprovalServiceClient.Create();
// Initialize request argument(s)
UpdateAccessApprovalSettingsMessage request = new UpdateAccessApprovalSettingsMessage
{
    Settings = new AccessApprovalSettings(),
    UpdateMask = new FieldMask(),
};
// Make the request
AccessApprovalSettings response = accessApprovalServiceClient.UpdateAccessApprovalSettings(request);

UpdateAccessApprovalSettingsAsync(AccessApprovalSettings, FieldMask, CallSettings)

public virtual Task<AccessApprovalSettings> UpdateAccessApprovalSettingsAsync(AccessApprovalSettings settings, FieldMask updateMask, 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
settingsAccessApprovalSettings

The new AccessApprovalSettings.

updateMaskFieldMask

The update mask applies to the settings. Only the top level fields of AccessApprovalSettings (notification_emails &amp; enrolled_services) are supported. For each field, if it is included, the currently stored value will be entirely overwritten with the value of the field passed in this request.

For the FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask If this field is left unset, only the notification_emails field will be updated.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<AccessApprovalSettings>

A Task containing the RPC response.

Example
// Create client
AccessApprovalServiceClient accessApprovalServiceClient = await AccessApprovalServiceClient.CreateAsync();
// Initialize request argument(s)
AccessApprovalSettings settings = new AccessApprovalSettings();
FieldMask updateMask = new FieldMask();
// Make the request
AccessApprovalSettings response = await accessApprovalServiceClient.UpdateAccessApprovalSettingsAsync(settings, updateMask);

UpdateAccessApprovalSettingsAsync(AccessApprovalSettings, FieldMask, CancellationToken)

public virtual Task<AccessApprovalSettings> UpdateAccessApprovalSettingsAsync(AccessApprovalSettings settings, FieldMask updateMask, CancellationToken cancellationToken)

Updates the settings associated with a project, folder, or organization. Settings to update are determined by the value of field_mask.

Parameters
NameDescription
settingsAccessApprovalSettings

The new AccessApprovalSettings.

updateMaskFieldMask

The update mask applies to the settings. Only the top level fields of AccessApprovalSettings (notification_emails &amp; enrolled_services) are supported. For each field, if it is included, the currently stored value will be entirely overwritten with the value of the field passed in this request.

For the FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask If this field is left unset, only the notification_emails field will be updated.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<AccessApprovalSettings>

A Task containing the RPC response.

Example
// Create client
AccessApprovalServiceClient accessApprovalServiceClient = await AccessApprovalServiceClient.CreateAsync();
// Initialize request argument(s)
AccessApprovalSettings settings = new AccessApprovalSettings();
FieldMask updateMask = new FieldMask();
// Make the request
AccessApprovalSettings response = await accessApprovalServiceClient.UpdateAccessApprovalSettingsAsync(settings, updateMask);

UpdateAccessApprovalSettingsAsync(UpdateAccessApprovalSettingsMessage, CallSettings)

public virtual 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.

Example
// Create client
AccessApprovalServiceClient accessApprovalServiceClient = await AccessApprovalServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateAccessApprovalSettingsMessage request = new UpdateAccessApprovalSettingsMessage
{
    Settings = new AccessApprovalSettings(),
    UpdateMask = new FieldMask(),
};
// Make the request
AccessApprovalSettings response = await accessApprovalServiceClient.UpdateAccessApprovalSettingsAsync(request);

UpdateAccessApprovalSettingsAsync(UpdateAccessApprovalSettingsMessage, CancellationToken)

public virtual Task<AccessApprovalSettings> UpdateAccessApprovalSettingsAsync(UpdateAccessApprovalSettingsMessage request, CancellationToken cancellationToken)

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.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<AccessApprovalSettings>

A Task containing the RPC response.

Example
// Create client
AccessApprovalServiceClient accessApprovalServiceClient = await AccessApprovalServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateAccessApprovalSettingsMessage request = new UpdateAccessApprovalSettingsMessage
{
    Settings = new AccessApprovalSettings(),
    UpdateMask = new FieldMask(),
};
// Make the request
AccessApprovalSettings response = await accessApprovalServiceClient.UpdateAccessApprovalSettingsAsync(request);