Google Cloud Recommender v1 API - Class RecommenderClient (3.3.0)

public abstract class RecommenderClient

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

Recommender client wrapper, for convenient use.

Inheritance

object > RecommenderClient

Derived Types

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.

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
TypeDescription
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default Recommender scopes.

Property Value
TypeDescription
IReadOnlyListstring
Remarks

The default Recommender scopes are:

GrpcClient

public virtual Recommender.RecommenderClient GrpcClient { get; }

The underlying gRPC Recommender client

Property Value
TypeDescription
RecommenderRecommenderClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
TypeDescription
ServiceMetadata

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
TypeDescription
RecommenderClient

The created RecommenderClient.

CreateAsync(CancellationToken)

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

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

Parameter
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
TaskRecommenderClient

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
NameDescription
requestGetInsightRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Insight

The RPC response.

Example
// 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
NameDescription
nameInsightName

Required. Name of the insight.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Insight

The RPC response.

Example
// 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
NameDescription
namestring

Required. Name of the insight.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Insight

The RPC response.

Example
// 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
NameDescription
requestGetInsightRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskInsight

A Task containing the RPC response.

Example
// 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
NameDescription
requestGetInsightRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskInsight

A Task containing the RPC response.

Example
// 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
NameDescription
nameInsightName

Required. Name of the insight.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskInsight

A Task containing the RPC response.

Example
// 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
NameDescription
nameInsightName

Required. Name of the insight.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskInsight

A Task containing the RPC response.

Example
// 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
NameDescription
namestring

Required. Name of the insight.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskInsight

A Task containing the RPC response.

Example
// 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
NameDescription
namestring

Required. Name of the insight.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskInsight

A Task containing the RPC response.

Example
// 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);

GetInsightTypeConfig(GetInsightTypeConfigRequest, CallSettings)

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

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

Parameters
NameDescription
requestGetInsightTypeConfigRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
InsightTypeConfig

The RPC response.

Example
// Create client
RecommenderClient recommenderClient = RecommenderClient.Create();
// Initialize request argument(s)
GetInsightTypeConfigRequest request = new GetInsightTypeConfigRequest
{
    InsightTypeConfigName = InsightTypeConfigName.FromProjectLocationInsightType("[PROJECT]", "[LOCATION]", "[INSIGHT_TYPE]"),
};
// Make the request
InsightTypeConfig response = recommenderClient.GetInsightTypeConfig(request);

GetInsightTypeConfig(InsightTypeConfigName, CallSettings)

public virtual InsightTypeConfig GetInsightTypeConfig(InsightTypeConfigName name, CallSettings callSettings = null)

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

Parameters
NameDescription
nameInsightTypeConfigName

Required. Name of the InsightTypeConfig to get.

Acceptable formats:

  • projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config

  • projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config

  • organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config

  • billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
InsightTypeConfig

The RPC response.

Example
// Create client
RecommenderClient recommenderClient = RecommenderClient.Create();
// Initialize request argument(s)
InsightTypeConfigName name = InsightTypeConfigName.FromProjectLocationInsightType("[PROJECT]", "[LOCATION]", "[INSIGHT_TYPE]");
// Make the request
InsightTypeConfig response = recommenderClient.GetInsightTypeConfig(name);

GetInsightTypeConfig(string, CallSettings)

public virtual InsightTypeConfig GetInsightTypeConfig(string name, CallSettings callSettings = null)

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

Parameters
NameDescription
namestring

Required. Name of the InsightTypeConfig to get.

Acceptable formats:

  • projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config

  • projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config

  • organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config

  • billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
InsightTypeConfig

The RPC response.

Example
// Create client
RecommenderClient recommenderClient = RecommenderClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE]/config";
// Make the request
InsightTypeConfig response = recommenderClient.GetInsightTypeConfig(name);

GetInsightTypeConfigAsync(GetInsightTypeConfigRequest, CallSettings)

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

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

Parameters
NameDescription
requestGetInsightTypeConfigRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskInsightTypeConfig

A Task containing the RPC response.

Example
// Create client
RecommenderClient recommenderClient = await RecommenderClient.CreateAsync();
// Initialize request argument(s)
GetInsightTypeConfigRequest request = new GetInsightTypeConfigRequest
{
    InsightTypeConfigName = InsightTypeConfigName.FromProjectLocationInsightType("[PROJECT]", "[LOCATION]", "[INSIGHT_TYPE]"),
};
// Make the request
InsightTypeConfig response = await recommenderClient.GetInsightTypeConfigAsync(request);

GetInsightTypeConfigAsync(GetInsightTypeConfigRequest, CancellationToken)

public virtual Task<InsightTypeConfig> GetInsightTypeConfigAsync(GetInsightTypeConfigRequest request, CancellationToken cancellationToken)

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

Parameters
NameDescription
requestGetInsightTypeConfigRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskInsightTypeConfig

A Task containing the RPC response.

Example
// Create client
RecommenderClient recommenderClient = await RecommenderClient.CreateAsync();
// Initialize request argument(s)
GetInsightTypeConfigRequest request = new GetInsightTypeConfigRequest
{
    InsightTypeConfigName = InsightTypeConfigName.FromProjectLocationInsightType("[PROJECT]", "[LOCATION]", "[INSIGHT_TYPE]"),
};
// Make the request
InsightTypeConfig response = await recommenderClient.GetInsightTypeConfigAsync(request);

GetInsightTypeConfigAsync(InsightTypeConfigName, CallSettings)

public virtual Task<InsightTypeConfig> GetInsightTypeConfigAsync(InsightTypeConfigName name, CallSettings callSettings = null)

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

Parameters
NameDescription
nameInsightTypeConfigName

Required. Name of the InsightTypeConfig to get.

Acceptable formats:

  • projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config

  • projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config

  • organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config

  • billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskInsightTypeConfig

A Task containing the RPC response.

Example
// Create client
RecommenderClient recommenderClient = await RecommenderClient.CreateAsync();
// Initialize request argument(s)
InsightTypeConfigName name = InsightTypeConfigName.FromProjectLocationInsightType("[PROJECT]", "[LOCATION]", "[INSIGHT_TYPE]");
// Make the request
InsightTypeConfig response = await recommenderClient.GetInsightTypeConfigAsync(name);

GetInsightTypeConfigAsync(InsightTypeConfigName, CancellationToken)

public virtual Task<InsightTypeConfig> GetInsightTypeConfigAsync(InsightTypeConfigName name, CancellationToken cancellationToken)

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

Parameters
NameDescription
nameInsightTypeConfigName

Required. Name of the InsightTypeConfig to get.

Acceptable formats:

  • projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config

  • projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config

  • organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config

  • billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskInsightTypeConfig

A Task containing the RPC response.

Example
// Create client
RecommenderClient recommenderClient = await RecommenderClient.CreateAsync();
// Initialize request argument(s)
InsightTypeConfigName name = InsightTypeConfigName.FromProjectLocationInsightType("[PROJECT]", "[LOCATION]", "[INSIGHT_TYPE]");
// Make the request
InsightTypeConfig response = await recommenderClient.GetInsightTypeConfigAsync(name);

GetInsightTypeConfigAsync(string, CallSettings)

public virtual Task<InsightTypeConfig> GetInsightTypeConfigAsync(string name, CallSettings callSettings = null)

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

Parameters
NameDescription
namestring

Required. Name of the InsightTypeConfig to get.

Acceptable formats:

  • projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config

  • projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config

  • organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config

  • billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskInsightTypeConfig

A Task containing the RPC response.

Example
// Create client
RecommenderClient recommenderClient = await RecommenderClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE]/config";
// Make the request
InsightTypeConfig response = await recommenderClient.GetInsightTypeConfigAsync(name);

GetInsightTypeConfigAsync(string, CancellationToken)

public virtual Task<InsightTypeConfig> GetInsightTypeConfigAsync(string name, CancellationToken cancellationToken)

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

Parameters
NameDescription
namestring

Required. Name of the InsightTypeConfig to get.

Acceptable formats:

  • projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config

  • projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config

  • organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config

  • billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskInsightTypeConfig

A Task containing the RPC response.

Example
// Create client
RecommenderClient recommenderClient = await RecommenderClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE]/config";
// Make the request
InsightTypeConfig response = await recommenderClient.GetInsightTypeConfigAsync(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
NameDescription
requestGetRecommendationRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Recommendation

The RPC response.

Example
// 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
NameDescription
nameRecommendationName

Required. Name of the recommendation.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Recommendation

The RPC response.

Example
// 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
NameDescription
namestring

Required. Name of the recommendation.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Recommendation

The RPC response.

Example
// 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
NameDescription
requestGetRecommendationRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskRecommendation

A Task containing the RPC response.

Example
// 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
NameDescription
requestGetRecommendationRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskRecommendation

A Task containing the RPC response.

Example
// 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
NameDescription
nameRecommendationName

Required. Name of the recommendation.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskRecommendation

A Task containing the RPC response.

Example
// 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
NameDescription
nameRecommendationName

Required. Name of the recommendation.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskRecommendation

A Task containing the RPC response.

Example
// 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
NameDescription
namestring

Required. Name of the recommendation.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskRecommendation

A Task containing the RPC response.

Example
// 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
NameDescription
namestring

Required. Name of the recommendation.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskRecommendation

A Task containing the RPC response.

Example
// 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);

GetRecommenderConfig(GetRecommenderConfigRequest, CallSettings)

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

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

Parameters
NameDescription
requestGetRecommenderConfigRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
RecommenderConfig

The RPC response.

Example
// Create client
RecommenderClient recommenderClient = RecommenderClient.Create();
// Initialize request argument(s)
GetRecommenderConfigRequest request = new GetRecommenderConfigRequest
{
    RecommenderConfigName = RecommenderConfigName.FromProjectLocationRecommender("[PROJECT]", "[LOCATION]", "[RECOMMENDER]"),
};
// Make the request
RecommenderConfig response = recommenderClient.GetRecommenderConfig(request);

GetRecommenderConfig(RecommenderConfigName, CallSettings)

public virtual RecommenderConfig GetRecommenderConfig(RecommenderConfigName name, CallSettings callSettings = null)

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

Parameters
NameDescription
nameRecommenderConfigName

Required. Name of the Recommendation Config to get.

Acceptable formats:

  • projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config

  • projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config

  • organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config

  • billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
RecommenderConfig

The RPC response.

Example
// Create client
RecommenderClient recommenderClient = RecommenderClient.Create();
// Initialize request argument(s)
RecommenderConfigName name = RecommenderConfigName.FromProjectLocationRecommender("[PROJECT]", "[LOCATION]", "[RECOMMENDER]");
// Make the request
RecommenderConfig response = recommenderClient.GetRecommenderConfig(name);

GetRecommenderConfig(string, CallSettings)

public virtual RecommenderConfig GetRecommenderConfig(string name, CallSettings callSettings = null)

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

Parameters
NameDescription
namestring

Required. Name of the Recommendation Config to get.

Acceptable formats:

  • projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config

  • projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config

  • organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config

  • billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
RecommenderConfig

The RPC response.

Example
// Create client
RecommenderClient recommenderClient = RecommenderClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/recommenders/[RECOMMENDER]/config";
// Make the request
RecommenderConfig response = recommenderClient.GetRecommenderConfig(name);

GetRecommenderConfigAsync(GetRecommenderConfigRequest, CallSettings)

public virtual 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
NameDescription
requestGetRecommenderConfigRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskRecommenderConfig

A Task containing the RPC response.

Example
// Create client
RecommenderClient recommenderClient = await RecommenderClient.CreateAsync();
// Initialize request argument(s)
GetRecommenderConfigRequest request = new GetRecommenderConfigRequest
{
    RecommenderConfigName = RecommenderConfigName.FromProjectLocationRecommender("[PROJECT]", "[LOCATION]", "[RECOMMENDER]"),
};
// Make the request
RecommenderConfig response = await recommenderClient.GetRecommenderConfigAsync(request);

GetRecommenderConfigAsync(GetRecommenderConfigRequest, CancellationToken)

public virtual Task<RecommenderConfig> GetRecommenderConfigAsync(GetRecommenderConfigRequest request, CancellationToken cancellationToken)

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

Parameters
NameDescription
requestGetRecommenderConfigRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskRecommenderConfig

A Task containing the RPC response.

Example
// Create client
RecommenderClient recommenderClient = await RecommenderClient.CreateAsync();
// Initialize request argument(s)
GetRecommenderConfigRequest request = new GetRecommenderConfigRequest
{
    RecommenderConfigName = RecommenderConfigName.FromProjectLocationRecommender("[PROJECT]", "[LOCATION]", "[RECOMMENDER]"),
};
// Make the request
RecommenderConfig response = await recommenderClient.GetRecommenderConfigAsync(request);

GetRecommenderConfigAsync(RecommenderConfigName, CallSettings)

public virtual Task<RecommenderConfig> GetRecommenderConfigAsync(RecommenderConfigName name, CallSettings callSettings = null)

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

Parameters
NameDescription
nameRecommenderConfigName

Required. Name of the Recommendation Config to get.

Acceptable formats:

  • projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config

  • projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config

  • organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config

  • billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskRecommenderConfig

A Task containing the RPC response.

Example
// Create client
RecommenderClient recommenderClient = await RecommenderClient.CreateAsync();
// Initialize request argument(s)
RecommenderConfigName name = RecommenderConfigName.FromProjectLocationRecommender("[PROJECT]", "[LOCATION]", "[RECOMMENDER]");
// Make the request
RecommenderConfig response = await recommenderClient.GetRecommenderConfigAsync(name);

GetRecommenderConfigAsync(RecommenderConfigName, CancellationToken)

public virtual Task<RecommenderConfig> GetRecommenderConfigAsync(RecommenderConfigName name, CancellationToken cancellationToken)

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

Parameters
NameDescription
nameRecommenderConfigName

Required. Name of the Recommendation Config to get.

Acceptable formats:

  • projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config

  • projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config

  • organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config

  • billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskRecommenderConfig

A Task containing the RPC response.

Example
// Create client
RecommenderClient recommenderClient = await RecommenderClient.CreateAsync();
// Initialize request argument(s)
RecommenderConfigName name = RecommenderConfigName.FromProjectLocationRecommender("[PROJECT]", "[LOCATION]", "[RECOMMENDER]");
// Make the request
RecommenderConfig response = await recommenderClient.GetRecommenderConfigAsync(name);

GetRecommenderConfigAsync(string, CallSettings)

public virtual Task<RecommenderConfig> GetRecommenderConfigAsync(string name, CallSettings callSettings = null)

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

Parameters
NameDescription
namestring

Required. Name of the Recommendation Config to get.

Acceptable formats:

  • projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config

  • projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config

  • organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config

  • billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskRecommenderConfig

A Task containing the RPC response.

Example
// Create client
RecommenderClient recommenderClient = await RecommenderClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/recommenders/[RECOMMENDER]/config";
// Make the request
RecommenderConfig response = await recommenderClient.GetRecommenderConfigAsync(name);

GetRecommenderConfigAsync(string, CancellationToken)

public virtual Task<RecommenderConfig> GetRecommenderConfigAsync(string name, CancellationToken cancellationToken)

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

Parameters
NameDescription
namestring

Required. Name of the Recommendation Config to get.

Acceptable formats:

  • projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config

  • projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config

  • organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config

  • billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskRecommenderConfig

A Task containing the RPC response.

Example
// Create client
RecommenderClient recommenderClient = await RecommenderClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/recommenders/[RECOMMENDER]/config";
// Make the request
RecommenderConfig response = await recommenderClient.GetRecommenderConfigAsync(name);

ListInsights(InsightTypeName, string, int?, CallSettings)

public virtual PagedEnumerable<ListInsightsResponse, Insight> ListInsights(InsightTypeName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists insights for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified insight type.

Parameters
NameDescription
parentInsightTypeName

Required. The container resource on which to execute the request. Acceptable formats:

  • projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]

  • projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]

  • billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]

  • folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]

  • organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]

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.

pageTokenstring

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListInsightsResponseInsight

A pageable sequence of Insight resources.

Example
// 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
NameDescription
requestListInsightsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListInsightsResponseInsight

A pageable sequence of Insight resources.

Example
// 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, int?, CallSettings)

public virtual PagedEnumerable<ListInsightsResponse, Insight> ListInsights(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists insights for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified insight type.

Parameters
NameDescription
parentstring

Required. The container resource on which to execute the request. Acceptable formats:

  • projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]

  • projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]

  • billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]

  • folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]

  • organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]

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.

pageTokenstring

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListInsightsResponseInsight

A pageable sequence of Insight resources.

Example
// 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, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListInsightsResponse, Insight> ListInsightsAsync(InsightTypeName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists insights for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified insight type.

Parameters
NameDescription
parentInsightTypeName

Required. The container resource on which to execute the request. Acceptable formats:

  • projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]

  • projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]

  • billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]

  • folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]

  • organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]

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.

pageTokenstring

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListInsightsResponseInsight

A pageable asynchronous sequence of Insight resources.

Example
// 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
NameDescription
requestListInsightsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListInsightsResponseInsight

A pageable asynchronous sequence of Insight resources.

Example
// 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, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListInsightsResponse, Insight> ListInsightsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists insights for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified insight type.

Parameters
NameDescription
parentstring

Required. The container resource on which to execute the request. Acceptable formats:

  • projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]

  • projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]

  • billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]

  • folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]

  • organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]

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.

pageTokenstring

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListInsightsResponseInsight

A pageable asynchronous sequence of Insight resources.

Example
// 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
NameDescription
requestListRecommendationsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListRecommendationsResponseRecommendation

A pageable sequence of Recommendation resources.

Example
// 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, int?, CallSettings)

public virtual PagedEnumerable<ListRecommendationsResponse, Recommendation> ListRecommendations(RecommenderName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists recommendations for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified recommender.

Parameters
NameDescription
parentRecommenderName

Required. The container resource on which to execute the request. Acceptable formats:

  • projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]

  • projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]

  • billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]

  • folders/[FOLDER_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]

  • organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]

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.

pageTokenstring

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListRecommendationsResponseRecommendation

A pageable sequence of Recommendation resources.

Example
// 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, int?, CallSettings)

public virtual PagedEnumerable<ListRecommendationsResponse, Recommendation> ListRecommendations(RecommenderName parent, string filter, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists recommendations for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified recommender.

Parameters
NameDescription
parentRecommenderName

Required. The container resource on which to execute the request. Acceptable formats:

  • projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]

  • projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]

  • billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]

  • folders/[FOLDER_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]

  • organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]

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.

filterstring

Filter expression to restrict the recommendations returned. Supported filter fields:

  • state_info.state

  • recommenderSubtype

  • priority

Examples:

  • stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED

  • recommenderSubtype = REMOVE_ROLE OR recommenderSubtype = REPLACE_ROLE

  • priority = P1 OR priority = P2

  • stateInfo.state = ACTIVE AND (priority = P1 OR priority = P2)

(These expressions are based on the filter language described at https://google.aip.dev/160)

pageTokenstring

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListRecommendationsResponseRecommendation

A pageable sequence of Recommendation resources.

Example
// 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, int?, CallSettings)

public virtual PagedEnumerable<ListRecommendationsResponse, Recommendation> ListRecommendations(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists recommendations for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified recommender.

Parameters
NameDescription
parentstring

Required. The container resource on which to execute the request. Acceptable formats:

  • projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]

  • projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]

  • billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]

  • folders/[FOLDER_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]

  • organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]

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.

pageTokenstring

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListRecommendationsResponseRecommendation

A pageable sequence of Recommendation resources.

Example
// 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, int?, CallSettings)

public virtual PagedEnumerable<ListRecommendationsResponse, Recommendation> ListRecommendations(string parent, string filter, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists recommendations for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified recommender.

Parameters
NameDescription
parentstring

Required. The container resource on which to execute the request. Acceptable formats:

  • projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]

  • projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]

  • billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]

  • folders/[FOLDER_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]

  • organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]

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.

filterstring

Filter expression to restrict the recommendations returned. Supported filter fields:

  • state_info.state

  • recommenderSubtype

  • priority

Examples:

  • stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED

  • recommenderSubtype = REMOVE_ROLE OR recommenderSubtype = REPLACE_ROLE

  • priority = P1 OR priority = P2

  • stateInfo.state = ACTIVE AND (priority = P1 OR priority = P2)

(These expressions are based on the filter language described at https://google.aip.dev/160)

pageTokenstring

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListRecommendationsResponseRecommendation

A pageable sequence of Recommendation resources.

Example
// 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
NameDescription
requestListRecommendationsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListRecommendationsResponseRecommendation

A pageable asynchronous sequence of Recommendation resources.

Example
// 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, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListRecommendationsResponse, Recommendation> ListRecommendationsAsync(RecommenderName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists recommendations for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified recommender.

Parameters
NameDescription
parentRecommenderName

Required. The container resource on which to execute the request. Acceptable formats:

  • projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]

  • projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]

  • billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]

  • folders/[FOLDER_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]

  • organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]

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.

pageTokenstring

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListRecommendationsResponseRecommendation

A pageable asynchronous sequence of Recommendation resources.

Example
// 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, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListRecommendationsResponse, Recommendation> ListRecommendationsAsync(RecommenderName parent, string filter, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists recommendations for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified recommender.

Parameters
NameDescription
parentRecommenderName

Required. The container resource on which to execute the request. Acceptable formats:

  • projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]

  • projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]

  • billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]

  • folders/[FOLDER_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]

  • organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]

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.

filterstring

Filter expression to restrict the recommendations returned. Supported filter fields:

  • state_info.state

  • recommenderSubtype

  • priority

Examples:

  • stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED

  • recommenderSubtype = REMOVE_ROLE OR recommenderSubtype = REPLACE_ROLE

  • priority = P1 OR priority = P2

  • stateInfo.state = ACTIVE AND (priority = P1 OR priority = P2)

(These expressions are based on the filter language described at https://google.aip.dev/160)

pageTokenstring

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListRecommendationsResponseRecommendation

A pageable asynchronous sequence of Recommendation resources.

Example
// 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, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListRecommendationsResponse, Recommendation> ListRecommendationsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists recommendations for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified recommender.

Parameters
NameDescription
parentstring

Required. The container resource on which to execute the request. Acceptable formats:

  • projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]

  • projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]

  • billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]

  • folders/[FOLDER_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]

  • organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]

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.

pageTokenstring

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListRecommendationsResponseRecommendation

A pageable asynchronous sequence of Recommendation resources.

Example
// 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, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListRecommendationsResponse, Recommendation> ListRecommendationsAsync(string parent, string filter, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists recommendations for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified recommender.

Parameters
NameDescription
parentstring

Required. The container resource on which to execute the request. Acceptable formats:

  • projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]

  • projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]

  • billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]

  • folders/[FOLDER_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]

  • organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]

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.

filterstring

Filter expression to restrict the recommendations returned. Supported filter fields:

  • state_info.state

  • recommenderSubtype

  • priority

Examples:

  • stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED

  • recommenderSubtype = REMOVE_ROLE OR recommenderSubtype = REPLACE_ROLE

  • priority = P1 OR priority = P2

  • stateInfo.state = ACTIVE AND (priority = P1 OR priority = P2)

(These expressions are based on the filter language described at https://google.aip.dev/160)

pageTokenstring

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListRecommendationsResponseRecommendation

A pageable asynchronous sequence of Recommendation resources.

Example
// 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
NameDescription
nameInsightName

Required. Name of the insight.

stateMetadataIDictionarystringstring

Optional. State properties user wish to include with this state. Full replace of the current state_metadata.

etagstring

Required. Fingerprint of the Insight. Provides optimistic locking.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Insight

The RPC response.

Example
// 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
NameDescription
requestMarkInsightAcceptedRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Insight

The RPC response.

Example
// 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
NameDescription
namestring

Required. Name of the insight.

stateMetadataIDictionarystringstring

Optional. State properties user wish to include with this state. Full replace of the current state_metadata.

etagstring

Required. Fingerprint of the Insight. Provides optimistic locking.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Insight

The RPC response.

Example
// 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
NameDescription
nameInsightName

Required. Name of the insight.

stateMetadataIDictionarystringstring

Optional. State properties user wish to include with this state. Full replace of the current state_metadata.

etagstring

Required. Fingerprint of the Insight. Provides optimistic locking.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskInsight

A Task containing the RPC response.

Example
// 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
NameDescription
nameInsightName

Required. Name of the insight.

stateMetadataIDictionarystringstring

Optional. State properties user wish to include with this state. Full replace of the current state_metadata.

etagstring

Required. Fingerprint of the Insight. Provides optimistic locking.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskInsight

A Task containing the RPC response.

Example
// 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
NameDescription
requestMarkInsightAcceptedRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskInsight

A Task containing the RPC response.

Example
// 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
NameDescription
requestMarkInsightAcceptedRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskInsight

A Task containing the RPC response.

Example
// 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
NameDescription
namestring

Required. Name of the insight.

stateMetadataIDictionarystringstring

Optional. State properties user wish to include with this state. Full replace of the current state_metadata.

etagstring

Required. Fingerprint of the Insight. Provides optimistic locking.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskInsight

A Task containing the RPC response.

Example
// 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
NameDescription
namestring

Required. Name of the insight.

stateMetadataIDictionarystringstring

Optional. State properties user wish to include with this state. Full replace of the current state_metadata.

etagstring

Required. Fingerprint of the Insight. Provides optimistic locking.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskInsight

A Task containing the RPC response.

Example
// 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
NameDescription
requestMarkRecommendationClaimedRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Recommendation

The RPC response.

Example
// 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
NameDescription
nameRecommendationName

Required. Name of the recommendation.

stateMetadataIDictionarystringstring

State properties to include with this state. Overwrites any existing state_metadata. Keys must match the regex /^[a-z0-9][a-z0-9_.-]{0,62}$/. Values must match the regex /^[a-zA-Z0-9_./-]{0,255}$/.

etagstring

Required. Fingerprint of the Recommendation. Provides optimistic locking.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Recommendation

The RPC response.

Example
// 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
NameDescription
namestring

Required. Name of the recommendation.

stateMetadataIDictionarystringstring

State properties to include with this state. Overwrites any existing state_metadata. Keys must match the regex /^[a-z0-9][a-z0-9_.-]{0,62}$/. Values must match the regex /^[a-zA-Z0-9_./-]{0,255}$/.

etagstring

Required. Fingerprint of the Recommendation. Provides optimistic locking.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Recommendation

The RPC response.

Example
// 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
NameDescription
requestMarkRecommendationClaimedRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskRecommendation

A Task containing the RPC response.

Example
// 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
NameDescription
requestMarkRecommendationClaimedRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskRecommendation

A Task containing the RPC response.

Example
// 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
NameDescription
nameRecommendationName

Required. Name of the recommendation.

stateMetadataIDictionarystringstring

State properties to include with this state. Overwrites any existing state_metadata. Keys must match the regex /^[a-z0-9][a-z0-9_.-]{0,62}$/. Values must match the regex /^[a-zA-Z0-9_./-]{0,255}$/.

etagstring

Required. Fingerprint of the Recommendation. Provides optimistic locking.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskRecommendation

A Task containing the RPC response.

Example
// 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
NameDescription
nameRecommendationName

Required. Name of the recommendation.

stateMetadataIDictionarystringstring

State properties to include with this state. Overwrites any existing state_metadata. Keys must match the regex /^[a-z0-9][a-z0-9_.-]{0,62}$/. Values must match the regex /^[a-zA-Z0-9_./-]{0,255}$/.

etagstring

Required. Fingerprint of the Recommendation. Provides optimistic locking.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskRecommendation

A Task containing the RPC response.

Example
// 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
NameDescription
namestring

Required. Name of the recommendation.

stateMetadataIDictionarystringstring

State properties to include with this state. Overwrites any existing state_metadata. Keys must match the regex /^[a-z0-9][a-z0-9_.-]{0,62}$/. Values must match the regex /^[a-zA-Z0-9_./-]{0,255}$/.

etagstring

Required. Fingerprint of the Recommendation. Provides optimistic locking.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskRecommendation

A Task containing the RPC response.

Example
// 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
NameDescription
namestring

Required. Name of the recommendation.

stateMetadataIDictionarystringstring

State properties to include with this state. Overwrites any existing state_metadata. Keys must match the regex /^[a-z0-9][a-z0-9_.-]{0,62}$/. Values must match the regex /^[a-zA-Z0-9_./-]{0,255}$/.

etagstring

Required. Fingerprint of the Recommendation. Provides optimistic locking.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskRecommendation

A Task containing the RPC response.

Example
// 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);

MarkRecommendationDismissed(MarkRecommendationDismissedRequest, CallSettings)

public virtual 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
NameDescription
requestMarkRecommendationDismissedRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Recommendation

The RPC response.

Example
// Create client
RecommenderClient recommenderClient = RecommenderClient.Create();
// Initialize request argument(s)
MarkRecommendationDismissedRequest request = new MarkRecommendationDismissedRequest
{
    RecommendationName = RecommendationName.FromProjectLocationRecommenderRecommendation("[PROJECT]", "[LOCATION]", "[RECOMMENDER]", "[RECOMMENDATION]"),
    Etag = "",
};
// Make the request
Recommendation response = recommenderClient.MarkRecommendationDismissed(request);

MarkRecommendationDismissedAsync(MarkRecommendationDismissedRequest, CallSettings)

public virtual 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
NameDescription
requestMarkRecommendationDismissedRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskRecommendation

A Task containing the RPC response.

Example
// Create client
RecommenderClient recommenderClient = await RecommenderClient.CreateAsync();
// Initialize request argument(s)
MarkRecommendationDismissedRequest request = new MarkRecommendationDismissedRequest
{
    RecommendationName = RecommendationName.FromProjectLocationRecommenderRecommendation("[PROJECT]", "[LOCATION]", "[RECOMMENDER]", "[RECOMMENDATION]"),
    Etag = "",
};
// Make the request
Recommendation response = await recommenderClient.MarkRecommendationDismissedAsync(request);

MarkRecommendationDismissedAsync(MarkRecommendationDismissedRequest, CancellationToken)

public virtual Task<Recommendation> MarkRecommendationDismissedAsync(MarkRecommendationDismissedRequest request, CancellationToken cancellationToken)

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
NameDescription
requestMarkRecommendationDismissedRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskRecommendation

A Task containing the RPC response.

Example
// Create client
RecommenderClient recommenderClient = await RecommenderClient.CreateAsync();
// Initialize request argument(s)
MarkRecommendationDismissedRequest request = new MarkRecommendationDismissedRequest
{
    RecommendationName = RecommendationName.FromProjectLocationRecommenderRecommendation("[PROJECT]", "[LOCATION]", "[RECOMMENDER]", "[RECOMMENDATION]"),
    Etag = "",
};
// Make the request
Recommendation response = await recommenderClient.MarkRecommendationDismissedAsync(request);

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
NameDescription
requestMarkRecommendationFailedRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Recommendation

The RPC response.

Example
// 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
NameDescription
nameRecommendationName

Required. Name of the recommendation.

stateMetadataIDictionarystringstring

State properties to include with this state. Overwrites any existing state_metadata. Keys must match the regex /^[a-z0-9][a-z0-9_.-]{0,62}$/. Values must match the regex /^[a-zA-Z0-9_./-]{0,255}$/.

etagstring

Required. Fingerprint of the Recommendation. Provides optimistic locking.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Recommendation

The RPC response.

Example
// 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
NameDescription
namestring

Required. Name of the recommendation.

stateMetadataIDictionarystringstring

State properties to include with this state. Overwrites any existing state_metadata. Keys must match the regex /^[a-z0-9][a-z0-9_.-]{0,62}$/. Values must match the regex /^[a-zA-Z0-9_./-]{0,255}$/.

etagstring

Required. Fingerprint of the Recommendation. Provides optimistic locking.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Recommendation

The RPC response.

Example
// 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
NameDescription
requestMarkRecommendationFailedRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskRecommendation

A Task containing the RPC response.

Example
// 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
NameDescription
requestMarkRecommendationFailedRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskRecommendation

A Task containing the RPC response.

Example
// 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
NameDescription
nameRecommendationName

Required. Name of the recommendation.

stateMetadataIDictionarystringstring

State properties to include with this state. Overwrites any existing state_metadata. Keys must match the regex /^[a-z0-9][a-z0-9_.-]{0,62}$/. Values must match the regex /^[a-zA-Z0-9_./-]{0,255}$/.

etagstring

Required. Fingerprint of the Recommendation. Provides optimistic locking.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskRecommendation

A Task containing the RPC response.

Example
// 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
NameDescription
nameRecommendationName

Required. Name of the recommendation.

stateMetadataIDictionarystringstring

State properties to include with this state. Overwrites any existing state_metadata. Keys must match the regex /^[a-z0-9][a-z0-9_.-]{0,62}$/. Values must match the regex /^[a-zA-Z0-9_./-]{0,255}$/.

etagstring

Required. Fingerprint of the Recommendation. Provides optimistic locking.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskRecommendation

A Task containing the RPC response.

Example
// 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
NameDescription
namestring

Required. Name of the recommendation.

stateMetadataIDictionarystringstring

State properties to include with this state. Overwrites any existing state_metadata. Keys must match the regex /^[a-z0-9][a-z0-9_.-]{0,62}$/. Values must match the regex /^[a-zA-Z0-9_./-]{0,255}$/.

etagstring

Required. Fingerprint of the Recommendation. Provides optimistic locking.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskRecommendation

A Task containing the RPC response.

Example
// 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
NameDescription
namestring

Required. Name of the recommendation.

stateMetadataIDictionarystringstring

State properties to include with this state. Overwrites any existing state_metadata. Keys must match the regex /^[a-z0-9][a-z0-9_.-]{0,62}$/. Values must match the regex /^[a-zA-Z0-9_./-]{0,255}$/.

etagstring

Required. Fingerprint of the Recommendation. Provides optimistic locking.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskRecommendation

A Task containing the RPC response.

Example
// 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
NameDescription
requestMarkRecommendationSucceededRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Recommendation

The RPC response.

Example
// 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
NameDescription
nameRecommendationName

Required. Name of the recommendation.

stateMetadataIDictionarystringstring

State properties to include with this state. Overwrites any existing state_metadata. Keys must match the regex /^[a-z0-9][a-z0-9_.-]{0,62}$/. Values must match the regex /^[a-zA-Z0-9_./-]{0,255}$/.

etagstring

Required. Fingerprint of the Recommendation. Provides optimistic locking.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Recommendation

The RPC response.

Example
// 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
NameDescription
namestring

Required. Name of the recommendation.

stateMetadataIDictionarystringstring

State properties to include with this state. Overwrites any existing state_metadata. Keys must match the regex /^[a-z0-9][a-z0-9_.-]{0,62}$/. Values must match the regex /^[a-zA-Z0-9_./-]{0,255}$/.

etagstring

Required. Fingerprint of the Recommendation. Provides optimistic locking.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Recommendation

The RPC response.

Example
// 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
NameDescription
requestMarkRecommendationSucceededRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskRecommendation

A Task containing the RPC response.

Example
// 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
NameDescription
requestMarkRecommendationSucceededRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskRecommendation

A Task containing the RPC response.

Example
// 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
NameDescription
nameRecommendationName

Required. Name of the recommendation.

stateMetadataIDictionarystringstring

State properties to include with this state. Overwrites any existing state_metadata. Keys must match the regex /^[a-z0-9][a-z0-9_.-]{0,62}$/. Values must match the regex /^[a-zA-Z0-9_./-]{0,255}$/.

etagstring

Required. Fingerprint of the Recommendation. Provides optimistic locking.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskRecommendation

A Task containing the RPC response.

Example
// 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
NameDescription
nameRecommendationName

Required. Name of the recommendation.

stateMetadataIDictionarystringstring

State properties to include with this state. Overwrites any existing state_metadata. Keys must match the regex /^[a-z0-9][a-z0-9_.-]{0,62}$/. Values must match the regex /^[a-zA-Z0-9_./-]{0,255}$/.

etagstring

Required. Fingerprint of the Recommendation. Provides optimistic locking.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskRecommendation

A Task containing the RPC response.

Example
// 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
NameDescription
namestring

Required. Name of the recommendation.

stateMetadataIDictionarystringstring

State properties to include with this state. Overwrites any existing state_metadata. Keys must match the regex /^[a-z0-9][a-z0-9_.-]{0,62}$/. Values must match the regex /^[a-zA-Z0-9_./-]{0,255}$/.

etagstring

Required. Fingerprint of the Recommendation. Provides optimistic locking.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskRecommendation

A Task containing the RPC response.

Example
// 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
NameDescription
namestring

Required. Name of the recommendation.

stateMetadataIDictionarystringstring

State properties to include with this state. Overwrites any existing state_metadata. Keys must match the regex /^[a-z0-9][a-z0-9_.-]{0,62}$/. Values must match the regex /^[a-zA-Z0-9_./-]{0,255}$/.

etagstring

Required. Fingerprint of the Recommendation. Provides optimistic locking.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskRecommendation

A Task containing the RPC response.

Example
// 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
TypeDescription
Task

A task representing the asynchronous shutdown operation.

Remarks

After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.

UpdateInsightTypeConfig(InsightTypeConfig, FieldMask, CallSettings)

public virtual InsightTypeConfig UpdateInsightTypeConfig(InsightTypeConfig insightTypeConfig, FieldMask updateMask, CallSettings callSettings = null)

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

Parameters
NameDescription
insightTypeConfigInsightTypeConfig

Required. The InsightTypeConfig to update.

updateMaskFieldMask

The list of fields to be updated.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
InsightTypeConfig

The RPC response.

Example
// Create client
RecommenderClient recommenderClient = RecommenderClient.Create();
// Initialize request argument(s)
InsightTypeConfig insightTypeConfig = new InsightTypeConfig();
FieldMask updateMask = new FieldMask();
// Make the request
InsightTypeConfig response = recommenderClient.UpdateInsightTypeConfig(insightTypeConfig, updateMask);

UpdateInsightTypeConfig(UpdateInsightTypeConfigRequest, CallSettings)

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

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

Parameters
NameDescription
requestUpdateInsightTypeConfigRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
InsightTypeConfig

The RPC response.

Example
// Create client
RecommenderClient recommenderClient = RecommenderClient.Create();
// Initialize request argument(s)
UpdateInsightTypeConfigRequest request = new UpdateInsightTypeConfigRequest
{
    InsightTypeConfig = new InsightTypeConfig(),
    UpdateMask = new FieldMask(),
    ValidateOnly = false,
};
// Make the request
InsightTypeConfig response = recommenderClient.UpdateInsightTypeConfig(request);

UpdateInsightTypeConfigAsync(InsightTypeConfig, FieldMask, CallSettings)

public virtual Task<InsightTypeConfig> UpdateInsightTypeConfigAsync(InsightTypeConfig insightTypeConfig, FieldMask updateMask, CallSettings callSettings = null)

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

Parameters
NameDescription
insightTypeConfigInsightTypeConfig

Required. The InsightTypeConfig to update.

updateMaskFieldMask

The list of fields to be updated.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskInsightTypeConfig

A Task containing the RPC response.

Example
// Create client
RecommenderClient recommenderClient = await RecommenderClient.CreateAsync();
// Initialize request argument(s)
InsightTypeConfig insightTypeConfig = new InsightTypeConfig();
FieldMask updateMask = new FieldMask();
// Make the request
InsightTypeConfig response = await recommenderClient.UpdateInsightTypeConfigAsync(insightTypeConfig, updateMask);

UpdateInsightTypeConfigAsync(InsightTypeConfig, FieldMask, CancellationToken)

public virtual Task<InsightTypeConfig> UpdateInsightTypeConfigAsync(InsightTypeConfig insightTypeConfig, FieldMask updateMask, CancellationToken cancellationToken)

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

Parameters
NameDescription
insightTypeConfigInsightTypeConfig

Required. The InsightTypeConfig to update.

updateMaskFieldMask

The list of fields to be updated.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskInsightTypeConfig

A Task containing the RPC response.

Example
// Create client
RecommenderClient recommenderClient = await RecommenderClient.CreateAsync();
// Initialize request argument(s)
InsightTypeConfig insightTypeConfig = new InsightTypeConfig();
FieldMask updateMask = new FieldMask();
// Make the request
InsightTypeConfig response = await recommenderClient.UpdateInsightTypeConfigAsync(insightTypeConfig, updateMask);

UpdateInsightTypeConfigAsync(UpdateInsightTypeConfigRequest, CallSettings)

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

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

Parameters
NameDescription
requestUpdateInsightTypeConfigRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskInsightTypeConfig

A Task containing the RPC response.

Example
// Create client
RecommenderClient recommenderClient = await RecommenderClient.CreateAsync();
// Initialize request argument(s)
UpdateInsightTypeConfigRequest request = new UpdateInsightTypeConfigRequest
{
    InsightTypeConfig = new InsightTypeConfig(),
    UpdateMask = new FieldMask(),
    ValidateOnly = false,
};
// Make the request
InsightTypeConfig response = await recommenderClient.UpdateInsightTypeConfigAsync(request);

UpdateInsightTypeConfigAsync(UpdateInsightTypeConfigRequest, CancellationToken)

public virtual Task<InsightTypeConfig> UpdateInsightTypeConfigAsync(UpdateInsightTypeConfigRequest request, CancellationToken cancellationToken)

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

Parameters
NameDescription
requestUpdateInsightTypeConfigRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskInsightTypeConfig

A Task containing the RPC response.

Example
// Create client
RecommenderClient recommenderClient = await RecommenderClient.CreateAsync();
// Initialize request argument(s)
UpdateInsightTypeConfigRequest request = new UpdateInsightTypeConfigRequest
{
    InsightTypeConfig = new InsightTypeConfig(),
    UpdateMask = new FieldMask(),
    ValidateOnly = false,
};
// Make the request
InsightTypeConfig response = await recommenderClient.UpdateInsightTypeConfigAsync(request);

UpdateRecommenderConfig(RecommenderConfig, FieldMask, CallSettings)

public virtual RecommenderConfig UpdateRecommenderConfig(RecommenderConfig recommenderConfig, FieldMask updateMask, CallSettings callSettings = null)

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

Parameters
NameDescription
recommenderConfigRecommenderConfig

Required. The RecommenderConfig to update.

updateMaskFieldMask

The list of fields to be updated.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
RecommenderConfig

The RPC response.

Example
// Create client
RecommenderClient recommenderClient = RecommenderClient.Create();
// Initialize request argument(s)
RecommenderConfig recommenderConfig = new RecommenderConfig();
FieldMask updateMask = new FieldMask();
// Make the request
RecommenderConfig response = recommenderClient.UpdateRecommenderConfig(recommenderConfig, updateMask);

UpdateRecommenderConfig(UpdateRecommenderConfigRequest, CallSettings)

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

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

Parameters
NameDescription
requestUpdateRecommenderConfigRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
RecommenderConfig

The RPC response.

Example
// Create client
RecommenderClient recommenderClient = RecommenderClient.Create();
// Initialize request argument(s)
UpdateRecommenderConfigRequest request = new UpdateRecommenderConfigRequest
{
    RecommenderConfig = new RecommenderConfig(),
    UpdateMask = new FieldMask(),
    ValidateOnly = false,
};
// Make the request
RecommenderConfig response = recommenderClient.UpdateRecommenderConfig(request);

UpdateRecommenderConfigAsync(RecommenderConfig, FieldMask, CallSettings)

public virtual Task<RecommenderConfig> UpdateRecommenderConfigAsync(RecommenderConfig recommenderConfig, FieldMask updateMask, CallSettings callSettings = null)

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

Parameters
NameDescription
recommenderConfigRecommenderConfig

Required. The RecommenderConfig to update.

updateMaskFieldMask

The list of fields to be updated.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskRecommenderConfig

A Task containing the RPC response.

Example
// Create client
RecommenderClient recommenderClient = await RecommenderClient.CreateAsync();
// Initialize request argument(s)
RecommenderConfig recommenderConfig = new RecommenderConfig();
FieldMask updateMask = new FieldMask();
// Make the request
RecommenderConfig response = await recommenderClient.UpdateRecommenderConfigAsync(recommenderConfig, updateMask);

UpdateRecommenderConfigAsync(RecommenderConfig, FieldMask, CancellationToken)

public virtual Task<RecommenderConfig> UpdateRecommenderConfigAsync(RecommenderConfig recommenderConfig, FieldMask updateMask, CancellationToken cancellationToken)

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

Parameters
NameDescription
recommenderConfigRecommenderConfig

Required. The RecommenderConfig to update.

updateMaskFieldMask

The list of fields to be updated.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskRecommenderConfig

A Task containing the RPC response.

Example
// Create client
RecommenderClient recommenderClient = await RecommenderClient.CreateAsync();
// Initialize request argument(s)
RecommenderConfig recommenderConfig = new RecommenderConfig();
FieldMask updateMask = new FieldMask();
// Make the request
RecommenderConfig response = await recommenderClient.UpdateRecommenderConfigAsync(recommenderConfig, updateMask);

UpdateRecommenderConfigAsync(UpdateRecommenderConfigRequest, CallSettings)

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

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

Parameters
NameDescription
requestUpdateRecommenderConfigRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskRecommenderConfig

A Task containing the RPC response.

Example
// Create client
RecommenderClient recommenderClient = await RecommenderClient.CreateAsync();
// Initialize request argument(s)
UpdateRecommenderConfigRequest request = new UpdateRecommenderConfigRequest
{
    RecommenderConfig = new RecommenderConfig(),
    UpdateMask = new FieldMask(),
    ValidateOnly = false,
};
// Make the request
RecommenderConfig response = await recommenderClient.UpdateRecommenderConfigAsync(request);

UpdateRecommenderConfigAsync(UpdateRecommenderConfigRequest, CancellationToken)

public virtual Task<RecommenderConfig> UpdateRecommenderConfigAsync(UpdateRecommenderConfigRequest request, CancellationToken cancellationToken)

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

Parameters
NameDescription
requestUpdateRecommenderConfigRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskRecommenderConfig

A Task containing the RPC response.

Example
// Create client
RecommenderClient recommenderClient = await RecommenderClient.CreateAsync();
// Initialize request argument(s)
UpdateRecommenderConfigRequest request = new UpdateRecommenderConfigRequest
{
    RecommenderConfig = new RecommenderConfig(),
    UpdateMask = new FieldMask(),
    ValidateOnly = false,
};
// Make the request
RecommenderConfig response = await recommenderClient.UpdateRecommenderConfigAsync(request);