Google Cloud Asset Inventory v1 API - Class AssetService.AssetServiceBase (3.8.0)

[BindServiceMethod(typeof(AssetService), "BindService")]
public abstract class AssetService.AssetServiceBase

Reference documentation and code samples for the Google Cloud Asset Inventory v1 API class AssetService.AssetServiceBase.

Base class for server-side implementations of AssetService

Inheritance

object > AssetService.AssetServiceBase

Namespace

Google.Cloud.Asset.V1

Assembly

Google.Cloud.Asset.V1.dll

Methods

AnalyzeIamPolicy(AnalyzeIamPolicyRequest, ServerCallContext)

public virtual Task<AnalyzeIamPolicyResponse> AnalyzeIamPolicy(AnalyzeIamPolicyRequest request, ServerCallContext context)

Analyzes IAM policies to answer which identities have what accesses on which resources.

Parameters
NameDescription
requestAnalyzeIamPolicyRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskAnalyzeIamPolicyResponse

The response to send back to the client (wrapped by a task).

AnalyzeIamPolicyLongrunning(AnalyzeIamPolicyLongrunningRequest, ServerCallContext)

public virtual Task<Operation> AnalyzeIamPolicyLongrunning(AnalyzeIamPolicyLongrunningRequest request, ServerCallContext context)

Analyzes IAM policies asynchronously to answer which identities have what accesses on which resources, and writes the analysis results to a Google Cloud Storage or a BigQuery destination. For Cloud Storage destination, the output format is the JSON format that represents a [AnalyzeIamPolicyResponse][google.cloud.asset.v1.AnalyzeIamPolicyResponse]. This method implements the [google.longrunning.Operation][google.longrunning.Operation], which allows you to track the operation status. We recommend intervals of at least 2 seconds with exponential backoff retry to poll the operation result. The metadata contains the metadata for the long-running operation.

Parameters
NameDescription
requestAnalyzeIamPolicyLongrunningRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskOperation

The response to send back to the client (wrapped by a task).

AnalyzeMove(AnalyzeMoveRequest, ServerCallContext)

public virtual Task<AnalyzeMoveResponse> AnalyzeMove(AnalyzeMoveRequest request, ServerCallContext context)

Analyze moving a resource to a specified destination without kicking off the actual move. The analysis is best effort depending on the user's permissions of viewing different hierarchical policies and configurations. The policies and configuration are subject to change before the actual resource migration takes place.

Parameters
NameDescription
requestAnalyzeMoveRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskAnalyzeMoveResponse

The response to send back to the client (wrapped by a task).

AnalyzeOrgPolicies(AnalyzeOrgPoliciesRequest, ServerCallContext)

public virtual Task<AnalyzeOrgPoliciesResponse> AnalyzeOrgPolicies(AnalyzeOrgPoliciesRequest request, ServerCallContext context)

Analyzes organization policies under a scope.

Parameters
NameDescription
requestAnalyzeOrgPoliciesRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskAnalyzeOrgPoliciesResponse

The response to send back to the client (wrapped by a task).

AnalyzeOrgPolicyGovernedAssets(AnalyzeOrgPolicyGovernedAssetsRequest, ServerCallContext)

public virtual Task<AnalyzeOrgPolicyGovernedAssetsResponse> AnalyzeOrgPolicyGovernedAssets(AnalyzeOrgPolicyGovernedAssetsRequest request, ServerCallContext context)

Analyzes organization policies governed assets (Google Cloud resources or policies) under a scope. This RPC supports custom constraints and the following 10 canned constraints:

  • storage.uniformBucketLevelAccess
  • iam.disableServiceAccountKeyCreation
  • iam.allowedPolicyMemberDomains
  • compute.vmExternalIpAccess
  • appengine.enforceServiceAccountActAsCheck
  • gcp.resourceLocations
  • compute.trustedImageProjects
  • compute.skipDefaultNetworkCreation
  • compute.requireOsLogin
  • compute.disableNestedVirtualization

This RPC only returns either resources of types supported by search APIs or IAM policies.

Parameters
NameDescription
requestAnalyzeOrgPolicyGovernedAssetsRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskAnalyzeOrgPolicyGovernedAssetsResponse

The response to send back to the client (wrapped by a task).

AnalyzeOrgPolicyGovernedContainers(AnalyzeOrgPolicyGovernedContainersRequest, ServerCallContext)

public virtual Task<AnalyzeOrgPolicyGovernedContainersResponse> AnalyzeOrgPolicyGovernedContainers(AnalyzeOrgPolicyGovernedContainersRequest request, ServerCallContext context)

Analyzes organization policies governed containers (projects, folders or organization) under a scope.

Parameters
NameDescription
requestAnalyzeOrgPolicyGovernedContainersRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskAnalyzeOrgPolicyGovernedContainersResponse

The response to send back to the client (wrapped by a task).

BatchGetAssetsHistory(BatchGetAssetsHistoryRequest, ServerCallContext)

public virtual Task<BatchGetAssetsHistoryResponse> BatchGetAssetsHistory(BatchGetAssetsHistoryRequest request, ServerCallContext context)

Batch gets the update history of assets that overlap a time window. For IAM_POLICY content, this API outputs history when the asset and its attached IAM POLICY both exist. This can create gaps in the output history. Otherwise, this API outputs history with asset in both non-delete or deleted status. If a specified asset does not exist, this API returns an INVALID_ARGUMENT error.

Parameters
NameDescription
requestBatchGetAssetsHistoryRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskBatchGetAssetsHistoryResponse

The response to send back to the client (wrapped by a task).

BatchGetEffectiveIamPolicies(BatchGetEffectiveIamPoliciesRequest, ServerCallContext)

public virtual Task<BatchGetEffectiveIamPoliciesResponse> BatchGetEffectiveIamPolicies(BatchGetEffectiveIamPoliciesRequest request, ServerCallContext context)

Gets effective IAM policies for a batch of resources.

Parameters
NameDescription
requestBatchGetEffectiveIamPoliciesRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskBatchGetEffectiveIamPoliciesResponse

The response to send back to the client (wrapped by a task).

CreateFeed(CreateFeedRequest, ServerCallContext)

public virtual Task<Feed> CreateFeed(CreateFeedRequest request, ServerCallContext context)

Creates a feed in a parent project/folder/organization to listen to its asset updates.

Parameters
NameDescription
requestCreateFeedRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskFeed

The response to send back to the client (wrapped by a task).

CreateSavedQuery(CreateSavedQueryRequest, ServerCallContext)

public virtual Task<SavedQuery> CreateSavedQuery(CreateSavedQueryRequest request, ServerCallContext context)

Creates a saved query in a parent project/folder/organization.

Parameters
NameDescription
requestCreateSavedQueryRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskSavedQuery

The response to send back to the client (wrapped by a task).

DeleteFeed(DeleteFeedRequest, ServerCallContext)

public virtual Task<Empty> DeleteFeed(DeleteFeedRequest request, ServerCallContext context)

Deletes an asset feed.

Parameters
NameDescription
requestDeleteFeedRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskEmpty

The response to send back to the client (wrapped by a task).

DeleteSavedQuery(DeleteSavedQueryRequest, ServerCallContext)

public virtual Task<Empty> DeleteSavedQuery(DeleteSavedQueryRequest request, ServerCallContext context)

Deletes a saved query.

Parameters
NameDescription
requestDeleteSavedQueryRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskEmpty

The response to send back to the client (wrapped by a task).

ExportAssets(ExportAssetsRequest, ServerCallContext)

public virtual Task<Operation> ExportAssets(ExportAssetsRequest request, ServerCallContext context)

Exports assets with time and resource types to a given Cloud Storage location/BigQuery table. For Cloud Storage location destinations, the output format is newline-delimited JSON. Each line represents a [google.cloud.asset.v1.Asset][google.cloud.asset.v1.Asset] in the JSON format; for BigQuery table destinations, the output table stores the fields in asset Protobuf as columns. This API implements the [google.longrunning.Operation][google.longrunning.Operation] API, which allows you to keep track of the export. We recommend intervals of at least 2 seconds with exponential retry to poll the export operation result. For regular-size resource parent, the export operation usually finishes within 5 minutes.

Parameters
NameDescription
requestExportAssetsRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskOperation

The response to send back to the client (wrapped by a task).

GetFeed(GetFeedRequest, ServerCallContext)

public virtual Task<Feed> GetFeed(GetFeedRequest request, ServerCallContext context)

Gets details about an asset feed.

Parameters
NameDescription
requestGetFeedRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskFeed

The response to send back to the client (wrapped by a task).

GetSavedQuery(GetSavedQueryRequest, ServerCallContext)

public virtual Task<SavedQuery> GetSavedQuery(GetSavedQueryRequest request, ServerCallContext context)

Gets details about a saved query.

Parameters
NameDescription
requestGetSavedQueryRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskSavedQuery

The response to send back to the client (wrapped by a task).

ListAssets(ListAssetsRequest, ServerCallContext)

public virtual Task<ListAssetsResponse> ListAssets(ListAssetsRequest request, ServerCallContext context)

Lists assets with time and resource types and returns paged results in response.

Parameters
NameDescription
requestListAssetsRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskListAssetsResponse

The response to send back to the client (wrapped by a task).

ListFeeds(ListFeedsRequest, ServerCallContext)

public virtual Task<ListFeedsResponse> ListFeeds(ListFeedsRequest request, ServerCallContext context)

Lists all asset feeds in a parent project/folder/organization.

Parameters
NameDescription
requestListFeedsRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskListFeedsResponse

The response to send back to the client (wrapped by a task).

ListSavedQueries(ListSavedQueriesRequest, ServerCallContext)

public virtual Task<ListSavedQueriesResponse> ListSavedQueries(ListSavedQueriesRequest request, ServerCallContext context)

Lists all saved queries in a parent project/folder/organization.

Parameters
NameDescription
requestListSavedQueriesRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskListSavedQueriesResponse

The response to send back to the client (wrapped by a task).

QueryAssets(QueryAssetsRequest, ServerCallContext)

public virtual Task<QueryAssetsResponse> QueryAssets(QueryAssetsRequest request, ServerCallContext context)

Issue a job that queries assets using a SQL statement compatible with BigQuery SQL.

If the query execution finishes within timeout and there's no pagination, the full query results will be returned in the QueryAssetsResponse.

Otherwise, full query results can be obtained by issuing extra requests with the job_reference from the a previous QueryAssets call.

Note, the query result has approximately 10 GB limitation enforced by BigQuery. Queries return larger results will result in errors.

Parameters
NameDescription
requestQueryAssetsRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskQueryAssetsResponse

The response to send back to the client (wrapped by a task).

SearchAllIamPolicies(SearchAllIamPoliciesRequest, ServerCallContext)

public virtual Task<SearchAllIamPoliciesResponse> SearchAllIamPolicies(SearchAllIamPoliciesRequest request, ServerCallContext context)

Searches all IAM policies within the specified scope, such as a project, folder, or organization. The caller must be granted the cloudasset.assets.searchAllIamPolicies permission on the desired scope, otherwise the request will be rejected.

Parameters
NameDescription
requestSearchAllIamPoliciesRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskSearchAllIamPoliciesResponse

The response to send back to the client (wrapped by a task).

SearchAllResources(SearchAllResourcesRequest, ServerCallContext)

public virtual Task<SearchAllResourcesResponse> SearchAllResources(SearchAllResourcesRequest request, ServerCallContext context)

Searches all Google Cloud resources within the specified scope, such as a project, folder, or organization. The caller must be granted the cloudasset.assets.searchAllResources permission on the desired scope, otherwise the request will be rejected.

Parameters
NameDescription
requestSearchAllResourcesRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskSearchAllResourcesResponse

The response to send back to the client (wrapped by a task).

UpdateFeed(UpdateFeedRequest, ServerCallContext)

public virtual Task<Feed> UpdateFeed(UpdateFeedRequest request, ServerCallContext context)

Updates an asset feed configuration.

Parameters
NameDescription
requestUpdateFeedRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskFeed

The response to send back to the client (wrapped by a task).

UpdateSavedQuery(UpdateSavedQueryRequest, ServerCallContext)

public virtual Task<SavedQuery> UpdateSavedQuery(UpdateSavedQueryRequest request, ServerCallContext context)

Updates a saved query.

Parameters
NameDescription
requestUpdateSavedQueryRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskSavedQuery

The response to send back to the client (wrapped by a task).