Google Cloud Recommender v1 API - Class RecommenderClientImpl (3.7.0)

public sealed class RecommenderClientImpl : RecommenderClient

Reference documentation and code samples for the Google Cloud Recommender v1 API class RecommenderClientImpl.

Recommender client wrapper implementation, for convenient use.

Inheritance

object > RecommenderClient > RecommenderClientImpl

Namespace

Google.Cloud.Recommender.V1

Assembly

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.

Constructors

RecommenderClientImpl(RecommenderClient, RecommenderSettings, ILogger)

public RecommenderClientImpl(Recommender.RecommenderClient grpcClient, RecommenderSettings settings, ILogger logger)

Constructs a client wrapper for the Recommender service, with the specified gRPC client and settings.

Parameters
Name Description
grpcClient RecommenderRecommenderClient

The underlying gRPC client.

settings RecommenderSettings

The base RecommenderSettings used within this client.

logger ILogger

Optional ILogger to use within this client.

Properties

GrpcClient

public override Recommender.RecommenderClient GrpcClient { get; }

The underlying gRPC Recommender client

Property Value
Type Description
RecommenderRecommenderClient
Overrides

Methods

GetInsight(GetInsightRequest, CallSettings)

public override 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.

Overrides

GetInsightAsync(GetInsightRequest, CallSettings)

public override 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
TaskInsight

A Task containing the RPC response.

Overrides

GetInsightTypeConfig(GetInsightTypeConfigRequest, CallSettings)

public override InsightTypeConfig GetInsightTypeConfig(GetInsightTypeConfigRequest request, CallSettings callSettings = null)

Gets the requested InsightTypeConfig. There is only one instance of the config for each InsightType.

Parameters
Name Description
request GetInsightTypeConfigRequest

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
InsightTypeConfig

The RPC response.

Overrides

GetInsightTypeConfigAsync(GetInsightTypeConfigRequest, CallSettings)

public override Task<InsightTypeConfig> GetInsightTypeConfigAsync(GetInsightTypeConfigRequest request, CallSettings callSettings = null)

Gets the requested InsightTypeConfig. There is only one instance of the config for each InsightType.

Parameters
Name Description
request GetInsightTypeConfigRequest

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
TaskInsightTypeConfig

A Task containing the RPC response.

Overrides

GetRecommendation(GetRecommendationRequest, CallSettings)

public override 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.

Overrides

GetRecommendationAsync(GetRecommendationRequest, CallSettings)

public override 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
TaskRecommendation

A Task containing the RPC response.

Overrides

GetRecommenderConfig(GetRecommenderConfigRequest, CallSettings)

public override RecommenderConfig GetRecommenderConfig(GetRecommenderConfigRequest request, CallSettings callSettings = null)

Gets the requested Recommender Config. There is only one instance of the config for each Recommender.

Parameters
Name Description
request GetRecommenderConfigRequest

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
RecommenderConfig

The RPC response.

Overrides

GetRecommenderConfigAsync(GetRecommenderConfigRequest, CallSettings)

public override Task<RecommenderConfig> GetRecommenderConfigAsync(GetRecommenderConfigRequest request, CallSettings callSettings = null)

Gets the requested Recommender Config. There is only one instance of the config for each Recommender.

Parameters
Name Description
request GetRecommenderConfigRequest

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
TaskRecommenderConfig

A Task containing the RPC response.

Overrides

ListInsights(ListInsightsRequest, CallSettings)

public override 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
PagedEnumerableListInsightsResponseInsight

A pageable sequence of Insight resources.

Overrides

ListInsightsAsync(ListInsightsRequest, CallSettings)

public override 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
PagedAsyncEnumerableListInsightsResponseInsight

A pageable asynchronous sequence of Insight resources.

Overrides

ListRecommendations(ListRecommendationsRequest, CallSettings)

public override 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
PagedEnumerableListRecommendationsResponseRecommendation

A pageable sequence of Recommendation resources.

Overrides

ListRecommendationsAsync(ListRecommendationsRequest, CallSettings)

public override 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
PagedAsyncEnumerableListRecommendationsResponseRecommendation

A pageable asynchronous sequence of Recommendation resources.

Overrides

MarkInsightAccepted(MarkInsightAcceptedRequest, CallSettings)

public override 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.

Overrides

MarkInsightAcceptedAsync(MarkInsightAcceptedRequest, CallSettings)

public override 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
TaskInsight

A Task containing the RPC response.

Overrides

MarkRecommendationClaimed(MarkRecommendationClaimedRequest, CallSettings)

public override 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.

Overrides

MarkRecommendationClaimedAsync(MarkRecommendationClaimedRequest, CallSettings)

public override 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
TaskRecommendation

A Task containing the RPC response.

Overrides

MarkRecommendationDismissed(MarkRecommendationDismissedRequest, CallSettings)

public override Recommendation MarkRecommendationDismissed(MarkRecommendationDismissedRequest request, CallSettings callSettings = null)

Mark the Recommendation State as Dismissed. Users can use this method to indicate to the Recommender API that an ACTIVE recommendation has to be marked back as DISMISSED.

MarkRecommendationDismissed can be applied to recommendations in ACTIVE state.

Requires the recommender.*.update IAM permission for the specified recommender.

Parameters
Name Description
request MarkRecommendationDismissedRequest

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.

Overrides

MarkRecommendationDismissedAsync(MarkRecommendationDismissedRequest, CallSettings)

public override Task<Recommendation> MarkRecommendationDismissedAsync(MarkRecommendationDismissedRequest request, CallSettings callSettings = null)

Mark the Recommendation State as Dismissed. Users can use this method to indicate to the Recommender API that an ACTIVE recommendation has to be marked back as DISMISSED.

MarkRecommendationDismissed can be applied to recommendations in ACTIVE state.

Requires the recommender.*.update IAM permission for the specified recommender.

Parameters
Name Description
request MarkRecommendationDismissedRequest

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
TaskRecommendation

A Task containing the RPC response.

Overrides

MarkRecommendationFailed(MarkRecommendationFailedRequest, CallSettings)

public override 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.

Overrides

MarkRecommendationFailedAsync(MarkRecommendationFailedRequest, CallSettings)

public override 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
TaskRecommendation

A Task containing the RPC response.

Overrides

MarkRecommendationSucceeded(MarkRecommendationSucceededRequest, CallSettings)

public override 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.

Overrides

MarkRecommendationSucceededAsync(MarkRecommendationSucceededRequest, CallSettings)

public override 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
TaskRecommendation

A Task containing the RPC response.

Overrides

UpdateInsightTypeConfig(UpdateInsightTypeConfigRequest, CallSettings)

public override InsightTypeConfig UpdateInsightTypeConfig(UpdateInsightTypeConfigRequest request, CallSettings callSettings = null)

Updates an InsightTypeConfig change. This will create a new revision of the config.

Parameters
Name Description
request UpdateInsightTypeConfigRequest

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
InsightTypeConfig

The RPC response.

Overrides

UpdateInsightTypeConfigAsync(UpdateInsightTypeConfigRequest, CallSettings)

public override Task<InsightTypeConfig> UpdateInsightTypeConfigAsync(UpdateInsightTypeConfigRequest request, CallSettings callSettings = null)

Updates an InsightTypeConfig change. This will create a new revision of the config.

Parameters
Name Description
request UpdateInsightTypeConfigRequest

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
TaskInsightTypeConfig

A Task containing the RPC response.

Overrides

UpdateRecommenderConfig(UpdateRecommenderConfigRequest, CallSettings)

public override RecommenderConfig UpdateRecommenderConfig(UpdateRecommenderConfigRequest request, CallSettings callSettings = null)

Updates a Recommender Config. This will create a new revision of the config.

Parameters
Name Description
request UpdateRecommenderConfigRequest

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
RecommenderConfig

The RPC response.

Overrides

UpdateRecommenderConfigAsync(UpdateRecommenderConfigRequest, CallSettings)

public override Task<RecommenderConfig> UpdateRecommenderConfigAsync(UpdateRecommenderConfigRequest request, CallSettings callSettings = null)

Updates a Recommender Config. This will create a new revision of the config.

Parameters
Name Description
request UpdateRecommenderConfigRequest

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
TaskRecommenderConfig

A Task containing the RPC response.

Overrides