pub struct SubjectAccessReview {
pub content: Option<RawExtension>,
pub groups: Vec<String>,
pub is_non_resource_url: bool,
pub namespace: String,
pub path: String,
pub resource: String,
pub resource_api_group: String,
pub resource_api_version: String,
pub resource_name: String,
pub scopes: Vec<String>,
pub user: String,
pub verb: String,
}Expand description
SubjectAccessReview is an object for requesting information about whether a user or group can perform an action
Fields§
§content: Option<RawExtension>Content is the actual content of the request for create and update
groups: Vec<String>GroupsSlice is optional. Groups is the list of groups to which the User belongs.
is_non_resource_url: boolIsNonResourceURL is true if this is a request for a non-resource URL (outside of the resource hieraarchy)
namespace: StringNamespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces
path: StringPath is the path of a non resource URL
resource: StringResource is one of the existing resource types
resource_api_group: StringGroup is the API group of the resource Serialized as resourceAPIGroup to avoid confusion with the ‘groups’ field when inlined
resource_api_version: StringVersion is the API version of the resource Serialized as resourceAPIVersion to avoid confusion with TypeMeta.apiVersion and ObjectMeta.resourceVersion when inlined
resource_name: StringResourceName is the name of the resource being requested for a “get” or deleted for a “delete”
scopes: Vec<String>Scopes to use for the evaluation. Empty means “use the unscoped (full) permissions of the user/groups”. Nil for a self-SAR, means “use the scopes on this request”. Nil for a regular SAR, means the same as empty.
user: StringUser is optional. If both User and Groups are empty, the current authenticated user is used.
verb: StringVerb is one of: get, list, watch, create, update, delete
Implementations§
Source§impl SubjectAccessReview
impl SubjectAccessReview
Sourcepub fn create_subject_access_review(
body: &SubjectAccessReview,
optional: CreateOptional<'_>,
) -> Result<(Request<Vec<u8>>, fn(StatusCode) -> ResponseBody<CreateResponse<Self>>), RequestError>
pub fn create_subject_access_review( body: &SubjectAccessReview, optional: CreateOptional<'_>, ) -> Result<(Request<Vec<u8>>, fn(StatusCode) -> ResponseBody<CreateResponse<Self>>), RequestError>
create a SubjectAccessReview
Use the returned k8s_openapi::ResponseBody<k8s_openapi::CreateResponse<Self>> constructor, or k8s_openapi::CreateResponse<Self> directly, to parse the HTTP response.
§Arguments
-
body -
optionalOptional parameters. Use
Default::default()to not pass any.
Trait Implementations§
Source§impl Clone for SubjectAccessReview
impl Clone for SubjectAccessReview
Source§fn clone(&self) -> SubjectAccessReview
fn clone(&self) -> SubjectAccessReview
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SubjectAccessReview
impl Debug for SubjectAccessReview
Source§impl Default for SubjectAccessReview
impl Default for SubjectAccessReview
Source§fn default() -> SubjectAccessReview
fn default() -> SubjectAccessReview
Source§impl<'de> Deserialize<'de> for SubjectAccessReview
impl<'de> Deserialize<'de> for SubjectAccessReview
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Source§impl PartialEq for SubjectAccessReview
impl PartialEq for SubjectAccessReview
Source§impl Resource for SubjectAccessReview
impl Resource for SubjectAccessReview
Source§const API_VERSION: &'static str = "authorization.openshift.io/v1"
const API_VERSION: &'static str = "authorization.openshift.io/v1"
Resource::GROUP and Resource::VERSION (eg "apiextensions.k8s.io/v1beta1")
or just the version for resources without a group (eg "v1"). Read more