public abstract class RecommenderClient
Recommender client wrapper, for convenient use.
Derived Types
Namespace
Google.Cloud.Recommender.V1Assembly
Google.Cloud.Recommender.V1.dll
Remarks
Provides insights and recommendations for cloud customers for various categories like performance optimization, cost savings, reliability, feature discovery, etc. Insights and recommendations are generated automatically based on analysis of user resources, configuration and monitoring metrics.
Properties
DefaultEndpoint
public static string DefaultEndpoint { get; }
The default endpoint for the Recommender service, which is a host of "recommender.googleapis.com" and a port of 443.
Property Value | |
---|---|
Type | Description |
String |
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }
The default Recommender scopes.
Property Value | |
---|---|
Type | Description |
IReadOnlyList<String> |
The default Recommender scopes are:
GrpcClient
public virtual Recommender.RecommenderClient GrpcClient { get; }
The underlying gRPC Recommender client
Property Value | |
---|---|
Type | Description |
Recommender.RecommenderClient |
Methods
Create()
public static RecommenderClient Create()
Synchronously creates a RecommenderClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use RecommenderClientBuilder.
Returns | |
---|---|
Type | Description |
RecommenderClient | The created RecommenderClient. |
CreateAsync(CancellationToken)
public static Task<RecommenderClient> CreateAsync(CancellationToken cancellationToken = default(CancellationToken))
Asynchronously creates a RecommenderClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use RecommenderClientBuilder.
Parameter | |
---|---|
Name | Description |
cancellationToken | CancellationToken The CancellationToken to use while creating the client. |
Returns | |
---|---|
Type | Description |
Task<RecommenderClient> | The task representing the created RecommenderClient. |
GetInsight(GetInsightRequest, CallSettings)
public virtual Insight GetInsight(GetInsightRequest request, CallSettings callSettings = null)
Gets the requested insight. Requires the recommender.*.get IAM permission for the specified insight type.
Parameters | |
---|---|
Name | Description |
request | GetInsightRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Insight | The RPC response. |
// Create client
RecommenderClient recommenderClient = RecommenderClient.Create();
// Initialize request argument(s)
GetInsightRequest request = new GetInsightRequest
{
InsightName = InsightName.FromProjectLocationInsightTypeInsight("[PROJECT]", "[LOCATION]", "[INSIGHT_TYPE]", "[INSIGHT]"),
};
// Make the request
Insight response = recommenderClient.GetInsight(request);
GetInsight(InsightName, CallSettings)
public virtual Insight GetInsight(InsightName name, CallSettings callSettings = null)
Gets the requested insight. Requires the recommender.*.get IAM permission for the specified insight type.
Parameters | |
---|---|
Name | Description |
name | InsightName Required. Name of the insight. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Insight | The RPC response. |
// Create client
RecommenderClient recommenderClient = RecommenderClient.Create();
// Initialize request argument(s)
InsightName name = InsightName.FromProjectLocationInsightTypeInsight("[PROJECT]", "[LOCATION]", "[INSIGHT_TYPE]", "[INSIGHT]");
// Make the request
Insight response = recommenderClient.GetInsight(name);
GetInsight(String, CallSettings)
public virtual Insight GetInsight(string name, CallSettings callSettings = null)
Gets the requested insight. Requires the recommender.*.get IAM permission for the specified insight type.
Parameters | |
---|---|
Name | Description |
name | String Required. Name of the insight. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Insight | The RPC response. |
// Create client
RecommenderClient recommenderClient = RecommenderClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE]/insights/[INSIGHT]";
// Make the request
Insight response = recommenderClient.GetInsight(name);
GetInsightAsync(GetInsightRequest, CallSettings)
public virtual Task<Insight> GetInsightAsync(GetInsightRequest request, CallSettings callSettings = null)
Gets the requested insight. Requires the recommender.*.get IAM permission for the specified insight type.
Parameters | |
---|---|
Name | Description |
request | GetInsightRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Insight> | A Task containing the RPC response. |
// Create client
RecommenderClient recommenderClient = await RecommenderClient.CreateAsync();
// Initialize request argument(s)
GetInsightRequest request = new GetInsightRequest
{
InsightName = InsightName.FromProjectLocationInsightTypeInsight("[PROJECT]", "[LOCATION]", "[INSIGHT_TYPE]", "[INSIGHT]"),
};
// Make the request
Insight response = await recommenderClient.GetInsightAsync(request);
GetInsightAsync(GetInsightRequest, CancellationToken)
public virtual Task<Insight> GetInsightAsync(GetInsightRequest request, CancellationToken cancellationToken)
Gets the requested insight. Requires the recommender.*.get IAM permission for the specified insight type.
Parameters | |
---|---|
Name | Description |
request | GetInsightRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Insight> | A Task containing the RPC response. |
// Create client
RecommenderClient recommenderClient = await RecommenderClient.CreateAsync();
// Initialize request argument(s)
GetInsightRequest request = new GetInsightRequest
{
InsightName = InsightName.FromProjectLocationInsightTypeInsight("[PROJECT]", "[LOCATION]", "[INSIGHT_TYPE]", "[INSIGHT]"),
};
// Make the request
Insight response = await recommenderClient.GetInsightAsync(request);
GetInsightAsync(InsightName, CallSettings)
public virtual Task<Insight> GetInsightAsync(InsightName name, CallSettings callSettings = null)
Gets the requested insight. Requires the recommender.*.get IAM permission for the specified insight type.
Parameters | |
---|---|
Name | Description |
name | InsightName Required. Name of the insight. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Insight> | A Task containing the RPC response. |
// Create client
RecommenderClient recommenderClient = await RecommenderClient.CreateAsync();
// Initialize request argument(s)
InsightName name = InsightName.FromProjectLocationInsightTypeInsight("[PROJECT]", "[LOCATION]", "[INSIGHT_TYPE]", "[INSIGHT]");
// Make the request
Insight response = await recommenderClient.GetInsightAsync(name);
GetInsightAsync(InsightName, CancellationToken)
public virtual Task<Insight> GetInsightAsync(InsightName name, CancellationToken cancellationToken)
Gets the requested insight. Requires the recommender.*.get IAM permission for the specified insight type.
Parameters | |
---|---|
Name | Description |
name | InsightName Required. Name of the insight. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Insight> | A Task containing the RPC response. |
// Create client
RecommenderClient recommenderClient = await RecommenderClient.CreateAsync();
// Initialize request argument(s)
InsightName name = InsightName.FromProjectLocationInsightTypeInsight("[PROJECT]", "[LOCATION]", "[INSIGHT_TYPE]", "[INSIGHT]");
// Make the request
Insight response = await recommenderClient.GetInsightAsync(name);
GetInsightAsync(String, CallSettings)
public virtual Task<Insight> GetInsightAsync(string name, CallSettings callSettings = null)
Gets the requested insight. Requires the recommender.*.get IAM permission for the specified insight type.
Parameters | |
---|---|
Name | Description |
name | String Required. Name of the insight. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Insight> | A Task containing the RPC response. |
// Create client
RecommenderClient recommenderClient = await RecommenderClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE]/insights/[INSIGHT]";
// Make the request
Insight response = await recommenderClient.GetInsightAsync(name);
GetInsightAsync(String, CancellationToken)
public virtual Task<Insight> GetInsightAsync(string name, CancellationToken cancellationToken)
Gets the requested insight. Requires the recommender.*.get IAM permission for the specified insight type.
Parameters | |
---|---|
Name | Description |
name | String Required. Name of the insight. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Insight> | A Task containing the RPC response. |
// Create client
RecommenderClient recommenderClient = await RecommenderClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE]/insights/[INSIGHT]";
// Make the request
Insight response = await recommenderClient.GetInsightAsync(name);
GetRecommendation(GetRecommendationRequest, CallSettings)
public virtual Recommendation GetRecommendation(GetRecommendationRequest request, CallSettings callSettings = null)
Gets the requested recommendation. Requires the recommender.*.get IAM permission for the specified recommender.
Parameters | |
---|---|
Name | Description |
request | GetRecommendationRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Recommendation | The RPC response. |
// Create client
RecommenderClient recommenderClient = RecommenderClient.Create();
// Initialize request argument(s)
GetRecommendationRequest request = new GetRecommendationRequest
{
RecommendationName = RecommendationName.FromProjectLocationRecommenderRecommendation("[PROJECT]", "[LOCATION]", "[RECOMMENDER]", "[RECOMMENDATION]"),
};
// Make the request
Recommendation response = recommenderClient.GetRecommendation(request);
GetRecommendation(RecommendationName, CallSettings)
public virtual Recommendation GetRecommendation(RecommendationName name, CallSettings callSettings = null)
Gets the requested recommendation. Requires the recommender.*.get IAM permission for the specified recommender.
Parameters | |
---|---|
Name | Description |
name | RecommendationName Required. Name of the recommendation. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Recommendation | The RPC response. |
// Create client
RecommenderClient recommenderClient = RecommenderClient.Create();
// Initialize request argument(s)
RecommendationName name = RecommendationName.FromProjectLocationRecommenderRecommendation("[PROJECT]", "[LOCATION]", "[RECOMMENDER]", "[RECOMMENDATION]");
// Make the request
Recommendation response = recommenderClient.GetRecommendation(name);
GetRecommendation(String, CallSettings)
public virtual Recommendation GetRecommendation(string name, CallSettings callSettings = null)
Gets the requested recommendation. Requires the recommender.*.get IAM permission for the specified recommender.
Parameters | |
---|---|
Name | Description |
name | String Required. Name of the recommendation. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Recommendation | The RPC response. |
// Create client
RecommenderClient recommenderClient = RecommenderClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/recommenders/[RECOMMENDER]/recommendations/[RECOMMENDATION]";
// Make the request
Recommendation response = recommenderClient.GetRecommendation(name);
GetRecommendationAsync(GetRecommendationRequest, CallSettings)
public virtual Task<Recommendation> GetRecommendationAsync(GetRecommendationRequest request, CallSettings callSettings = null)
Gets the requested recommendation. Requires the recommender.*.get IAM permission for the specified recommender.
Parameters | |
---|---|
Name | Description |
request | GetRecommendationRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Recommendation> | A Task containing the RPC response. |
// Create client
RecommenderClient recommenderClient = await RecommenderClient.CreateAsync();
// Initialize request argument(s)
GetRecommendationRequest request = new GetRecommendationRequest
{
RecommendationName = RecommendationName.FromProjectLocationRecommenderRecommendation("[PROJECT]", "[LOCATION]", "[RECOMMENDER]", "[RECOMMENDATION]"),
};
// Make the request
Recommendation response = await recommenderClient.GetRecommendationAsync(request);
GetRecommendationAsync(GetRecommendationRequest, CancellationToken)
public virtual Task<Recommendation> GetRecommendationAsync(GetRecommendationRequest request, CancellationToken cancellationToken)
Gets the requested recommendation. Requires the recommender.*.get IAM permission for the specified recommender.
Parameters | |
---|---|
Name | Description |
request | GetRecommendationRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Recommendation> | A Task containing the RPC response. |
// Create client
RecommenderClient recommenderClient = await RecommenderClient.CreateAsync();
// Initialize request argument(s)
GetRecommendationRequest request = new GetRecommendationRequest
{
RecommendationName = RecommendationName.FromProjectLocationRecommenderRecommendation("[PROJECT]", "[LOCATION]", "[RECOMMENDER]", "[RECOMMENDATION]"),
};
// Make the request
Recommendation response = await recommenderClient.GetRecommendationAsync(request);
GetRecommendationAsync(RecommendationName, CallSettings)
public virtual Task<Recommendation> GetRecommendationAsync(RecommendationName name, CallSettings callSettings = null)
Gets the requested recommendation. Requires the recommender.*.get IAM permission for the specified recommender.
Parameters | |
---|---|
Name | Description |
name | RecommendationName Required. Name of the recommendation. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Recommendation> | A Task containing the RPC response. |
// Create client
RecommenderClient recommenderClient = await RecommenderClient.CreateAsync();
// Initialize request argument(s)
RecommendationName name = RecommendationName.FromProjectLocationRecommenderRecommendation("[PROJECT]", "[LOCATION]", "[RECOMMENDER]", "[RECOMMENDATION]");
// Make the request
Recommendation response = await recommenderClient.GetRecommendationAsync(name);
GetRecommendationAsync(RecommendationName, CancellationToken)
public virtual Task<Recommendation> GetRecommendationAsync(RecommendationName name, CancellationToken cancellationToken)
Gets the requested recommendation. Requires the recommender.*.get IAM permission for the specified recommender.
Parameters | |
---|---|
Name | Description |
name | RecommendationName Required. Name of the recommendation. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Recommendation> | A Task containing the RPC response. |
// Create client
RecommenderClient recommenderClient = await RecommenderClient.CreateAsync();
// Initialize request argument(s)
RecommendationName name = RecommendationName.FromProjectLocationRecommenderRecommendation("[PROJECT]", "[LOCATION]", "[RECOMMENDER]", "[RECOMMENDATION]");
// Make the request
Recommendation response = await recommenderClient.GetRecommendationAsync(name);
GetRecommendationAsync(String, CallSettings)
public virtual Task<Recommendation> GetRecommendationAsync(string name, CallSettings callSettings = null)
Gets the requested recommendation. Requires the recommender.*.get IAM permission for the specified recommender.
Parameters | |
---|---|
Name | Description |
name | String Required. Name of the recommendation. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Recommendation> | A Task containing the RPC response. |
// Create client
RecommenderClient recommenderClient = await RecommenderClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/recommenders/[RECOMMENDER]/recommendations/[RECOMMENDATION]";
// Make the request
Recommendation response = await recommenderClient.GetRecommendationAsync(name);
GetRecommendationAsync(String, CancellationToken)
public virtual Task<Recommendation> GetRecommendationAsync(string name, CancellationToken cancellationToken)
Gets the requested recommendation. Requires the recommender.*.get IAM permission for the specified recommender.
Parameters | |
---|---|
Name | Description |
name | String Required. Name of the recommendation. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Recommendation> | A Task containing the RPC response. |
// Create client
RecommenderClient recommenderClient = await RecommenderClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/recommenders/[RECOMMENDER]/recommendations/[RECOMMENDATION]";
// Make the request
Recommendation response = await recommenderClient.GetRecommendationAsync(name);
ListInsights(InsightTypeName, String, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListInsightsResponse, Insight> ListInsights(InsightTypeName parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists insights for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified insight type.
Parameters | |
---|---|
Name | Description |
parent | InsightTypeName Required. The container resource on which to execute the request. Acceptable formats:
LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types. |
pageToken | String The 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 | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListInsightsResponse, Insight> | A pageable sequence of Insight resources. |
// Create client
RecommenderClient recommenderClient = RecommenderClient.Create();
// Initialize request argument(s)
InsightTypeName parent = InsightTypeName.FromProjectLocationInsightType("[PROJECT]", "[LOCATION]", "[INSIGHT_TYPE]");
// Make the request
PagedEnumerable<ListInsightsResponse, Insight> response = recommenderClient.ListInsights(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (Insight 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 (ListInsightsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Insight 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<Insight> 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 (Insight 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;
ListInsights(ListInsightsRequest, CallSettings)
public virtual PagedEnumerable<ListInsightsResponse, Insight> ListInsights(ListInsightsRequest request, CallSettings callSettings = null)
Lists insights for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified insight type.
Parameters | |
---|---|
Name | Description |
request | ListInsightsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListInsightsResponse, Insight> | A pageable sequence of Insight resources. |
// Create client
RecommenderClient recommenderClient = RecommenderClient.Create();
// Initialize request argument(s)
ListInsightsRequest request = new ListInsightsRequest
{
ParentAsInsightTypeName = InsightTypeName.FromProjectLocationInsightType("[PROJECT]", "[LOCATION]", "[INSIGHT_TYPE]"),
Filter = "",
};
// Make the request
PagedEnumerable<ListInsightsResponse, Insight> response = recommenderClient.ListInsights(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (Insight 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 (ListInsightsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Insight 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<Insight> 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 (Insight 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;
ListInsights(String, String, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListInsightsResponse, Insight> ListInsights(string parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists insights for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified insight type.
Parameters | |
---|---|
Name | Description |
parent | String Required. The container resource on which to execute the request. Acceptable formats:
LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types. |
pageToken | String The 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 | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListInsightsResponse, Insight> | A pageable sequence of Insight resources. |
// Create client
RecommenderClient recommenderClient = RecommenderClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE]";
// Make the request
PagedEnumerable<ListInsightsResponse, Insight> response = recommenderClient.ListInsights(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (Insight 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 (ListInsightsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Insight 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<Insight> 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 (Insight 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;
ListInsightsAsync(InsightTypeName, String, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListInsightsResponse, Insight> ListInsightsAsync(InsightTypeName parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists insights for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified insight type.
Parameters | |
---|---|
Name | Description |
parent | InsightTypeName Required. The container resource on which to execute the request. Acceptable formats:
LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types. |
pageToken | String The 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 | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListInsightsResponse, Insight> | A pageable asynchronous sequence of Insight resources. |
// Create client
RecommenderClient recommenderClient = await RecommenderClient.CreateAsync();
// Initialize request argument(s)
InsightTypeName parent = InsightTypeName.FromProjectLocationInsightType("[PROJECT]", "[LOCATION]", "[INSIGHT_TYPE]");
// Make the request
PagedAsyncEnumerable<ListInsightsResponse, Insight> response = recommenderClient.ListInsightsAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Insight 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((ListInsightsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Insight 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<Insight> 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 (Insight 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;
ListInsightsAsync(ListInsightsRequest, CallSettings)
public virtual PagedAsyncEnumerable<ListInsightsResponse, Insight> ListInsightsAsync(ListInsightsRequest request, CallSettings callSettings = null)
Lists insights for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified insight type.
Parameters | |
---|---|
Name | Description |
request | ListInsightsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListInsightsResponse, Insight> | A pageable asynchronous sequence of Insight resources. |
// Create client
RecommenderClient recommenderClient = await RecommenderClient.CreateAsync();
// Initialize request argument(s)
ListInsightsRequest request = new ListInsightsRequest
{
ParentAsInsightTypeName = InsightTypeName.FromProjectLocationInsightType("[PROJECT]", "[LOCATION]", "[INSIGHT_TYPE]"),
Filter = "",
};
// Make the request
PagedAsyncEnumerable<ListInsightsResponse, Insight> response = recommenderClient.ListInsightsAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Insight 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((ListInsightsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Insight 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<Insight> 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 (Insight 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;
ListInsightsAsync(String, String, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListInsightsResponse, Insight> ListInsightsAsync(string parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists insights for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified insight type.
Parameters | |
---|---|
Name | Description |
parent | String Required. The container resource on which to execute the request. Acceptable formats:
LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types. |
pageToken | String The 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 | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListInsightsResponse, Insight> | A pageable asynchronous sequence of Insight resources. |
// Create client
RecommenderClient recommenderClient = await RecommenderClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE]";
// Make the request
PagedAsyncEnumerable<ListInsightsResponse, Insight> response = recommenderClient.ListInsightsAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Insight 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((ListInsightsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Insight 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<Insight> 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 (Insight 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;
ListRecommendations(ListRecommendationsRequest, CallSettings)
public virtual PagedEnumerable<ListRecommendationsResponse, Recommendation> ListRecommendations(ListRecommendationsRequest request, CallSettings callSettings = null)
Lists recommendations for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified recommender.
Parameters | |
---|---|
Name | Description |
request | ListRecommendationsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListRecommendationsResponse, Recommendation> | A pageable sequence of Recommendation resources. |
// Create client
RecommenderClient recommenderClient = RecommenderClient.Create();
// Initialize request argument(s)
ListRecommendationsRequest request = new ListRecommendationsRequest
{
ParentAsRecommenderName = RecommenderName.FromProjectLocationRecommender("[PROJECT]", "[LOCATION]", "[RECOMMENDER]"),
Filter = "",
};
// Make the request
PagedEnumerable<ListRecommendationsResponse, Recommendation> response = recommenderClient.ListRecommendations(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (Recommendation 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 (ListRecommendationsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Recommendation 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<Recommendation> 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 (Recommendation 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;
ListRecommendations(RecommenderName, String, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListRecommendationsResponse, Recommendation> ListRecommendations(RecommenderName parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists recommendations for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified recommender.
Parameters | |
---|---|
Name | Description |
parent | RecommenderName Required. The container resource on which to execute the request. Acceptable formats:
LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://cloud.google.com/recommender/docs/recommenders. |
pageToken | String The 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 | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListRecommendationsResponse, Recommendation> | A pageable sequence of Recommendation resources. |
// Create client
RecommenderClient recommenderClient = RecommenderClient.Create();
// Initialize request argument(s)
RecommenderName parent = RecommenderName.FromProjectLocationRecommender("[PROJECT]", "[LOCATION]", "[RECOMMENDER]");
// Make the request
PagedEnumerable<ListRecommendationsResponse, Recommendation> response = recommenderClient.ListRecommendations(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (Recommendation 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 (ListRecommendationsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Recommendation 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<Recommendation> 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 (Recommendation 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;
ListRecommendations(RecommenderName, String, String, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListRecommendationsResponse, Recommendation> ListRecommendations(RecommenderName parent, string filter, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists recommendations for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified recommender.
Parameters | |
---|---|
Name | Description |
parent | RecommenderName Required. The container resource on which to execute the request. Acceptable formats:
LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://cloud.google.com/recommender/docs/recommenders. |
filter | String Filter expression to restrict the recommendations returned. Supported filter fields:
Examples:
(These expressions are based on the filter language described at https://google.aip.dev/160) |
pageToken | String The 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 | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListRecommendationsResponse, Recommendation> | A pageable sequence of Recommendation resources. |
// Create client
RecommenderClient recommenderClient = RecommenderClient.Create();
// Initialize request argument(s)
RecommenderName parent = RecommenderName.FromProjectLocationRecommender("[PROJECT]", "[LOCATION]", "[RECOMMENDER]");
string filter = "";
// Make the request
PagedEnumerable<ListRecommendationsResponse, Recommendation> response = recommenderClient.ListRecommendations(parent, filter: filter);
// Iterate over all response items, lazily performing RPCs as required
foreach (Recommendation 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 (ListRecommendationsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Recommendation 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<Recommendation> 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 (Recommendation 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;
ListRecommendations(String, String, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListRecommendationsResponse, Recommendation> ListRecommendations(string parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists recommendations for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified recommender.
Parameters | |
---|---|
Name | Description |
parent | String Required. The container resource on which to execute the request. Acceptable formats:
LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://cloud.google.com/recommender/docs/recommenders. |
pageToken | String The 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 | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListRecommendationsResponse, Recommendation> | A pageable sequence of Recommendation resources. |
// Create client
RecommenderClient recommenderClient = RecommenderClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/recommenders/[RECOMMENDER]";
// Make the request
PagedEnumerable<ListRecommendationsResponse, Recommendation> response = recommenderClient.ListRecommendations(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (Recommendation 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 (ListRecommendationsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Recommendation 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<Recommendation> 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 (Recommendation 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;
ListRecommendations(String, String, String, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListRecommendationsResponse, Recommendation> ListRecommendations(string parent, string filter, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists recommendations for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified recommender.
Parameters | |
---|---|
Name | Description |
parent | String Required. The container resource on which to execute the request. Acceptable formats:
LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://cloud.google.com/recommender/docs/recommenders. |
filter | String Filter expression to restrict the recommendations returned. Supported filter fields:
Examples:
(These expressions are based on the filter language described at https://google.aip.dev/160) |
pageToken | String The 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 | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListRecommendationsResponse, Recommendation> | A pageable sequence of Recommendation resources. |
// Create client
RecommenderClient recommenderClient = RecommenderClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/recommenders/[RECOMMENDER]";
string filter = "";
// Make the request
PagedEnumerable<ListRecommendationsResponse, Recommendation> response = recommenderClient.ListRecommendations(parent, filter: filter);
// Iterate over all response items, lazily performing RPCs as required
foreach (Recommendation 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 (ListRecommendationsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Recommendation 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<Recommendation> 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 (Recommendation 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;
ListRecommendationsAsync(ListRecommendationsRequest, CallSettings)
public virtual PagedAsyncEnumerable<ListRecommendationsResponse, Recommendation> ListRecommendationsAsync(ListRecommendationsRequest request, CallSettings callSettings = null)
Lists recommendations for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified recommender.
Parameters | |
---|---|
Name | Description |
request | ListRecommendationsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListRecommendationsResponse, Recommendation> | A pageable asynchronous sequence of Recommendation resources. |
// Create client
RecommenderClient recommenderClient = await RecommenderClient.CreateAsync();
// Initialize request argument(s)
ListRecommendationsRequest request = new ListRecommendationsRequest
{
ParentAsRecommenderName = RecommenderName.FromProjectLocationRecommender("[PROJECT]", "[LOCATION]", "[RECOMMENDER]"),
Filter = "",
};
// Make the request
PagedAsyncEnumerable<ListRecommendationsResponse, Recommendation> response = recommenderClient.ListRecommendationsAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Recommendation 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((ListRecommendationsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Recommendation 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<Recommendation> 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 (Recommendation 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;
ListRecommendationsAsync(RecommenderName, String, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListRecommendationsResponse, Recommendation> ListRecommendationsAsync(RecommenderName parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists recommendations for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified recommender.
Parameters | |
---|---|
Name | Description |
parent | RecommenderName Required. The container resource on which to execute the request. Acceptable formats:
LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://cloud.google.com/recommender/docs/recommenders. |
pageToken | String The 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 | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListRecommendationsResponse, Recommendation> | A pageable asynchronous sequence of Recommendation resources. |
// Create client
RecommenderClient recommenderClient = await RecommenderClient.CreateAsync();
// Initialize request argument(s)
RecommenderName parent = RecommenderName.FromProjectLocationRecommender("[PROJECT]", "[LOCATION]", "[RECOMMENDER]");
// Make the request
PagedAsyncEnumerable<ListRecommendationsResponse, Recommendation> response = recommenderClient.ListRecommendationsAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Recommendation 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((ListRecommendationsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Recommendation 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<Recommendation> 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 (Recommendation 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;
ListRecommendationsAsync(RecommenderName, String, String, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListRecommendationsResponse, Recommendation> ListRecommendationsAsync(RecommenderName parent, string filter, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists recommendations for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified recommender.
Parameters | |
---|---|
Name | Description |
parent | RecommenderName Required. The container resource on which to execute the request. Acceptable formats:
LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://cloud.google.com/recommender/docs/recommenders. |
filter | String Filter expression to restrict the recommendations returned. Supported filter fields:
Examples:
(These expressions are based on the filter language described at https://google.aip.dev/160) |
pageToken | String The 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 | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListRecommendationsResponse, Recommendation> | A pageable asynchronous sequence of Recommendation resources. |
// Create client
RecommenderClient recommenderClient = await RecommenderClient.CreateAsync();
// Initialize request argument(s)
RecommenderName parent = RecommenderName.FromProjectLocationRecommender("[PROJECT]", "[LOCATION]", "[RECOMMENDER]");
string filter = "";
// Make the request
PagedAsyncEnumerable<ListRecommendationsResponse, Recommendation> response = recommenderClient.ListRecommendationsAsync(parent, filter: filter);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Recommendation 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((ListRecommendationsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Recommendation 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<Recommendation> 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 (Recommendation 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;
ListRecommendationsAsync(String, String, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListRecommendationsResponse, Recommendation> ListRecommendationsAsync(string parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists recommendations for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified recommender.
Parameters | |
---|---|
Name | Description |
parent | String Required. The container resource on which to execute the request. Acceptable formats:
LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://cloud.google.com/recommender/docs/recommenders. |
pageToken | String The 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 | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListRecommendationsResponse, Recommendation> | A pageable asynchronous sequence of Recommendation resources. |
// Create client
RecommenderClient recommenderClient = await RecommenderClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/recommenders/[RECOMMENDER]";
// Make the request
PagedAsyncEnumerable<ListRecommendationsResponse, Recommendation> response = recommenderClient.ListRecommendationsAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Recommendation 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((ListRecommendationsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Recommendation 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<Recommendation> 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 (Recommendation 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;
ListRecommendationsAsync(String, String, String, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListRecommendationsResponse, Recommendation> ListRecommendationsAsync(string parent, string filter, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists recommendations for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified recommender.
Parameters | |
---|---|
Name | Description |
parent | String Required. The container resource on which to execute the request. Acceptable formats:
LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://cloud.google.com/recommender/docs/recommenders. |
filter | String Filter expression to restrict the recommendations returned. Supported filter fields:
Examples:
(These expressions are based on the filter language described at https://google.aip.dev/160) |
pageToken | String The 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 | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListRecommendationsResponse, Recommendation> | A pageable asynchronous sequence of Recommendation resources. |
// Create client
RecommenderClient recommenderClient = await RecommenderClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/recommenders/[RECOMMENDER]";
string filter = "";
// Make the request
PagedAsyncEnumerable<ListRecommendationsResponse, Recommendation> response = recommenderClient.ListRecommendationsAsync(parent, filter: filter);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Recommendation 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((ListRecommendationsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Recommendation 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<Recommendation> 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 (Recommendation 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;
MarkInsightAccepted(InsightName, IDictionary<String, String>, String, CallSettings)
public virtual Insight MarkInsightAccepted(InsightName name, IDictionary<string, string> stateMetadata, string etag, CallSettings callSettings = null)
Marks the Insight State as Accepted. Users can use this method to indicate to the Recommender API that they have applied some action based on the insight. This stops the insight content from being updated.
MarkInsightAccepted can be applied to insights in ACTIVE state. Requires the recommender.*.update IAM permission for the specified insight.
Parameters | |
---|---|
Name | Description |
name | InsightName Required. Name of the insight. |
stateMetadata | IDictionary<String, String> Optional. State properties user wish to include with this state. Full replace of the current state_metadata. |
etag | String Required. Fingerprint of the Insight. Provides optimistic locking. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Insight | The RPC response. |
// Create client
RecommenderClient recommenderClient = RecommenderClient.Create();
// Initialize request argument(s)
InsightName name = InsightName.FromProjectLocationInsightTypeInsight("[PROJECT]", "[LOCATION]", "[INSIGHT_TYPE]", "[INSIGHT]");
IDictionary<string, string> stateMetadata = new Dictionary<string, string> { { "", "" }, };
string etag = "";
// Make the request
Insight response = recommenderClient.MarkInsightAccepted(name, stateMetadata, etag);
MarkInsightAccepted(MarkInsightAcceptedRequest, CallSettings)
public virtual Insight MarkInsightAccepted(MarkInsightAcceptedRequest request, CallSettings callSettings = null)
Marks the Insight State as Accepted. Users can use this method to indicate to the Recommender API that they have applied some action based on the insight. This stops the insight content from being updated.
MarkInsightAccepted can be applied to insights in ACTIVE state. Requires the recommender.*.update IAM permission for the specified insight.
Parameters | |
---|---|
Name | Description |
request | MarkInsightAcceptedRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Insight | The RPC response. |
// Create client
RecommenderClient recommenderClient = RecommenderClient.Create();
// Initialize request argument(s)
MarkInsightAcceptedRequest request = new MarkInsightAcceptedRequest
{
InsightName = InsightName.FromProjectLocationInsightTypeInsight("[PROJECT]", "[LOCATION]", "[INSIGHT_TYPE]", "[INSIGHT]"),
StateMetadata = { { "", "" }, },
Etag = "",
};
// Make the request
Insight response = recommenderClient.MarkInsightAccepted(request);
MarkInsightAccepted(String, IDictionary<String, String>, String, CallSettings)
public virtual Insight MarkInsightAccepted(string name, IDictionary<string, string> stateMetadata, string etag, CallSettings callSettings = null)
Marks the Insight State as Accepted. Users can use this method to indicate to the Recommender API that they have applied some action based on the insight. This stops the insight content from being updated.
MarkInsightAccepted can be applied to insights in ACTIVE state. Requires the recommender.*.update IAM permission for the specified insight.
Parameters | |
---|---|
Name | Description |
name | String Required. Name of the insight. |
stateMetadata | IDictionary<String, String> Optional. State properties user wish to include with this state. Full replace of the current state_metadata. |
etag | String Required. Fingerprint of the Insight. Provides optimistic locking. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Insight | The RPC response. |
// Create client
RecommenderClient recommenderClient = RecommenderClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE]/insights/[INSIGHT]";
IDictionary<string, string> stateMetadata = new Dictionary<string, string> { { "", "" }, };
string etag = "";
// Make the request
Insight response = recommenderClient.MarkInsightAccepted(name, stateMetadata, etag);
MarkInsightAcceptedAsync(InsightName, IDictionary<String, String>, String, CallSettings)
public virtual Task<Insight> MarkInsightAcceptedAsync(InsightName name, IDictionary<string, string> stateMetadata, string etag, CallSettings callSettings = null)
Marks the Insight State as Accepted. Users can use this method to indicate to the Recommender API that they have applied some action based on the insight. This stops the insight content from being updated.
MarkInsightAccepted can be applied to insights in ACTIVE state. Requires the recommender.*.update IAM permission for the specified insight.
Parameters | |
---|---|
Name | Description |
name | InsightName Required. Name of the insight. |
stateMetadata | IDictionary<String, String> Optional. State properties user wish to include with this state. Full replace of the current state_metadata. |
etag | String Required. Fingerprint of the Insight. Provides optimistic locking. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Insight> | A Task containing the RPC response. |
// Create client
RecommenderClient recommenderClient = await RecommenderClient.CreateAsync();
// Initialize request argument(s)
InsightName name = InsightName.FromProjectLocationInsightTypeInsight("[PROJECT]", "[LOCATION]", "[INSIGHT_TYPE]", "[INSIGHT]");
IDictionary<string, string> stateMetadata = new Dictionary<string, string> { { "", "" }, };
string etag = "";
// Make the request
Insight response = await recommenderClient.MarkInsightAcceptedAsync(name, stateMetadata, etag);
MarkInsightAcceptedAsync(InsightName, IDictionary<String, String>, String, CancellationToken)
public virtual Task<Insight> MarkInsightAcceptedAsync(InsightName name, IDictionary<string, string> stateMetadata, string etag, CancellationToken cancellationToken)
Marks the Insight State as Accepted. Users can use this method to indicate to the Recommender API that they have applied some action based on the insight. This stops the insight content from being updated.
MarkInsightAccepted can be applied to insights in ACTIVE state. Requires the recommender.*.update IAM permission for the specified insight.
Parameters | |
---|---|
Name | Description |
name | InsightName Required. Name of the insight. |
stateMetadata | IDictionary<String, String> Optional. State properties user wish to include with this state. Full replace of the current state_metadata. |
etag | String Required. Fingerprint of the Insight. Provides optimistic locking. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Insight> | A Task containing the RPC response. |
// Create client
RecommenderClient recommenderClient = await RecommenderClient.CreateAsync();
// Initialize request argument(s)
InsightName name = InsightName.FromProjectLocationInsightTypeInsight("[PROJECT]", "[LOCATION]", "[INSIGHT_TYPE]", "[INSIGHT]");
IDictionary<string, string> stateMetadata = new Dictionary<string, string> { { "", "" }, };
string etag = "";
// Make the request
Insight response = await recommenderClient.MarkInsightAcceptedAsync(name, stateMetadata, etag);
MarkInsightAcceptedAsync(MarkInsightAcceptedRequest, CallSettings)
public virtual Task<Insight> MarkInsightAcceptedAsync(MarkInsightAcceptedRequest request, CallSettings callSettings = null)
Marks the Insight State as Accepted. Users can use this method to indicate to the Recommender API that they have applied some action based on the insight. This stops the insight content from being updated.
MarkInsightAccepted can be applied to insights in ACTIVE state. Requires the recommender.*.update IAM permission for the specified insight.
Parameters | |
---|---|
Name | Description |
request | MarkInsightAcceptedRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Insight> | A Task containing the RPC response. |
// Create client
RecommenderClient recommenderClient = await RecommenderClient.CreateAsync();
// Initialize request argument(s)
MarkInsightAcceptedRequest request = new MarkInsightAcceptedRequest
{
InsightName = InsightName.FromProjectLocationInsightTypeInsight("[PROJECT]", "[LOCATION]", "[INSIGHT_TYPE]", "[INSIGHT]"),
StateMetadata = { { "", "" }, },
Etag = "",
};
// Make the request
Insight response = await recommenderClient.MarkInsightAcceptedAsync(request);
MarkInsightAcceptedAsync(MarkInsightAcceptedRequest, CancellationToken)
public virtual Task<Insight> MarkInsightAcceptedAsync(MarkInsightAcceptedRequest request, CancellationToken cancellationToken)
Marks the Insight State as Accepted. Users can use this method to indicate to the Recommender API that they have applied some action based on the insight. This stops the insight content from being updated.
MarkInsightAccepted can be applied to insights in ACTIVE state. Requires the recommender.*.update IAM permission for the specified insight.
Parameters | |
---|---|
Name | Description |
request | MarkInsightAcceptedRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Insight> | A Task containing the RPC response. |
// Create client
RecommenderClient recommenderClient = await RecommenderClient.CreateAsync();
// Initialize request argument(s)
MarkInsightAcceptedRequest request = new MarkInsightAcceptedRequest
{
InsightName = InsightName.FromProjectLocationInsightTypeInsight("[PROJECT]", "[LOCATION]", "[INSIGHT_TYPE]", "[INSIGHT]"),
StateMetadata = { { "", "" }, },
Etag = "",
};
// Make the request
Insight response = await recommenderClient.MarkInsightAcceptedAsync(request);
MarkInsightAcceptedAsync(String, IDictionary<String, String>, String, CallSettings)
public virtual Task<Insight> MarkInsightAcceptedAsync(string name, IDictionary<string, string> stateMetadata, string etag, CallSettings callSettings = null)
Marks the Insight State as Accepted. Users can use this method to indicate to the Recommender API that they have applied some action based on the insight. This stops the insight content from being updated.
MarkInsightAccepted can be applied to insights in ACTIVE state. Requires the recommender.*.update IAM permission for the specified insight.
Parameters | |
---|---|
Name | Description |
name | String Required. Name of the insight. |
stateMetadata | IDictionary<String, String> Optional. State properties user wish to include with this state. Full replace of the current state_metadata. |
etag | String Required. Fingerprint of the Insight. Provides optimistic locking. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Insight> | A Task containing the RPC response. |
// Create client
RecommenderClient recommenderClient = await RecommenderClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE]/insights/[INSIGHT]";
IDictionary<string, string> stateMetadata = new Dictionary<string, string> { { "", "" }, };
string etag = "";
// Make the request
Insight response = await recommenderClient.MarkInsightAcceptedAsync(name, stateMetadata, etag);
MarkInsightAcceptedAsync(String, IDictionary<String, String>, String, CancellationToken)
public virtual Task<Insight> MarkInsightAcceptedAsync(string name, IDictionary<string, string> stateMetadata, string etag, CancellationToken cancellationToken)
Marks the Insight State as Accepted. Users can use this method to indicate to the Recommender API that they have applied some action based on the insight. This stops the insight content from being updated.
MarkInsightAccepted can be applied to insights in ACTIVE state. Requires the recommender.*.update IAM permission for the specified insight.
Parameters | |
---|---|
Name | Description |
name | String Required. Name of the insight. |
stateMetadata | IDictionary<String, String> Optional. State properties user wish to include with this state. Full replace of the current state_metadata. |
etag | String Required. Fingerprint of the Insight. Provides optimistic locking. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Insight> | A Task containing the RPC response. |
// Create client
RecommenderClient recommenderClient = await RecommenderClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE]/insights/[INSIGHT]";
IDictionary<string, string> stateMetadata = new Dictionary<string, string> { { "", "" }, };
string etag = "";
// Make the request
Insight response = await recommenderClient.MarkInsightAcceptedAsync(name, stateMetadata, etag);
MarkRecommendationClaimed(MarkRecommendationClaimedRequest, CallSettings)
public virtual Recommendation MarkRecommendationClaimed(MarkRecommendationClaimedRequest request, CallSettings callSettings = null)
Marks the Recommendation State as Claimed. Users can use this method to indicate to the Recommender API that they are starting to apply the recommendation themselves. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state.
MarkRecommendationClaimed can be applied to recommendations in CLAIMED, SUCCEEDED, FAILED, or ACTIVE state.
Requires the recommender.*.update IAM permission for the specified recommender.
Parameters | |
---|---|
Name | Description |
request | MarkRecommendationClaimedRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Recommendation | The RPC response. |
// Create client
RecommenderClient recommenderClient = RecommenderClient.Create();
// Initialize request argument(s)
MarkRecommendationClaimedRequest request = new MarkRecommendationClaimedRequest
{
RecommendationName = RecommendationName.FromProjectLocationRecommenderRecommendation("[PROJECT]", "[LOCATION]", "[RECOMMENDER]", "[RECOMMENDATION]"),
StateMetadata = { { "", "" }, },
Etag = "",
};
// Make the request
Recommendation response = recommenderClient.MarkRecommendationClaimed(request);
MarkRecommendationClaimed(RecommendationName, IDictionary<String, String>, String, CallSettings)
public virtual Recommendation MarkRecommendationClaimed(RecommendationName name, IDictionary<string, string> stateMetadata, string etag, CallSettings callSettings = null)
Marks the Recommendation State as Claimed. Users can use this method to indicate to the Recommender API that they are starting to apply the recommendation themselves. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state.
MarkRecommendationClaimed can be applied to recommendations in CLAIMED, SUCCEEDED, FAILED, or ACTIVE state.
Requires the recommender.*.update IAM permission for the specified recommender.
Parameters | |
---|---|
Name | Description |
name | RecommendationName Required. Name of the recommendation. |
stateMetadata | IDictionary<String, String> State properties to include with this state. Overwrites any existing
|
etag | String Required. Fingerprint of the Recommendation. Provides optimistic locking. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Recommendation | The RPC response. |
// Create client
RecommenderClient recommenderClient = RecommenderClient.Create();
// Initialize request argument(s)
RecommendationName name = RecommendationName.FromProjectLocationRecommenderRecommendation("[PROJECT]", "[LOCATION]", "[RECOMMENDER]", "[RECOMMENDATION]");
IDictionary<string, string> stateMetadata = new Dictionary<string, string> { { "", "" }, };
string etag = "";
// Make the request
Recommendation response = recommenderClient.MarkRecommendationClaimed(name, stateMetadata, etag);
MarkRecommendationClaimed(String, IDictionary<String, String>, String, CallSettings)
public virtual Recommendation MarkRecommendationClaimed(string name, IDictionary<string, string> stateMetadata, string etag, CallSettings callSettings = null)
Marks the Recommendation State as Claimed. Users can use this method to indicate to the Recommender API that they are starting to apply the recommendation themselves. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state.
MarkRecommendationClaimed can be applied to recommendations in CLAIMED, SUCCEEDED, FAILED, or ACTIVE state.
Requires the recommender.*.update IAM permission for the specified recommender.
Parameters | |
---|---|
Name | Description |
name | String Required. Name of the recommendation. |
stateMetadata | IDictionary<String, String> State properties to include with this state. Overwrites any existing
|
etag | String Required. Fingerprint of the Recommendation. Provides optimistic locking. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Recommendation | The RPC response. |
// Create client
RecommenderClient recommenderClient = RecommenderClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/recommenders/[RECOMMENDER]/recommendations/[RECOMMENDATION]";
IDictionary<string, string> stateMetadata = new Dictionary<string, string> { { "", "" }, };
string etag = "";
// Make the request
Recommendation response = recommenderClient.MarkRecommendationClaimed(name, stateMetadata, etag);
MarkRecommendationClaimedAsync(MarkRecommendationClaimedRequest, CallSettings)
public virtual Task<Recommendation> MarkRecommendationClaimedAsync(MarkRecommendationClaimedRequest request, CallSettings callSettings = null)
Marks the Recommendation State as Claimed. Users can use this method to indicate to the Recommender API that they are starting to apply the recommendation themselves. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state.
MarkRecommendationClaimed can be applied to recommendations in CLAIMED, SUCCEEDED, FAILED, or ACTIVE state.
Requires the recommender.*.update IAM permission for the specified recommender.
Parameters | |
---|---|
Name | Description |
request | MarkRecommendationClaimedRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Recommendation> | A Task containing the RPC response. |
// Create client
RecommenderClient recommenderClient = await RecommenderClient.CreateAsync();
// Initialize request argument(s)
MarkRecommendationClaimedRequest request = new MarkRecommendationClaimedRequest
{
RecommendationName = RecommendationName.FromProjectLocationRecommenderRecommendation("[PROJECT]", "[LOCATION]", "[RECOMMENDER]", "[RECOMMENDATION]"),
StateMetadata = { { "", "" }, },
Etag = "",
};
// Make the request
Recommendation response = await recommenderClient.MarkRecommendationClaimedAsync(request);
MarkRecommendationClaimedAsync(MarkRecommendationClaimedRequest, CancellationToken)
public virtual Task<Recommendation> MarkRecommendationClaimedAsync(MarkRecommendationClaimedRequest request, CancellationToken cancellationToken)
Marks the Recommendation State as Claimed. Users can use this method to indicate to the Recommender API that they are starting to apply the recommendation themselves. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state.
MarkRecommendationClaimed can be applied to recommendations in CLAIMED, SUCCEEDED, FAILED, or ACTIVE state.
Requires the recommender.*.update IAM permission for the specified recommender.
Parameters | |
---|---|
Name | Description |
request | MarkRecommendationClaimedRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Recommendation> | A Task containing the RPC response. |
// Create client
RecommenderClient recommenderClient = await RecommenderClient.CreateAsync();
// Initialize request argument(s)
MarkRecommendationClaimedRequest request = new MarkRecommendationClaimedRequest
{
RecommendationName = RecommendationName.FromProjectLocationRecommenderRecommendation("[PROJECT]", "[LOCATION]", "[RECOMMENDER]", "[RECOMMENDATION]"),
StateMetadata = { { "", "" }, },
Etag = "",
};
// Make the request
Recommendation response = await recommenderClient.MarkRecommendationClaimedAsync(request);
MarkRecommendationClaimedAsync(RecommendationName, IDictionary<String, String>, String, CallSettings)
public virtual Task<Recommendation> MarkRecommendationClaimedAsync(RecommendationName name, IDictionary<string, string> stateMetadata, string etag, CallSettings callSettings = null)
Marks the Recommendation State as Claimed. Users can use this method to indicate to the Recommender API that they are starting to apply the recommendation themselves. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state.
MarkRecommendationClaimed can be applied to recommendations in CLAIMED, SUCCEEDED, FAILED, or ACTIVE state.
Requires the recommender.*.update IAM permission for the specified recommender.
Parameters | |
---|---|
Name | Description |
name | RecommendationName Required. Name of the recommendation. |
stateMetadata | IDictionary<String, String> State properties to include with this state. Overwrites any existing
|
etag | String Required. Fingerprint of the Recommendation. Provides optimistic locking. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Recommendation> | A Task containing the RPC response. |
// Create client
RecommenderClient recommenderClient = await RecommenderClient.CreateAsync();
// Initialize request argument(s)
RecommendationName name = RecommendationName.FromProjectLocationRecommenderRecommendation("[PROJECT]", "[LOCATION]", "[RECOMMENDER]", "[RECOMMENDATION]");
IDictionary<string, string> stateMetadata = new Dictionary<string, string> { { "", "" }, };
string etag = "";
// Make the request
Recommendation response = await recommenderClient.MarkRecommendationClaimedAsync(name, stateMetadata, etag);
MarkRecommendationClaimedAsync(RecommendationName, IDictionary<String, String>, String, CancellationToken)
public virtual Task<Recommendation> MarkRecommendationClaimedAsync(RecommendationName name, IDictionary<string, string> stateMetadata, string etag, CancellationToken cancellationToken)
Marks the Recommendation State as Claimed. Users can use this method to indicate to the Recommender API that they are starting to apply the recommendation themselves. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state.
MarkRecommendationClaimed can be applied to recommendations in CLAIMED, SUCCEEDED, FAILED, or ACTIVE state.
Requires the recommender.*.update IAM permission for the specified recommender.
Parameters | |
---|---|
Name | Description |
name | RecommendationName Required. Name of the recommendation. |
stateMetadata | IDictionary<String, String> State properties to include with this state. Overwrites any existing
|
etag | String Required. Fingerprint of the Recommendation. Provides optimistic locking. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Recommendation> | A Task containing the RPC response. |
// Create client
RecommenderClient recommenderClient = await RecommenderClient.CreateAsync();
// Initialize request argument(s)
RecommendationName name = RecommendationName.FromProjectLocationRecommenderRecommendation("[PROJECT]", "[LOCATION]", "[RECOMMENDER]", "[RECOMMENDATION]");
IDictionary<string, string> stateMetadata = new Dictionary<string, string> { { "", "" }, };
string etag = "";
// Make the request
Recommendation response = await recommenderClient.MarkRecommendationClaimedAsync(name, stateMetadata, etag);
MarkRecommendationClaimedAsync(String, IDictionary<String, String>, String, CallSettings)
public virtual Task<Recommendation> MarkRecommendationClaimedAsync(string name, IDictionary<string, string> stateMetadata, string etag, CallSettings callSettings = null)
Marks the Recommendation State as Claimed. Users can use this method to indicate to the Recommender API that they are starting to apply the recommendation themselves. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state.
MarkRecommendationClaimed can be applied to recommendations in CLAIMED, SUCCEEDED, FAILED, or ACTIVE state.
Requires the recommender.*.update IAM permission for the specified recommender.
Parameters | |
---|---|
Name | Description |
name | String Required. Name of the recommendation. |
stateMetadata | IDictionary<String, String> State properties to include with this state. Overwrites any existing
|
etag | String Required. Fingerprint of the Recommendation. Provides optimistic locking. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Recommendation> | A Task containing the RPC response. |
// Create client
RecommenderClient recommenderClient = await RecommenderClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/recommenders/[RECOMMENDER]/recommendations/[RECOMMENDATION]";
IDictionary<string, string> stateMetadata = new Dictionary<string, string> { { "", "" }, };
string etag = "";
// Make the request
Recommendation response = await recommenderClient.MarkRecommendationClaimedAsync(name, stateMetadata, etag);
MarkRecommendationClaimedAsync(String, IDictionary<String, String>, String, CancellationToken)
public virtual Task<Recommendation> MarkRecommendationClaimedAsync(string name, IDictionary<string, string> stateMetadata, string etag, CancellationToken cancellationToken)
Marks the Recommendation State as Claimed. Users can use this method to indicate to the Recommender API that they are starting to apply the recommendation themselves. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state.
MarkRecommendationClaimed can be applied to recommendations in CLAIMED, SUCCEEDED, FAILED, or ACTIVE state.
Requires the recommender.*.update IAM permission for the specified recommender.
Parameters | |
---|---|
Name | Description |
name | String Required. Name of the recommendation. |
stateMetadata | IDictionary<String, String> State properties to include with this state. Overwrites any existing
|
etag | String Required. Fingerprint of the Recommendation. Provides optimistic locking. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Recommendation> | A Task containing the RPC response. |
// Create client
RecommenderClient recommenderClient = await RecommenderClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/recommenders/[RECOMMENDER]/recommendations/[RECOMMENDATION]";
IDictionary<string, string> stateMetadata = new Dictionary<string, string> { { "", "" }, };
string etag = "";
// Make the request
Recommendation response = await recommenderClient.MarkRecommendationClaimedAsync(name, stateMetadata, etag);
MarkRecommendationFailed(MarkRecommendationFailedRequest, CallSettings)
public virtual Recommendation MarkRecommendationFailed(MarkRecommendationFailedRequest request, CallSettings callSettings = null)
Marks the Recommendation State as Failed. Users can use this method to indicate to the Recommender API that they have applied the recommendation themselves, and the operation failed. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state.
MarkRecommendationFailed can be applied to recommendations in ACTIVE, CLAIMED, SUCCEEDED, or FAILED state.
Requires the recommender.*.update IAM permission for the specified recommender.
Parameters | |
---|---|
Name | Description |
request | MarkRecommendationFailedRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Recommendation | The RPC response. |
// Create client
RecommenderClient recommenderClient = RecommenderClient.Create();
// Initialize request argument(s)
MarkRecommendationFailedRequest request = new MarkRecommendationFailedRequest
{
RecommendationName = RecommendationName.FromProjectLocationRecommenderRecommendation("[PROJECT]", "[LOCATION]", "[RECOMMENDER]", "[RECOMMENDATION]"),
StateMetadata = { { "", "" }, },
Etag = "",
};
// Make the request
Recommendation response = recommenderClient.MarkRecommendationFailed(request);
MarkRecommendationFailed(RecommendationName, IDictionary<String, String>, String, CallSettings)
public virtual Recommendation MarkRecommendationFailed(RecommendationName name, IDictionary<string, string> stateMetadata, string etag, CallSettings callSettings = null)
Marks the Recommendation State as Failed. Users can use this method to indicate to the Recommender API that they have applied the recommendation themselves, and the operation failed. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state.
MarkRecommendationFailed can be applied to recommendations in ACTIVE, CLAIMED, SUCCEEDED, or FAILED state.
Requires the recommender.*.update IAM permission for the specified recommender.
Parameters | |
---|---|
Name | Description |
name | RecommendationName Required. Name of the recommendation. |
stateMetadata | IDictionary<String, String> State properties to include with this state. Overwrites any existing
|
etag | String Required. Fingerprint of the Recommendation. Provides optimistic locking. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Recommendation | The RPC response. |
// Create client
RecommenderClient recommenderClient = RecommenderClient.Create();
// Initialize request argument(s)
RecommendationName name = RecommendationName.FromProjectLocationRecommenderRecommendation("[PROJECT]", "[LOCATION]", "[RECOMMENDER]", "[RECOMMENDATION]");
IDictionary<string, string> stateMetadata = new Dictionary<string, string> { { "", "" }, };
string etag = "";
// Make the request
Recommendation response = recommenderClient.MarkRecommendationFailed(name, stateMetadata, etag);
MarkRecommendationFailed(String, IDictionary<String, String>, String, CallSettings)
public virtual Recommendation MarkRecommendationFailed(string name, IDictionary<string, string> stateMetadata, string etag, CallSettings callSettings = null)
Marks the Recommendation State as Failed. Users can use this method to indicate to the Recommender API that they have applied the recommendation themselves, and the operation failed. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state.
MarkRecommendationFailed can be applied to recommendations in ACTIVE, CLAIMED, SUCCEEDED, or FAILED state.
Requires the recommender.*.update IAM permission for the specified recommender.
Parameters | |
---|---|
Name | Description |
name | String Required. Name of the recommendation. |
stateMetadata | IDictionary<String, String> State properties to include with this state. Overwrites any existing
|
etag | String Required. Fingerprint of the Recommendation. Provides optimistic locking. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Recommendation | The RPC response. |
// Create client
RecommenderClient recommenderClient = RecommenderClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/recommenders/[RECOMMENDER]/recommendations/[RECOMMENDATION]";
IDictionary<string, string> stateMetadata = new Dictionary<string, string> { { "", "" }, };
string etag = "";
// Make the request
Recommendation response = recommenderClient.MarkRecommendationFailed(name, stateMetadata, etag);
MarkRecommendationFailedAsync(MarkRecommendationFailedRequest, CallSettings)
public virtual Task<Recommendation> MarkRecommendationFailedAsync(MarkRecommendationFailedRequest request, CallSettings callSettings = null)
Marks the Recommendation State as Failed. Users can use this method to indicate to the Recommender API that they have applied the recommendation themselves, and the operation failed. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state.
MarkRecommendationFailed can be applied to recommendations in ACTIVE, CLAIMED, SUCCEEDED, or FAILED state.
Requires the recommender.*.update IAM permission for the specified recommender.
Parameters | |
---|---|
Name | Description |
request | MarkRecommendationFailedRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Recommendation> | A Task containing the RPC response. |
// Create client
RecommenderClient recommenderClient = await RecommenderClient.CreateAsync();
// Initialize request argument(s)
MarkRecommendationFailedRequest request = new MarkRecommendationFailedRequest
{
RecommendationName = RecommendationName.FromProjectLocationRecommenderRecommendation("[PROJECT]", "[LOCATION]", "[RECOMMENDER]", "[RECOMMENDATION]"),
StateMetadata = { { "", "" }, },
Etag = "",
};
// Make the request
Recommendation response = await recommenderClient.MarkRecommendationFailedAsync(request);
MarkRecommendationFailedAsync(MarkRecommendationFailedRequest, CancellationToken)
public virtual Task<Recommendation> MarkRecommendationFailedAsync(MarkRecommendationFailedRequest request, CancellationToken cancellationToken)
Marks the Recommendation State as Failed. Users can use this method to indicate to the Recommender API that they have applied the recommendation themselves, and the operation failed. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state.
MarkRecommendationFailed can be applied to recommendations in ACTIVE, CLAIMED, SUCCEEDED, or FAILED state.
Requires the recommender.*.update IAM permission for the specified recommender.
Parameters | |
---|---|
Name | Description |
request | MarkRecommendationFailedRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Recommendation> | A Task containing the RPC response. |
// Create client
RecommenderClient recommenderClient = await RecommenderClient.CreateAsync();
// Initialize request argument(s)
MarkRecommendationFailedRequest request = new MarkRecommendationFailedRequest
{
RecommendationName = RecommendationName.FromProjectLocationRecommenderRecommendation("[PROJECT]", "[LOCATION]", "[RECOMMENDER]", "[RECOMMENDATION]"),
StateMetadata = { { "", "" }, },
Etag = "",
};
// Make the request
Recommendation response = await recommenderClient.MarkRecommendationFailedAsync(request);
MarkRecommendationFailedAsync(RecommendationName, IDictionary<String, String>, String, CallSettings)
public virtual Task<Recommendation> MarkRecommendationFailedAsync(RecommendationName name, IDictionary<string, string> stateMetadata, string etag, CallSettings callSettings = null)
Marks the Recommendation State as Failed. Users can use this method to indicate to the Recommender API that they have applied the recommendation themselves, and the operation failed. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state.
MarkRecommendationFailed can be applied to recommendations in ACTIVE, CLAIMED, SUCCEEDED, or FAILED state.
Requires the recommender.*.update IAM permission for the specified recommender.
Parameters | |
---|---|
Name | Description |
name | RecommendationName Required. Name of the recommendation. |
stateMetadata | IDictionary<String, String> State properties to include with this state. Overwrites any existing
|
etag | String Required. Fingerprint of the Recommendation. Provides optimistic locking. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Recommendation> | A Task containing the RPC response. |
// Create client
RecommenderClient recommenderClient = await RecommenderClient.CreateAsync();
// Initialize request argument(s)
RecommendationName name = RecommendationName.FromProjectLocationRecommenderRecommendation("[PROJECT]", "[LOCATION]", "[RECOMMENDER]", "[RECOMMENDATION]");
IDictionary<string, string> stateMetadata = new Dictionary<string, string> { { "", "" }, };
string etag = "";
// Make the request
Recommendation response = await recommenderClient.MarkRecommendationFailedAsync(name, stateMetadata, etag);
MarkRecommendationFailedAsync(RecommendationName, IDictionary<String, String>, String, CancellationToken)
public virtual Task<Recommendation> MarkRecommendationFailedAsync(RecommendationName name, IDictionary<string, string> stateMetadata, string etag, CancellationToken cancellationToken)
Marks the Recommendation State as Failed. Users can use this method to indicate to the Recommender API that they have applied the recommendation themselves, and the operation failed. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state.
MarkRecommendationFailed can be applied to recommendations in ACTIVE, CLAIMED, SUCCEEDED, or FAILED state.
Requires the recommender.*.update IAM permission for the specified recommender.
Parameters | |
---|---|
Name | Description |
name | RecommendationName Required. Name of the recommendation. |
stateMetadata | IDictionary<String, String> State properties to include with this state. Overwrites any existing
|
etag | String Required. Fingerprint of the Recommendation. Provides optimistic locking. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Recommendation> | A Task containing the RPC response. |
// Create client
RecommenderClient recommenderClient = await RecommenderClient.CreateAsync();
// Initialize request argument(s)
RecommendationName name = RecommendationName.FromProjectLocationRecommenderRecommendation("[PROJECT]", "[LOCATION]", "[RECOMMENDER]", "[RECOMMENDATION]");
IDictionary<string, string> stateMetadata = new Dictionary<string, string> { { "", "" }, };
string etag = "";
// Make the request
Recommendation response = await recommenderClient.MarkRecommendationFailedAsync(name, stateMetadata, etag);
MarkRecommendationFailedAsync(String, IDictionary<String, String>, String, CallSettings)
public virtual Task<Recommendation> MarkRecommendationFailedAsync(string name, IDictionary<string, string> stateMetadata, string etag, CallSettings callSettings = null)
Marks the Recommendation State as Failed. Users can use this method to indicate to the Recommender API that they have applied the recommendation themselves, and the operation failed. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state.
MarkRecommendationFailed can be applied to recommendations in ACTIVE, CLAIMED, SUCCEEDED, or FAILED state.
Requires the recommender.*.update IAM permission for the specified recommender.
Parameters | |
---|---|
Name | Description |
name | String Required. Name of the recommendation. |
stateMetadata | IDictionary<String, String> State properties to include with this state. Overwrites any existing
|
etag | String Required. Fingerprint of the Recommendation. Provides optimistic locking. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Recommendation> | A Task containing the RPC response. |
// Create client
RecommenderClient recommenderClient = await RecommenderClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/recommenders/[RECOMMENDER]/recommendations/[RECOMMENDATION]";
IDictionary<string, string> stateMetadata = new Dictionary<string, string> { { "", "" }, };
string etag = "";
// Make the request
Recommendation response = await recommenderClient.MarkRecommendationFailedAsync(name, stateMetadata, etag);
MarkRecommendationFailedAsync(String, IDictionary<String, String>, String, CancellationToken)
public virtual Task<Recommendation> MarkRecommendationFailedAsync(string name, IDictionary<string, string> stateMetadata, string etag, CancellationToken cancellationToken)
Marks the Recommendation State as Failed. Users can use this method to indicate to the Recommender API that they have applied the recommendation themselves, and the operation failed. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state.
MarkRecommendationFailed can be applied to recommendations in ACTIVE, CLAIMED, SUCCEEDED, or FAILED state.
Requires the recommender.*.update IAM permission for the specified recommender.
Parameters | |
---|---|
Name | Description |
name | String Required. Name of the recommendation. |
stateMetadata | IDictionary<String, String> State properties to include with this state. Overwrites any existing
|
etag | String Required. Fingerprint of the Recommendation. Provides optimistic locking. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Recommendation> | A Task containing the RPC response. |
// Create client
RecommenderClient recommenderClient = await RecommenderClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/recommenders/[RECOMMENDER]/recommendations/[RECOMMENDATION]";
IDictionary<string, string> stateMetadata = new Dictionary<string, string> { { "", "" }, };
string etag = "";
// Make the request
Recommendation response = await recommenderClient.MarkRecommendationFailedAsync(name, stateMetadata, etag);
MarkRecommendationSucceeded(MarkRecommendationSucceededRequest, CallSettings)
public virtual Recommendation MarkRecommendationSucceeded(MarkRecommendationSucceededRequest request, CallSettings callSettings = null)
Marks the Recommendation State as Succeeded. Users can use this method to indicate to the Recommender API that they have applied the recommendation themselves, and the operation was successful. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state.
MarkRecommendationSucceeded can be applied to recommendations in ACTIVE, CLAIMED, SUCCEEDED, or FAILED state.
Requires the recommender.*.update IAM permission for the specified recommender.
Parameters | |
---|---|
Name | Description |
request | MarkRecommendationSucceededRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Recommendation | The RPC response. |
// Create client
RecommenderClient recommenderClient = RecommenderClient.Create();
// Initialize request argument(s)
MarkRecommendationSucceededRequest request = new MarkRecommendationSucceededRequest
{
RecommendationName = RecommendationName.FromProjectLocationRecommenderRecommendation("[PROJECT]", "[LOCATION]", "[RECOMMENDER]", "[RECOMMENDATION]"),
StateMetadata = { { "", "" }, },
Etag = "",
};
// Make the request
Recommendation response = recommenderClient.MarkRecommendationSucceeded(request);
MarkRecommendationSucceeded(RecommendationName, IDictionary<String, String>, String, CallSettings)
public virtual Recommendation MarkRecommendationSucceeded(RecommendationName name, IDictionary<string, string> stateMetadata, string etag, CallSettings callSettings = null)
Marks the Recommendation State as Succeeded. Users can use this method to indicate to the Recommender API that they have applied the recommendation themselves, and the operation was successful. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state.
MarkRecommendationSucceeded can be applied to recommendations in ACTIVE, CLAIMED, SUCCEEDED, or FAILED state.
Requires the recommender.*.update IAM permission for the specified recommender.
Parameters | |
---|---|
Name | Description |
name | RecommendationName Required. Name of the recommendation. |
stateMetadata | IDictionary<String, String> State properties to include with this state. Overwrites any existing
|
etag | String Required. Fingerprint of the Recommendation. Provides optimistic locking. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Recommendation | The RPC response. |
// Create client
RecommenderClient recommenderClient = RecommenderClient.Create();
// Initialize request argument(s)
RecommendationName name = RecommendationName.FromProjectLocationRecommenderRecommendation("[PROJECT]", "[LOCATION]", "[RECOMMENDER]", "[RECOMMENDATION]");
IDictionary<string, string> stateMetadata = new Dictionary<string, string> { { "", "" }, };
string etag = "";
// Make the request
Recommendation response = recommenderClient.MarkRecommendationSucceeded(name, stateMetadata, etag);
MarkRecommendationSucceeded(String, IDictionary<String, String>, String, CallSettings)
public virtual Recommendation MarkRecommendationSucceeded(string name, IDictionary<string, string> stateMetadata, string etag, CallSettings callSettings = null)
Marks the Recommendation State as Succeeded. Users can use this method to indicate to the Recommender API that they have applied the recommendation themselves, and the operation was successful. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state.
MarkRecommendationSucceeded can be applied to recommendations in ACTIVE, CLAIMED, SUCCEEDED, or FAILED state.
Requires the recommender.*.update IAM permission for the specified recommender.
Parameters | |
---|---|
Name | Description |
name | String Required. Name of the recommendation. |
stateMetadata | IDictionary<String, String> State properties to include with this state. Overwrites any existing
|
etag | String Required. Fingerprint of the Recommendation. Provides optimistic locking. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Recommendation | The RPC response. |
// Create client
RecommenderClient recommenderClient = RecommenderClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/recommenders/[RECOMMENDER]/recommendations/[RECOMMENDATION]";
IDictionary<string, string> stateMetadata = new Dictionary<string, string> { { "", "" }, };
string etag = "";
// Make the request
Recommendation response = recommenderClient.MarkRecommendationSucceeded(name, stateMetadata, etag);
MarkRecommendationSucceededAsync(MarkRecommendationSucceededRequest, CallSettings)
public virtual Task<Recommendation> MarkRecommendationSucceededAsync(MarkRecommendationSucceededRequest request, CallSettings callSettings = null)
Marks the Recommendation State as Succeeded. Users can use this method to indicate to the Recommender API that they have applied the recommendation themselves, and the operation was successful. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state.
MarkRecommendationSucceeded can be applied to recommendations in ACTIVE, CLAIMED, SUCCEEDED, or FAILED state.
Requires the recommender.*.update IAM permission for the specified recommender.
Parameters | |
---|---|
Name | Description |
request | MarkRecommendationSucceededRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Recommendation> | A Task containing the RPC response. |
// Create client
RecommenderClient recommenderClient = await RecommenderClient.CreateAsync();
// Initialize request argument(s)
MarkRecommendationSucceededRequest request = new MarkRecommendationSucceededRequest
{
RecommendationName = RecommendationName.FromProjectLocationRecommenderRecommendation("[PROJECT]", "[LOCATION]", "[RECOMMENDER]", "[RECOMMENDATION]"),
StateMetadata = { { "", "" }, },
Etag = "",
};
// Make the request
Recommendation response = await recommenderClient.MarkRecommendationSucceededAsync(request);
MarkRecommendationSucceededAsync(MarkRecommendationSucceededRequest, CancellationToken)
public virtual Task<Recommendation> MarkRecommendationSucceededAsync(MarkRecommendationSucceededRequest request, CancellationToken cancellationToken)
Marks the Recommendation State as Succeeded. Users can use this method to indicate to the Recommender API that they have applied the recommendation themselves, and the operation was successful. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state.
MarkRecommendationSucceeded can be applied to recommendations in ACTIVE, CLAIMED, SUCCEEDED, or FAILED state.
Requires the recommender.*.update IAM permission for the specified recommender.
Parameters | |
---|---|
Name | Description |
request | MarkRecommendationSucceededRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Recommendation> | A Task containing the RPC response. |
// Create client
RecommenderClient recommenderClient = await RecommenderClient.CreateAsync();
// Initialize request argument(s)
MarkRecommendationSucceededRequest request = new MarkRecommendationSucceededRequest
{
RecommendationName = RecommendationName.FromProjectLocationRecommenderRecommendation("[PROJECT]", "[LOCATION]", "[RECOMMENDER]", "[RECOMMENDATION]"),
StateMetadata = { { "", "" }, },
Etag = "",
};
// Make the request
Recommendation response = await recommenderClient.MarkRecommendationSucceededAsync(request);
MarkRecommendationSucceededAsync(RecommendationName, IDictionary<String, String>, String, CallSettings)
public virtual Task<Recommendation> MarkRecommendationSucceededAsync(RecommendationName name, IDictionary<string, string> stateMetadata, string etag, CallSettings callSettings = null)
Marks the Recommendation State as Succeeded. Users can use this method to indicate to the Recommender API that they have applied the recommendation themselves, and the operation was successful. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state.
MarkRecommendationSucceeded can be applied to recommendations in ACTIVE, CLAIMED, SUCCEEDED, or FAILED state.
Requires the recommender.*.update IAM permission for the specified recommender.
Parameters | |
---|---|
Name | Description |
name | RecommendationName Required. Name of the recommendation. |
stateMetadata | IDictionary<String, String> State properties to include with this state. Overwrites any existing
|
etag | String Required. Fingerprint of the Recommendation. Provides optimistic locking. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Recommendation> | A Task containing the RPC response. |
// Create client
RecommenderClient recommenderClient = await RecommenderClient.CreateAsync();
// Initialize request argument(s)
RecommendationName name = RecommendationName.FromProjectLocationRecommenderRecommendation("[PROJECT]", "[LOCATION]", "[RECOMMENDER]", "[RECOMMENDATION]");
IDictionary<string, string> stateMetadata = new Dictionary<string, string> { { "", "" }, };
string etag = "";
// Make the request
Recommendation response = await recommenderClient.MarkRecommendationSucceededAsync(name, stateMetadata, etag);
MarkRecommendationSucceededAsync(RecommendationName, IDictionary<String, String>, String, CancellationToken)
public virtual Task<Recommendation> MarkRecommendationSucceededAsync(RecommendationName name, IDictionary<string, string> stateMetadata, string etag, CancellationToken cancellationToken)
Marks the Recommendation State as Succeeded. Users can use this method to indicate to the Recommender API that they have applied the recommendation themselves, and the operation was successful. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state.
MarkRecommendationSucceeded can be applied to recommendations in ACTIVE, CLAIMED, SUCCEEDED, or FAILED state.
Requires the recommender.*.update IAM permission for the specified recommender.
Parameters | |
---|---|
Name | Description |
name | RecommendationName Required. Name of the recommendation. |
stateMetadata | IDictionary<String, String> State properties to include with this state. Overwrites any existing
|
etag | String Required. Fingerprint of the Recommendation. Provides optimistic locking. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Recommendation> | A Task containing the RPC response. |
// Create client
RecommenderClient recommenderClient = await RecommenderClient.CreateAsync();
// Initialize request argument(s)
RecommendationName name = RecommendationName.FromProjectLocationRecommenderRecommendation("[PROJECT]", "[LOCATION]", "[RECOMMENDER]", "[RECOMMENDATION]");
IDictionary<string, string> stateMetadata = new Dictionary<string, string> { { "", "" }, };
string etag = "";
// Make the request
Recommendation response = await recommenderClient.MarkRecommendationSucceededAsync(name, stateMetadata, etag);
MarkRecommendationSucceededAsync(String, IDictionary<String, String>, String, CallSettings)
public virtual Task<Recommendation> MarkRecommendationSucceededAsync(string name, IDictionary<string, string> stateMetadata, string etag, CallSettings callSettings = null)
Marks the Recommendation State as Succeeded. Users can use this method to indicate to the Recommender API that they have applied the recommendation themselves, and the operation was successful. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state.
MarkRecommendationSucceeded can be applied to recommendations in ACTIVE, CLAIMED, SUCCEEDED, or FAILED state.
Requires the recommender.*.update IAM permission for the specified recommender.
Parameters | |
---|---|
Name | Description |
name | String Required. Name of the recommendation. |
stateMetadata | IDictionary<String, String> State properties to include with this state. Overwrites any existing
|
etag | String Required. Fingerprint of the Recommendation. Provides optimistic locking. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Recommendation> | A Task containing the RPC response. |
// Create client
RecommenderClient recommenderClient = await RecommenderClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/recommenders/[RECOMMENDER]/recommendations/[RECOMMENDATION]";
IDictionary<string, string> stateMetadata = new Dictionary<string, string> { { "", "" }, };
string etag = "";
// Make the request
Recommendation response = await recommenderClient.MarkRecommendationSucceededAsync(name, stateMetadata, etag);
MarkRecommendationSucceededAsync(String, IDictionary<String, String>, String, CancellationToken)
public virtual Task<Recommendation> MarkRecommendationSucceededAsync(string name, IDictionary<string, string> stateMetadata, string etag, CancellationToken cancellationToken)
Marks the Recommendation State as Succeeded. Users can use this method to indicate to the Recommender API that they have applied the recommendation themselves, and the operation was successful. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state.
MarkRecommendationSucceeded can be applied to recommendations in ACTIVE, CLAIMED, SUCCEEDED, or FAILED state.
Requires the recommender.*.update IAM permission for the specified recommender.
Parameters | |
---|---|
Name | Description |
name | String Required. Name of the recommendation. |
stateMetadata | IDictionary<String, String> State properties to include with this state. Overwrites any existing
|
etag | String Required. Fingerprint of the Recommendation. Provides optimistic locking. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Recommendation> | A Task containing the RPC response. |
// Create client
RecommenderClient recommenderClient = await RecommenderClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/recommenders/[RECOMMENDER]/recommendations/[RECOMMENDATION]";
IDictionary<string, string> stateMetadata = new Dictionary<string, string> { { "", "" }, };
string etag = "";
// Make the request
Recommendation response = await recommenderClient.MarkRecommendationSucceededAsync(name, stateMetadata, etag);
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.