pub struct Role {
pub metadata: ObjectMeta,
pub rules: Vec<PolicyRule>,
}
Expand description
Role is a logical grouping of PolicyRules that can be referenced as a unit by RoleBindings.
Fields§
§metadata: ObjectMeta
Standard object’s metadata.
rules: Vec<PolicyRule>
Rules holds all the PolicyRules for this Role
Implementations§
Source§impl Role
impl Role
Sourcepub fn create_namespaced_role(
namespace: &str,
body: &Role,
optional: CreateOptional<'_>,
) -> Result<(Request<Vec<u8>>, fn(StatusCode) -> ResponseBody<CreateResponse<Self>>), RequestError>
pub fn create_namespaced_role( namespace: &str, body: &Role, optional: CreateOptional<'_>, ) -> Result<(Request<Vec<u8>>, fn(StatusCode) -> ResponseBody<CreateResponse<Self>>), RequestError>
create a Role
Use the returned k8s_openapi::ResponseBody
<
k8s_openapi::CreateResponse
<Self>>
constructor, or k8s_openapi::CreateResponse
<Self>
directly, to parse the HTTP response.
§Arguments
-
namespace
object name and auth scope, such as for teams and projects
-
body
-
optional
Optional parameters. Use
Default::default()
to not pass any.
Source§impl Role
impl Role
Sourcepub fn delete_namespaced_role(
name: &str,
namespace: &str,
optional: DeleteOptional<'_>,
) -> Result<(Request<Vec<u8>>, fn(StatusCode) -> ResponseBody<DeleteResponse<Self>>), RequestError>
pub fn delete_namespaced_role( name: &str, namespace: &str, optional: DeleteOptional<'_>, ) -> Result<(Request<Vec<u8>>, fn(StatusCode) -> ResponseBody<DeleteResponse<Self>>), RequestError>
delete a Role
Use the returned k8s_openapi::ResponseBody
<
k8s_openapi::DeleteResponse
<Self>>
constructor, or k8s_openapi::DeleteResponse
<Self>
directly, to parse the HTTP response.
§Arguments
-
name
name of the Role
-
namespace
object name and auth scope, such as for teams and projects
-
optional
Optional parameters. Use
Default::default()
to not pass any.
Source§impl Role
impl Role
Sourcepub fn list_namespaced_role(
namespace: &str,
optional: ListOptional<'_>,
) -> Result<(Request<Vec<u8>>, fn(StatusCode) -> ResponseBody<ListResponse<Self>>), RequestError>
pub fn list_namespaced_role( namespace: &str, optional: ListOptional<'_>, ) -> Result<(Request<Vec<u8>>, fn(StatusCode) -> ResponseBody<ListResponse<Self>>), RequestError>
list objects of kind Role
This operation only supports listing all items of this type.
Use the returned k8s_openapi::ResponseBody
<
k8s_openapi::ListResponse
<Self>>
constructor, or k8s_openapi::ListResponse
<Self>
directly, to parse the HTTP response.
§Arguments
-
namespace
object name and auth scope, such as for teams and projects
-
optional
Optional parameters. Use
Default::default()
to not pass any.
Source§impl Role
impl Role
Sourcepub fn list_role_for_all_namespaces(
optional: ListOptional<'_>,
) -> Result<(Request<Vec<u8>>, fn(StatusCode) -> ResponseBody<ListResponse<Self>>), RequestError>
pub fn list_role_for_all_namespaces( optional: ListOptional<'_>, ) -> Result<(Request<Vec<u8>>, fn(StatusCode) -> ResponseBody<ListResponse<Self>>), RequestError>
list objects of kind Role
This operation only supports listing all items of this type.
Use the returned k8s_openapi::ResponseBody
<
k8s_openapi::ListResponse
<Self>>
constructor, or k8s_openapi::ListResponse
<Self>
directly, to parse the HTTP response.
§Arguments
-
optional
Optional parameters. Use
Default::default()
to not pass any.
Source§impl Role
impl Role
Sourcepub fn patch_namespaced_role(
name: &str,
namespace: &str,
body: &Patch,
optional: PatchOptional<'_>,
) -> Result<(Request<Vec<u8>>, fn(StatusCode) -> ResponseBody<PatchResponse<Self>>), RequestError>
pub fn patch_namespaced_role( name: &str, namespace: &str, body: &Patch, optional: PatchOptional<'_>, ) -> Result<(Request<Vec<u8>>, fn(StatusCode) -> ResponseBody<PatchResponse<Self>>), RequestError>
partially update the specified Role
Use the returned k8s_openapi::ResponseBody
<
k8s_openapi::PatchResponse
<Self>>
constructor, or k8s_openapi::PatchResponse
<Self>
directly, to parse the HTTP response.
§Arguments
-
name
name of the Role
-
namespace
object name and auth scope, such as for teams and projects
-
body
-
optional
Optional parameters. Use
Default::default()
to not pass any.
Source§impl Role
impl Role
Sourcepub fn read_namespaced_role(
name: &str,
namespace: &str,
optional: ReadNamespacedRoleOptional<'_>,
) -> Result<(Request<Vec<u8>>, fn(StatusCode) -> ResponseBody<ReadNamespacedRoleResponse>), RequestError>
pub fn read_namespaced_role( name: &str, namespace: &str, optional: ReadNamespacedRoleOptional<'_>, ) -> Result<(Request<Vec<u8>>, fn(StatusCode) -> ResponseBody<ReadNamespacedRoleResponse>), RequestError>
read the specified Role
Use the returned k8s_openapi::ResponseBody
<
ReadNamespacedRoleResponse
>
constructor, or ReadNamespacedRoleResponse
directly, to parse the HTTP response.
§Arguments
-
name
name of the Role
-
namespace
object name and auth scope, such as for teams and projects
-
optional
Optional parameters. Use
Default::default()
to not pass any.
Source§impl Role
impl Role
Sourcepub fn replace_namespaced_role(
name: &str,
namespace: &str,
body: &Role,
optional: ReplaceOptional<'_>,
) -> Result<(Request<Vec<u8>>, fn(StatusCode) -> ResponseBody<ReplaceResponse<Self>>), RequestError>
pub fn replace_namespaced_role( name: &str, namespace: &str, body: &Role, optional: ReplaceOptional<'_>, ) -> Result<(Request<Vec<u8>>, fn(StatusCode) -> ResponseBody<ReplaceResponse<Self>>), RequestError>
replace the specified Role
Use the returned k8s_openapi::ResponseBody
<
k8s_openapi::ReplaceResponse
<Self>>
constructor, or k8s_openapi::ReplaceResponse
<Self>
directly, to parse the HTTP response.
§Arguments
-
name
name of the Role
-
namespace
object name and auth scope, such as for teams and projects
-
body
-
optional
Optional parameters. Use
Default::default()
to not pass any.
Source§impl Role
impl Role
Sourcepub fn watch_namespaced_role(
namespace: &str,
optional: WatchOptional<'_>,
) -> Result<(Request<Vec<u8>>, fn(StatusCode) -> ResponseBody<WatchResponse<Self>>), RequestError>
pub fn watch_namespaced_role( namespace: &str, optional: WatchOptional<'_>, ) -> Result<(Request<Vec<u8>>, fn(StatusCode) -> ResponseBody<WatchResponse<Self>>), RequestError>
list objects of kind Role
This operation only supports watching one item, or a list of items, of this type for changes.
Use the returned k8s_openapi::ResponseBody
<
k8s_openapi::WatchResponse
<Self>>
constructor, or k8s_openapi::WatchResponse
<Self>
directly, to parse the HTTP response.
§Arguments
-
namespace
object name and auth scope, such as for teams and projects
-
optional
Optional parameters. Use
Default::default()
to not pass any.
Source§impl Role
impl Role
Sourcepub fn watch_role_for_all_namespaces(
optional: WatchOptional<'_>,
) -> Result<(Request<Vec<u8>>, fn(StatusCode) -> ResponseBody<WatchResponse<Self>>), RequestError>
pub fn watch_role_for_all_namespaces( optional: WatchOptional<'_>, ) -> Result<(Request<Vec<u8>>, fn(StatusCode) -> ResponseBody<WatchResponse<Self>>), RequestError>
list objects of kind Role
This operation only supports watching one item, or a list of items, of this type for changes.
Use the returned k8s_openapi::ResponseBody
<
k8s_openapi::WatchResponse
<Self>>
constructor, or k8s_openapi::WatchResponse
<Self>
directly, to parse the HTTP response.
§Arguments
-
optional
Optional parameters. Use
Default::default()
to not pass any.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Role
impl<'de> Deserialize<'de> for Role
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 ListableResource for Role
impl ListableResource for Role
Source§impl Resource for Role
impl Resource for Role
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