public abstract class AssetServiceClientAssetService 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 |
IReadOnlyList<String> |
|
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 |
AssetService.AssetServiceClient |
|
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(),
};
// 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 |
Task<AnalyzeIamPolicyResponse> |
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(),
};
// 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 |
Task<AnalyzeIamPolicyResponse> |
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(),
};
// Make the request
AnalyzeIamPolicyResponse response = await assetServiceClient.AnalyzeIamPolicyAsync(request);
AnalyzeIamPolicyLongrunning(AnalyzeIamPolicyLongrunningRequest, CallSettings)
public virtual Operation<AnalyzeIamPolicyLongrunningResponse, AnalyzeIamPolicyLongrunningRequest> 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 request to help callers to map responses to requests.
| 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 |
Operation<AnalyzeIamPolicyLongrunningResponse, AnalyzeIamPolicyLongrunningRequest> |
The RPC response. |
// Create client
AssetServiceClient assetServiceClient = AssetServiceClient.Create();
// Initialize request argument(s)
AnalyzeIamPolicyLongrunningRequest request = new AnalyzeIamPolicyLongrunningRequest
{
AnalysisQuery = new IamPolicyAnalysisQuery(),
OutputConfig = new IamPolicyAnalysisOutputConfig(),
};
// Make the request
Operation<AnalyzeIamPolicyLongrunningResponse, AnalyzeIamPolicyLongrunningRequest> response = assetServiceClient.AnalyzeIamPolicyLongrunning(request);
// Poll until the returned long-running operation is complete
Operation<AnalyzeIamPolicyLongrunningResponse, AnalyzeIamPolicyLongrunningRequest> 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, AnalyzeIamPolicyLongrunningRequest> 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, AnalyzeIamPolicyLongrunningRequest>> 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 request to help callers to map responses to requests.
| 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 |
Task<Operation<AnalyzeIamPolicyLongrunningResponse, AnalyzeIamPolicyLongrunningRequest>> |
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(),
};
// Make the request
Operation<AnalyzeIamPolicyLongrunningResponse, AnalyzeIamPolicyLongrunningRequest> response = await assetServiceClient.AnalyzeIamPolicyLongrunningAsync(request);
// Poll until the returned long-running operation is complete
Operation<AnalyzeIamPolicyLongrunningResponse, AnalyzeIamPolicyLongrunningRequest> 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, AnalyzeIamPolicyLongrunningRequest> 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, AnalyzeIamPolicyLongrunningRequest>> 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 request to help callers to map responses to requests.
| 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 |
Task<Operation<AnalyzeIamPolicyLongrunningResponse, AnalyzeIamPolicyLongrunningRequest>> |
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(),
};
// Make the request
Operation<AnalyzeIamPolicyLongrunningResponse, AnalyzeIamPolicyLongrunningRequest> response = await assetServiceClient.AnalyzeIamPolicyLongrunningAsync(request);
// Poll until the returned long-running operation is complete
Operation<AnalyzeIamPolicyLongrunningResponse, AnalyzeIamPolicyLongrunningRequest> 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, AnalyzeIamPolicyLongrunningRequest> 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;
}
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(),
};
// 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 |
Task<BatchGetAssetsHistoryResponse> |
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(),
};
// 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 |
Task<BatchGetAssetsHistoryResponse> |
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(),
};
// Make the request
BatchGetAssetsHistoryResponse response = await assetServiceClient.BatchGetAssetsHistoryAsync(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(CancellationToken))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 |
Task<AssetServiceClient> |
The task representing the created AssetServiceClient. |
CreateFeed(CreateFeedRequest, CallSettings)
public virtual Feed CreateFeed(CreateFeedRequest request, CallSettings callSettings = null)Creates a feed in a parent project/folder/organization to listen to its asset updates.
| Parameters | |
|---|---|
| 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 |
Task<Feed> |
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 |
Task<Feed> |
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 |
Task<Feed> |
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 |
Task<Feed> |
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);
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);
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 proto 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 |
Operation<ExportAssetsResponse, ExportAssetsRequest> |
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(),
};
// 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 proto 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 |
Task<Operation<ExportAssetsResponse, ExportAssetsRequest>> |
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(),
};
// 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 proto 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 |
Task<Operation<ExportAssetsResponse, ExportAssetsRequest>> |
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(),
};
// 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 |
Task<Feed> |
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 |
Task<Feed> |
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 |
Task<Feed> |
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 |
Task<Feed> |
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 |
Task<Feed> |
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 |
Task<Feed> |
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);
ListAssets(IResourceName, String, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListAssetsResponse, Asset> ListAssets(IResourceName parent, string pageToken = null, int? pageSize = default(int? ), 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 or project the assets belong to. Format: "organizations/[organization-number]" (such as "organizations/123"), "projects/[project-id]" (such as "projects/my-project-id"), or "projects/[project-number]" (such as "projects/12345"). |
pageToken |
StringThe token returned from the previous request. A value of |
pageSize |
Nullable<Int32>The 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 |
PagedEnumerable<ListAssetsResponse, Asset> |
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 |
PagedEnumerable<ListAssetsResponse, Asset> |
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,
};
// Make the request
PagedEnumerable<ListAssetsResponse, Asset> response = assetServiceClient.ListAssets(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (Asset item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListAssetsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Asset item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Asset> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Asset item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListAssets(String, String, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListAssetsResponse, Asset> ListAssets(string parent, string pageToken = null, int? pageSize = default(int? ), 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 or project the assets belong to. Format: "organizations/[organization-number]" (such as "organizations/123"), "projects/[project-id]" (such as "projects/my-project-id"), or "projects/[project-number]" (such as "projects/12345"). |
pageToken |
StringThe token returned from the previous request. A value of |
pageSize |
Nullable<Int32>The 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 |
PagedEnumerable<ListAssetsResponse, Asset> |
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, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListAssetsResponse, Asset> ListAssetsAsync(IResourceName parent, string pageToken = null, int? pageSize = default(int? ), 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 or project the assets belong to. Format: "organizations/[organization-number]" (such as "organizations/123"), "projects/[project-id]" (such as "projects/my-project-id"), or "projects/[project-number]" (such as "projects/12345"). |
pageToken |
StringThe token returned from the previous request. A value of |
pageSize |
Nullable<Int32>The 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 |
PagedAsyncEnumerable<ListAssetsResponse, Asset> |
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 |
PagedAsyncEnumerable<ListAssetsResponse, Asset> |
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,
};
// Make the request
PagedAsyncEnumerable<ListAssetsResponse, Asset> response = assetServiceClient.ListAssetsAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Asset item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListAssetsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Asset item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Asset> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Asset item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListAssetsAsync(String, String, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListAssetsResponse, Asset> ListAssetsAsync(string parent, string pageToken = null, int? pageSize = default(int? ), 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 or project the assets belong to. Format: "organizations/[organization-number]" (such as "organizations/123"), "projects/[project-id]" (such as "projects/my-project-id"), or "projects/[project-number]" (such as "projects/12345"). |
pageToken |
StringThe token returned from the previous request. A value of |
pageSize |
Nullable<Int32>The 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 |
PagedAsyncEnumerable<ListAssetsResponse, Asset> |
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 |
Task<ListFeedsResponse> |
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 |
Task<ListFeedsResponse> |
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 |
Task<ListFeedsResponse> |
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 |
Task<ListFeedsResponse> |
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);
PollOnceAnalyzeIamPolicyLongrunning(String, CallSettings)
public virtual Operation<AnalyzeIamPolicyLongrunningResponse, AnalyzeIamPolicyLongrunningRequest> 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 |
Operation<AnalyzeIamPolicyLongrunningResponse, AnalyzeIamPolicyLongrunningRequest> |
The result of polling the operation. |
PollOnceAnalyzeIamPolicyLongrunningAsync(String, CallSettings)
public virtual Task<Operation<AnalyzeIamPolicyLongrunningResponse, AnalyzeIamPolicyLongrunningRequest>> 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 |
Task<Operation<AnalyzeIamPolicyLongrunningResponse, AnalyzeIamPolicyLongrunningRequest>> |
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 |
Operation<ExportAssetsResponse, ExportAssetsRequest> |
The result of polling the operation. |
PollOnceExportAssetsAsync(String, CallSettings)
public virtual Task<Operation<ExportAssetsResponse, ExportAssetsRequest>> PollOnceExportAssetsAsync(string operationName, CallSettings callSettings = null)Asynchronously poll an operation once, using an operationName from a previous invocation of
ExportAssets.
| Parameters | |
|---|---|
| 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 |
Task<Operation<ExportAssetsResponse, ExportAssetsRequest>> |
A task representing the result of polling the operation. |
SearchAllIamPolicies(SearchAllIamPoliciesRequest, CallSettings)
public virtual PagedEnumerable<SearchAllIamPoliciesResponse, IamPolicySearchResult> SearchAllIamPolicies(SearchAllIamPoliciesRequest request, CallSettings callSettings = null)Searches all IAM policies within the specified scope, such as a project,
folder, or organization. The caller must be granted the
cloudasset.assets.searchAllIamPolicies permission on the desired scope,
otherwise the request will be rejected.
| Parameters | |
|---|---|
| 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 |
PagedEnumerable<SearchAllIamPoliciesResponse, IamPolicySearchResult> |
A pageable sequence of IamPolicySearchResult resources. |
// Create client
AssetServiceClient assetServiceClient = AssetServiceClient.Create();
// Initialize request argument(s)
SearchAllIamPoliciesRequest request = new SearchAllIamPoliciesRequest { Scope = "", Query = "", };
// Make the request
PagedEnumerable<SearchAllIamPoliciesResponse, IamPolicySearchResult> response = assetServiceClient.SearchAllIamPolicies(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (IamPolicySearchResult item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (SearchAllIamPoliciesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (IamPolicySearchResult item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<IamPolicySearchResult> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (IamPolicySearchResult item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
SearchAllIamPolicies(String, String, String, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<SearchAllIamPoliciesResponse, IamPolicySearchResult> SearchAllIamPolicies(string scope, string query, string pageToken = null, int? pageSize = default(int? ), 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 |
Nullable<Int32>The 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 |
PagedEnumerable<SearchAllIamPoliciesResponse, IamPolicySearchResult> |
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 |
PagedAsyncEnumerable<SearchAllIamPoliciesResponse, IamPolicySearchResult> |
A pageable asynchronous sequence of IamPolicySearchResult resources. |
// Create client
AssetServiceClient assetServiceClient = await AssetServiceClient.CreateAsync();
// Initialize request argument(s)
SearchAllIamPoliciesRequest request = new SearchAllIamPoliciesRequest { Scope = "", Query = "", };
// Make the request
PagedAsyncEnumerable<SearchAllIamPoliciesResponse, IamPolicySearchResult> response = assetServiceClient.SearchAllIamPoliciesAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((IamPolicySearchResult item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((SearchAllIamPoliciesResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (IamPolicySearchResult item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<IamPolicySearchResult> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (IamPolicySearchResult item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
SearchAllIamPoliciesAsync(String, String, String, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<SearchAllIamPoliciesResponse, IamPolicySearchResult> SearchAllIamPoliciesAsync(string scope, string query, string pageToken = null, int? pageSize = default(int? ), 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 |
Nullable<Int32>The 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 |
PagedAsyncEnumerable<SearchAllIamPoliciesResponse, IamPolicySearchResult> |
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 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 |
PagedEnumerable<SearchAllResourcesResponse, ResourceSearchResult> |
A pageable sequence of ResourceSearchResult resources. |
// Create client
AssetServiceClient assetServiceClient = AssetServiceClient.Create();
// Initialize request argument(s)
SearchAllResourcesRequest request = new SearchAllResourcesRequest
{
Scope = "",
Query = "",
AssetTypes = { "", },
OrderBy = "",
};
// Make the request
PagedEnumerable<SearchAllResourcesResponse, ResourceSearchResult> response = assetServiceClient.SearchAllResources(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (ResourceSearchResult item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (SearchAllResourcesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (ResourceSearchResult item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<ResourceSearchResult> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (ResourceSearchResult item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
SearchAllResources(String, String, IEnumerable<String>, String, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<SearchAllResourcesResponse, ResourceSearchResult> SearchAllResources(string scope, string query, IEnumerable<string> assetTypes, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)Searches all Cloud resources within the specified scope, such as a project,
folder, or organization. The caller must be granted the
cloudasset.assets.searchAllResources permission on the desired scope,
otherwise the request will be rejected.
| Parameters | |
|---|---|
| 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 |
IEnumerable<String>Optional. A list of asset types that this request searches for. If empty, it will search all the searchable asset types. Regular expressions are also supported. For example:
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 |
Nullable<Int32>The 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 |
PagedEnumerable<SearchAllResourcesResponse, ResourceSearchResult> |
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 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 |
PagedAsyncEnumerable<SearchAllResourcesResponse, ResourceSearchResult> |
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 = "",
};
// Make the request
PagedAsyncEnumerable<SearchAllResourcesResponse, ResourceSearchResult> response = assetServiceClient.SearchAllResourcesAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((ResourceSearchResult item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((SearchAllResourcesResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (ResourceSearchResult item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<ResourceSearchResult> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (ResourceSearchResult item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
SearchAllResourcesAsync(String, String, IEnumerable<String>, String, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<SearchAllResourcesResponse, ResourceSearchResult> SearchAllResourcesAsync(string scope, string query, IEnumerable<string> assetTypes, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)Searches all Cloud resources within the specified scope, such as a project,
folder, or organization. The caller must be granted the
cloudasset.assets.searchAllResources permission on the desired scope,
otherwise the request will be rejected.
| Parameters | |
|---|---|
| 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 |
IEnumerable<String>Optional. A list of asset types that this request searches for. If empty, it will search all the searchable asset types. Regular expressions are also supported. For example:
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 |
Nullable<Int32>The 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 |
PagedAsyncEnumerable<SearchAllResourcesResponse, ResourceSearchResult> |
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 |
Task<Feed> |
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 |
Task<Feed> |
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 |
Task<Feed> |
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 |
Task<Feed> |
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);