#[non_exhaustive]pub struct Access {
pub principal_email: String,
pub caller_ip: String,
pub caller_ip_geo: Option<Geolocation>,
pub user_agent_family: String,
pub user_agent: String,
pub service_name: String,
pub method_name: String,
pub principal_subject: String,
pub service_account_key_name: String,
pub service_account_delegation_info: Vec<ServiceAccountDelegationInfo>,
pub user_name: String,
/* private fields */
}Expand description
Represents an access event.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.principal_email: StringAssociated email, such as “foo@google.com”.
The email address of the authenticated user or a service account acting on
behalf of a third party principal making the request. For third party
identity callers, the principal_subject field is populated instead of
this field. For privacy reasons, the principal email address is sometimes
redacted. For more information, see Caller identities in audit
logs.
caller_ip: StringCaller’s IP address, such as “1.1.1.1”.
caller_ip_geo: Option<Geolocation>The caller IP’s geolocation, which identifies where the call came from.
user_agent_family: StringType of user agent associated with the finding. For example, an operating system shell or an embedded or standalone application.
user_agent: StringThe caller’s user agent string associated with the finding.
service_name: StringThis is the API service that the service account made a call to, e.g. “iam.googleapis.com”
method_name: StringThe method that the service account called, e.g. “SetIamPolicy”.
principal_subject: StringA string that represents the principal_subject that is associated with the
identity. Unlike principal_email, principal_subject supports principals
that aren’t associated with email addresses, such as third party
principals. For most identities, the format is
principal://iam.googleapis.com/{identity pool name}/subject/{subject}.
Some GKE identities, such as GKE_WORKLOAD, FREEFORM, and GKE_HUB_WORKLOAD,
still use the legacy format serviceAccount:{identity pool name}[{subject}].
service_account_key_name: StringThe name of the service account key that was used to create or exchange credentials when authenticating the service account that made the request. This is a scheme-less URI full resource name. For example:
“//iam.googleapis.com/projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}”.
service_account_delegation_info: Vec<ServiceAccountDelegationInfo>The identity delegation history of an authenticated service account that
made the request. The serviceAccountDelegationInfo[] object contains
information about the real authorities that try to access Google Cloud
resources by delegating on a service account. When multiple authorities are
present, they are guaranteed to be sorted based on the original ordering of
the identity delegation events.
user_name: StringA string that represents a username. The username provided depends on the type of the finding and is likely not an IAM principal. For example, this can be a system username if the finding is related to a virtual machine, or it can be an application login username.
Implementations§
Source§impl Access
impl Access
pub fn new() -> Self
Sourcepub fn set_principal_email<T: Into<String>>(self, v: T) -> Self
pub fn set_principal_email<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_caller_ip<T: Into<String>>(self, v: T) -> Self
pub fn set_caller_ip<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_caller_ip_geo<T>(self, v: T) -> Selfwhere
T: Into<Geolocation>,
pub fn set_caller_ip_geo<T>(self, v: T) -> Selfwhere
T: Into<Geolocation>,
Sets the value of caller_ip_geo.
§Example
use google_cloud_securitycenter_v2::model::Geolocation;
let x = Access::new().set_caller_ip_geo(Geolocation::default()/* use setters */);Sourcepub fn set_or_clear_caller_ip_geo<T>(self, v: Option<T>) -> Selfwhere
T: Into<Geolocation>,
pub fn set_or_clear_caller_ip_geo<T>(self, v: Option<T>) -> Selfwhere
T: Into<Geolocation>,
Sets or clears the value of caller_ip_geo.
§Example
use google_cloud_securitycenter_v2::model::Geolocation;
let x = Access::new().set_or_clear_caller_ip_geo(Some(Geolocation::default()/* use setters */));
let x = Access::new().set_or_clear_caller_ip_geo(None::<Geolocation>);Sourcepub fn set_user_agent_family<T: Into<String>>(self, v: T) -> Self
pub fn set_user_agent_family<T: Into<String>>(self, v: T) -> Self
Sets the value of user_agent_family.
§Example
let x = Access::new().set_user_agent_family("example");Sourcepub fn set_user_agent<T: Into<String>>(self, v: T) -> Self
pub fn set_user_agent<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_service_name<T: Into<String>>(self, v: T) -> Self
pub fn set_service_name<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_method_name<T: Into<String>>(self, v: T) -> Self
pub fn set_method_name<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_principal_subject<T: Into<String>>(self, v: T) -> Self
pub fn set_principal_subject<T: Into<String>>(self, v: T) -> Self
Sets the value of principal_subject.
§Example
let x = Access::new().set_principal_subject("example");Sourcepub fn set_service_account_key_name<T: Into<String>>(self, v: T) -> Self
pub fn set_service_account_key_name<T: Into<String>>(self, v: T) -> Self
Sets the value of service_account_key_name.
§Example
let x = Access::new().set_service_account_key_name("example");Sourcepub fn set_service_account_delegation_info<T, V>(self, v: T) -> Self
pub fn set_service_account_delegation_info<T, V>(self, v: T) -> Self
Sets the value of service_account_delegation_info.
§Example
use google_cloud_securitycenter_v2::model::ServiceAccountDelegationInfo;
let x = Access::new()
.set_service_account_delegation_info([
ServiceAccountDelegationInfo::default()/* use setters */,
ServiceAccountDelegationInfo::default()/* use (different) setters */,
]);