[][src]Struct k8s_openapi::api::rbac::v1::RoleBinding

pub struct RoleBinding {
    pub metadata: Option<ObjectMeta>,
    pub role_ref: RoleRef,
    pub subjects: Option<Vec<Subject>>,
}

RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace.

Fields

metadata: Option<ObjectMeta>

Standard object's metadata.

role_ref: RoleRef

RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.

subjects: Option<Vec<Subject>>

Subjects holds references to the objects the role applies to.

Methods

impl RoleBinding[src]

pub fn create_namespaced_role_binding(
    namespace: &str,
    body: &RoleBinding,
    optional: CreateNamespacedRoleBindingOptional
) -> Result<(Request<Vec<u8>>, fn(_: StatusCode) -> ResponseBody<CreateNamespacedRoleBindingResponse>), RequestError>
[src]

create a RoleBinding

Use the returned crate::ResponseBody<CreateNamespacedRoleBindingResponse> constructor, or CreateNamespacedRoleBindingResponse 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.

impl RoleBinding[src]

pub fn delete_collection_namespaced_role_binding(
    namespace: &str,
    optional: DeleteCollectionNamespacedRoleBindingOptional
) -> Result<(Request<Vec<u8>>, fn(_: StatusCode) -> ResponseBody<DeleteCollectionNamespacedRoleBindingResponse>), RequestError>
[src]

delete collection of RoleBinding

Use the returned crate::ResponseBody<DeleteCollectionNamespacedRoleBindingResponse> constructor, or DeleteCollectionNamespacedRoleBindingResponse 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.

impl RoleBinding[src]

pub fn delete_namespaced_role_binding(
    name: &str,
    namespace: &str,
    optional: DeleteNamespacedRoleBindingOptional
) -> Result<(Request<Vec<u8>>, fn(_: StatusCode) -> ResponseBody<DeleteNamespacedRoleBindingResponse>), RequestError>
[src]

delete a RoleBinding

Use the returned crate::ResponseBody<DeleteNamespacedRoleBindingResponse> constructor, or DeleteNamespacedRoleBindingResponse directly, to parse the HTTP response.

Arguments

  • name

    name of the RoleBinding

  • namespace

    object name and auth scope, such as for teams and projects

  • optional

    Optional parameters. Use Default::default() to not pass any.

impl RoleBinding[src]

pub fn list_namespaced_role_binding(
    namespace: &str,
    optional: ListNamespacedRoleBindingOptional
) -> Result<(Request<Vec<u8>>, fn(_: StatusCode) -> ResponseBody<ListNamespacedRoleBindingResponse>), RequestError>
[src]

list or watch objects of kind RoleBinding

This operation only supports listing all items of this type.

Use the returned crate::ResponseBody<ListNamespacedRoleBindingResponse> constructor, or ListNamespacedRoleBindingResponse 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.

impl RoleBinding[src]

pub fn list_role_binding_for_all_namespaces(
    optional: ListRoleBindingForAllNamespacesOptional
) -> Result<(Request<Vec<u8>>, fn(_: StatusCode) -> ResponseBody<ListRoleBindingForAllNamespacesResponse>), RequestError>
[src]

list or watch objects of kind RoleBinding

This operation only supports listing all items of this type.

Use the returned crate::ResponseBody<ListRoleBindingForAllNamespacesResponse> constructor, or ListRoleBindingForAllNamespacesResponse directly, to parse the HTTP response.

Arguments

  • optional

    Optional parameters. Use Default::default() to not pass any.

impl RoleBinding[src]

pub fn patch_namespaced_role_binding(
    name: &str,
    namespace: &str,
    body: &Patch,
    optional: PatchNamespacedRoleBindingOptional
) -> Result<(Request<Vec<u8>>, fn(_: StatusCode) -> ResponseBody<PatchNamespacedRoleBindingResponse>), RequestError>
[src]

partially update the specified RoleBinding

Use the returned crate::ResponseBody<PatchNamespacedRoleBindingResponse> constructor, or PatchNamespacedRoleBindingResponse directly, to parse the HTTP response.

Arguments

  • name

    name of the RoleBinding

  • namespace

    object name and auth scope, such as for teams and projects

  • body

  • optional

    Optional parameters. Use Default::default() to not pass any.

impl RoleBinding[src]

pub fn read_namespaced_role_binding(
    name: &str,
    namespace: &str,
    optional: ReadNamespacedRoleBindingOptional
) -> Result<(Request<Vec<u8>>, fn(_: StatusCode) -> ResponseBody<ReadNamespacedRoleBindingResponse>), RequestError>
[src]

read the specified RoleBinding

Use the returned crate::ResponseBody<ReadNamespacedRoleBindingResponse> constructor, or ReadNamespacedRoleBindingResponse directly, to parse the HTTP response.

Arguments

  • name

    name of the RoleBinding

  • namespace

    object name and auth scope, such as for teams and projects

  • optional

    Optional parameters. Use Default::default() to not pass any.

impl RoleBinding[src]

pub fn replace_namespaced_role_binding(
    name: &str,
    namespace: &str,
    body: &RoleBinding,
    optional: ReplaceNamespacedRoleBindingOptional
) -> Result<(Request<Vec<u8>>, fn(_: StatusCode) -> ResponseBody<ReplaceNamespacedRoleBindingResponse>), RequestError>
[src]

replace the specified RoleBinding

Use the returned crate::ResponseBody<ReplaceNamespacedRoleBindingResponse> constructor, or ReplaceNamespacedRoleBindingResponse directly, to parse the HTTP response.

Arguments

  • name

    name of the RoleBinding

  • namespace

    object name and auth scope, such as for teams and projects

  • body

  • optional

    Optional parameters. Use Default::default() to not pass any.

impl RoleBinding[src]

pub fn watch_namespaced_role_binding(
    namespace: &str,
    optional: WatchNamespacedRoleBindingOptional
) -> Result<(Request<Vec<u8>>, fn(_: StatusCode) -> ResponseBody<WatchNamespacedRoleBindingResponse>), RequestError>
[src]

list or watch objects of kind RoleBinding

This operation only supports watching one item, or a list of items, of this type for changes.

Use the returned crate::ResponseBody<WatchNamespacedRoleBindingResponse> constructor, or WatchNamespacedRoleBindingResponse 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.

impl RoleBinding[src]

pub fn watch_role_binding_for_all_namespaces(
    optional: WatchRoleBindingForAllNamespacesOptional
) -> Result<(Request<Vec<u8>>, fn(_: StatusCode) -> ResponseBody<WatchRoleBindingForAllNamespacesResponse>), RequestError>
[src]

list or watch objects of kind RoleBinding

This operation only supports watching one item, or a list of items, of this type for changes.

Use the returned crate::ResponseBody<WatchRoleBindingForAllNamespacesResponse> constructor, or WatchRoleBindingForAllNamespacesResponse directly, to parse the HTTP response.

Arguments

  • optional

    Optional parameters. Use Default::default() to not pass any.

Trait Implementations

impl Resource for RoleBinding[src]

impl Metadata for RoleBinding[src]

type Ty = ObjectMeta

The type of the metadata object.

impl Clone for RoleBinding[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl PartialEq<RoleBinding> for RoleBinding[src]

impl Default for RoleBinding[src]

impl Debug for RoleBinding[src]

impl Serialize for RoleBinding[src]

impl<'de> Deserialize<'de> for RoleBinding[src]

Auto Trait Implementations

impl Send for RoleBinding

impl Sync for RoleBinding

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]