Struct google_logging2::api::MethodMethods
source · pub struct MethodMethods<'a, S>where
S: 'a,{ /* private fields */ }
Expand description
A builder providing access to all free methods, which are not associated with a particular resource.
It is not used directly, but through the Logging
hub.
§Example
Instantiate a resource builder
extern crate hyper;
extern crate hyper_rustls;
extern crate google_logging2 as logging2;
use std::default::Default;
use logging2::{Logging, 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 = Logging::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 `get_cmek_settings(...)`, `get_settings(...)`, `update_cmek_settings(...)` and `update_settings(...)`
// to build up your call.
let rb = hub.methods();
Implementations§
source§impl<'a, S> MethodMethods<'a, S>
impl<'a, S> MethodMethods<'a, S>
sourcepub fn get_cmek_settings(&self, name: &str) -> MethodGetCmekSettingCall<'a, S>
pub fn get_cmek_settings(&self, name: &str) -> MethodGetCmekSettingCall<'a, S>
Create a builder to help you perform the following task:
Gets the Logging CMEK settings for the given resource.Note: CMEK for the Log Router can be configured for Google Cloud projects, folders, organizations, and billing accounts. Once configured for an organization, it applies to all projects and folders in the Google Cloud organization.See Enabling CMEK for Log Router (https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.
§Arguments
name
- Required. The resource for which to retrieve CMEK settings. “projects/[PROJECT_ID]/cmekSettings” “organizations/[ORGANIZATION_ID]/cmekSettings” “billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings” “folders/[FOLDER_ID]/cmekSettings” For example:“organizations/12345/cmekSettings“Note: CMEK for the Log Router can be configured for Google Cloud projects, folders, organizations, and billing accounts. Once configured for an organization, it applies to all projects and folders in the Google Cloud organization.
sourcepub fn get_settings(&self, name: &str) -> MethodGetSettingCall<'a, S>
pub fn get_settings(&self, name: &str) -> MethodGetSettingCall<'a, S>
Create a builder to help you perform the following task:
Gets the settings for the given resource.Note: Settings can be retrieved for Google Cloud projects, folders, organizations, and billing accounts.See View default resource settings for Logging (https://cloud.google.com/logging/docs/default-settings#view-org-settings) for more information.
§Arguments
name
- Required. The resource for which to retrieve settings. “projects/[PROJECT_ID]/settings” “organizations/[ORGANIZATION_ID]/settings” “billingAccounts/[BILLING_ACCOUNT_ID]/settings” “folders/[FOLDER_ID]/settings” For example:“organizations/12345/settings“Note: Settings can be retrieved for Google Cloud projects, folders, organizations, and billing accounts.
sourcepub fn update_cmek_settings(
&self,
request: CmekSettings,
name: &str
) -> MethodUpdateCmekSettingCall<'a, S>
pub fn update_cmek_settings( &self, request: CmekSettings, name: &str ) -> MethodUpdateCmekSettingCall<'a, S>
Create a builder to help you perform the following task:
Updates the Log Router CMEK settings for the given resource.Note: CMEK for the Log Router can currently only be configured for Google Cloud organizations. Once configured, it applies to all projects and folders in the Google Cloud organization.UpdateCmekSettings fails when any of the following are true: The value of kms_key_name is invalid. The associated service account doesn’t have the required roles/cloudkms.cryptoKeyEncrypterDecrypter role assigned for the key. Access to the key is disabled.See Enabling CMEK for Log Router (https://cloud.google.com/logging/docs/routing/managed-encryption) for more information.
§Arguments
request
- No description provided.name
- Required. The resource name for the CMEK settings to update. “projects/[PROJECT_ID]/cmekSettings” “organizations/[ORGANIZATION_ID]/cmekSettings” “billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings” “folders/[FOLDER_ID]/cmekSettings” For example:“organizations/12345/cmekSettings“Note: CMEK for the Log Router can currently only be configured for Google Cloud organizations. Once configured, it applies to all projects and folders in the Google Cloud organization.
sourcepub fn update_settings(
&self,
request: Settings,
name: &str
) -> MethodUpdateSettingCall<'a, S>
pub fn update_settings( &self, request: Settings, name: &str ) -> MethodUpdateSettingCall<'a, S>
Create a builder to help you perform the following task:
Updates the settings for the given resource. This method applies to all feature configurations for organization and folders.UpdateSettings fails when any of the following are true: The value of storage_location either isn’t supported by Logging or violates the location OrgPolicy. The default_sink_config field is set, but it has an unspecified filter write mode. The value of kms_key_name is invalid. The associated service account doesn’t have the required roles/cloudkms.cryptoKeyEncrypterDecrypter role assigned for the key. Access to the key is disabled.See Configure default settings for organizations and folders (https://cloud.google.com/logging/docs/default-settings) for more information.
§Arguments
request
- No description provided.name
- Required. The resource name for the settings to update. “organizations/[ORGANIZATION_ID]/settings” For example:“organizations/12345/settings”