public abstract class AssetServiceClientReference documentation and code samples for the Google Cloud Asset Inventory v1 API class AssetServiceClient.
AssetService client wrapper, for convenient use.
Derived Types
Namespace
Google.Cloud.Asset.V1Assembly
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 | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Type | Description |
string |
|
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }The default AssetService scopes.
| Property Value | |
|---|---|
| Type | Description |
IReadOnlyListstring |
|
The default AssetService scopes are:
ExportAssetsOperationsClient
public virtual OperationsClient ExportAssetsOperationsClient { get; }The long-running operations client for ExportAssets.
| Property Value | |
|---|---|
| Type | Description |
OperationsClient |
|
GrpcClient
public virtual AssetService.AssetServiceClient GrpcClient { get; }The underlying gRPC AssetService client
| Property Value | |
|---|---|
| Type | Description |
AssetServiceAssetServiceClient |
|
ServiceMetadata
public static ServiceMetadata ServiceMetadata { get; }The service metadata associated with this client type.
| Property Value | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request |
AnalyzeIamPolicyRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
AnalyzeIamPolicyResponse |
The RPC response. |
// 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 | |
|---|---|
| Name | Description |
request |
AnalyzeIamPolicyRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskAnalyzeIamPolicyResponse |
A Task containing the RPC response. |
// 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 | |
|---|---|
| Name | Description |
request |
AnalyzeIamPolicyRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskAnalyzeIamPolicyResponse |
A Task containing the RPC response. |
// 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 | |
|---|---|
| Name | Description |
request |
AnalyzeIamPolicyLongrunningRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationAnalyzeIamPolicyLongrunningResponseAnalyzeIamPolicyLongrunningMetadata |
The RPC response. |
// 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 | |
|---|---|
| Name | Description |
request |
AnalyzeIamPolicyLongrunningRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationAnalyzeIamPolicyLongrunningResponseAnalyzeIamPolicyLongrunningMetadata |
A Task containing the RPC response. |
// 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 | |
|---|---|
| Name | Description |
request |
AnalyzeIamPolicyLongrunningRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationAnalyzeIamPolicyLongrunningResponseAnalyzeIamPolicyLongrunningMetadata |
A Task containing the RPC response. |
// 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 | |
|---|---|
| Name | Description |
request |
AnalyzeMoveRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
AnalyzeMoveResponse |
The RPC response. |
// Create client
AssetServiceClient assetServiceClient = AssetServiceClient.Create();
// Initialize request argument(s)
AnalyzeMoveRequest request = new AnalyzeMoveRequest
{
ResourceAsProjectName = ProjectName.FromProject("[PROJECT]"),
DestinationParentAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
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 | |
|---|---|
| Name | Description |
request |
AnalyzeMoveRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskAnalyzeMoveResponse |
A Task containing the RPC response. |
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
AnalyzeMoveRequest request = new AnalyzeMoveRequest
{
ResourceAsProjectName = ProjectName.FromProject("[PROJECT]"),
DestinationParentAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
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 | |
|---|---|
| Name | Description |
request |
AnalyzeMoveRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskAnalyzeMoveResponse |
A Task containing the RPC response. |
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
AnalyzeMoveRequest request = new AnalyzeMoveRequest
{
ResourceAsProjectName = ProjectName.FromProject("[PROJECT]"),
DestinationParentAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
View = AnalyzeMoveRequest.Types.AnalysisView.Unspecified,
};
// Make the request
AnalyzeMoveResponse response = await assetServiceClient.AnalyzeMoveAsync(request);
AnalyzeOrgPolicies(AnalyzeOrgPoliciesRequest, CallSettings)
public virtual PagedEnumerable<AnalyzeOrgPoliciesResponse, AnalyzeOrgPoliciesResponse.Types.OrgPolicyResult> AnalyzeOrgPolicies(AnalyzeOrgPoliciesRequest request, CallSettings callSettings = null)Analyzes organization policies under a scope.
| Parameters | |
|---|---|
| Name | Description |
request |
AnalyzeOrgPoliciesRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedEnumerableAnalyzeOrgPoliciesResponseAnalyzeOrgPoliciesResponseTypesOrgPolicyResult |
A pageable sequence of AnalyzeOrgPoliciesResponse.Types.OrgPolicyResult resources. |
// Create client
AssetServiceClient assetServiceClient = AssetServiceClient.Create();
// Initialize request argument(s)
AnalyzeOrgPoliciesRequest request = new AnalyzeOrgPoliciesRequest
{
Scope = "",
Constraint = "",
Filter = "",
};
// Make the request
PagedEnumerable<AnalyzeOrgPoliciesResponse, AnalyzeOrgPoliciesResponse.Types.OrgPolicyResult> response = assetServiceClient.AnalyzeOrgPolicies(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (AnalyzeOrgPoliciesResponse.Types.OrgPolicyResult 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 (AnalyzeOrgPoliciesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (AnalyzeOrgPoliciesResponse.Types.OrgPolicyResult 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<AnalyzeOrgPoliciesResponse.Types.OrgPolicyResult> 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 (AnalyzeOrgPoliciesResponse.Types.OrgPolicyResult 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;
AnalyzeOrgPolicies(string, string, string, string, int?, CallSettings)
public virtual PagedEnumerable<AnalyzeOrgPoliciesResponse, AnalyzeOrgPoliciesResponse.Types.OrgPolicyResult> AnalyzeOrgPolicies(string scope, string constraint, string filter, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)Analyzes organization policies under a scope.
| Parameters | |
|---|---|
| Name | Description |
scope |
stringRequired. The organization to scope the request. Only organization policies within the scope will be analyzed.
|
constraint |
stringRequired. The name of the constraint to analyze organization policies for. The response only contains analyzed organization policies for the provided constraint. |
filter |
stringThe expression to filter [AnalyzeOrgPoliciesResponse.org_policy_results][google.cloud.asset.v1.AnalyzeOrgPoliciesResponse.org_policy_results]. Filtering is currently available for bare literal values and the following fields:
When filtering by a specific field, the only supported operator is |
pageToken |
stringThe token returned from the previous request. A value of |
pageSize |
intThe size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedEnumerableAnalyzeOrgPoliciesResponseAnalyzeOrgPoliciesResponseTypesOrgPolicyResult |
A pageable sequence of AnalyzeOrgPoliciesResponse.Types.OrgPolicyResult resources. |
// Create client
AssetServiceClient assetServiceClient = AssetServiceClient.Create();
// Initialize request argument(s)
string scope = "";
string constraint = "";
string filter = "";
// Make the request
PagedEnumerable<AnalyzeOrgPoliciesResponse, AnalyzeOrgPoliciesResponse.Types.OrgPolicyResult> response = assetServiceClient.AnalyzeOrgPolicies(scope, constraint, filter);
// Iterate over all response items, lazily performing RPCs as required
foreach (AnalyzeOrgPoliciesResponse.Types.OrgPolicyResult 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 (AnalyzeOrgPoliciesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (AnalyzeOrgPoliciesResponse.Types.OrgPolicyResult 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<AnalyzeOrgPoliciesResponse.Types.OrgPolicyResult> 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 (AnalyzeOrgPoliciesResponse.Types.OrgPolicyResult 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;
AnalyzeOrgPoliciesAsync(AnalyzeOrgPoliciesRequest, CallSettings)
public virtual PagedAsyncEnumerable<AnalyzeOrgPoliciesResponse, AnalyzeOrgPoliciesResponse.Types.OrgPolicyResult> AnalyzeOrgPoliciesAsync(AnalyzeOrgPoliciesRequest request, CallSettings callSettings = null)Analyzes organization policies under a scope.
| Parameters | |
|---|---|
| Name | Description |
request |
AnalyzeOrgPoliciesRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedAsyncEnumerableAnalyzeOrgPoliciesResponseAnalyzeOrgPoliciesResponseTypesOrgPolicyResult |
A pageable asynchronous sequence of AnalyzeOrgPoliciesResponse.Types.OrgPolicyResult resources. |
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
AnalyzeOrgPoliciesRequest request = new AnalyzeOrgPoliciesRequest
{
Scope = "",
Constraint = "",
Filter = "",
};
// Make the request
PagedAsyncEnumerable<AnalyzeOrgPoliciesResponse, AnalyzeOrgPoliciesResponse.Types.OrgPolicyResult> response = assetServiceClient.AnalyzeOrgPoliciesAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((AnalyzeOrgPoliciesResponse.Types.OrgPolicyResult 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((AnalyzeOrgPoliciesResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (AnalyzeOrgPoliciesResponse.Types.OrgPolicyResult 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<AnalyzeOrgPoliciesResponse.Types.OrgPolicyResult> 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 (AnalyzeOrgPoliciesResponse.Types.OrgPolicyResult 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;
AnalyzeOrgPoliciesAsync(string, string, string, string, int?, CallSettings)
public virtual PagedAsyncEnumerable<AnalyzeOrgPoliciesResponse, AnalyzeOrgPoliciesResponse.Types.OrgPolicyResult> AnalyzeOrgPoliciesAsync(string scope, string constraint, string filter, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)Analyzes organization policies under a scope.
| Parameters | |
|---|---|
| Name | Description |
scope |
stringRequired. The organization to scope the request. Only organization policies within the scope will be analyzed.
|
constraint |
stringRequired. The name of the constraint to analyze organization policies for. The response only contains analyzed organization policies for the provided constraint. |
filter |
stringThe expression to filter [AnalyzeOrgPoliciesResponse.org_policy_results][google.cloud.asset.v1.AnalyzeOrgPoliciesResponse.org_policy_results]. Filtering is currently available for bare literal values and the following fields:
When filtering by a specific field, the only supported operator is |
pageToken |
stringThe token returned from the previous request. A value of |
pageSize |
intThe size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedAsyncEnumerableAnalyzeOrgPoliciesResponseAnalyzeOrgPoliciesResponseTypesOrgPolicyResult |
A pageable asynchronous sequence of AnalyzeOrgPoliciesResponse.Types.OrgPolicyResult resources. |
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
string scope = "";
string constraint = "";
string filter = "";
// Make the request
PagedAsyncEnumerable<AnalyzeOrgPoliciesResponse, AnalyzeOrgPoliciesResponse.Types.OrgPolicyResult> response = assetServiceClient.AnalyzeOrgPoliciesAsync(scope, constraint, filter);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((AnalyzeOrgPoliciesResponse.Types.OrgPolicyResult 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((AnalyzeOrgPoliciesResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (AnalyzeOrgPoliciesResponse.Types.OrgPolicyResult 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<AnalyzeOrgPoliciesResponse.Types.OrgPolicyResult> 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 (AnalyzeOrgPoliciesResponse.Types.OrgPolicyResult 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;
AnalyzeOrgPolicyGovernedAssets(AnalyzeOrgPolicyGovernedAssetsRequest, CallSettings)
public virtual PagedEnumerable<AnalyzeOrgPolicyGovernedAssetsResponse, AnalyzeOrgPolicyGovernedAssetsResponse.Types.GovernedAsset> AnalyzeOrgPolicyGovernedAssets(AnalyzeOrgPolicyGovernedAssetsRequest request, CallSettings callSettings = null)Analyzes organization policies governed assets (Google Cloud resources or policies) under a scope. This RPC supports custom constraints and the following canned constraints:
- constraints/ainotebooks.accessMode
- constraints/ainotebooks.disableFileDownloads
- constraints/ainotebooks.disableRootAccess
- constraints/ainotebooks.disableTerminal
- constraints/ainotebooks.environmentOptions
- constraints/ainotebooks.requireAutoUpgradeSchedule
- constraints/ainotebooks.restrictVpcNetworks
- constraints/compute.disableGuestAttributesAccess
- constraints/compute.disableInstanceDataAccessApis
- constraints/compute.disableNestedVirtualization
- constraints/compute.disableSerialPortAccess
- constraints/compute.disableSerialPortLogging
- constraints/compute.disableVpcExternalIpv6
- constraints/compute.requireOsLogin
- constraints/compute.requireShieldedVm
- constraints/compute.restrictLoadBalancerCreationForTypes
- constraints/compute.restrictProtocolForwardingCreationForTypes
- constraints/compute.restrictXpnProjectLienRemoval
- constraints/compute.setNewProjectDefaultToZonalDNSOnly
- constraints/compute.skipDefaultNetworkCreation
- constraints/compute.trustedImageProjects
- constraints/compute.vmCanIpForward
- constraints/compute.vmExternalIpAccess
- constraints/gcp.detailedAuditLoggingMode
- constraints/gcp.resourceLocations
- constraints/iam.allowedPolicyMemberDomains
- constraints/iam.automaticIamGrantsForDefaultServiceAccounts
- constraints/iam.disableServiceAccountCreation
- constraints/iam.disableServiceAccountKeyCreation
- constraints/iam.disableServiceAccountKeyUpload
- constraints/iam.restrictCrossProjectServiceAccountLienRemoval
- constraints/iam.serviceAccountKeyExpiryHours
- constraints/resourcemanager.accessBoundaries
- constraints/resourcemanager.allowedExportDestinations
- constraints/sql.restrictAuthorizedNetworks
- constraints/sql.restrictNoncompliantDiagnosticDataAccess
- constraints/sql.restrictNoncompliantResourceCreation
- constraints/sql.restrictPublicIp
- constraints/storage.publicAccessPrevention
- constraints/storage.restrictAuthTypes
- constraints/storage.uniformBucketLevelAccess
This RPC only returns either resources of types supported by search APIs or IAM policies.
| Parameters | |
|---|---|
| Name | Description |
request |
AnalyzeOrgPolicyGovernedAssetsRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedEnumerableAnalyzeOrgPolicyGovernedAssetsResponseAnalyzeOrgPolicyGovernedAssetsResponseTypesGovernedAsset |
A pageable sequence of AnalyzeOrgPolicyGovernedAssetsResponse.Types.GovernedAsset resources. |
// Create client
AssetServiceClient assetServiceClient = AssetServiceClient.Create();
// Initialize request argument(s)
AnalyzeOrgPolicyGovernedAssetsRequest request = new AnalyzeOrgPolicyGovernedAssetsRequest
{
Scope = "",
Constraint = "",
Filter = "",
};
// Make the request
PagedEnumerable<AnalyzeOrgPolicyGovernedAssetsResponse, AnalyzeOrgPolicyGovernedAssetsResponse.Types.GovernedAsset> response = assetServiceClient.AnalyzeOrgPolicyGovernedAssets(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (AnalyzeOrgPolicyGovernedAssetsResponse.Types.GovernedAsset 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 (AnalyzeOrgPolicyGovernedAssetsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (AnalyzeOrgPolicyGovernedAssetsResponse.Types.GovernedAsset 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<AnalyzeOrgPolicyGovernedAssetsResponse.Types.GovernedAsset> 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 (AnalyzeOrgPolicyGovernedAssetsResponse.Types.GovernedAsset 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;
AnalyzeOrgPolicyGovernedAssets(string, string, string, string, int?, CallSettings)
public virtual PagedEnumerable<AnalyzeOrgPolicyGovernedAssetsResponse, AnalyzeOrgPolicyGovernedAssetsResponse.Types.GovernedAsset> AnalyzeOrgPolicyGovernedAssets(string scope, string constraint, string filter, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)Analyzes organization policies governed assets (Google Cloud resources or policies) under a scope. This RPC supports custom constraints and the following canned constraints:
- constraints/ainotebooks.accessMode
- constraints/ainotebooks.disableFileDownloads
- constraints/ainotebooks.disableRootAccess
- constraints/ainotebooks.disableTerminal
- constraints/ainotebooks.environmentOptions
- constraints/ainotebooks.requireAutoUpgradeSchedule
- constraints/ainotebooks.restrictVpcNetworks
- constraints/compute.disableGuestAttributesAccess
- constraints/compute.disableInstanceDataAccessApis
- constraints/compute.disableNestedVirtualization
- constraints/compute.disableSerialPortAccess
- constraints/compute.disableSerialPortLogging
- constraints/compute.disableVpcExternalIpv6
- constraints/compute.requireOsLogin
- constraints/compute.requireShieldedVm
- constraints/compute.restrictLoadBalancerCreationForTypes
- constraints/compute.restrictProtocolForwardingCreationForTypes
- constraints/compute.restrictXpnProjectLienRemoval
- constraints/compute.setNewProjectDefaultToZonalDNSOnly
- constraints/compute.skipDefaultNetworkCreation
- constraints/compute.trustedImageProjects
- constraints/compute.vmCanIpForward
- constraints/compute.vmExternalIpAccess
- constraints/gcp.detailedAuditLoggingMode
- constraints/gcp.resourceLocations
- constraints/iam.allowedPolicyMemberDomains
- constraints/iam.automaticIamGrantsForDefaultServiceAccounts
- constraints/iam.disableServiceAccountCreation
- constraints/iam.disableServiceAccountKeyCreation
- constraints/iam.disableServiceAccountKeyUpload
- constraints/iam.restrictCrossProjectServiceAccountLienRemoval
- constraints/iam.serviceAccountKeyExpiryHours
- constraints/resourcemanager.accessBoundaries
- constraints/resourcemanager.allowedExportDestinations
- constraints/sql.restrictAuthorizedNetworks
- constraints/sql.restrictNoncompliantDiagnosticDataAccess
- constraints/sql.restrictNoncompliantResourceCreation
- constraints/sql.restrictPublicIp
- constraints/storage.publicAccessPrevention
- constraints/storage.restrictAuthTypes
- constraints/storage.uniformBucketLevelAccess
This RPC only returns either resources of types supported by search APIs or IAM policies.
| Parameters | |
|---|---|
| Name | Description |
scope |
stringRequired. The organization to scope the request. Only organization policies within the scope will be analyzed. The output assets will also be limited to the ones governed by those in-scope organization policies.
|
constraint |
stringRequired. The name of the constraint to analyze governed assets for. The analysis only contains analyzed organization policies for the provided constraint. |
filter |
stringThe expression to filter [AnalyzeOrgPolicyGovernedAssetsResponse.governed_assets][google.cloud.asset.v1.AnalyzeOrgPolicyGovernedAssetsResponse.governed_assets]. For governed resources, filtering is currently available for bare literal values and the following fields:
For governed IAM policies, filtering is currently available for bare literal values and the following fields:
|
pageToken |
stringThe token returned from the previous request. A value of |
pageSize |
intThe size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedEnumerableAnalyzeOrgPolicyGovernedAssetsResponseAnalyzeOrgPolicyGovernedAssetsResponseTypesGovernedAsset |
A pageable sequence of AnalyzeOrgPolicyGovernedAssetsResponse.Types.GovernedAsset resources. |
// Create client
AssetServiceClient assetServiceClient = AssetServiceClient.Create();
// Initialize request argument(s)
string scope = "";
string constraint = "";
string filter = "";
// Make the request
PagedEnumerable<AnalyzeOrgPolicyGovernedAssetsResponse, AnalyzeOrgPolicyGovernedAssetsResponse.Types.GovernedAsset> response = assetServiceClient.AnalyzeOrgPolicyGovernedAssets(scope, constraint, filter);
// Iterate over all response items, lazily performing RPCs as required
foreach (AnalyzeOrgPolicyGovernedAssetsResponse.Types.GovernedAsset 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 (AnalyzeOrgPolicyGovernedAssetsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (AnalyzeOrgPolicyGovernedAssetsResponse.Types.GovernedAsset 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<AnalyzeOrgPolicyGovernedAssetsResponse.Types.GovernedAsset> 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 (AnalyzeOrgPolicyGovernedAssetsResponse.Types.GovernedAsset 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;
AnalyzeOrgPolicyGovernedAssetsAsync(AnalyzeOrgPolicyGovernedAssetsRequest, CallSettings)
public virtual PagedAsyncEnumerable<AnalyzeOrgPolicyGovernedAssetsResponse, AnalyzeOrgPolicyGovernedAssetsResponse.Types.GovernedAsset> AnalyzeOrgPolicyGovernedAssetsAsync(AnalyzeOrgPolicyGovernedAssetsRequest request, CallSettings callSettings = null)Analyzes organization policies governed assets (Google Cloud resources or policies) under a scope. This RPC supports custom constraints and the following canned constraints:
- constraints/ainotebooks.accessMode
- constraints/ainotebooks.disableFileDownloads
- constraints/ainotebooks.disableRootAccess
- constraints/ainotebooks.disableTerminal
- constraints/ainotebooks.environmentOptions
- constraints/ainotebooks.requireAutoUpgradeSchedule
- constraints/ainotebooks.restrictVpcNetworks
- constraints/compute.disableGuestAttributesAccess
- constraints/compute.disableInstanceDataAccessApis
- constraints/compute.disableNestedVirtualization
- constraints/compute.disableSerialPortAccess
- constraints/compute.disableSerialPortLogging
- constraints/compute.disableVpcExternalIpv6
- constraints/compute.requireOsLogin
- constraints/compute.requireShieldedVm
- constraints/compute.restrictLoadBalancerCreationForTypes
- constraints/compute.restrictProtocolForwardingCreationForTypes
- constraints/compute.restrictXpnProjectLienRemoval
- constraints/compute.setNewProjectDefaultToZonalDNSOnly
- constraints/compute.skipDefaultNetworkCreation
- constraints/compute.trustedImageProjects
- constraints/compute.vmCanIpForward
- constraints/compute.vmExternalIpAccess
- constraints/gcp.detailedAuditLoggingMode
- constraints/gcp.resourceLocations
- constraints/iam.allowedPolicyMemberDomains
- constraints/iam.automaticIamGrantsForDefaultServiceAccounts
- constraints/iam.disableServiceAccountCreation
- constraints/iam.disableServiceAccountKeyCreation
- constraints/iam.disableServiceAccountKeyUpload
- constraints/iam.restrictCrossProjectServiceAccountLienRemoval
- constraints/iam.serviceAccountKeyExpiryHours
- constraints/resourcemanager.accessBoundaries
- constraints/resourcemanager.allowedExportDestinations
- constraints/sql.restrictAuthorizedNetworks
- constraints/sql.restrictNoncompliantDiagnosticDataAccess
- constraints/sql.restrictNoncompliantResourceCreation
- constraints/sql.restrictPublicIp
- constraints/storage.publicAccessPrevention
- constraints/storage.restrictAuthTypes
- constraints/storage.uniformBucketLevelAccess
This RPC only returns either resources of types supported by search APIs or IAM policies.
| Parameters | |
|---|---|
| Name | Description |
request |
AnalyzeOrgPolicyGovernedAssetsRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedAsyncEnumerableAnalyzeOrgPolicyGovernedAssetsResponseAnalyzeOrgPolicyGovernedAssetsResponseTypesGovernedAsset |
A pageable asynchronous sequence of AnalyzeOrgPolicyGovernedAssetsResponse.Types.GovernedAsset resources. |
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
AnalyzeOrgPolicyGovernedAssetsRequest request = new AnalyzeOrgPolicyGovernedAssetsRequest
{
Scope = "",
Constraint = "",
Filter = "",
};
// Make the request
PagedAsyncEnumerable<AnalyzeOrgPolicyGovernedAssetsResponse, AnalyzeOrgPolicyGovernedAssetsResponse.Types.GovernedAsset> response = assetServiceClient.AnalyzeOrgPolicyGovernedAssetsAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((AnalyzeOrgPolicyGovernedAssetsResponse.Types.GovernedAsset 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((AnalyzeOrgPolicyGovernedAssetsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (AnalyzeOrgPolicyGovernedAssetsResponse.Types.GovernedAsset 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<AnalyzeOrgPolicyGovernedAssetsResponse.Types.GovernedAsset> 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 (AnalyzeOrgPolicyGovernedAssetsResponse.Types.GovernedAsset 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;
AnalyzeOrgPolicyGovernedAssetsAsync(string, string, string, string, int?, CallSettings)
public virtual PagedAsyncEnumerable<AnalyzeOrgPolicyGovernedAssetsResponse, AnalyzeOrgPolicyGovernedAssetsResponse.Types.GovernedAsset> AnalyzeOrgPolicyGovernedAssetsAsync(string scope, string constraint, string filter, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)Analyzes organization policies governed assets (Google Cloud resources or policies) under a scope. This RPC supports custom constraints and the following canned constraints:
- constraints/ainotebooks.accessMode
- constraints/ainotebooks.disableFileDownloads
- constraints/ainotebooks.disableRootAccess
- constraints/ainotebooks.disableTerminal
- constraints/ainotebooks.environmentOptions
- constraints/ainotebooks.requireAutoUpgradeSchedule
- constraints/ainotebooks.restrictVpcNetworks
- constraints/compute.disableGuestAttributesAccess
- constraints/compute.disableInstanceDataAccessApis
- constraints/compute.disableNestedVirtualization
- constraints/compute.disableSerialPortAccess
- constraints/compute.disableSerialPortLogging
- constraints/compute.disableVpcExternalIpv6
- constraints/compute.requireOsLogin
- constraints/compute.requireShieldedVm
- constraints/compute.restrictLoadBalancerCreationForTypes
- constraints/compute.restrictProtocolForwardingCreationForTypes
- constraints/compute.restrictXpnProjectLienRemoval
- constraints/compute.setNewProjectDefaultToZonalDNSOnly
- constraints/compute.skipDefaultNetworkCreation
- constraints/compute.trustedImageProjects
- constraints/compute.vmCanIpForward
- constraints/compute.vmExternalIpAccess
- constraints/gcp.detailedAuditLoggingMode
- constraints/gcp.resourceLocations
- constraints/iam.allowedPolicyMemberDomains
- constraints/iam.automaticIamGrantsForDefaultServiceAccounts
- constraints/iam.disableServiceAccountCreation
- constraints/iam.disableServiceAccountKeyCreation
- constraints/iam.disableServiceAccountKeyUpload
- constraints/iam.restrictCrossProjectServiceAccountLienRemoval
- constraints/iam.serviceAccountKeyExpiryHours
- constraints/resourcemanager.accessBoundaries
- constraints/resourcemanager.allowedExportDestinations
- constraints/sql.restrictAuthorizedNetworks
- constraints/sql.restrictNoncompliantDiagnosticDataAccess
- constraints/sql.restrictNoncompliantResourceCreation
- constraints/sql.restrictPublicIp
- constraints/storage.publicAccessPrevention
- constraints/storage.restrictAuthTypes
- constraints/storage.uniformBucketLevelAccess
This RPC only returns either resources of types supported by search APIs or IAM policies.
| Parameters | |
|---|---|
| Name | Description |
scope |
stringRequired. The organization to scope the request. Only organization policies within the scope will be analyzed. The output assets will also be limited to the ones governed by those in-scope organization policies.
|
constraint |
stringRequired. The name of the constraint to analyze governed assets for. The analysis only contains analyzed organization policies for the provided constraint. |
filter |
stringThe expression to filter [AnalyzeOrgPolicyGovernedAssetsResponse.governed_assets][google.cloud.asset.v1.AnalyzeOrgPolicyGovernedAssetsResponse.governed_assets]. For governed resources, filtering is currently available for bare literal values and the following fields:
For governed IAM policies, filtering is currently available for bare literal values and the following fields:
|
pageToken |
stringThe token returned from the previous request. A value of |
pageSize |
intThe size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedAsyncEnumerableAnalyzeOrgPolicyGovernedAssetsResponseAnalyzeOrgPolicyGovernedAssetsResponseTypesGovernedAsset |
A pageable asynchronous sequence of AnalyzeOrgPolicyGovernedAssetsResponse.Types.GovernedAsset resources. |
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
string scope = "";
string constraint = "";
string filter = "";
// Make the request
PagedAsyncEnumerable<AnalyzeOrgPolicyGovernedAssetsResponse, AnalyzeOrgPolicyGovernedAssetsResponse.Types.GovernedAsset> response = assetServiceClient.AnalyzeOrgPolicyGovernedAssetsAsync(scope, constraint, filter);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((AnalyzeOrgPolicyGovernedAssetsResponse.Types.GovernedAsset 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((AnalyzeOrgPolicyGovernedAssetsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (AnalyzeOrgPolicyGovernedAssetsResponse.Types.GovernedAsset 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<AnalyzeOrgPolicyGovernedAssetsResponse.Types.GovernedAsset> 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 (AnalyzeOrgPolicyGovernedAssetsResponse.Types.GovernedAsset 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;
AnalyzeOrgPolicyGovernedContainers(AnalyzeOrgPolicyGovernedContainersRequest, CallSettings)
public virtual PagedEnumerable<AnalyzeOrgPolicyGovernedContainersResponse, AnalyzeOrgPolicyGovernedContainersResponse.Types.GovernedContainer> AnalyzeOrgPolicyGovernedContainers(AnalyzeOrgPolicyGovernedContainersRequest request, CallSettings callSettings = null)Analyzes organization policies governed containers (projects, folders or organization) under a scope.
| Parameters | |
|---|---|
| Name | Description |
request |
AnalyzeOrgPolicyGovernedContainersRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedEnumerableAnalyzeOrgPolicyGovernedContainersResponseAnalyzeOrgPolicyGovernedContainersResponseTypesGovernedContainer |
A pageable sequence of AnalyzeOrgPolicyGovernedContainersResponse.Types.GovernedContainer resources. |
// Create client
AssetServiceClient assetServiceClient = AssetServiceClient.Create();
// Initialize request argument(s)
AnalyzeOrgPolicyGovernedContainersRequest request = new AnalyzeOrgPolicyGovernedContainersRequest
{
Scope = "",
Constraint = "",
Filter = "",
};
// Make the request
PagedEnumerable<AnalyzeOrgPolicyGovernedContainersResponse, AnalyzeOrgPolicyGovernedContainersResponse.Types.GovernedContainer> response = assetServiceClient.AnalyzeOrgPolicyGovernedContainers(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (AnalyzeOrgPolicyGovernedContainersResponse.Types.GovernedContainer 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 (AnalyzeOrgPolicyGovernedContainersResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (AnalyzeOrgPolicyGovernedContainersResponse.Types.GovernedContainer 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<AnalyzeOrgPolicyGovernedContainersResponse.Types.GovernedContainer> 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 (AnalyzeOrgPolicyGovernedContainersResponse.Types.GovernedContainer 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;
AnalyzeOrgPolicyGovernedContainers(string, string, string, string, int?, CallSettings)
public virtual PagedEnumerable<AnalyzeOrgPolicyGovernedContainersResponse, AnalyzeOrgPolicyGovernedContainersResponse.Types.GovernedContainer> AnalyzeOrgPolicyGovernedContainers(string scope, string constraint, string filter, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)Analyzes organization policies governed containers (projects, folders or organization) under a scope.
| Parameters | |
|---|---|
| Name | Description |
scope |
stringRequired. The organization to scope the request. Only organization policies within the scope will be analyzed. The output containers will also be limited to the ones governed by those in-scope organization policies.
|
constraint |
stringRequired. The name of the constraint to analyze governed containers for. The analysis only contains organization policies for the provided constraint. |
filter |
stringThe expression to filter [AnalyzeOrgPolicyGovernedContainersResponse.governed_containers][google.cloud.asset.v1.AnalyzeOrgPolicyGovernedContainersResponse.governed_containers]. Filtering is currently available for bare literal values and the following fields:
When filtering by a specific field, the only supported operator is |
pageToken |
stringThe token returned from the previous request. A value of |
pageSize |
intThe size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedEnumerableAnalyzeOrgPolicyGovernedContainersResponseAnalyzeOrgPolicyGovernedContainersResponseTypesGovernedContainer |
A pageable sequence of AnalyzeOrgPolicyGovernedContainersResponse.Types.GovernedContainer resources. |
// Create client
AssetServiceClient assetServiceClient = AssetServiceClient.Create();
// Initialize request argument(s)
string scope = "";
string constraint = "";
string filter = "";
// Make the request
PagedEnumerable<AnalyzeOrgPolicyGovernedContainersResponse, AnalyzeOrgPolicyGovernedContainersResponse.Types.GovernedContainer> response = assetServiceClient.AnalyzeOrgPolicyGovernedContainers(scope, constraint, filter);
// Iterate over all response items, lazily performing RPCs as required
foreach (AnalyzeOrgPolicyGovernedContainersResponse.Types.GovernedContainer 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 (AnalyzeOrgPolicyGovernedContainersResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (AnalyzeOrgPolicyGovernedContainersResponse.Types.GovernedContainer 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<AnalyzeOrgPolicyGovernedContainersResponse.Types.GovernedContainer> 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 (AnalyzeOrgPolicyGovernedContainersResponse.Types.GovernedContainer 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;
AnalyzeOrgPolicyGovernedContainersAsync(AnalyzeOrgPolicyGovernedContainersRequest, CallSettings)
public virtual PagedAsyncEnumerable<AnalyzeOrgPolicyGovernedContainersResponse, AnalyzeOrgPolicyGovernedContainersResponse.Types.GovernedContainer> AnalyzeOrgPolicyGovernedContainersAsync(AnalyzeOrgPolicyGovernedContainersRequest request, CallSettings callSettings = null)Analyzes organization policies governed containers (projects, folders or organization) under a scope.
| Parameters | |
|---|---|
| Name | Description |
request |
AnalyzeOrgPolicyGovernedContainersRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedAsyncEnumerableAnalyzeOrgPolicyGovernedContainersResponseAnalyzeOrgPolicyGovernedContainersResponseTypesGovernedContainer |
A pageable asynchronous sequence of AnalyzeOrgPolicyGovernedContainersResponse.Types.GovernedContainer resources. |
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
AnalyzeOrgPolicyGovernedContainersRequest request = new AnalyzeOrgPolicyGovernedContainersRequest
{
Scope = "",
Constraint = "",
Filter = "",
};
// Make the request
PagedAsyncEnumerable<AnalyzeOrgPolicyGovernedContainersResponse, AnalyzeOrgPolicyGovernedContainersResponse.Types.GovernedContainer> response = assetServiceClient.AnalyzeOrgPolicyGovernedContainersAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((AnalyzeOrgPolicyGovernedContainersResponse.Types.GovernedContainer 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((AnalyzeOrgPolicyGovernedContainersResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (AnalyzeOrgPolicyGovernedContainersResponse.Types.GovernedContainer 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<AnalyzeOrgPolicyGovernedContainersResponse.Types.GovernedContainer> 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 (AnalyzeOrgPolicyGovernedContainersResponse.Types.GovernedContainer 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;
AnalyzeOrgPolicyGovernedContainersAsync(string, string, string, string, int?, CallSettings)
public virtual PagedAsyncEnumerable<AnalyzeOrgPolicyGovernedContainersResponse, AnalyzeOrgPolicyGovernedContainersResponse.Types.GovernedContainer> AnalyzeOrgPolicyGovernedContainersAsync(string scope, string constraint, string filter, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)Analyzes organization policies governed containers (projects, folders or organization) under a scope.
| Parameters | |
|---|---|
| Name | Description |
scope |
stringRequired. The organization to scope the request. Only organization policies within the scope will be analyzed. The output containers will also be limited to the ones governed by those in-scope organization policies.
|
constraint |
stringRequired. The name of the constraint to analyze governed containers for. The analysis only contains organization policies for the provided constraint. |
filter |
stringThe expression to filter [AnalyzeOrgPolicyGovernedContainersResponse.governed_containers][google.cloud.asset.v1.AnalyzeOrgPolicyGovernedContainersResponse.governed_containers]. Filtering is currently available for bare literal values and the following fields:
When filtering by a specific field, the only supported operator is |
pageToken |
stringThe token returned from the previous request. A value of |
pageSize |
intThe size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedAsyncEnumerableAnalyzeOrgPolicyGovernedContainersResponseAnalyzeOrgPolicyGovernedContainersResponseTypesGovernedContainer |
A pageable asynchronous sequence of AnalyzeOrgPolicyGovernedContainersResponse.Types.GovernedContainer resources. |
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
string scope = "";
string constraint = "";
string filter = "";
// Make the request
PagedAsyncEnumerable<AnalyzeOrgPolicyGovernedContainersResponse, AnalyzeOrgPolicyGovernedContainersResponse.Types.GovernedContainer> response = assetServiceClient.AnalyzeOrgPolicyGovernedContainersAsync(scope, constraint, filter);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((AnalyzeOrgPolicyGovernedContainersResponse.Types.GovernedContainer 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((AnalyzeOrgPolicyGovernedContainersResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (AnalyzeOrgPolicyGovernedContainersResponse.Types.GovernedContainer 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<AnalyzeOrgPolicyGovernedContainersResponse.Types.GovernedContainer> 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 (AnalyzeOrgPolicyGovernedContainersResponse.Types.GovernedContainer 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;
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 | |
|---|---|
| Name | Description |
request |
BatchGetAssetsHistoryRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
BatchGetAssetsHistoryResponse |
The RPC response. |
// 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 | |
|---|---|
| Name | Description |
request |
BatchGetAssetsHistoryRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskBatchGetAssetsHistoryResponse |
A Task containing the RPC response. |
// 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 | |
|---|---|
| Name | Description |
request |
BatchGetAssetsHistoryRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskBatchGetAssetsHistoryResponse |
A Task containing the RPC response. |
// 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 | |
|---|---|
| Name | Description |
request |
BatchGetEffectiveIamPoliciesRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
BatchGetEffectiveIamPoliciesResponse |
The RPC response. |
// 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 | |
|---|---|
| Name | Description |
request |
BatchGetEffectiveIamPoliciesRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskBatchGetEffectiveIamPoliciesResponse |
A Task containing the RPC response. |
// 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 | |
|---|---|
| Name | Description |
request |
BatchGetEffectiveIamPoliciesRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskBatchGetEffectiveIamPoliciesResponse |
A Task containing the RPC response. |
// 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 | |
|---|---|
| Type | Description |
AssetServiceClient |
The created AssetServiceClient. |
CreateAsync(CancellationToken)
public static Task<AssetServiceClient> CreateAsync(CancellationToken cancellationToken = default)Asynchronously creates a AssetServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use AssetServiceClientBuilder.
| Parameter | |
|---|---|
| Name | Description |
cancellationToken |
CancellationTokenThe CancellationToken to use while creating the client. |
| Returns | |
|---|---|
| Type | Description |
TaskAssetServiceClient |
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 | |
|---|---|
| Name | Description |
request |
CreateFeedRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Feed |
The RPC response. |
// 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 | |
|---|---|
| Name | Description |
parent |
stringRequired. 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"). |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Feed |
The RPC response. |
// 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 | |
|---|---|
| Name | Description |
request |
CreateFeedRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskFeed |
A Task containing the RPC response. |
// 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 | |
|---|---|
| Name | Description |
request |
CreateFeedRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskFeed |
A Task containing the RPC response. |
// 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 | |
|---|---|
| Name | Description |
parent |
stringRequired. 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"). |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskFeed |
A Task containing the RPC response. |
// 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 | |
|---|---|
| Name | Description |
parent |
stringRequired. 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"). |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskFeed |
A Task containing the RPC response. |
// 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 | |
|---|---|
| Name | Description |
parent |
FolderNameRequired. 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"). |
savedQuery |
SavedQueryRequired. The saved_query details. The |
savedQueryId |
stringRequired. 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 Notice that this field is required in the saved query creation, and the
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
SavedQuery |
The RPC response. |
// 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 | |
|---|---|
| Name | Description |
parent |
OrganizationNameRequired. 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"). |
savedQuery |
SavedQueryRequired. The saved_query details. The |
savedQueryId |
stringRequired. 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 Notice that this field is required in the saved query creation, and the
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
SavedQuery |
The RPC response. |
// 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 | |
|---|---|
| Name | Description |
parent |
ProjectNameRequired. 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"). |
savedQuery |
SavedQueryRequired. The saved_query details. The |
savedQueryId |
stringRequired. 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 Notice that this field is required in the saved query creation, and the
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
SavedQuery |
The RPC response. |
// 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 | |
|---|---|
| Name | Description |
request |
CreateSavedQueryRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
SavedQuery |
The RPC response. |
// 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 | |
|---|---|
| Name | Description |
parent |
stringRequired. 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"). |
savedQuery |
SavedQueryRequired. The saved_query details. The |
savedQueryId |
stringRequired. 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 Notice that this field is required in the saved query creation, and the
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
SavedQuery |
The RPC response. |
// 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 | |
|---|---|
| Name | Description |
parent |
FolderNameRequired. 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"). |
savedQuery |
SavedQueryRequired. The saved_query details. The |
savedQueryId |
stringRequired. 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 Notice that this field is required in the saved query creation, and the
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskSavedQuery |
A Task containing the RPC response. |
// 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 | |
|---|---|
| Name | Description |
parent |
FolderNameRequired. 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"). |
savedQuery |
SavedQueryRequired. The saved_query details. The |
savedQueryId |
stringRequired. 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 Notice that this field is required in the saved query creation, and the
|
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskSavedQuery |
A Task containing the RPC response. |
// 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 | |
|---|---|
| Name | Description |
parent |
OrganizationNameRequired. 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"). |
savedQuery |
SavedQueryRequired. The saved_query details. The |
savedQueryId |
stringRequired. 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 Notice that this field is required in the saved query creation, and the
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskSavedQuery |
A Task containing the RPC response. |
// 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 | |
|---|---|
| Name | Description |
parent |
OrganizationNameRequired. 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"). |
savedQuery |
SavedQueryRequired. The saved_query details. The |
savedQueryId |
stringRequired. 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 Notice that this field is required in the saved query creation, and the
|
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskSavedQuery |
A Task containing the RPC response. |
// 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 | |
|---|---|
| Name | Description |
parent |
ProjectNameRequired. 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"). |
savedQuery |
SavedQueryRequired. The saved_query details. The |
savedQueryId |
stringRequired. 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 Notice that this field is required in the saved query creation, and the
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskSavedQuery |
A Task containing the RPC response. |
// 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 | |
|---|---|
| Name | Description |
parent |
ProjectNameRequired. 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"). |
savedQuery |
SavedQueryRequired. The saved_query details. The |
savedQueryId |
stringRequired. 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 Notice that this field is required in the saved query creation, and the
|
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskSavedQuery |
A Task containing the RPC response. |
// 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 | |
|---|---|
| Name | Description |
request |
CreateSavedQueryRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskSavedQuery |
A Task containing the RPC response. |
// 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 | |
|---|---|
| Name | Description |
request |
CreateSavedQueryRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskSavedQuery |
A Task containing the RPC response. |
// 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 | |
|---|---|
| Name | Description |
parent |
stringRequired. 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"). |
savedQuery |
SavedQueryRequired. The saved_query details. The |
savedQueryId |
stringRequired. 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 Notice that this field is required in the saved query creation, and the
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskSavedQuery |
A Task containing the RPC response. |
// 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 | |
|---|---|
| Name | Description |
parent |
stringRequired. 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"). |
savedQuery |
SavedQueryRequired. The saved_query details. The |
savedQueryId |
stringRequired. 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 Notice that this field is required in the saved query creation, and the
|
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskSavedQuery |
A Task containing the RPC response. |
// 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 | |
|---|---|
| Name | Description |
request |
DeleteFeedRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
// 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 | |
|---|---|
| Name | Description |
name |
FeedNameRequired. 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 |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
// 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 | |
|---|---|
| Name | Description |
name |
stringRequired. 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 |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
// 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 | |
|---|---|
| Name | Description |
request |
DeleteFeedRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Task |
A Task containing the RPC response. |
// 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 | |
|---|---|
| Name | Description |
request |
DeleteFeedRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
Task |
A Task containing the RPC response. |
// 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 | |
|---|---|
| Name | Description |
name |
FeedNameRequired. 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 |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Task |
A Task containing the RPC response. |
// 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 | |
|---|---|
| Name | Description |
name |
FeedNameRequired. 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 |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
Task |
A Task containing the RPC response. |
// 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 | |
|---|---|
| Name | Description |
name |
stringRequired. 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 |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Task |
A Task containing the RPC response. |
// 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 | |
|---|---|
| Name | Description |
name |
stringRequired. 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 |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
Task |
A Task containing the RPC response. |
// 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 | |
|---|---|
| Name | Description |
request |
DeleteSavedQueryRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
// 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 | |
|---|---|
| Name | Description |
name |
SavedQueryNameRequired. The name of the saved query to delete. It must be in the format of:
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
// 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 | |
|---|---|
| Name | Description |
name |
stringRequired. The name of the saved query to delete. It must be in the format of:
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
// 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 | |
|---|---|
| Name | Description |
request |
DeleteSavedQueryRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Task |
A Task containing the RPC response. |
// 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 | |
|---|---|
| Name | Description |
request |
DeleteSavedQueryRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
Task |
A Task containing the RPC response. |
// 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 | |
|---|---|
| Name | Description |
name |
SavedQueryNameRequired. The name of the saved query to delete. It must be in the format of:
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Task |
A Task containing the RPC response. |
// 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 | |
|---|---|
| Name | Description |
name |
SavedQueryNameRequired. The name of the saved query to delete. It must be in the format of:
|
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
Task |
A Task containing the RPC response. |
// 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 | |
|---|---|
| Name | Description |
name |
stringRequired. The name of the saved query to delete. It must be in the format of:
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Task |
A Task containing the RPC response. |
// 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 | |
|---|---|
| Name | Description |
name |
stringRequired. The name of the saved query to delete. It must be in the format of:
|
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
Task |
A Task containing the RPC response. |
// 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 | |
|---|---|
| Name | Description |
request |
ExportAssetsRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationExportAssetsResponseExportAssetsRequest |
The RPC response. |
// 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 | |
|---|---|
| Name | Description |
request |
ExportAssetsRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationExportAssetsResponseExportAssetsRequest |
A Task containing the RPC response. |
// 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 | |
|---|---|
| Name | Description |
request |
ExportAssetsRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationExportAssetsResponseExportAssetsRequest |
A Task containing the RPC response. |
// 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 | |
|---|---|
| Name | Description |
name |
FeedNameRequired. 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 |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Feed |
The RPC response. |
// 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 | |
|---|---|
| Name | Description |
request |
GetFeedRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Feed |
The RPC response. |
// 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 | |
|---|---|
| Name | Description |
name |
stringRequired. 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 |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Feed |
The RPC response. |
// 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 | |
|---|---|
| Name | Description |
name |
FeedNameRequired. 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 |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskFeed |
A Task containing the RPC response. |
// 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 | |
|---|---|
| Name | Description |
name |
FeedNameRequired. 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 |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskFeed |
A Task containing the RPC response. |
// 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 | |
|---|---|
| Name | Description |
request |
GetFeedRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskFeed |
A Task containing the RPC response. |
// 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 | |
|---|---|
| Name | Description |
request |
GetFeedRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskFeed |
A Task containing the RPC response. |
// 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 | |
|---|---|
| Name | Description |
name |
stringRequired. 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 |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskFeed |
A Task containing the RPC response. |
// 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 | |
|---|---|
| Name | Description |
name |
stringRequired. 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 |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskFeed |
A Task containing the RPC response. |
// 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 | |
|---|---|
| Name | Description |
request |
GetSavedQueryRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
SavedQuery |
The RPC response. |
// 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 | |
|---|---|
| Name | Description |
name |
SavedQueryNameRequired. The name of the saved query and it must be in the format of:
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
SavedQuery |
The RPC response. |
// 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 | |
|---|---|
| Name | Description |
name |
stringRequired. The name of the saved query and it must be in the format of:
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
SavedQuery |
The RPC response. |
// 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 | |
|---|---|
| Name | Description |
request |
GetSavedQueryRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskSavedQuery |
A Task containing the RPC response. |
// 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 | |
|---|---|
| Name | Description |
request |
GetSavedQueryRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskSavedQuery |
A Task containing the RPC response. |
// 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 | |
|---|---|
| Name | Description |
name |
SavedQueryNameRequired. The name of the saved query and it must be in the format of:
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskSavedQuery |
A Task containing the RPC response. |
// 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 | |
|---|---|
| Name | Description |
name |
SavedQueryNameRequired. The name of the saved query and it must be in the format of:
|
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskSavedQuery |
A Task containing the RPC response. |
// 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 | |
|---|---|
| Name | Description |
name |
stringRequired. The name of the saved query and it must be in the format of:
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskSavedQuery |
A Task containing the RPC response. |
// 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 | |
|---|---|
| Name | Description |
name |
stringRequired. The name of the saved query and it must be in the format of:
|
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskSavedQuery |
A Task containing the RPC response. |
// 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, int?, 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 | |
|---|---|
| Name | Description |
parent |
IResourceNameRequired. 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"). |
pageToken |
stringThe token returned from the previous request. A value of |
pageSize |
intThe size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedEnumerableListAssetsResponseAsset |
A pageable sequence of Asset resources. |
// 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 | |
|---|---|
| Name | Description |
request |
ListAssetsRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedEnumerableListAssetsResponseAsset |
A pageable sequence of Asset resources. |
// 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, int?, 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 | |
|---|---|
| Name | Description |
parent |
stringRequired. 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"). |
pageToken |
stringThe token returned from the previous request. A value of |
pageSize |
intThe size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedEnumerableListAssetsResponseAsset |
A pageable sequence of Asset resources. |
// 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, int?, 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 | |
|---|---|
| Name | Description |
parent |
IResourceNameRequired. 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"). |
pageToken |
stringThe token returned from the previous request. A value of |
pageSize |
intThe size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedAsyncEnumerableListAssetsResponseAsset |
A pageable asynchronous sequence of Asset resources. |
// 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 | |
|---|---|
| Name | Description |
request |
ListAssetsRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedAsyncEnumerableListAssetsResponseAsset |
A pageable asynchronous sequence of Asset resources. |
// 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, int?, 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 | |
|---|---|
| Name | Description |
parent |
stringRequired. 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"). |
pageToken |
stringThe token returned from the previous request. A value of |
pageSize |
intThe size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedAsyncEnumerableListAssetsResponseAsset |
A pageable asynchronous sequence of Asset resources. |
// 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 | |
|---|---|
| Name | Description |
request |
ListFeedsRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
ListFeedsResponse |
The RPC response. |
// 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 | |
|---|---|
| Name | Description |
parent |
stringRequired. 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"). |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
ListFeedsResponse |
The RPC response. |
// 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 | |
|---|---|
| Name | Description |
request |
ListFeedsRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskListFeedsResponse |
A Task containing the RPC response. |
// 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 | |
|---|---|
| Name | Description |
request |
ListFeedsRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskListFeedsResponse |
A Task containing the RPC response. |
// 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 | |
|---|---|
| Name | Description |
parent |
stringRequired. 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"). |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskListFeedsResponse |
A Task containing the RPC response. |
// 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 | |
|---|---|
| Name | Description |
parent |
stringRequired. 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"). |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskListFeedsResponse |
A Task containing the RPC response. |
// 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, int?, 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 | |
|---|---|
| Name | Description |
parent |
FolderNameRequired. 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"). |
pageToken |
stringThe token returned from the previous request. A value of |
pageSize |
intThe size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedEnumerableListSavedQueriesResponseSavedQuery |
A pageable sequence of SavedQuery resources. |
// 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, int?, 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 | |
|---|---|
| Name | Description |
parent |
OrganizationNameRequired. 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"). |
pageToken |
stringThe token returned from the previous request. A value of |
pageSize |
intThe size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedEnumerableListSavedQueriesResponseSavedQuery |
A pageable sequence of SavedQuery resources. |
// 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, int?, 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 | |
|---|---|
| Name | Description |
parent |
ProjectNameRequired. 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"). |
pageToken |
stringThe token returned from the previous request. A value of |
pageSize |
intThe size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedEnumerableListSavedQueriesResponseSavedQuery |
A pageable sequence of SavedQuery resources. |
// 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 | |
|---|---|
| Name | Description |
request |
ListSavedQueriesRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedEnumerableListSavedQueriesResponseSavedQuery |
A pageable sequence of SavedQuery resources. |
// 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, int?, 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 | |
|---|---|
| Name | Description |
parent |
stringRequired. 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"). |
pageToken |
stringThe token returned from the previous request. A value of |
pageSize |
intThe size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedEnumerableListSavedQueriesResponseSavedQuery |
A pageable sequence of SavedQuery resources. |
// 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, int?, 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 | |
|---|---|
| Name | Description |
parent |
FolderNameRequired. 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"). |
pageToken |
stringThe token returned from the previous request. A value of |
pageSize |
intThe size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedAsyncEnumerableListSavedQueriesResponseSavedQuery |
A pageable asynchronous sequence of SavedQuery resources. |
// 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, int?, 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 | |
|---|---|
| Name | Description |
parent |
OrganizationNameRequired. 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"). |
pageToken |
stringThe token returned from the previous request. A value of |
pageSize |
intThe size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedAsyncEnumerableListSavedQueriesResponseSavedQuery |
A pageable asynchronous sequence of SavedQuery resources. |
// 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, int?, 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 | |
|---|---|
| Name | Description |
parent |
ProjectNameRequired. 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"). |
pageToken |
stringThe token returned from the previous request. A value of |
pageSize |
intThe size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedAsyncEnumerableListSavedQueriesResponseSavedQuery |
A pageable asynchronous sequence of SavedQuery resources. |
// 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 | |
|---|---|
| Name | Description |
request |
ListSavedQueriesRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedAsyncEnumerableListSavedQueriesResponseSavedQuery |
A pageable asynchronous sequence of SavedQuery resources. |
// 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, int?, 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 | |
|---|---|
| Name | Description |
parent |
stringRequired. 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"). |
pageToken |
stringThe token returned from the previous request. A value of |
pageSize |
intThe size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedAsyncEnumerableListSavedQueriesResponseSavedQuery |
A pageable asynchronous sequence of SavedQuery resources. |
// 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 | |
|---|---|
| Name | Description |
operationName |
stringThe name of a previously invoked operation. Must not be |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationAnalyzeIamPolicyLongrunningResponseAnalyzeIamPolicyLongrunningMetadata |
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 | |
|---|---|
| Name | Description |
operationName |
stringThe name of a previously invoked operation. Must not be |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationAnalyzeIamPolicyLongrunningResponseAnalyzeIamPolicyLongrunningMetadata |
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 | |
|---|---|
| Name | Description |
operationName |
stringThe name of a previously invoked operation. Must not be |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationExportAssetsResponseExportAssetsRequest |
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 | |
|---|---|
| Name | Description |
operationName |
stringThe name of a previously invoked operation. Must not be |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationExportAssetsResponseExportAssetsRequest |
A task representing the result of polling the operation. |
QueryAssets(QueryAssetsRequest, CallSettings)
public virtual QueryAssetsResponse QueryAssets(QueryAssetsRequest request, CallSettings callSettings = null)Issue a job that queries assets using a SQL statement compatible with BigQuery SQL.
If the query execution finishes within timeout and there's no pagination,
the full query results will be returned in the QueryAssetsResponse.
Otherwise, full query results can be obtained by issuing extra requests
with the job_reference from the a previous QueryAssets call.
Note, the query result has approximately 10 GB limitation enforced by BigQuery. Queries return larger results will result in errors.
| Parameters | |
|---|---|
| Name | Description |
request |
QueryAssetsRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
QueryAssetsResponse |
The RPC response. |
// Create client
AssetServiceClient assetServiceClient = AssetServiceClient.Create();
// Initialize request argument(s)
QueryAssetsRequest request = new QueryAssetsRequest
{
ParentAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
Statement = "",
PageSize = 0,
PageToken = "",
Timeout = new Duration(),
ReadTimeWindow = new TimeWindow(),
OutputConfig = new QueryAssetsOutputConfig(),
};
// Make the request
QueryAssetsResponse response = assetServiceClient.QueryAssets(request);
QueryAssetsAsync(QueryAssetsRequest, CallSettings)
public virtual Task<QueryAssetsResponse> QueryAssetsAsync(QueryAssetsRequest request, CallSettings callSettings = null)Issue a job that queries assets using a SQL statement compatible with BigQuery SQL.
If the query execution finishes within timeout and there's no pagination,
the full query results will be returned in the QueryAssetsResponse.
Otherwise, full query results can be obtained by issuing extra requests
with the job_reference from the a previous QueryAssets call.
Note, the query result has approximately 10 GB limitation enforced by BigQuery. Queries return larger results will result in errors.
| Parameters | |
|---|---|
| Name | Description |
request |
QueryAssetsRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskQueryAssetsResponse |
A Task containing the RPC response. |
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
QueryAssetsRequest request = new QueryAssetsRequest
{
ParentAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
Statement = "",
PageSize = 0,
PageToken = "",
Timeout = new Duration(),
ReadTimeWindow = new TimeWindow(),
OutputConfig = new QueryAssetsOutputConfig(),
};
// Make the request
QueryAssetsResponse response = await assetServiceClient.QueryAssetsAsync(request);
QueryAssetsAsync(QueryAssetsRequest, CancellationToken)
public virtual Task<QueryAssetsResponse> QueryAssetsAsync(QueryAssetsRequest request, CancellationToken cancellationToken)Issue a job that queries assets using a SQL statement compatible with BigQuery SQL.
If the query execution finishes within timeout and there's no pagination,
the full query results will be returned in the QueryAssetsResponse.
Otherwise, full query results can be obtained by issuing extra requests
with the job_reference from the a previous QueryAssets call.
Note, the query result has approximately 10 GB limitation enforced by BigQuery. Queries return larger results will result in errors.
| Parameters | |
|---|---|
| Name | Description |
request |
QueryAssetsRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskQueryAssetsResponse |
A Task containing the RPC response. |
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
QueryAssetsRequest request = new QueryAssetsRequest
{
ParentAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
Statement = "",
PageSize = 0,
PageToken = "",
Timeout = new Duration(),
ReadTimeWindow = new TimeWindow(),
OutputConfig = new QueryAssetsOutputConfig(),
};
// Make the request
QueryAssetsResponse response = await assetServiceClient.QueryAssetsAsync(request);
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 | |
|---|---|
| Name | Description |
request |
SearchAllIamPoliciesRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedEnumerableSearchAllIamPoliciesResponseIamPolicySearchResult |
A pageable sequence of IamPolicySearchResult resources. |
// 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, int?, 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 | |
|---|---|
| Name | Description |
scope |
stringRequired. A scope can be a project, a folder, or an organization. The
search is limited to the IAM policies within the The allowed values are:
|
query |
stringOptional. 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 Examples:
|
pageToken |
stringThe token returned from the previous request. A value of |
pageSize |
intThe size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedEnumerableSearchAllIamPoliciesResponseIamPolicySearchResult |
A pageable sequence of IamPolicySearchResult resources. |
// 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 | |
|---|---|
| Name | Description |
request |
SearchAllIamPoliciesRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedAsyncEnumerableSearchAllIamPoliciesResponseIamPolicySearchResult |
A pageable asynchronous sequence of IamPolicySearchResult resources. |
// 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, int?, 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 | |
|---|---|
| Name | Description |
scope |
stringRequired. A scope can be a project, a folder, or an organization. The
search is limited to the IAM policies within the The allowed values are:
|
query |
stringOptional. 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 Examples:
|
pageToken |
stringThe token returned from the previous request. A value of |
pageSize |
intThe size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedAsyncEnumerableSearchAllIamPoliciesResponseIamPolicySearchResult |
A pageable asynchronous sequence of IamPolicySearchResult resources. |
// 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 Google Cloud resources within the specified scope, such as a
project, folder, or organization. The caller must be granted the
cloudasset.assets.searchAllResources permission on the desired scope,
otherwise the request will be rejected.
| Parameters | |
|---|---|
| Name | Description |
request |
SearchAllResourcesRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedEnumerableSearchAllResourcesResponseResourceSearchResult |
A pageable sequence of ResourceSearchResult resources. |
// 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, int?, 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 Google Cloud resources within the specified scope, such as a
project, folder, or organization. The caller must be granted the
cloudasset.assets.searchAllResources permission on the desired scope,
otherwise the request will be rejected.
| Parameters | |
|---|---|
| Name | Description |
scope |
stringRequired. A scope can be a project, a folder, or an organization. The
search is limited to the resources within the The allowed values are:
|
query |
stringOptional. 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 Examples:
|
assetTypes |
IEnumerablestringOptional. A list of asset types that this request searches for. If empty, it will search all the asset types supported by search APIs. Regular expressions are also supported. For example:
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. |
pageToken |
stringThe token returned from the previous request. A value of |
pageSize |
intThe size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedEnumerableSearchAllResourcesResponseResourceSearchResult |
A pageable sequence of ResourceSearchResult resources. |
// 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 Google Cloud resources within the specified scope, such as a
project, folder, or organization. The caller must be granted the
cloudasset.assets.searchAllResources permission on the desired scope,
otherwise the request will be rejected.
| Parameters | |
|---|---|
| Name | Description |
request |
SearchAllResourcesRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedAsyncEnumerableSearchAllResourcesResponseResourceSearchResult |
A pageable asynchronous sequence of ResourceSearchResult resources. |
// 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, int?, 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 Google Cloud resources within the specified scope, such as a
project, folder, or organization. The caller must be granted the
cloudasset.assets.searchAllResources permission on the desired scope,
otherwise the request will be rejected.
| Parameters | |
|---|---|
| Name | Description |
scope |
stringRequired. A scope can be a project, a folder, or an organization. The
search is limited to the resources within the The allowed values are:
|
query |
stringOptional. 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 Examples:
|
assetTypes |
IEnumerablestringOptional. A list of asset types that this request searches for. If empty, it will search all the asset types supported by search APIs. Regular expressions are also supported. For example:
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. |
pageToken |
stringThe token returned from the previous request. A value of |
pageSize |
intThe size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedAsyncEnumerableSearchAllResourcesResponseResourceSearchResult |
A pageable asynchronous sequence of ResourceSearchResult resources. |
// 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 | |
|---|---|
| Type | Description |
Task |
A task representing the asynchronous shutdown operation. |
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 | |
|---|---|
| Name | Description |
feed |
FeedRequired. The new values of feed details. It must match an existing feed
and the field |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Feed |
The RPC response. |
// 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 | |
|---|---|
| Name | Description |
request |
UpdateFeedRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Feed |
The RPC response. |
// 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 | |
|---|---|
| Name | Description |
feed |
FeedRequired. The new values of feed details. It must match an existing feed
and the field |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskFeed |
A Task containing the RPC response. |
// 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 | |
|---|---|
| Name | Description |
feed |
FeedRequired. The new values of feed details. It must match an existing feed
and the field |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskFeed |
A Task containing the RPC response. |
// 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 | |
|---|---|
| Name | Description |
request |
UpdateFeedRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskFeed |
A Task containing the RPC response. |
// 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 | |
|---|---|
| Name | Description |
request |
UpdateFeedRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskFeed |
A Task containing the RPC response. |
// 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 | |
|---|---|
| Name | Description |
savedQuery |
SavedQueryRequired. The saved query to update. The saved query's
|
updateMask |
FieldMaskRequired. The list of fields to update. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
SavedQuery |
The RPC response. |
// 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 | |
|---|---|
| Name | Description |
request |
UpdateSavedQueryRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
SavedQuery |
The RPC response. |
// 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 | |
|---|---|
| Name | Description |
savedQuery |
SavedQueryRequired. The saved query to update. The saved query's
|
updateMask |
FieldMaskRequired. The list of fields to update. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskSavedQuery |
A Task containing the RPC response. |
// 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 | |
|---|---|
| Name | Description |
savedQuery |
SavedQueryRequired. The saved query to update. The saved query's
|
updateMask |
FieldMaskRequired. The list of fields to update. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskSavedQuery |
A Task containing the RPC response. |
// 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 | |
|---|---|
| Name | Description |
request |
UpdateSavedQueryRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskSavedQuery |
A Task containing the RPC response. |
// 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 | |
|---|---|
| Name | Description |
request |
UpdateSavedQueryRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskSavedQuery |
A Task containing the RPC response. |
// 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);