Class AssetServiceClient (3.0.0)

public abstract class AssetServiceClient

AssetService client wrapper, for convenient use.

Inheritance

Object > AssetServiceClient

Derived Types

Namespace

Google.Cloud.Asset.V1

Assembly

Google.Cloud.Asset.V1.dll

Remarks

Asset service definition.

Properties

AnalyzeIamPolicyLongrunningOperationsClient

public virtual OperationsClient AnalyzeIamPolicyLongrunningOperationsClient { get; }

The long-running operations client for AnalyzeIamPolicyLongrunning.

Property Value
TypeDescription
OperationsClient

DefaultEndpoint

public static string DefaultEndpoint { get; }

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

Property Value
TypeDescription
String

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default AssetService scopes.

Property Value
TypeDescription
IReadOnlyList<String>
Remarks

The default AssetService scopes are:

ExportAssetsOperationsClient

public virtual OperationsClient ExportAssetsOperationsClient { get; }

The long-running operations client for ExportAssets.

Property Value
TypeDescription
OperationsClient

GrpcClient

public virtual AssetService.AssetServiceClient GrpcClient { get; }

The underlying gRPC AssetService client

Property Value
TypeDescription
AssetService.AssetServiceClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
TypeDescription
ServiceMetadata

Methods

AnalyzeIamPolicy(AnalyzeIamPolicyRequest, CallSettings)

public virtual AnalyzeIamPolicyResponse AnalyzeIamPolicy(AnalyzeIamPolicyRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestAnalyzeIamPolicyRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
AnalyzeIamPolicyResponse

The RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = AssetServiceClient.Create();
// Initialize request argument(s)
AnalyzeIamPolicyRequest request = new AnalyzeIamPolicyRequest
{
    AnalysisQuery = new IamPolicyAnalysisQuery(),
    ExecutionTimeout = new Duration(),
    SavedAnalysisQuery = "",
};
// Make the request
AnalyzeIamPolicyResponse response = assetServiceClient.AnalyzeIamPolicy(request);

AnalyzeIamPolicyAsync(AnalyzeIamPolicyRequest, CallSettings)

public virtual Task<AnalyzeIamPolicyResponse> AnalyzeIamPolicyAsync(AnalyzeIamPolicyRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestAnalyzeIamPolicyRequest

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<AnalyzeIamPolicyResponse>

A Task containing the RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
AnalyzeIamPolicyRequest request = new AnalyzeIamPolicyRequest
{
    AnalysisQuery = new IamPolicyAnalysisQuery(),
    ExecutionTimeout = new Duration(),
    SavedAnalysisQuery = "",
};
// Make the request
AnalyzeIamPolicyResponse response = await assetServiceClient.AnalyzeIamPolicyAsync(request);

AnalyzeIamPolicyAsync(AnalyzeIamPolicyRequest, CancellationToken)

public virtual Task<AnalyzeIamPolicyResponse> AnalyzeIamPolicyAsync(AnalyzeIamPolicyRequest request, CancellationToken cancellationToken)

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

Parameters
NameDescription
requestAnalyzeIamPolicyRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<AnalyzeIamPolicyResponse>

A Task containing the RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
AnalyzeIamPolicyRequest request = new AnalyzeIamPolicyRequest
{
    AnalysisQuery = new IamPolicyAnalysisQuery(),
    ExecutionTimeout = new Duration(),
    SavedAnalysisQuery = "",
};
// Make the request
AnalyzeIamPolicyResponse response = await assetServiceClient.AnalyzeIamPolicyAsync(request);

AnalyzeIamPolicyLongrunning(AnalyzeIamPolicyLongrunningRequest, CallSettings)

public virtual Operation<AnalyzeIamPolicyLongrunningResponse, AnalyzeIamPolicyLongrunningMetadata> AnalyzeIamPolicyLongrunning(AnalyzeIamPolicyLongrunningRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<AnalyzeIamPolicyLongrunningResponse, AnalyzeIamPolicyLongrunningMetadata>

The RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = AssetServiceClient.Create();
// Initialize request argument(s)
AnalyzeIamPolicyLongrunningRequest request = new AnalyzeIamPolicyLongrunningRequest
{
    AnalysisQuery = new IamPolicyAnalysisQuery(),
    OutputConfig = new IamPolicyAnalysisOutputConfig(),
    SavedAnalysisQuery = "",
};
// Make the request
Operation<AnalyzeIamPolicyLongrunningResponse, AnalyzeIamPolicyLongrunningMetadata> response = assetServiceClient.AnalyzeIamPolicyLongrunning(request);

// Poll until the returned long-running operation is complete
Operation<AnalyzeIamPolicyLongrunningResponse, AnalyzeIamPolicyLongrunningMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
AnalyzeIamPolicyLongrunningResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<AnalyzeIamPolicyLongrunningResponse, AnalyzeIamPolicyLongrunningMetadata> retrievedResponse = assetServiceClient.PollOnceAnalyzeIamPolicyLongrunning(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    AnalyzeIamPolicyLongrunningResponse retrievedResult = retrievedResponse.Result;
}

AnalyzeIamPolicyLongrunningAsync(AnalyzeIamPolicyLongrunningRequest, CallSettings)

public virtual Task<Operation<AnalyzeIamPolicyLongrunningResponse, AnalyzeIamPolicyLongrunningMetadata>> AnalyzeIamPolicyLongrunningAsync(AnalyzeIamPolicyLongrunningRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<AnalyzeIamPolicyLongrunningResponse, AnalyzeIamPolicyLongrunningMetadata>>

A Task containing the RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
AnalyzeIamPolicyLongrunningRequest request = new AnalyzeIamPolicyLongrunningRequest
{
    AnalysisQuery = new IamPolicyAnalysisQuery(),
    OutputConfig = new IamPolicyAnalysisOutputConfig(),
    SavedAnalysisQuery = "",
};
// Make the request
Operation<AnalyzeIamPolicyLongrunningResponse, AnalyzeIamPolicyLongrunningMetadata> response = await assetServiceClient.AnalyzeIamPolicyLongrunningAsync(request);

// Poll until the returned long-running operation is complete
Operation<AnalyzeIamPolicyLongrunningResponse, AnalyzeIamPolicyLongrunningMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
AnalyzeIamPolicyLongrunningResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<AnalyzeIamPolicyLongrunningResponse, AnalyzeIamPolicyLongrunningMetadata> retrievedResponse = await assetServiceClient.PollOnceAnalyzeIamPolicyLongrunningAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    AnalyzeIamPolicyLongrunningResponse retrievedResult = retrievedResponse.Result;
}

AnalyzeIamPolicyLongrunningAsync(AnalyzeIamPolicyLongrunningRequest, CancellationToken)

public virtual Task<Operation<AnalyzeIamPolicyLongrunningResponse, AnalyzeIamPolicyLongrunningMetadata>> AnalyzeIamPolicyLongrunningAsync(AnalyzeIamPolicyLongrunningRequest request, CancellationToken cancellationToken)

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 object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<AnalyzeIamPolicyLongrunningResponse, AnalyzeIamPolicyLongrunningMetadata>>

A Task containing the RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
AnalyzeIamPolicyLongrunningRequest request = new AnalyzeIamPolicyLongrunningRequest
{
    AnalysisQuery = new IamPolicyAnalysisQuery(),
    OutputConfig = new IamPolicyAnalysisOutputConfig(),
    SavedAnalysisQuery = "",
};
// Make the request
Operation<AnalyzeIamPolicyLongrunningResponse, AnalyzeIamPolicyLongrunningMetadata> response = await assetServiceClient.AnalyzeIamPolicyLongrunningAsync(request);

// Poll until the returned long-running operation is complete
Operation<AnalyzeIamPolicyLongrunningResponse, AnalyzeIamPolicyLongrunningMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
AnalyzeIamPolicyLongrunningResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<AnalyzeIamPolicyLongrunningResponse, AnalyzeIamPolicyLongrunningMetadata> retrievedResponse = await assetServiceClient.PollOnceAnalyzeIamPolicyLongrunningAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    AnalyzeIamPolicyLongrunningResponse retrievedResult = retrievedResponse.Result;
}

AnalyzeMove(AnalyzeMoveRequest, CallSettings)

public virtual AnalyzeMoveResponse AnalyzeMove(AnalyzeMoveRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
AnalyzeMoveResponse

The RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = AssetServiceClient.Create();
// Initialize request argument(s)
AnalyzeMoveRequest request = new AnalyzeMoveRequest
{
    Resource = "",
    DestinationParent = "",
    View = AnalyzeMoveRequest.Types.AnalysisView.Unspecified,
};
// Make the request
AnalyzeMoveResponse response = assetServiceClient.AnalyzeMove(request);

AnalyzeMoveAsync(AnalyzeMoveRequest, CallSettings)

public virtual Task<AnalyzeMoveResponse> AnalyzeMoveAsync(AnalyzeMoveRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<AnalyzeMoveResponse>

A Task containing the RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
AnalyzeMoveRequest request = new AnalyzeMoveRequest
{
    Resource = "",
    DestinationParent = "",
    View = AnalyzeMoveRequest.Types.AnalysisView.Unspecified,
};
// Make the request
AnalyzeMoveResponse response = await assetServiceClient.AnalyzeMoveAsync(request);

AnalyzeMoveAsync(AnalyzeMoveRequest, CancellationToken)

public virtual Task<AnalyzeMoveResponse> AnalyzeMoveAsync(AnalyzeMoveRequest request, CancellationToken cancellationToken)

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 object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<AnalyzeMoveResponse>

A Task containing the RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
AnalyzeMoveRequest request = new AnalyzeMoveRequest
{
    Resource = "",
    DestinationParent = "",
    View = AnalyzeMoveRequest.Types.AnalysisView.Unspecified,
};
// Make the request
AnalyzeMoveResponse response = await assetServiceClient.AnalyzeMoveAsync(request);

BatchGetAssetsHistory(BatchGetAssetsHistoryRequest, CallSettings)

public virtual BatchGetAssetsHistoryResponse BatchGetAssetsHistory(BatchGetAssetsHistoryRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
BatchGetAssetsHistoryResponse

The RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = AssetServiceClient.Create();
// Initialize request argument(s)
BatchGetAssetsHistoryRequest request = new BatchGetAssetsHistoryRequest
{
    ParentAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
    AssetNames = { "", },
    ContentType = ContentType.Unspecified,
    ReadTimeWindow = new TimeWindow(),
    RelationshipTypes = { "", },
};
// Make the request
BatchGetAssetsHistoryResponse response = assetServiceClient.BatchGetAssetsHistory(request);

BatchGetAssetsHistoryAsync(BatchGetAssetsHistoryRequest, CallSettings)

public virtual Task<BatchGetAssetsHistoryResponse> BatchGetAssetsHistoryAsync(BatchGetAssetsHistoryRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<BatchGetAssetsHistoryResponse>

A Task containing the RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
BatchGetAssetsHistoryRequest request = new BatchGetAssetsHistoryRequest
{
    ParentAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
    AssetNames = { "", },
    ContentType = ContentType.Unspecified,
    ReadTimeWindow = new TimeWindow(),
    RelationshipTypes = { "", },
};
// Make the request
BatchGetAssetsHistoryResponse response = await assetServiceClient.BatchGetAssetsHistoryAsync(request);

BatchGetAssetsHistoryAsync(BatchGetAssetsHistoryRequest, CancellationToken)

public virtual Task<BatchGetAssetsHistoryResponse> BatchGetAssetsHistoryAsync(BatchGetAssetsHistoryRequest request, CancellationToken cancellationToken)

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 object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<BatchGetAssetsHistoryResponse>

A Task containing the RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
BatchGetAssetsHistoryRequest request = new BatchGetAssetsHistoryRequest
{
    ParentAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
    AssetNames = { "", },
    ContentType = ContentType.Unspecified,
    ReadTimeWindow = new TimeWindow(),
    RelationshipTypes = { "", },
};
// Make the request
BatchGetAssetsHistoryResponse response = await assetServiceClient.BatchGetAssetsHistoryAsync(request);

BatchGetEffectiveIamPolicies(BatchGetEffectiveIamPoliciesRequest, CallSettings)

public virtual BatchGetEffectiveIamPoliciesResponse BatchGetEffectiveIamPolicies(BatchGetEffectiveIamPoliciesRequest request, CallSettings callSettings = null)

Gets effective IAM policies for a batch of resources.

Parameters
NameDescription
requestBatchGetEffectiveIamPoliciesRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
BatchGetEffectiveIamPoliciesResponse

The RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = AssetServiceClient.Create();
// Initialize request argument(s)
BatchGetEffectiveIamPoliciesRequest request = new BatchGetEffectiveIamPoliciesRequest
{
    ScopeAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
    ResourceNames =
    {
        new UnparsedResourceName("a/wildcard/resource"),
    },
};
// Make the request
BatchGetEffectiveIamPoliciesResponse response = assetServiceClient.BatchGetEffectiveIamPolicies(request);

BatchGetEffectiveIamPoliciesAsync(BatchGetEffectiveIamPoliciesRequest, CallSettings)

public virtual Task<BatchGetEffectiveIamPoliciesResponse> BatchGetEffectiveIamPoliciesAsync(BatchGetEffectiveIamPoliciesRequest request, CallSettings callSettings = null)

Gets effective IAM policies for a batch of resources.

Parameters
NameDescription
requestBatchGetEffectiveIamPoliciesRequest

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<BatchGetEffectiveIamPoliciesResponse>

A Task containing the RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
BatchGetEffectiveIamPoliciesRequest request = new BatchGetEffectiveIamPoliciesRequest
{
    ScopeAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
    ResourceNames =
    {
        new UnparsedResourceName("a/wildcard/resource"),
    },
};
// Make the request
BatchGetEffectiveIamPoliciesResponse response = await assetServiceClient.BatchGetEffectiveIamPoliciesAsync(request);

BatchGetEffectiveIamPoliciesAsync(BatchGetEffectiveIamPoliciesRequest, CancellationToken)

public virtual Task<BatchGetEffectiveIamPoliciesResponse> BatchGetEffectiveIamPoliciesAsync(BatchGetEffectiveIamPoliciesRequest request, CancellationToken cancellationToken)

Gets effective IAM policies for a batch of resources.

Parameters
NameDescription
requestBatchGetEffectiveIamPoliciesRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<BatchGetEffectiveIamPoliciesResponse>

A Task containing the RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
BatchGetEffectiveIamPoliciesRequest request = new BatchGetEffectiveIamPoliciesRequest
{
    ScopeAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
    ResourceNames =
    {
        new UnparsedResourceName("a/wildcard/resource"),
    },
};
// Make the request
BatchGetEffectiveIamPoliciesResponse response = await assetServiceClient.BatchGetEffectiveIamPoliciesAsync(request);

Create()

public static AssetServiceClient Create()

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

Returns
TypeDescription
AssetServiceClient

The created AssetServiceClient.

CreateAsync(CancellationToken)

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

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

Parameter
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
Task<AssetServiceClient>

The task representing the created AssetServiceClient.

CreateFeed(CreateFeedRequest, CallSettings)

public virtual Feed CreateFeed(CreateFeedRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestCreateFeedRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Feed

The RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = AssetServiceClient.Create();
// Initialize request argument(s)
CreateFeedRequest request = new CreateFeedRequest
{
    Parent = "",
    FeedId = "",
    Feed = new Feed(),
};
// Make the request
Feed response = assetServiceClient.CreateFeed(request);

CreateFeed(String, CallSettings)

public virtual Feed CreateFeed(string parent, CallSettings callSettings = null)

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

Parameters
NameDescription
parentString

Required. The name of the project/folder/organization where this feed should be created in. It can only be an organization number (such as "organizations/123"), a folder number (such as "folders/123"), a project ID (such as "projects/my-project-id")", or a project number (such as "projects/12345").

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Feed

The RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = AssetServiceClient.Create();
// Initialize request argument(s)
string parent = "";
// Make the request
Feed response = assetServiceClient.CreateFeed(parent);

CreateFeedAsync(CreateFeedRequest, CallSettings)

public virtual Task<Feed> CreateFeedAsync(CreateFeedRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestCreateFeedRequest

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<Feed>

A Task containing the RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
CreateFeedRequest request = new CreateFeedRequest
{
    Parent = "",
    FeedId = "",
    Feed = new Feed(),
};
// Make the request
Feed response = await assetServiceClient.CreateFeedAsync(request);

CreateFeedAsync(CreateFeedRequest, CancellationToken)

public virtual Task<Feed> CreateFeedAsync(CreateFeedRequest request, CancellationToken cancellationToken)

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

Parameters
NameDescription
requestCreateFeedRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Feed>

A Task containing the RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
CreateFeedRequest request = new CreateFeedRequest
{
    Parent = "",
    FeedId = "",
    Feed = new Feed(),
};
// Make the request
Feed response = await assetServiceClient.CreateFeedAsync(request);

CreateFeedAsync(String, CallSettings)

public virtual Task<Feed> CreateFeedAsync(string parent, CallSettings callSettings = null)

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

Parameters
NameDescription
parentString

Required. The name of the project/folder/organization where this feed should be created in. It can only be an organization number (such as "organizations/123"), a folder number (such as "folders/123"), a project ID (such as "projects/my-project-id")", or a project number (such as "projects/12345").

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Feed>

A Task containing the RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "";
// Make the request
Feed response = await assetServiceClient.CreateFeedAsync(parent);

CreateFeedAsync(String, CancellationToken)

public virtual Task<Feed> CreateFeedAsync(string parent, CancellationToken cancellationToken)

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

Parameters
NameDescription
parentString

Required. The name of the project/folder/organization where this feed should be created in. It can only be an organization number (such as "organizations/123"), a folder number (such as "folders/123"), a project ID (such as "projects/my-project-id")", or a project number (such as "projects/12345").

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Feed>

A Task containing the RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "";
// Make the request
Feed response = await assetServiceClient.CreateFeedAsync(parent);

CreateSavedQuery(FolderName, SavedQuery, String, CallSettings)

public virtual SavedQuery CreateSavedQuery(FolderName parent, SavedQuery savedQuery, string savedQueryId, CallSettings callSettings = null)

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

Parameters
NameDescription
parentFolderName

Required. The name of the project/folder/organization where this saved_query should be created in. It can only be an organization number (such as "organizations/123"), a folder number (such as "folders/123"), a project ID (such as "projects/my-project-id")", or a project number (such as "projects/12345").

savedQuerySavedQuery

Required. The saved_query details. The name field must be empty as it will be generated based on the parent and saved_query_id.

savedQueryIdString

Required. The ID to use for the saved query, which must be unique in the specified parent. It will become the final component of the saved query's resource name.

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/.

Notice that this field is required in the saved query creation, and the name field of the saved_query will be ignored.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
SavedQuery

The RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = AssetServiceClient.Create();
// Initialize request argument(s)
FolderName parent = FolderName.FromFolder("[FOLDER]");
SavedQuery savedQuery = new SavedQuery();
string savedQueryId = "";
// Make the request
SavedQuery response = assetServiceClient.CreateSavedQuery(parent, savedQuery, savedQueryId);

CreateSavedQuery(OrganizationName, SavedQuery, String, CallSettings)

public virtual SavedQuery CreateSavedQuery(OrganizationName parent, SavedQuery savedQuery, string savedQueryId, CallSettings callSettings = null)

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

Parameters
NameDescription
parentOrganizationName

Required. The name of the project/folder/organization where this saved_query should be created in. It can only be an organization number (such as "organizations/123"), a folder number (such as "folders/123"), a project ID (such as "projects/my-project-id")", or a project number (such as "projects/12345").

savedQuerySavedQuery

Required. The saved_query details. The name field must be empty as it will be generated based on the parent and saved_query_id.

savedQueryIdString

Required. The ID to use for the saved query, which must be unique in the specified parent. It will become the final component of the saved query's resource name.

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/.

Notice that this field is required in the saved query creation, and the name field of the saved_query will be ignored.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
SavedQuery

The RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = AssetServiceClient.Create();
// Initialize request argument(s)
OrganizationName parent = OrganizationName.FromOrganization("[ORGANIZATION]");
SavedQuery savedQuery = new SavedQuery();
string savedQueryId = "";
// Make the request
SavedQuery response = assetServiceClient.CreateSavedQuery(parent, savedQuery, savedQueryId);

CreateSavedQuery(ProjectName, SavedQuery, String, CallSettings)

public virtual SavedQuery CreateSavedQuery(ProjectName parent, SavedQuery savedQuery, string savedQueryId, CallSettings callSettings = null)

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

Parameters
NameDescription
parentProjectName

Required. The name of the project/folder/organization where this saved_query should be created in. It can only be an organization number (such as "organizations/123"), a folder number (such as "folders/123"), a project ID (such as "projects/my-project-id")", or a project number (such as "projects/12345").

savedQuerySavedQuery

Required. The saved_query details. The name field must be empty as it will be generated based on the parent and saved_query_id.

savedQueryIdString

Required. The ID to use for the saved query, which must be unique in the specified parent. It will become the final component of the saved query's resource name.

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/.

Notice that this field is required in the saved query creation, and the name field of the saved_query will be ignored.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
SavedQuery

The RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = AssetServiceClient.Create();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
SavedQuery savedQuery = new SavedQuery();
string savedQueryId = "";
// Make the request
SavedQuery response = assetServiceClient.CreateSavedQuery(parent, savedQuery, savedQueryId);

CreateSavedQuery(CreateSavedQueryRequest, CallSettings)

public virtual SavedQuery CreateSavedQuery(CreateSavedQueryRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestCreateSavedQueryRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
SavedQuery

The RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = AssetServiceClient.Create();
// Initialize request argument(s)
CreateSavedQueryRequest request = new CreateSavedQueryRequest
{
    ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
    SavedQuery = new SavedQuery(),
    SavedQueryId = "",
};
// Make the request
SavedQuery response = assetServiceClient.CreateSavedQuery(request);

CreateSavedQuery(String, SavedQuery, String, CallSettings)

public virtual SavedQuery CreateSavedQuery(string parent, SavedQuery savedQuery, string savedQueryId, CallSettings callSettings = null)

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

Parameters
NameDescription
parentString

Required. The name of the project/folder/organization where this saved_query should be created in. It can only be an organization number (such as "organizations/123"), a folder number (such as "folders/123"), a project ID (such as "projects/my-project-id")", or a project number (such as "projects/12345").

savedQuerySavedQuery

Required. The saved_query details. The name field must be empty as it will be generated based on the parent and saved_query_id.

savedQueryIdString

Required. The ID to use for the saved query, which must be unique in the specified parent. It will become the final component of the saved query's resource name.

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/.

Notice that this field is required in the saved query creation, and the name field of the saved_query will be ignored.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
SavedQuery

The RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = AssetServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
SavedQuery savedQuery = new SavedQuery();
string savedQueryId = "";
// Make the request
SavedQuery response = assetServiceClient.CreateSavedQuery(parent, savedQuery, savedQueryId);

CreateSavedQueryAsync(FolderName, SavedQuery, String, CallSettings)

public virtual Task<SavedQuery> CreateSavedQueryAsync(FolderName parent, SavedQuery savedQuery, string savedQueryId, CallSettings callSettings = null)

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

Parameters
NameDescription
parentFolderName

Required. The name of the project/folder/organization where this saved_query should be created in. It can only be an organization number (such as "organizations/123"), a folder number (such as "folders/123"), a project ID (such as "projects/my-project-id")", or a project number (such as "projects/12345").

savedQuerySavedQuery

Required. The saved_query details. The name field must be empty as it will be generated based on the parent and saved_query_id.

savedQueryIdString

Required. The ID to use for the saved query, which must be unique in the specified parent. It will become the final component of the saved query's resource name.

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/.

Notice that this field is required in the saved query creation, and the name field of the saved_query will be ignored.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<SavedQuery>

A Task containing the RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
FolderName parent = FolderName.FromFolder("[FOLDER]");
SavedQuery savedQuery = new SavedQuery();
string savedQueryId = "";
// Make the request
SavedQuery response = await assetServiceClient.CreateSavedQueryAsync(parent, savedQuery, savedQueryId);

CreateSavedQueryAsync(FolderName, SavedQuery, String, CancellationToken)

public virtual Task<SavedQuery> CreateSavedQueryAsync(FolderName parent, SavedQuery savedQuery, string savedQueryId, CancellationToken cancellationToken)

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

Parameters
NameDescription
parentFolderName

Required. The name of the project/folder/organization where this saved_query should be created in. It can only be an organization number (such as "organizations/123"), a folder number (such as "folders/123"), a project ID (such as "projects/my-project-id")", or a project number (such as "projects/12345").

savedQuerySavedQuery

Required. The saved_query details. The name field must be empty as it will be generated based on the parent and saved_query_id.

savedQueryIdString

Required. The ID to use for the saved query, which must be unique in the specified parent. It will become the final component of the saved query's resource name.

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/.

Notice that this field is required in the saved query creation, and the name field of the saved_query will be ignored.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<SavedQuery>

A Task containing the RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
FolderName parent = FolderName.FromFolder("[FOLDER]");
SavedQuery savedQuery = new SavedQuery();
string savedQueryId = "";
// Make the request
SavedQuery response = await assetServiceClient.CreateSavedQueryAsync(parent, savedQuery, savedQueryId);

CreateSavedQueryAsync(OrganizationName, SavedQuery, String, CallSettings)

public virtual Task<SavedQuery> CreateSavedQueryAsync(OrganizationName parent, SavedQuery savedQuery, string savedQueryId, CallSettings callSettings = null)

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

Parameters
NameDescription
parentOrganizationName

Required. The name of the project/folder/organization where this saved_query should be created in. It can only be an organization number (such as "organizations/123"), a folder number (such as "folders/123"), a project ID (such as "projects/my-project-id")", or a project number (such as "projects/12345").

savedQuerySavedQuery

Required. The saved_query details. The name field must be empty as it will be generated based on the parent and saved_query_id.

savedQueryIdString

Required. The ID to use for the saved query, which must be unique in the specified parent. It will become the final component of the saved query's resource name.

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/.

Notice that this field is required in the saved query creation, and the name field of the saved_query will be ignored.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<SavedQuery>

A Task containing the RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
OrganizationName parent = OrganizationName.FromOrganization("[ORGANIZATION]");
SavedQuery savedQuery = new SavedQuery();
string savedQueryId = "";
// Make the request
SavedQuery response = await assetServiceClient.CreateSavedQueryAsync(parent, savedQuery, savedQueryId);

CreateSavedQueryAsync(OrganizationName, SavedQuery, String, CancellationToken)

public virtual Task<SavedQuery> CreateSavedQueryAsync(OrganizationName parent, SavedQuery savedQuery, string savedQueryId, CancellationToken cancellationToken)

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

Parameters
NameDescription
parentOrganizationName

Required. The name of the project/folder/organization where this saved_query should be created in. It can only be an organization number (such as "organizations/123"), a folder number (such as "folders/123"), a project ID (such as "projects/my-project-id")", or a project number (such as "projects/12345").

savedQuerySavedQuery

Required. The saved_query details. The name field must be empty as it will be generated based on the parent and saved_query_id.

savedQueryIdString

Required. The ID to use for the saved query, which must be unique in the specified parent. It will become the final component of the saved query's resource name.

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/.

Notice that this field is required in the saved query creation, and the name field of the saved_query will be ignored.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<SavedQuery>

A Task containing the RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
OrganizationName parent = OrganizationName.FromOrganization("[ORGANIZATION]");
SavedQuery savedQuery = new SavedQuery();
string savedQueryId = "";
// Make the request
SavedQuery response = await assetServiceClient.CreateSavedQueryAsync(parent, savedQuery, savedQueryId);

CreateSavedQueryAsync(ProjectName, SavedQuery, String, CallSettings)

public virtual Task<SavedQuery> CreateSavedQueryAsync(ProjectName parent, SavedQuery savedQuery, string savedQueryId, CallSettings callSettings = null)

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

Parameters
NameDescription
parentProjectName

Required. The name of the project/folder/organization where this saved_query should be created in. It can only be an organization number (such as "organizations/123"), a folder number (such as "folders/123"), a project ID (such as "projects/my-project-id")", or a project number (such as "projects/12345").

savedQuerySavedQuery

Required. The saved_query details. The name field must be empty as it will be generated based on the parent and saved_query_id.

savedQueryIdString

Required. The ID to use for the saved query, which must be unique in the specified parent. It will become the final component of the saved query's resource name.

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/.

Notice that this field is required in the saved query creation, and the name field of the saved_query will be ignored.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<SavedQuery>

A Task containing the RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
SavedQuery savedQuery = new SavedQuery();
string savedQueryId = "";
// Make the request
SavedQuery response = await assetServiceClient.CreateSavedQueryAsync(parent, savedQuery, savedQueryId);

CreateSavedQueryAsync(ProjectName, SavedQuery, String, CancellationToken)

public virtual Task<SavedQuery> CreateSavedQueryAsync(ProjectName parent, SavedQuery savedQuery, string savedQueryId, CancellationToken cancellationToken)

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

Parameters
NameDescription
parentProjectName

Required. The name of the project/folder/organization where this saved_query should be created in. It can only be an organization number (such as "organizations/123"), a folder number (such as "folders/123"), a project ID (such as "projects/my-project-id")", or a project number (such as "projects/12345").

savedQuerySavedQuery

Required. The saved_query details. The name field must be empty as it will be generated based on the parent and saved_query_id.

savedQueryIdString

Required. The ID to use for the saved query, which must be unique in the specified parent. It will become the final component of the saved query's resource name.

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/.

Notice that this field is required in the saved query creation, and the name field of the saved_query will be ignored.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<SavedQuery>

A Task containing the RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
SavedQuery savedQuery = new SavedQuery();
string savedQueryId = "";
// Make the request
SavedQuery response = await assetServiceClient.CreateSavedQueryAsync(parent, savedQuery, savedQueryId);

CreateSavedQueryAsync(CreateSavedQueryRequest, CallSettings)

public virtual Task<SavedQuery> CreateSavedQueryAsync(CreateSavedQueryRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestCreateSavedQueryRequest

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<SavedQuery>

A Task containing the RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
CreateSavedQueryRequest request = new CreateSavedQueryRequest
{
    ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
    SavedQuery = new SavedQuery(),
    SavedQueryId = "",
};
// Make the request
SavedQuery response = await assetServiceClient.CreateSavedQueryAsync(request);

CreateSavedQueryAsync(CreateSavedQueryRequest, CancellationToken)

public virtual Task<SavedQuery> CreateSavedQueryAsync(CreateSavedQueryRequest request, CancellationToken cancellationToken)

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

Parameters
NameDescription
requestCreateSavedQueryRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<SavedQuery>

A Task containing the RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
CreateSavedQueryRequest request = new CreateSavedQueryRequest
{
    ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
    SavedQuery = new SavedQuery(),
    SavedQueryId = "",
};
// Make the request
SavedQuery response = await assetServiceClient.CreateSavedQueryAsync(request);

CreateSavedQueryAsync(String, SavedQuery, String, CallSettings)

public virtual Task<SavedQuery> CreateSavedQueryAsync(string parent, SavedQuery savedQuery, string savedQueryId, CallSettings callSettings = null)

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

Parameters
NameDescription
parentString

Required. The name of the project/folder/organization where this saved_query should be created in. It can only be an organization number (such as "organizations/123"), a folder number (such as "folders/123"), a project ID (such as "projects/my-project-id")", or a project number (such as "projects/12345").

savedQuerySavedQuery

Required. The saved_query details. The name field must be empty as it will be generated based on the parent and saved_query_id.

savedQueryIdString

Required. The ID to use for the saved query, which must be unique in the specified parent. It will become the final component of the saved query's resource name.

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/.

Notice that this field is required in the saved query creation, and the name field of the saved_query will be ignored.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<SavedQuery>

A Task containing the RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
SavedQuery savedQuery = new SavedQuery();
string savedQueryId = "";
// Make the request
SavedQuery response = await assetServiceClient.CreateSavedQueryAsync(parent, savedQuery, savedQueryId);

CreateSavedQueryAsync(String, SavedQuery, String, CancellationToken)

public virtual Task<SavedQuery> CreateSavedQueryAsync(string parent, SavedQuery savedQuery, string savedQueryId, CancellationToken cancellationToken)

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

Parameters
NameDescription
parentString

Required. The name of the project/folder/organization where this saved_query should be created in. It can only be an organization number (such as "organizations/123"), a folder number (such as "folders/123"), a project ID (such as "projects/my-project-id")", or a project number (such as "projects/12345").

savedQuerySavedQuery

Required. The saved_query details. The name field must be empty as it will be generated based on the parent and saved_query_id.

savedQueryIdString

Required. The ID to use for the saved query, which must be unique in the specified parent. It will become the final component of the saved query's resource name.

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/.

Notice that this field is required in the saved query creation, and the name field of the saved_query will be ignored.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<SavedQuery>

A Task containing the RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
SavedQuery savedQuery = new SavedQuery();
string savedQueryId = "";
// Make the request
SavedQuery response = await assetServiceClient.CreateSavedQueryAsync(parent, savedQuery, savedQueryId);

DeleteFeed(DeleteFeedRequest, CallSettings)

public virtual void DeleteFeed(DeleteFeedRequest request, CallSettings callSettings = null)

Deletes an asset feed.

Parameters
NameDescription
requestDeleteFeedRequest

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
AssetServiceClient assetServiceClient = AssetServiceClient.Create();
// Initialize request argument(s)
DeleteFeedRequest request = new DeleteFeedRequest
{
    FeedName = FeedName.FromProjectFeed("[PROJECT]", "[FEED]"),
};
// Make the request
assetServiceClient.DeleteFeed(request);

DeleteFeed(FeedName, CallSettings)

public virtual void DeleteFeed(FeedName name, CallSettings callSettings = null)

Deletes an asset feed.

Parameters
NameDescription
nameFeedName

Required. The name of the feed and it must be in the format of: projects/project_number/feeds/feed_id folders/folder_number/feeds/feed_id organizations/organization_number/feeds/feed_id

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
AssetServiceClient assetServiceClient = AssetServiceClient.Create();
// Initialize request argument(s)
FeedName name = FeedName.FromProjectFeed("[PROJECT]", "[FEED]");
// Make the request
assetServiceClient.DeleteFeed(name);

DeleteFeed(String, CallSettings)

public virtual void DeleteFeed(string name, CallSettings callSettings = null)

Deletes an asset feed.

Parameters
NameDescription
nameString

Required. The name of the feed and it must be in the format of: projects/project_number/feeds/feed_id folders/folder_number/feeds/feed_id organizations/organization_number/feeds/feed_id

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
AssetServiceClient assetServiceClient = AssetServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/feeds/[FEED]";
// Make the request
assetServiceClient.DeleteFeed(name);

DeleteFeedAsync(DeleteFeedRequest, CallSettings)

public virtual Task DeleteFeedAsync(DeleteFeedRequest request, CallSettings callSettings = null)

Deletes an asset feed.

Parameters
NameDescription
requestDeleteFeedRequest

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
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteFeedRequest request = new DeleteFeedRequest
{
    FeedName = FeedName.FromProjectFeed("[PROJECT]", "[FEED]"),
};
// Make the request
await assetServiceClient.DeleteFeedAsync(request);

DeleteFeedAsync(DeleteFeedRequest, CancellationToken)

public virtual Task DeleteFeedAsync(DeleteFeedRequest request, CancellationToken cancellationToken)

Deletes an asset feed.

Parameters
NameDescription
requestDeleteFeedRequest

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
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteFeedRequest request = new DeleteFeedRequest
{
    FeedName = FeedName.FromProjectFeed("[PROJECT]", "[FEED]"),
};
// Make the request
await assetServiceClient.DeleteFeedAsync(request);

DeleteFeedAsync(FeedName, CallSettings)

public virtual Task DeleteFeedAsync(FeedName name, CallSettings callSettings = null)

Deletes an asset feed.

Parameters
NameDescription
nameFeedName

Required. The name of the feed and it must be in the format of: projects/project_number/feeds/feed_id folders/folder_number/feeds/feed_id organizations/organization_number/feeds/feed_id

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
FeedName name = FeedName.FromProjectFeed("[PROJECT]", "[FEED]");
// Make the request
await assetServiceClient.DeleteFeedAsync(name);

DeleteFeedAsync(FeedName, CancellationToken)

public virtual Task DeleteFeedAsync(FeedName name, CancellationToken cancellationToken)

Deletes an asset feed.

Parameters
NameDescription
nameFeedName

Required. The name of the feed and it must be in the format of: projects/project_number/feeds/feed_id folders/folder_number/feeds/feed_id organizations/organization_number/feeds/feed_id

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
FeedName name = FeedName.FromProjectFeed("[PROJECT]", "[FEED]");
// Make the request
await assetServiceClient.DeleteFeedAsync(name);

DeleteFeedAsync(String, CallSettings)

public virtual Task DeleteFeedAsync(string name, CallSettings callSettings = null)

Deletes an asset feed.

Parameters
NameDescription
nameString

Required. The name of the feed and it must be in the format of: projects/project_number/feeds/feed_id folders/folder_number/feeds/feed_id organizations/organization_number/feeds/feed_id

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/feeds/[FEED]";
// Make the request
await assetServiceClient.DeleteFeedAsync(name);

DeleteFeedAsync(String, CancellationToken)

public virtual Task DeleteFeedAsync(string name, CancellationToken cancellationToken)

Deletes an asset feed.

Parameters
NameDescription
nameString

Required. The name of the feed and it must be in the format of: projects/project_number/feeds/feed_id folders/folder_number/feeds/feed_id organizations/organization_number/feeds/feed_id

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/feeds/[FEED]";
// Make the request
await assetServiceClient.DeleteFeedAsync(name);

DeleteSavedQuery(DeleteSavedQueryRequest, CallSettings)

public virtual void DeleteSavedQuery(DeleteSavedQueryRequest request, CallSettings callSettings = null)

Deletes a saved query.

Parameters
NameDescription
requestDeleteSavedQueryRequest

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
AssetServiceClient assetServiceClient = AssetServiceClient.Create();
// Initialize request argument(s)
DeleteSavedQueryRequest request = new DeleteSavedQueryRequest
{
    SavedQueryName = SavedQueryName.FromProjectSavedQuery("[PROJECT]", "[SAVED_QUERY]"),
};
// Make the request
assetServiceClient.DeleteSavedQuery(request);

DeleteSavedQuery(SavedQueryName, CallSettings)

public virtual void DeleteSavedQuery(SavedQueryName name, CallSettings callSettings = null)

Deletes a saved query.

Parameters
NameDescription
nameSavedQueryName

Required. The name of the saved query to delete. It must be in the format of:

  • projects/project_number/savedQueries/saved_query_id
  • folders/folder_number/savedQueries/saved_query_id
  • organizations/organization_number/savedQueries/saved_query_id
callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
AssetServiceClient assetServiceClient = AssetServiceClient.Create();
// Initialize request argument(s)
SavedQueryName name = SavedQueryName.FromProjectSavedQuery("[PROJECT]", "[SAVED_QUERY]");
// Make the request
assetServiceClient.DeleteSavedQuery(name);

DeleteSavedQuery(String, CallSettings)

public virtual void DeleteSavedQuery(string name, CallSettings callSettings = null)

Deletes a saved query.

Parameters
NameDescription
nameString

Required. The name of the saved query to delete. It must be in the format of:

  • projects/project_number/savedQueries/saved_query_id
  • folders/folder_number/savedQueries/saved_query_id
  • organizations/organization_number/savedQueries/saved_query_id
callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
AssetServiceClient assetServiceClient = AssetServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/savedQueries/[SAVED_QUERY]";
// Make the request
assetServiceClient.DeleteSavedQuery(name);

DeleteSavedQueryAsync(DeleteSavedQueryRequest, CallSettings)

public virtual Task DeleteSavedQueryAsync(DeleteSavedQueryRequest request, CallSettings callSettings = null)

Deletes a saved query.

Parameters
NameDescription
requestDeleteSavedQueryRequest

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
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteSavedQueryRequest request = new DeleteSavedQueryRequest
{
    SavedQueryName = SavedQueryName.FromProjectSavedQuery("[PROJECT]", "[SAVED_QUERY]"),
};
// Make the request
await assetServiceClient.DeleteSavedQueryAsync(request);

DeleteSavedQueryAsync(DeleteSavedQueryRequest, CancellationToken)

public virtual Task DeleteSavedQueryAsync(DeleteSavedQueryRequest request, CancellationToken cancellationToken)

Deletes a saved query.

Parameters
NameDescription
requestDeleteSavedQueryRequest

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
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteSavedQueryRequest request = new DeleteSavedQueryRequest
{
    SavedQueryName = SavedQueryName.FromProjectSavedQuery("[PROJECT]", "[SAVED_QUERY]"),
};
// Make the request
await assetServiceClient.DeleteSavedQueryAsync(request);

DeleteSavedQueryAsync(SavedQueryName, CallSettings)

public virtual Task DeleteSavedQueryAsync(SavedQueryName name, CallSettings callSettings = null)

Deletes a saved query.

Parameters
NameDescription
nameSavedQueryName

Required. The name of the saved query to delete. It must be in the format of:

  • projects/project_number/savedQueries/saved_query_id
  • folders/folder_number/savedQueries/saved_query_id
  • organizations/organization_number/savedQueries/saved_query_id
callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
SavedQueryName name = SavedQueryName.FromProjectSavedQuery("[PROJECT]", "[SAVED_QUERY]");
// Make the request
await assetServiceClient.DeleteSavedQueryAsync(name);

DeleteSavedQueryAsync(SavedQueryName, CancellationToken)

public virtual Task DeleteSavedQueryAsync(SavedQueryName name, CancellationToken cancellationToken)

Deletes a saved query.

Parameters
NameDescription
nameSavedQueryName

Required. The name of the saved query to delete. It must be in the format of:

  • projects/project_number/savedQueries/saved_query_id
  • folders/folder_number/savedQueries/saved_query_id
  • organizations/organization_number/savedQueries/saved_query_id
cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
SavedQueryName name = SavedQueryName.FromProjectSavedQuery("[PROJECT]", "[SAVED_QUERY]");
// Make the request
await assetServiceClient.DeleteSavedQueryAsync(name);

DeleteSavedQueryAsync(String, CallSettings)

public virtual Task DeleteSavedQueryAsync(string name, CallSettings callSettings = null)

Deletes a saved query.

Parameters
NameDescription
nameString

Required. The name of the saved query to delete. It must be in the format of:

  • projects/project_number/savedQueries/saved_query_id
  • folders/folder_number/savedQueries/saved_query_id
  • organizations/organization_number/savedQueries/saved_query_id
callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/savedQueries/[SAVED_QUERY]";
// Make the request
await assetServiceClient.DeleteSavedQueryAsync(name);

DeleteSavedQueryAsync(String, CancellationToken)

public virtual Task DeleteSavedQueryAsync(string name, CancellationToken cancellationToken)

Deletes a saved query.

Parameters
NameDescription
nameString

Required. The name of the saved query to delete. It must be in the format of:

  • projects/project_number/savedQueries/saved_query_id
  • folders/folder_number/savedQueries/saved_query_id
  • organizations/organization_number/savedQueries/saved_query_id
cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/savedQueries/[SAVED_QUERY]";
// Make the request
await assetServiceClient.DeleteSavedQueryAsync(name);

ExportAssets(ExportAssetsRequest, CallSettings)

public virtual Operation<ExportAssetsResponse, ExportAssetsRequest> ExportAssets(ExportAssetsRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<ExportAssetsResponse, ExportAssetsRequest>

The RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = AssetServiceClient.Create();
// Initialize request argument(s)
ExportAssetsRequest request = new ExportAssetsRequest
{
    ParentAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
    ReadTime = new Timestamp(),
    AssetTypes = { "", },
    ContentType = ContentType.Unspecified,
    OutputConfig = new OutputConfig(),
    RelationshipTypes = { "", },
};
// Make the request
Operation<ExportAssetsResponse, ExportAssetsRequest> response = assetServiceClient.ExportAssets(request);

// Poll until the returned long-running operation is complete
Operation<ExportAssetsResponse, ExportAssetsRequest> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
ExportAssetsResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<ExportAssetsResponse, ExportAssetsRequest> retrievedResponse = assetServiceClient.PollOnceExportAssets(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    ExportAssetsResponse retrievedResult = retrievedResponse.Result;
}

ExportAssetsAsync(ExportAssetsRequest, CallSettings)

public virtual Task<Operation<ExportAssetsResponse, ExportAssetsRequest>> ExportAssetsAsync(ExportAssetsRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<ExportAssetsResponse, ExportAssetsRequest>>

A Task containing the RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
ExportAssetsRequest request = new ExportAssetsRequest
{
    ParentAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
    ReadTime = new Timestamp(),
    AssetTypes = { "", },
    ContentType = ContentType.Unspecified,
    OutputConfig = new OutputConfig(),
    RelationshipTypes = { "", },
};
// Make the request
Operation<ExportAssetsResponse, ExportAssetsRequest> response = await assetServiceClient.ExportAssetsAsync(request);

// Poll until the returned long-running operation is complete
Operation<ExportAssetsResponse, ExportAssetsRequest> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ExportAssetsResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<ExportAssetsResponse, ExportAssetsRequest> retrievedResponse = await assetServiceClient.PollOnceExportAssetsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    ExportAssetsResponse retrievedResult = retrievedResponse.Result;
}

ExportAssetsAsync(ExportAssetsRequest, CancellationToken)

public virtual Task<Operation<ExportAssetsResponse, ExportAssetsRequest>> ExportAssetsAsync(ExportAssetsRequest request, CancellationToken cancellationToken)

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 object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<ExportAssetsResponse, ExportAssetsRequest>>

A Task containing the RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
ExportAssetsRequest request = new ExportAssetsRequest
{
    ParentAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
    ReadTime = new Timestamp(),
    AssetTypes = { "", },
    ContentType = ContentType.Unspecified,
    OutputConfig = new OutputConfig(),
    RelationshipTypes = { "", },
};
// Make the request
Operation<ExportAssetsResponse, ExportAssetsRequest> response = await assetServiceClient.ExportAssetsAsync(request);

// Poll until the returned long-running operation is complete
Operation<ExportAssetsResponse, ExportAssetsRequest> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ExportAssetsResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<ExportAssetsResponse, ExportAssetsRequest> retrievedResponse = await assetServiceClient.PollOnceExportAssetsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    ExportAssetsResponse retrievedResult = retrievedResponse.Result;
}

GetFeed(FeedName, CallSettings)

public virtual Feed GetFeed(FeedName name, CallSettings callSettings = null)

Gets details about an asset feed.

Parameters
NameDescription
nameFeedName

Required. The name of the Feed and it must be in the format of: projects/project_number/feeds/feed_id folders/folder_number/feeds/feed_id organizations/organization_number/feeds/feed_id

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Feed

The RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = AssetServiceClient.Create();
// Initialize request argument(s)
FeedName name = FeedName.FromProjectFeed("[PROJECT]", "[FEED]");
// Make the request
Feed response = assetServiceClient.GetFeed(name);

GetFeed(GetFeedRequest, CallSettings)

public virtual Feed GetFeed(GetFeedRequest request, CallSettings callSettings = null)

Gets details about an asset feed.

Parameters
NameDescription
requestGetFeedRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Feed

The RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = AssetServiceClient.Create();
// Initialize request argument(s)
GetFeedRequest request = new GetFeedRequest
{
    FeedName = FeedName.FromProjectFeed("[PROJECT]", "[FEED]"),
};
// Make the request
Feed response = assetServiceClient.GetFeed(request);

GetFeed(String, CallSettings)

public virtual Feed GetFeed(string name, CallSettings callSettings = null)

Gets details about an asset feed.

Parameters
NameDescription
nameString

Required. The name of the Feed and it must be in the format of: projects/project_number/feeds/feed_id folders/folder_number/feeds/feed_id organizations/organization_number/feeds/feed_id

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Feed

The RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = AssetServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/feeds/[FEED]";
// Make the request
Feed response = assetServiceClient.GetFeed(name);

GetFeedAsync(FeedName, CallSettings)

public virtual Task<Feed> GetFeedAsync(FeedName name, CallSettings callSettings = null)

Gets details about an asset feed.

Parameters
NameDescription
nameFeedName

Required. The name of the Feed and it must be in the format of: projects/project_number/feeds/feed_id folders/folder_number/feeds/feed_id organizations/organization_number/feeds/feed_id

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Feed>

A Task containing the RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
FeedName name = FeedName.FromProjectFeed("[PROJECT]", "[FEED]");
// Make the request
Feed response = await assetServiceClient.GetFeedAsync(name);

GetFeedAsync(FeedName, CancellationToken)

public virtual Task<Feed> GetFeedAsync(FeedName name, CancellationToken cancellationToken)

Gets details about an asset feed.

Parameters
NameDescription
nameFeedName

Required. The name of the Feed and it must be in the format of: projects/project_number/feeds/feed_id folders/folder_number/feeds/feed_id organizations/organization_number/feeds/feed_id

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Feed>

A Task containing the RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
FeedName name = FeedName.FromProjectFeed("[PROJECT]", "[FEED]");
// Make the request
Feed response = await assetServiceClient.GetFeedAsync(name);

GetFeedAsync(GetFeedRequest, CallSettings)

public virtual Task<Feed> GetFeedAsync(GetFeedRequest request, CallSettings callSettings = null)

Gets details about an asset feed.

Parameters
NameDescription
requestGetFeedRequest

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<Feed>

A Task containing the RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
GetFeedRequest request = new GetFeedRequest
{
    FeedName = FeedName.FromProjectFeed("[PROJECT]", "[FEED]"),
};
// Make the request
Feed response = await assetServiceClient.GetFeedAsync(request);

GetFeedAsync(GetFeedRequest, CancellationToken)

public virtual Task<Feed> GetFeedAsync(GetFeedRequest request, CancellationToken cancellationToken)

Gets details about an asset feed.

Parameters
NameDescription
requestGetFeedRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Feed>

A Task containing the RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
GetFeedRequest request = new GetFeedRequest
{
    FeedName = FeedName.FromProjectFeed("[PROJECT]", "[FEED]"),
};
// Make the request
Feed response = await assetServiceClient.GetFeedAsync(request);

GetFeedAsync(String, CallSettings)

public virtual Task<Feed> GetFeedAsync(string name, CallSettings callSettings = null)

Gets details about an asset feed.

Parameters
NameDescription
nameString

Required. The name of the Feed and it must be in the format of: projects/project_number/feeds/feed_id folders/folder_number/feeds/feed_id organizations/organization_number/feeds/feed_id

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Feed>

A Task containing the RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/feeds/[FEED]";
// Make the request
Feed response = await assetServiceClient.GetFeedAsync(name);

GetFeedAsync(String, CancellationToken)

public virtual Task<Feed> GetFeedAsync(string name, CancellationToken cancellationToken)

Gets details about an asset feed.

Parameters
NameDescription
nameString

Required. The name of the Feed and it must be in the format of: projects/project_number/feeds/feed_id folders/folder_number/feeds/feed_id organizations/organization_number/feeds/feed_id

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Feed>

A Task containing the RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/feeds/[FEED]";
// Make the request
Feed response = await assetServiceClient.GetFeedAsync(name);

GetSavedQuery(GetSavedQueryRequest, CallSettings)

public virtual SavedQuery GetSavedQuery(GetSavedQueryRequest request, CallSettings callSettings = null)

Gets details about a saved query.

Parameters
NameDescription
requestGetSavedQueryRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
SavedQuery

The RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = AssetServiceClient.Create();
// Initialize request argument(s)
GetSavedQueryRequest request = new GetSavedQueryRequest
{
    SavedQueryName = SavedQueryName.FromProjectSavedQuery("[PROJECT]", "[SAVED_QUERY]"),
};
// Make the request
SavedQuery response = assetServiceClient.GetSavedQuery(request);

GetSavedQuery(SavedQueryName, CallSettings)

public virtual SavedQuery GetSavedQuery(SavedQueryName name, CallSettings callSettings = null)

Gets details about a saved query.

Parameters
NameDescription
nameSavedQueryName

Required. The name of the saved query and it must be in the format of:

  • projects/project_number/savedQueries/saved_query_id
  • folders/folder_number/savedQueries/saved_query_id
  • organizations/organization_number/savedQueries/saved_query_id
callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
SavedQuery

The RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = AssetServiceClient.Create();
// Initialize request argument(s)
SavedQueryName name = SavedQueryName.FromProjectSavedQuery("[PROJECT]", "[SAVED_QUERY]");
// Make the request
SavedQuery response = assetServiceClient.GetSavedQuery(name);

GetSavedQuery(String, CallSettings)

public virtual SavedQuery GetSavedQuery(string name, CallSettings callSettings = null)

Gets details about a saved query.

Parameters
NameDescription
nameString

Required. The name of the saved query and it must be in the format of:

  • projects/project_number/savedQueries/saved_query_id
  • folders/folder_number/savedQueries/saved_query_id
  • organizations/organization_number/savedQueries/saved_query_id
callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
SavedQuery

The RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = AssetServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/savedQueries/[SAVED_QUERY]";
// Make the request
SavedQuery response = assetServiceClient.GetSavedQuery(name);

GetSavedQueryAsync(GetSavedQueryRequest, CallSettings)

public virtual Task<SavedQuery> GetSavedQueryAsync(GetSavedQueryRequest request, CallSettings callSettings = null)

Gets details about a saved query.

Parameters
NameDescription
requestGetSavedQueryRequest

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<SavedQuery>

A Task containing the RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
GetSavedQueryRequest request = new GetSavedQueryRequest
{
    SavedQueryName = SavedQueryName.FromProjectSavedQuery("[PROJECT]", "[SAVED_QUERY]"),
};
// Make the request
SavedQuery response = await assetServiceClient.GetSavedQueryAsync(request);

GetSavedQueryAsync(GetSavedQueryRequest, CancellationToken)

public virtual Task<SavedQuery> GetSavedQueryAsync(GetSavedQueryRequest request, CancellationToken cancellationToken)

Gets details about a saved query.

Parameters
NameDescription
requestGetSavedQueryRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<SavedQuery>

A Task containing the RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
GetSavedQueryRequest request = new GetSavedQueryRequest
{
    SavedQueryName = SavedQueryName.FromProjectSavedQuery("[PROJECT]", "[SAVED_QUERY]"),
};
// Make the request
SavedQuery response = await assetServiceClient.GetSavedQueryAsync(request);

GetSavedQueryAsync(SavedQueryName, CallSettings)

public virtual Task<SavedQuery> GetSavedQueryAsync(SavedQueryName name, CallSettings callSettings = null)

Gets details about a saved query.

Parameters
NameDescription
nameSavedQueryName

Required. The name of the saved query and it must be in the format of:

  • projects/project_number/savedQueries/saved_query_id
  • folders/folder_number/savedQueries/saved_query_id
  • organizations/organization_number/savedQueries/saved_query_id
callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<SavedQuery>

A Task containing the RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
SavedQueryName name = SavedQueryName.FromProjectSavedQuery("[PROJECT]", "[SAVED_QUERY]");
// Make the request
SavedQuery response = await assetServiceClient.GetSavedQueryAsync(name);

GetSavedQueryAsync(SavedQueryName, CancellationToken)

public virtual Task<SavedQuery> GetSavedQueryAsync(SavedQueryName name, CancellationToken cancellationToken)

Gets details about a saved query.

Parameters
NameDescription
nameSavedQueryName

Required. The name of the saved query and it must be in the format of:

  • projects/project_number/savedQueries/saved_query_id
  • folders/folder_number/savedQueries/saved_query_id
  • organizations/organization_number/savedQueries/saved_query_id
cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<SavedQuery>

A Task containing the RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
SavedQueryName name = SavedQueryName.FromProjectSavedQuery("[PROJECT]", "[SAVED_QUERY]");
// Make the request
SavedQuery response = await assetServiceClient.GetSavedQueryAsync(name);

GetSavedQueryAsync(String, CallSettings)

public virtual Task<SavedQuery> GetSavedQueryAsync(string name, CallSettings callSettings = null)

Gets details about a saved query.

Parameters
NameDescription
nameString

Required. The name of the saved query and it must be in the format of:

  • projects/project_number/savedQueries/saved_query_id
  • folders/folder_number/savedQueries/saved_query_id
  • organizations/organization_number/savedQueries/saved_query_id
callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<SavedQuery>

A Task containing the RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/savedQueries/[SAVED_QUERY]";
// Make the request
SavedQuery response = await assetServiceClient.GetSavedQueryAsync(name);

GetSavedQueryAsync(String, CancellationToken)

public virtual Task<SavedQuery> GetSavedQueryAsync(string name, CancellationToken cancellationToken)

Gets details about a saved query.

Parameters
NameDescription
nameString

Required. The name of the saved query and it must be in the format of:

  • projects/project_number/savedQueries/saved_query_id
  • folders/folder_number/savedQueries/saved_query_id
  • organizations/organization_number/savedQueries/saved_query_id
cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<SavedQuery>

A Task containing the RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/savedQueries/[SAVED_QUERY]";
// Make the request
SavedQuery response = await assetServiceClient.GetSavedQueryAsync(name);

ListAssets(IResourceName, String, Nullable<Int32>, CallSettings)

public virtual PagedEnumerable<ListAssetsResponse, Asset> ListAssets(IResourceName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

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

Parameters
NameDescription
parentIResourceName

Required. Name of the organization, folder, or project the assets belong to. Format: "organizations/[organization-number]" (such as "organizations/123"), "projects/[project-id]" (such as "projects/my-project-id"), "projects/[project-number]" (such as "projects/12345"), or "folders/[folder-number]" (such as "folders/12345").

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<ListAssetsResponse, Asset>

A pageable sequence of Asset resources.

Example
// Create client
AssetServiceClient assetServiceClient = AssetServiceClient.Create();
// Initialize request argument(s)
IResourceName parent = new UnparsedResourceName("a/wildcard/resource");
// Make the request
PagedEnumerable<ListAssetsResponse, Asset> response = assetServiceClient.ListAssets(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (Asset 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 (ListAssetsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Asset 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<Asset> 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 (Asset 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;

ListAssets(ListAssetsRequest, CallSettings)

public virtual PagedEnumerable<ListAssetsResponse, Asset> ListAssets(ListAssetsRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestListAssetsRequest

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<ListAssetsResponse, Asset>

A pageable sequence of Asset resources.

Example
// Create client
AssetServiceClient assetServiceClient = AssetServiceClient.Create();
// Initialize request argument(s)
ListAssetsRequest request = new ListAssetsRequest
{
    ParentAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
    ReadTime = new Timestamp(),
    AssetTypes = { "", },
    ContentType = ContentType.Unspecified,
    RelationshipTypes = { "", },
};
// Make the request
PagedEnumerable<ListAssetsResponse, Asset> response = assetServiceClient.ListAssets(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (Asset 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 (ListAssetsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Asset 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<Asset> 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 (Asset 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;

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

public virtual PagedEnumerable<ListAssetsResponse, Asset> ListAssets(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

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

Parameters
NameDescription
parentString

Required. Name of the organization, folder, or project the assets belong to. Format: "organizations/[organization-number]" (such as "organizations/123"), "projects/[project-id]" (such as "projects/my-project-id"), "projects/[project-number]" (such as "projects/12345"), or "folders/[folder-number]" (such as "folders/12345").

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<ListAssetsResponse, Asset>

A pageable sequence of Asset resources.

Example
// Create client
AssetServiceClient assetServiceClient = AssetServiceClient.Create();
// Initialize request argument(s)
string parent = "a/wildcard/resource";
// Make the request
PagedEnumerable<ListAssetsResponse, Asset> response = assetServiceClient.ListAssets(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (Asset 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 (ListAssetsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Asset 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<Asset> 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 (Asset 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;

ListAssetsAsync(IResourceName, String, Nullable<Int32>, CallSettings)

public virtual PagedAsyncEnumerable<ListAssetsResponse, Asset> ListAssetsAsync(IResourceName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

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

Parameters
NameDescription
parentIResourceName

Required. Name of the organization, folder, or project the assets belong to. Format: "organizations/[organization-number]" (such as "organizations/123"), "projects/[project-id]" (such as "projects/my-project-id"), "projects/[project-number]" (such as "projects/12345"), or "folders/[folder-number]" (such as "folders/12345").

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<ListAssetsResponse, Asset>

A pageable asynchronous sequence of Asset resources.

Example
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
IResourceName parent = new UnparsedResourceName("a/wildcard/resource");
// Make the request
PagedAsyncEnumerable<ListAssetsResponse, Asset> response = assetServiceClient.ListAssetsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Asset 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((ListAssetsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Asset 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<Asset> 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 (Asset 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;

ListAssetsAsync(ListAssetsRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListAssetsResponse, Asset> ListAssetsAsync(ListAssetsRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestListAssetsRequest

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<ListAssetsResponse, Asset>

A pageable asynchronous sequence of Asset resources.

Example
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
ListAssetsRequest request = new ListAssetsRequest
{
    ParentAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
    ReadTime = new Timestamp(),
    AssetTypes = { "", },
    ContentType = ContentType.Unspecified,
    RelationshipTypes = { "", },
};
// Make the request
PagedAsyncEnumerable<ListAssetsResponse, Asset> response = assetServiceClient.ListAssetsAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Asset 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((ListAssetsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Asset 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<Asset> 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 (Asset 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;

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

public virtual PagedAsyncEnumerable<ListAssetsResponse, Asset> ListAssetsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

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

Parameters
NameDescription
parentString

Required. Name of the organization, folder, or project the assets belong to. Format: "organizations/[organization-number]" (such as "organizations/123"), "projects/[project-id]" (such as "projects/my-project-id"), "projects/[project-number]" (such as "projects/12345"), or "folders/[folder-number]" (such as "folders/12345").

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<ListAssetsResponse, Asset>

A pageable asynchronous sequence of Asset resources.

Example
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "a/wildcard/resource";
// Make the request
PagedAsyncEnumerable<ListAssetsResponse, Asset> response = assetServiceClient.ListAssetsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Asset 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((ListAssetsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Asset 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<Asset> 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 (Asset 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;

ListFeeds(ListFeedsRequest, CallSettings)

public virtual ListFeedsResponse ListFeeds(ListFeedsRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestListFeedsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
ListFeedsResponse

The RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = AssetServiceClient.Create();
// Initialize request argument(s)
ListFeedsRequest request = new ListFeedsRequest { Parent = "", };
// Make the request
ListFeedsResponse response = assetServiceClient.ListFeeds(request);

ListFeeds(String, CallSettings)

public virtual ListFeedsResponse ListFeeds(string parent, CallSettings callSettings = null)

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

Parameters
NameDescription
parentString

Required. The parent project/folder/organization whose feeds are to be listed. It can only be using project/folder/organization number (such as "folders/12345")", or a project ID (such as "projects/my-project-id").

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
ListFeedsResponse

The RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = AssetServiceClient.Create();
// Initialize request argument(s)
string parent = "";
// Make the request
ListFeedsResponse response = assetServiceClient.ListFeeds(parent);

ListFeedsAsync(ListFeedsRequest, CallSettings)

public virtual Task<ListFeedsResponse> ListFeedsAsync(ListFeedsRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestListFeedsRequest

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<ListFeedsResponse>

A Task containing the RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
ListFeedsRequest request = new ListFeedsRequest { Parent = "", };
// Make the request
ListFeedsResponse response = await assetServiceClient.ListFeedsAsync(request);

ListFeedsAsync(ListFeedsRequest, CancellationToken)

public virtual Task<ListFeedsResponse> ListFeedsAsync(ListFeedsRequest request, CancellationToken cancellationToken)

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

Parameters
NameDescription
requestListFeedsRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<ListFeedsResponse>

A Task containing the RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
ListFeedsRequest request = new ListFeedsRequest { Parent = "", };
// Make the request
ListFeedsResponse response = await assetServiceClient.ListFeedsAsync(request);

ListFeedsAsync(String, CallSettings)

public virtual Task<ListFeedsResponse> ListFeedsAsync(string parent, CallSettings callSettings = null)

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

Parameters
NameDescription
parentString

Required. The parent project/folder/organization whose feeds are to be listed. It can only be using project/folder/organization number (such as "folders/12345")", or a project ID (such as "projects/my-project-id").

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<ListFeedsResponse>

A Task containing the RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "";
// Make the request
ListFeedsResponse response = await assetServiceClient.ListFeedsAsync(parent);

ListFeedsAsync(String, CancellationToken)

public virtual Task<ListFeedsResponse> ListFeedsAsync(string parent, CancellationToken cancellationToken)

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

Parameters
NameDescription
parentString

Required. The parent project/folder/organization whose feeds are to be listed. It can only be using project/folder/organization number (such as "folders/12345")", or a project ID (such as "projects/my-project-id").

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<ListFeedsResponse>

A Task containing the RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "";
// Make the request
ListFeedsResponse response = await assetServiceClient.ListFeedsAsync(parent);

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

public virtual PagedEnumerable<ListSavedQueriesResponse, SavedQuery> ListSavedQueries(FolderName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

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

Parameters
NameDescription
parentFolderName

Required. The parent project/folder/organization whose savedQueries are to be listed. It can only be using project/folder/organization number (such as "folders/12345")", or a project ID (such as "projects/my-project-id").

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<ListSavedQueriesResponse, SavedQuery>

A pageable sequence of SavedQuery resources.

Example
// Create client
AssetServiceClient assetServiceClient = AssetServiceClient.Create();
// Initialize request argument(s)
FolderName parent = FolderName.FromFolder("[FOLDER]");
// Make the request
PagedEnumerable<ListSavedQueriesResponse, SavedQuery> response = assetServiceClient.ListSavedQueries(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (SavedQuery 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 (ListSavedQueriesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (SavedQuery 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<SavedQuery> 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 (SavedQuery 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;

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

public virtual PagedEnumerable<ListSavedQueriesResponse, SavedQuery> ListSavedQueries(OrganizationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

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

Parameters
NameDescription
parentOrganizationName

Required. The parent project/folder/organization whose savedQueries are to be listed. It can only be using project/folder/organization number (such as "folders/12345")", or a project ID (such as "projects/my-project-id").

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<ListSavedQueriesResponse, SavedQuery>

A pageable sequence of SavedQuery resources.

Example
// Create client
AssetServiceClient assetServiceClient = AssetServiceClient.Create();
// Initialize request argument(s)
OrganizationName parent = OrganizationName.FromOrganization("[ORGANIZATION]");
// Make the request
PagedEnumerable<ListSavedQueriesResponse, SavedQuery> response = assetServiceClient.ListSavedQueries(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (SavedQuery 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 (ListSavedQueriesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (SavedQuery 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<SavedQuery> 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 (SavedQuery 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;

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

public virtual PagedEnumerable<ListSavedQueriesResponse, SavedQuery> ListSavedQueries(ProjectName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

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

Parameters
NameDescription
parentProjectName

Required. The parent project/folder/organization whose savedQueries are to be listed. It can only be using project/folder/organization number (such as "folders/12345")", or a project ID (such as "projects/my-project-id").

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<ListSavedQueriesResponse, SavedQuery>

A pageable sequence of SavedQuery resources.

Example
// Create client
AssetServiceClient assetServiceClient = AssetServiceClient.Create();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
// Make the request
PagedEnumerable<ListSavedQueriesResponse, SavedQuery> response = assetServiceClient.ListSavedQueries(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (SavedQuery 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 (ListSavedQueriesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (SavedQuery 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<SavedQuery> 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 (SavedQuery 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;

ListSavedQueries(ListSavedQueriesRequest, CallSettings)

public virtual PagedEnumerable<ListSavedQueriesResponse, SavedQuery> ListSavedQueries(ListSavedQueriesRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestListSavedQueriesRequest

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<ListSavedQueriesResponse, SavedQuery>

A pageable sequence of SavedQuery resources.

Example
// Create client
AssetServiceClient assetServiceClient = AssetServiceClient.Create();
// Initialize request argument(s)
ListSavedQueriesRequest request = new ListSavedQueriesRequest
{
    ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
    Filter = "",
};
// Make the request
PagedEnumerable<ListSavedQueriesResponse, SavedQuery> response = assetServiceClient.ListSavedQueries(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (SavedQuery 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 (ListSavedQueriesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (SavedQuery 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<SavedQuery> 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 (SavedQuery 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;

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

public virtual PagedEnumerable<ListSavedQueriesResponse, SavedQuery> ListSavedQueries(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

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

Parameters
NameDescription
parentString

Required. The parent project/folder/organization whose savedQueries are to be listed. It can only be using project/folder/organization number (such as "folders/12345")", or a project ID (such as "projects/my-project-id").

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<ListSavedQueriesResponse, SavedQuery>

A pageable sequence of SavedQuery resources.

Example
// Create client
AssetServiceClient assetServiceClient = AssetServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
// Make the request
PagedEnumerable<ListSavedQueriesResponse, SavedQuery> response = assetServiceClient.ListSavedQueries(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (SavedQuery 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 (ListSavedQueriesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (SavedQuery 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<SavedQuery> 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 (SavedQuery 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;

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

public virtual PagedAsyncEnumerable<ListSavedQueriesResponse, SavedQuery> ListSavedQueriesAsync(FolderName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

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

Parameters
NameDescription
parentFolderName

Required. The parent project/folder/organization whose savedQueries are to be listed. It can only be using project/folder/organization number (such as "folders/12345")", or a project ID (such as "projects/my-project-id").

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<ListSavedQueriesResponse, SavedQuery>

A pageable asynchronous sequence of SavedQuery resources.

Example
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
FolderName parent = FolderName.FromFolder("[FOLDER]");
// Make the request
PagedAsyncEnumerable<ListSavedQueriesResponse, SavedQuery> response = assetServiceClient.ListSavedQueriesAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((SavedQuery 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((ListSavedQueriesResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (SavedQuery 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<SavedQuery> 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 (SavedQuery 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;

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

public virtual PagedAsyncEnumerable<ListSavedQueriesResponse, SavedQuery> ListSavedQueriesAsync(OrganizationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

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

Parameters
NameDescription
parentOrganizationName

Required. The parent project/folder/organization whose savedQueries are to be listed. It can only be using project/folder/organization number (such as "folders/12345")", or a project ID (such as "projects/my-project-id").

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<ListSavedQueriesResponse, SavedQuery>

A pageable asynchronous sequence of SavedQuery resources.

Example
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
OrganizationName parent = OrganizationName.FromOrganization("[ORGANIZATION]");
// Make the request
PagedAsyncEnumerable<ListSavedQueriesResponse, SavedQuery> response = assetServiceClient.ListSavedQueriesAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((SavedQuery 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((ListSavedQueriesResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (SavedQuery 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<SavedQuery> 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 (SavedQuery 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;

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

public virtual PagedAsyncEnumerable<ListSavedQueriesResponse, SavedQuery> ListSavedQueriesAsync(ProjectName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

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

Parameters
NameDescription
parentProjectName

Required. The parent project/folder/organization whose savedQueries are to be listed. It can only be using project/folder/organization number (such as "folders/12345")", or a project ID (such as "projects/my-project-id").

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<ListSavedQueriesResponse, SavedQuery>

A pageable asynchronous sequence of SavedQuery resources.

Example
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
// Make the request
PagedAsyncEnumerable<ListSavedQueriesResponse, SavedQuery> response = assetServiceClient.ListSavedQueriesAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((SavedQuery 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((ListSavedQueriesResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (SavedQuery 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<SavedQuery> 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 (SavedQuery 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;

ListSavedQueriesAsync(ListSavedQueriesRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListSavedQueriesResponse, SavedQuery> ListSavedQueriesAsync(ListSavedQueriesRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestListSavedQueriesRequest

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<ListSavedQueriesResponse, SavedQuery>

A pageable asynchronous sequence of SavedQuery resources.

Example
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
ListSavedQueriesRequest request = new ListSavedQueriesRequest
{
    ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
    Filter = "",
};
// Make the request
PagedAsyncEnumerable<ListSavedQueriesResponse, SavedQuery> response = assetServiceClient.ListSavedQueriesAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((SavedQuery 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((ListSavedQueriesResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (SavedQuery 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<SavedQuery> 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 (SavedQuery 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;

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

public virtual PagedAsyncEnumerable<ListSavedQueriesResponse, SavedQuery> ListSavedQueriesAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

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

Parameters
NameDescription
parentString

Required. The parent project/folder/organization whose savedQueries are to be listed. It can only be using project/folder/organization number (such as "folders/12345")", or a project ID (such as "projects/my-project-id").

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<ListSavedQueriesResponse, SavedQuery>

A pageable asynchronous sequence of SavedQuery resources.

Example
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
// Make the request
PagedAsyncEnumerable<ListSavedQueriesResponse, SavedQuery> response = assetServiceClient.ListSavedQueriesAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((SavedQuery 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((ListSavedQueriesResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (SavedQuery 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<SavedQuery> 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 (SavedQuery 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;

PollOnceAnalyzeIamPolicyLongrunning(String, CallSettings)

public virtual Operation<AnalyzeIamPolicyLongrunningResponse, AnalyzeIamPolicyLongrunningMetadata> PollOnceAnalyzeIamPolicyLongrunning(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of AnalyzeIamPolicyLongrunning.

Parameters
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<AnalyzeIamPolicyLongrunningResponse, AnalyzeIamPolicyLongrunningMetadata>

The result of polling the operation.

PollOnceAnalyzeIamPolicyLongrunningAsync(String, CallSettings)

public virtual Task<Operation<AnalyzeIamPolicyLongrunningResponse, AnalyzeIamPolicyLongrunningMetadata>> PollOnceAnalyzeIamPolicyLongrunningAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of AnalyzeIamPolicyLongrunning.

Parameters
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<AnalyzeIamPolicyLongrunningResponse, AnalyzeIamPolicyLongrunningMetadata>>

A task representing the result of polling the operation.

PollOnceExportAssets(String, CallSettings)

public virtual Operation<ExportAssetsResponse, ExportAssetsRequest> PollOnceExportAssets(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of ExportAssets.

Parameters
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<ExportAssetsResponse, ExportAssetsRequest>

The result of polling the operation.

PollOnceExportAssetsAsync(String, CallSettings)

public virtual Task<Operation<ExportAssetsResponse, ExportAssetsRequest>> PollOnceExportAssetsAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of ExportAssets.

Parameters
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<ExportAssetsResponse, ExportAssetsRequest>>

A task representing the result of polling the operation.

SearchAllIamPolicies(SearchAllIamPoliciesRequest, CallSettings)

public virtual PagedEnumerable<SearchAllIamPoliciesResponse, IamPolicySearchResult> SearchAllIamPolicies(SearchAllIamPoliciesRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<SearchAllIamPoliciesResponse, IamPolicySearchResult>

A pageable sequence of IamPolicySearchResult resources.

Example
// Create client
AssetServiceClient assetServiceClient = AssetServiceClient.Create();
// Initialize request argument(s)
SearchAllIamPoliciesRequest request = new SearchAllIamPoliciesRequest
{
    Scope = "",
    Query = "",
    AssetTypes = { "", },
    OrderBy = "",
};
// Make the request
PagedEnumerable<SearchAllIamPoliciesResponse, IamPolicySearchResult> response = assetServiceClient.SearchAllIamPolicies(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (IamPolicySearchResult 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 (SearchAllIamPoliciesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (IamPolicySearchResult 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<IamPolicySearchResult> 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 (IamPolicySearchResult 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;

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

public virtual PagedEnumerable<SearchAllIamPoliciesResponse, IamPolicySearchResult> SearchAllIamPolicies(string scope, string query, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

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
scopeString

Required. A scope can be a project, a folder, or an organization. The search is limited to the IAM policies within the scope. The caller must be granted the cloudasset.assets.searchAllIamPolicies permission on the desired scope.

The allowed values are:

  • projects/{PROJECT_ID} (e.g., "projects/foo-bar")
  • projects/{PROJECT_NUMBER} (e.g., "projects/12345678")
  • folders/{FOLDER_NUMBER} (e.g., "folders/1234567")
  • organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
queryString

Optional. The query statement. See how to construct a query for more information. If not specified or empty, it will search all the IAM policies within the specified scope. Note that the query string is compared against each Cloud IAM policy binding, including its principals, roles, and Cloud IAM conditions. The returned Cloud IAM policies will only contain the bindings that match your query. To learn more about the IAM policy structure, see IAM policy doc.

Examples:

  • policy:amy@gmail.com to find IAM policy bindings that specify user &quot;amy@gmail.com".
  • policy:roles/compute.admin to find IAM policy bindings that specify the Compute Admin role.
  • policy:comp* to find IAM policy bindings that contain "comp" as a prefix of any word in the binding.
  • policy.role.permissions:storage.buckets.update to find IAM policy bindings that specify a role containing "storage.buckets.update" permission. Note that if callers don't have iam.roles.get access to a role's included permissions, policy bindings that specify this role will be dropped from the search results.
  • policy.role.permissions:upd* to find IAM policy bindings that specify a role containing "upd" as a prefix of any word in the role permission. Note that if callers don't have iam.roles.get access to a role's included permissions, policy bindings that specify this role will be dropped from the search results.
  • resource:organizations/123456 to find IAM policy bindings that are set on "organizations/123456".
  • resource=//cloudresourcemanager.googleapis.com/projects/myproject to find IAM policy bindings that are set on the project named "myproject".
  • Important to find IAM policy bindings that contain "Important" as a word in any of the searchable fields (except for the included permissions).
  • resource:(instance1 OR instance2) policy:amy to find IAM policy bindings that are set on resources "instance1" or "instance2" and also specify user "amy".
  • roles:roles/compute.admin to find IAM policy bindings that specify the Compute Admin role.
  • memberTypes:user to find IAM policy bindings that contain the principal type "user".
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<SearchAllIamPoliciesResponse, IamPolicySearchResult>

A pageable sequence of IamPolicySearchResult resources.

Example
// Create client
AssetServiceClient assetServiceClient = AssetServiceClient.Create();
// Initialize request argument(s)
string scope = "";
string query = "";
// Make the request
PagedEnumerable<SearchAllIamPoliciesResponse, IamPolicySearchResult> response = assetServiceClient.SearchAllIamPolicies(scope, query);

// Iterate over all response items, lazily performing RPCs as required
foreach (IamPolicySearchResult 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 (SearchAllIamPoliciesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (IamPolicySearchResult 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<IamPolicySearchResult> 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 (IamPolicySearchResult 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;

SearchAllIamPoliciesAsync(SearchAllIamPoliciesRequest, CallSettings)

public virtual PagedAsyncEnumerable<SearchAllIamPoliciesResponse, IamPolicySearchResult> SearchAllIamPoliciesAsync(SearchAllIamPoliciesRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<SearchAllIamPoliciesResponse, IamPolicySearchResult>

A pageable asynchronous sequence of IamPolicySearchResult resources.

Example
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
SearchAllIamPoliciesRequest request = new SearchAllIamPoliciesRequest
{
    Scope = "",
    Query = "",
    AssetTypes = { "", },
    OrderBy = "",
};
// Make the request
PagedAsyncEnumerable<SearchAllIamPoliciesResponse, IamPolicySearchResult> response = assetServiceClient.SearchAllIamPoliciesAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((IamPolicySearchResult 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((SearchAllIamPoliciesResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (IamPolicySearchResult 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<IamPolicySearchResult> 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 (IamPolicySearchResult 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;

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

public virtual PagedAsyncEnumerable<SearchAllIamPoliciesResponse, IamPolicySearchResult> SearchAllIamPoliciesAsync(string scope, string query, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

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
scopeString

Required. A scope can be a project, a folder, or an organization. The search is limited to the IAM policies within the scope. The caller must be granted the cloudasset.assets.searchAllIamPolicies permission on the desired scope.

The allowed values are:

  • projects/{PROJECT_ID} (e.g., "projects/foo-bar")
  • projects/{PROJECT_NUMBER} (e.g., "projects/12345678")
  • folders/{FOLDER_NUMBER} (e.g., "folders/1234567")
  • organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
queryString

Optional. The query statement. See how to construct a query for more information. If not specified or empty, it will search all the IAM policies within the specified scope. Note that the query string is compared against each Cloud IAM policy binding, including its principals, roles, and Cloud IAM conditions. The returned Cloud IAM policies will only contain the bindings that match your query. To learn more about the IAM policy structure, see IAM policy doc.

Examples:

  • policy:amy@gmail.com to find IAM policy bindings that specify user &quot;amy@gmail.com".
  • policy:roles/compute.admin to find IAM policy bindings that specify the Compute Admin role.
  • policy:comp* to find IAM policy bindings that contain "comp" as a prefix of any word in the binding.
  • policy.role.permissions:storage.buckets.update to find IAM policy bindings that specify a role containing "storage.buckets.update" permission. Note that if callers don't have iam.roles.get access to a role's included permissions, policy bindings that specify this role will be dropped from the search results.
  • policy.role.permissions:upd* to find IAM policy bindings that specify a role containing "upd" as a prefix of any word in the role permission. Note that if callers don't have iam.roles.get access to a role's included permissions, policy bindings that specify this role will be dropped from the search results.
  • resource:organizations/123456 to find IAM policy bindings that are set on "organizations/123456".
  • resource=//cloudresourcemanager.googleapis.com/projects/myproject to find IAM policy bindings that are set on the project named "myproject".
  • Important to find IAM policy bindings that contain "Important" as a word in any of the searchable fields (except for the included permissions).
  • resource:(instance1 OR instance2) policy:amy to find IAM policy bindings that are set on resources "instance1" or "instance2" and also specify user "amy".
  • roles:roles/compute.admin to find IAM policy bindings that specify the Compute Admin role.
  • memberTypes:user to find IAM policy bindings that contain the principal type "user".
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<SearchAllIamPoliciesResponse, IamPolicySearchResult>

A pageable asynchronous sequence of IamPolicySearchResult resources.

Example
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
string scope = "";
string query = "";
// Make the request
PagedAsyncEnumerable<SearchAllIamPoliciesResponse, IamPolicySearchResult> response = assetServiceClient.SearchAllIamPoliciesAsync(scope, query);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((IamPolicySearchResult 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((SearchAllIamPoliciesResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (IamPolicySearchResult 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<IamPolicySearchResult> 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 (IamPolicySearchResult 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;

SearchAllResources(SearchAllResourcesRequest, CallSettings)

public virtual PagedEnumerable<SearchAllResourcesResponse, ResourceSearchResult> SearchAllResources(SearchAllResourcesRequest request, CallSettings callSettings = null)

Searches all 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 object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<SearchAllResourcesResponse, ResourceSearchResult>

A pageable sequence of ResourceSearchResult resources.

Example
// Create client
AssetServiceClient assetServiceClient = AssetServiceClient.Create();
// Initialize request argument(s)
SearchAllResourcesRequest request = new SearchAllResourcesRequest
{
    Scope = "",
    Query = "",
    AssetTypes = { "", },
    OrderBy = "",
    ReadMask = new FieldMask(),
};
// Make the request
PagedEnumerable<SearchAllResourcesResponse, ResourceSearchResult> response = assetServiceClient.SearchAllResources(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (ResourceSearchResult 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 (SearchAllResourcesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ResourceSearchResult 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<ResourceSearchResult> 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 (ResourceSearchResult 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;

SearchAllResources(String, String, IEnumerable<String>, String, Nullable<Int32>, CallSettings)

public virtual PagedEnumerable<SearchAllResourcesResponse, ResourceSearchResult> SearchAllResources(string scope, string query, IEnumerable<string> assetTypes, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Searches all 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
scopeString

Required. A scope can be a project, a folder, or an organization. The search is limited to the resources within the scope. The caller must be granted the cloudasset.assets.searchAllResources permission on the desired scope.

The allowed values are:

  • projects/{PROJECT_ID} (e.g., "projects/foo-bar")
  • projects/{PROJECT_NUMBER} (e.g., "projects/12345678")
  • folders/{FOLDER_NUMBER} (e.g., "folders/1234567")
  • organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
queryString

Optional. The query statement. See how to construct a query for more information. If not specified or empty, it will search all the resources within the specified scope.

Examples:

  • name:Important to find Cloud resources whose name contains "Important" as a word.
  • name=Important to find the Cloud resource whose name is exactly "Important".
  • displayName:Impor* to find Cloud resources whose display name contains "Impor" as a prefix of any word in the field.
  • location:us-west* to find Cloud resources whose location contains both "us" and "west" as prefixes.
  • labels:prod to find Cloud resources whose labels contain "prod" as a key or value.
  • labels.env:prod to find Cloud resources that have a label "env" and its value is "prod".
  • labels.env:* to find Cloud resources that have a label "env".
  • kmsKey:key to find Cloud resources encrypted with a customer-managed encryption key whose name contains the word "key".
  • state:ACTIVE to find Cloud resources whose state contains "ACTIVE" as a word.
  • NOT state:ACTIVE to find Cloud resources whose state doesn't contain "ACTIVE" as a word.
  • createTime&amp;lt;1609459200 to find Cloud resources that were created before "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of "2021-01-01 00:00:00 UTC" in seconds.
  • updateTime&amp;gt;1609459200 to find Cloud resources that were updated after "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of "2021-01-01 00:00:00 UTC" in seconds.
  • Important to find Cloud resources that contain "Important" as a word in any of the searchable fields.
  • Impor* to find Cloud resources that contain "Impor" as a prefix of any word in any of the searchable fields.
  • Important location:(us-west1 OR global) to find Cloud resources that contain "Important" as a word in any of the searchable fields and are also located in the "us-west1" region or the "global" location.
assetTypesIEnumerable<String>

Optional. A list of asset types that this request searches for. If empty, it will search all the searchable asset types.

Regular expressions are also supported. For example:

  • "compute.googleapis.com.*" snapshots resources whose asset type starts with "compute.googleapis.com".
  • ".*Instance" snapshots resources whose asset type ends with "Instance".
  • ".Instance." snapshots resources whose asset type contains "Instance".

See RE2 for all supported regular expression syntax. If the regular expression does not match any supported asset type, an INVALID_ARGUMENT error will be returned.

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<SearchAllResourcesResponse, ResourceSearchResult>

A pageable sequence of ResourceSearchResult resources.

Example
// Create client
AssetServiceClient assetServiceClient = AssetServiceClient.Create();
// Initialize request argument(s)
string scope = "";
string query = "";
IEnumerable<string> assetTypes = new string[] { "", };
// Make the request
PagedEnumerable<SearchAllResourcesResponse, ResourceSearchResult> response = assetServiceClient.SearchAllResources(scope, query, assetTypes);

// Iterate over all response items, lazily performing RPCs as required
foreach (ResourceSearchResult 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 (SearchAllResourcesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ResourceSearchResult 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<ResourceSearchResult> 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 (ResourceSearchResult 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;

SearchAllResourcesAsync(SearchAllResourcesRequest, CallSettings)

public virtual PagedAsyncEnumerable<SearchAllResourcesResponse, ResourceSearchResult> SearchAllResourcesAsync(SearchAllResourcesRequest request, CallSettings callSettings = null)

Searches all 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 object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<SearchAllResourcesResponse, ResourceSearchResult>

A pageable asynchronous sequence of ResourceSearchResult resources.

Example
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
SearchAllResourcesRequest request = new SearchAllResourcesRequest
{
    Scope = "",
    Query = "",
    AssetTypes = { "", },
    OrderBy = "",
    ReadMask = new FieldMask(),
};
// Make the request
PagedAsyncEnumerable<SearchAllResourcesResponse, ResourceSearchResult> response = assetServiceClient.SearchAllResourcesAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((ResourceSearchResult 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((SearchAllResourcesResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ResourceSearchResult 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<ResourceSearchResult> 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 (ResourceSearchResult 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;

SearchAllResourcesAsync(String, String, IEnumerable<String>, String, Nullable<Int32>, CallSettings)

public virtual PagedAsyncEnumerable<SearchAllResourcesResponse, ResourceSearchResult> SearchAllResourcesAsync(string scope, string query, IEnumerable<string> assetTypes, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Searches all 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
scopeString

Required. A scope can be a project, a folder, or an organization. The search is limited to the resources within the scope. The caller must be granted the cloudasset.assets.searchAllResources permission on the desired scope.

The allowed values are:

  • projects/{PROJECT_ID} (e.g., "projects/foo-bar")
  • projects/{PROJECT_NUMBER} (e.g., "projects/12345678")
  • folders/{FOLDER_NUMBER} (e.g., "folders/1234567")
  • organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
queryString

Optional. The query statement. See how to construct a query for more information. If not specified or empty, it will search all the resources within the specified scope.

Examples:

  • name:Important to find Cloud resources whose name contains "Important" as a word.
  • name=Important to find the Cloud resource whose name is exactly "Important".
  • displayName:Impor* to find Cloud resources whose display name contains "Impor" as a prefix of any word in the field.
  • location:us-west* to find Cloud resources whose location contains both "us" and "west" as prefixes.
  • labels:prod to find Cloud resources whose labels contain "prod" as a key or value.
  • labels.env:prod to find Cloud resources that have a label "env" and its value is "prod".
  • labels.env:* to find Cloud resources that have a label "env".
  • kmsKey:key to find Cloud resources encrypted with a customer-managed encryption key whose name contains the word "key".
  • state:ACTIVE to find Cloud resources whose state contains "ACTIVE" as a word.
  • NOT state:ACTIVE to find Cloud resources whose state doesn't contain "ACTIVE" as a word.
  • createTime&amp;lt;1609459200 to find Cloud resources that were created before "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of "2021-01-01 00:00:00 UTC" in seconds.
  • updateTime&amp;gt;1609459200 to find Cloud resources that were updated after "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of "2021-01-01 00:00:00 UTC" in seconds.
  • Important to find Cloud resources that contain "Important" as a word in any of the searchable fields.
  • Impor* to find Cloud resources that contain "Impor" as a prefix of any word in any of the searchable fields.
  • Important location:(us-west1 OR global) to find Cloud resources that contain "Important" as a word in any of the searchable fields and are also located in the "us-west1" region or the "global" location.
assetTypesIEnumerable<String>

Optional. A list of asset types that this request searches for. If empty, it will search all the searchable asset types.

Regular expressions are also supported. For example:

  • "compute.googleapis.com.*" snapshots resources whose asset type starts with "compute.googleapis.com".
  • ".*Instance" snapshots resources whose asset type ends with "Instance".
  • ".Instance." snapshots resources whose asset type contains "Instance".

See RE2 for all supported regular expression syntax. If the regular expression does not match any supported asset type, an INVALID_ARGUMENT error will be returned.

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<SearchAllResourcesResponse, ResourceSearchResult>

A pageable asynchronous sequence of ResourceSearchResult resources.

Example
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
string scope = "";
string query = "";
IEnumerable<string> assetTypes = new string[] { "", };
// Make the request
PagedAsyncEnumerable<SearchAllResourcesResponse, ResourceSearchResult> response = assetServiceClient.SearchAllResourcesAsync(scope, query, assetTypes);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((ResourceSearchResult 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((SearchAllResourcesResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ResourceSearchResult 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<ResourceSearchResult> 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 (ResourceSearchResult 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.

UpdateFeed(Feed, CallSettings)

public virtual Feed UpdateFeed(Feed feed, CallSettings callSettings = null)

Updates an asset feed configuration.

Parameters
NameDescription
feedFeed

Required. The new values of feed details. It must match an existing feed and the field name must be in the format of: projects/project_number/feeds/feed_id or folders/folder_number/feeds/feed_id or organizations/organization_number/feeds/feed_id.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Feed

The RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = AssetServiceClient.Create();
// Initialize request argument(s)
Feed feed = new Feed();
// Make the request
Feed response = assetServiceClient.UpdateFeed(feed);

UpdateFeed(UpdateFeedRequest, CallSettings)

public virtual Feed UpdateFeed(UpdateFeedRequest request, CallSettings callSettings = null)

Updates an asset feed configuration.

Parameters
NameDescription
requestUpdateFeedRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Feed

The RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = AssetServiceClient.Create();
// Initialize request argument(s)
UpdateFeedRequest request = new UpdateFeedRequest
{
    Feed = new Feed(),
    UpdateMask = new FieldMask(),
};
// Make the request
Feed response = assetServiceClient.UpdateFeed(request);

UpdateFeedAsync(Feed, CallSettings)

public virtual Task<Feed> UpdateFeedAsync(Feed feed, CallSettings callSettings = null)

Updates an asset feed configuration.

Parameters
NameDescription
feedFeed

Required. The new values of feed details. It must match an existing feed and the field name must be in the format of: projects/project_number/feeds/feed_id or folders/folder_number/feeds/feed_id or organizations/organization_number/feeds/feed_id.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Feed>

A Task containing the RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
Feed feed = new Feed();
// Make the request
Feed response = await assetServiceClient.UpdateFeedAsync(feed);

UpdateFeedAsync(Feed, CancellationToken)

public virtual Task<Feed> UpdateFeedAsync(Feed feed, CancellationToken cancellationToken)

Updates an asset feed configuration.

Parameters
NameDescription
feedFeed

Required. The new values of feed details. It must match an existing feed and the field name must be in the format of: projects/project_number/feeds/feed_id or folders/folder_number/feeds/feed_id or organizations/organization_number/feeds/feed_id.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Feed>

A Task containing the RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
Feed feed = new Feed();
// Make the request
Feed response = await assetServiceClient.UpdateFeedAsync(feed);

UpdateFeedAsync(UpdateFeedRequest, CallSettings)

public virtual Task<Feed> UpdateFeedAsync(UpdateFeedRequest request, CallSettings callSettings = null)

Updates an asset feed configuration.

Parameters
NameDescription
requestUpdateFeedRequest

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<Feed>

A Task containing the RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateFeedRequest request = new UpdateFeedRequest
{
    Feed = new Feed(),
    UpdateMask = new FieldMask(),
};
// Make the request
Feed response = await assetServiceClient.UpdateFeedAsync(request);

UpdateFeedAsync(UpdateFeedRequest, CancellationToken)

public virtual Task<Feed> UpdateFeedAsync(UpdateFeedRequest request, CancellationToken cancellationToken)

Updates an asset feed configuration.

Parameters
NameDescription
requestUpdateFeedRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Feed>

A Task containing the RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateFeedRequest request = new UpdateFeedRequest
{
    Feed = new Feed(),
    UpdateMask = new FieldMask(),
};
// Make the request
Feed response = await assetServiceClient.UpdateFeedAsync(request);

UpdateSavedQuery(SavedQuery, FieldMask, CallSettings)

public virtual SavedQuery UpdateSavedQuery(SavedQuery savedQuery, FieldMask updateMask, CallSettings callSettings = null)

Updates a saved query.

Parameters
NameDescription
savedQuerySavedQuery

Required. The saved query to update.

The saved query's name field is used to identify the one to update, which has format as below:

  • projects/project_number/savedQueries/saved_query_id
  • folders/folder_number/savedQueries/saved_query_id
  • organizations/organization_number/savedQueries/saved_query_id
updateMaskFieldMask

Required. The list of fields to update.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
SavedQuery

The RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = AssetServiceClient.Create();
// Initialize request argument(s)
SavedQuery savedQuery = new SavedQuery();
FieldMask updateMask = new FieldMask();
// Make the request
SavedQuery response = assetServiceClient.UpdateSavedQuery(savedQuery, updateMask);

UpdateSavedQuery(UpdateSavedQueryRequest, CallSettings)

public virtual SavedQuery UpdateSavedQuery(UpdateSavedQueryRequest request, CallSettings callSettings = null)

Updates a saved query.

Parameters
NameDescription
requestUpdateSavedQueryRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
SavedQuery

The RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = AssetServiceClient.Create();
// Initialize request argument(s)
UpdateSavedQueryRequest request = new UpdateSavedQueryRequest
{
    SavedQuery = new SavedQuery(),
    UpdateMask = new FieldMask(),
};
// Make the request
SavedQuery response = assetServiceClient.UpdateSavedQuery(request);

UpdateSavedQueryAsync(SavedQuery, FieldMask, CallSettings)

public virtual Task<SavedQuery> UpdateSavedQueryAsync(SavedQuery savedQuery, FieldMask updateMask, CallSettings callSettings = null)

Updates a saved query.

Parameters
NameDescription
savedQuerySavedQuery

Required. The saved query to update.

The saved query's name field is used to identify the one to update, which has format as below:

  • projects/project_number/savedQueries/saved_query_id
  • folders/folder_number/savedQueries/saved_query_id
  • organizations/organization_number/savedQueries/saved_query_id
updateMaskFieldMask

Required. The list of fields to update.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<SavedQuery>

A Task containing the RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
SavedQuery savedQuery = new SavedQuery();
FieldMask updateMask = new FieldMask();
// Make the request
SavedQuery response = await assetServiceClient.UpdateSavedQueryAsync(savedQuery, updateMask);

UpdateSavedQueryAsync(SavedQuery, FieldMask, CancellationToken)

public virtual Task<SavedQuery> UpdateSavedQueryAsync(SavedQuery savedQuery, FieldMask updateMask, CancellationToken cancellationToken)

Updates a saved query.

Parameters
NameDescription
savedQuerySavedQuery

Required. The saved query to update.

The saved query's name field is used to identify the one to update, which has format as below:

  • projects/project_number/savedQueries/saved_query_id
  • folders/folder_number/savedQueries/saved_query_id
  • organizations/organization_number/savedQueries/saved_query_id
updateMaskFieldMask

Required. The list of fields to update.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<SavedQuery>

A Task containing the RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
SavedQuery savedQuery = new SavedQuery();
FieldMask updateMask = new FieldMask();
// Make the request
SavedQuery response = await assetServiceClient.UpdateSavedQueryAsync(savedQuery, updateMask);

UpdateSavedQueryAsync(UpdateSavedQueryRequest, CallSettings)

public virtual Task<SavedQuery> UpdateSavedQueryAsync(UpdateSavedQueryRequest request, CallSettings callSettings = null)

Updates a saved query.

Parameters
NameDescription
requestUpdateSavedQueryRequest

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<SavedQuery>

A Task containing the RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateSavedQueryRequest request = new UpdateSavedQueryRequest
{
    SavedQuery = new SavedQuery(),
    UpdateMask = new FieldMask(),
};
// Make the request
SavedQuery response = await assetServiceClient.UpdateSavedQueryAsync(request);

UpdateSavedQueryAsync(UpdateSavedQueryRequest, CancellationToken)

public virtual Task<SavedQuery> UpdateSavedQueryAsync(UpdateSavedQueryRequest request, CancellationToken cancellationToken)

Updates a saved query.

Parameters
NameDescription
requestUpdateSavedQueryRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<SavedQuery>

A Task containing the RPC response.

Example
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateSavedQueryRequest request = new UpdateSavedQueryRequest
{
    SavedQuery = new SavedQuery(),
    UpdateMask = new FieldMask(),
};
// Make the request
SavedQuery response = await assetServiceClient.UpdateSavedQueryAsync(request);