Struct google_recommender1::api::FolderMethods
source · pub struct FolderMethods<'a, S>where
S: 'a,{ /* private fields */ }
Expand description
A builder providing access to all methods supported on folder resources.
It is not used directly, but through the Recommender
hub.
§Example
Instantiate a resource builder
extern crate hyper;
extern crate hyper_rustls;
extern crate google_recommender1 as recommender1;
use std::default::Default;
use recommender1::{Recommender, oauth2, hyper, hyper_rustls, chrono, FieldMask};
let secret: oauth2::ApplicationSecret = Default::default();
let auth = oauth2::InstalledFlowAuthenticator::builder(
secret,
oauth2::InstalledFlowReturnMethod::HTTPRedirect,
).build().await.unwrap();
let mut hub = Recommender::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().https_or_http().enable_http1().build()), auth);
// Usually you wouldn't bind this to a variable, but keep calling *CallBuilders*
// like `locations_insight_types_insights_get(...)`, `locations_insight_types_insights_list(...)`, `locations_insight_types_insights_mark_accepted(...)`, `locations_recommenders_recommendations_get(...)`, `locations_recommenders_recommendations_list(...)`, `locations_recommenders_recommendations_mark_claimed(...)`, `locations_recommenders_recommendations_mark_dismissed(...)`, `locations_recommenders_recommendations_mark_failed(...)` and `locations_recommenders_recommendations_mark_succeeded(...)`
// to build up your call.
let rb = hub.folders();
Implementations§
source§impl<'a, S> FolderMethods<'a, S>
impl<'a, S> FolderMethods<'a, S>
sourcepub fn locations_insight_types_insights_get(
&self,
name: &str
) -> FolderLocationInsightTypeInsightGetCall<'a, S>
pub fn locations_insight_types_insights_get( &self, name: &str ) -> FolderLocationInsightTypeInsightGetCall<'a, S>
Create a builder to help you perform the following task:
Gets the requested insight. Requires the recommender.*.get IAM permission for the specified insight type.
§Arguments
name
- Required. Name of the insight.
sourcepub fn locations_insight_types_insights_list(
&self,
parent: &str
) -> FolderLocationInsightTypeInsightListCall<'a, S>
pub fn locations_insight_types_insights_list( &self, parent: &str ) -> FolderLocationInsightTypeInsightListCall<'a, S>
Create a builder to help you perform the following task:
Lists insights for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified insight type.
§Arguments
parent
- 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.
sourcepub fn locations_insight_types_insights_mark_accepted(
&self,
request: GoogleCloudRecommenderV1MarkInsightAcceptedRequest,
name: &str
) -> FolderLocationInsightTypeInsightMarkAcceptedCall<'a, S>
pub fn locations_insight_types_insights_mark_accepted( &self, request: GoogleCloudRecommenderV1MarkInsightAcceptedRequest, name: &str ) -> FolderLocationInsightTypeInsightMarkAcceptedCall<'a, S>
Create a builder to help you perform the following task:
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.
§Arguments
request
- No description provided.name
- Required. Name of the insight.
sourcepub fn locations_recommenders_recommendations_get(
&self,
name: &str
) -> FolderLocationRecommenderRecommendationGetCall<'a, S>
pub fn locations_recommenders_recommendations_get( &self, name: &str ) -> FolderLocationRecommenderRecommendationGetCall<'a, S>
Create a builder to help you perform the following task:
Gets the requested recommendation. Requires the recommender.*.get IAM permission for the specified recommender.
§Arguments
name
- Required. Name of the recommendation.
sourcepub fn locations_recommenders_recommendations_list(
&self,
parent: &str
) -> FolderLocationRecommenderRecommendationListCall<'a, S>
pub fn locations_recommenders_recommendations_list( &self, parent: &str ) -> FolderLocationRecommenderRecommendationListCall<'a, S>
Create a builder to help you perform the following task:
Lists recommendations for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified recommender.
§Arguments
parent
- 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.
sourcepub fn locations_recommenders_recommendations_mark_claimed(
&self,
request: GoogleCloudRecommenderV1MarkRecommendationClaimedRequest,
name: &str
) -> FolderLocationRecommenderRecommendationMarkClaimedCall<'a, S>
pub fn locations_recommenders_recommendations_mark_claimed( &self, request: GoogleCloudRecommenderV1MarkRecommendationClaimedRequest, name: &str ) -> FolderLocationRecommenderRecommendationMarkClaimedCall<'a, S>
Create a builder to help you perform the following task:
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.
§Arguments
request
- No description provided.name
- Required. Name of the recommendation.
sourcepub fn locations_recommenders_recommendations_mark_dismissed(
&self,
request: GoogleCloudRecommenderV1MarkRecommendationDismissedRequest,
name: &str
) -> FolderLocationRecommenderRecommendationMarkDismissedCall<'a, S>
pub fn locations_recommenders_recommendations_mark_dismissed( &self, request: GoogleCloudRecommenderV1MarkRecommendationDismissedRequest, name: &str ) -> FolderLocationRecommenderRecommendationMarkDismissedCall<'a, S>
Create a builder to help you perform the following task:
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.
§Arguments
request
- No description provided.name
- Required. Name of the recommendation.
sourcepub fn locations_recommenders_recommendations_mark_failed(
&self,
request: GoogleCloudRecommenderV1MarkRecommendationFailedRequest,
name: &str
) -> FolderLocationRecommenderRecommendationMarkFailedCall<'a, S>
pub fn locations_recommenders_recommendations_mark_failed( &self, request: GoogleCloudRecommenderV1MarkRecommendationFailedRequest, name: &str ) -> FolderLocationRecommenderRecommendationMarkFailedCall<'a, S>
Create a builder to help you perform the following task:
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.
§Arguments
request
- No description provided.name
- Required. Name of the recommendation.
sourcepub fn locations_recommenders_recommendations_mark_succeeded(
&self,
request: GoogleCloudRecommenderV1MarkRecommendationSucceededRequest,
name: &str
) -> FolderLocationRecommenderRecommendationMarkSucceededCall<'a, S>
pub fn locations_recommenders_recommendations_mark_succeeded( &self, request: GoogleCloudRecommenderV1MarkRecommendationSucceededRequest, name: &str ) -> FolderLocationRecommenderRecommendationMarkSucceededCall<'a, S>
Create a builder to help you perform the following task:
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.
§Arguments
request
- No description provided.name
- Required. Name of the recommendation.