[][src]Struct k8s_openapi::api::coordination::v1beta1::Lease

pub struct Lease {
    pub metadata: Option<ObjectMeta>,
    pub spec: Option<LeaseSpec>,
}

Lease defines a lease concept.

Fields

metadata: Option<ObjectMeta>

More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata

spec: Option<LeaseSpec>

Specification of the Lease. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status

Methods

impl Lease[src]

pub fn create_namespaced_lease(
    namespace: &str,
    body: &Lease,
    optional: CreateNamespacedLeaseOptional
) -> Result<(Request<Vec<u8>>, fn(_: StatusCode) -> ResponseBody<CreateNamespacedLeaseResponse>), RequestError>
[src]

create a Lease

Use the returned crate::ResponseBody<CreateNamespacedLeaseResponse> constructor, or CreateNamespacedLeaseResponse 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 Lease[src]

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

delete collection of Lease

Use the returned crate::ResponseBody<DeleteCollectionNamespacedLeaseResponse> constructor, or DeleteCollectionNamespacedLeaseResponse 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 Lease[src]

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

delete a Lease

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

Arguments

  • name

    name of the Lease

  • namespace

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

  • optional

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

impl Lease[src]

pub fn list_lease_for_all_namespaces(
    optional: ListLeaseForAllNamespacesOptional
) -> Result<(Request<Vec<u8>>, fn(_: StatusCode) -> ResponseBody<ListLeaseForAllNamespacesResponse>), RequestError>
[src]

list or watch objects of kind Lease

This operation only supports listing all items of this type.

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

Arguments

  • optional

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

impl Lease[src]

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

list or watch objects of kind Lease

This operation only supports listing all items of this type.

Use the returned crate::ResponseBody<ListNamespacedLeaseResponse> constructor, or ListNamespacedLeaseResponse 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 Lease[src]

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

partially update the specified Lease

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

Arguments

  • name

    name of the Lease

  • namespace

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

  • body

  • optional

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

impl Lease[src]

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

read the specified Lease

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

Arguments

  • name

    name of the Lease

  • namespace

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

  • optional

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

impl Lease[src]

pub fn replace_namespaced_lease(
    name: &str,
    namespace: &str,
    body: &Lease,
    optional: ReplaceNamespacedLeaseOptional
) -> Result<(Request<Vec<u8>>, fn(_: StatusCode) -> ResponseBody<ReplaceNamespacedLeaseResponse>), RequestError>
[src]

replace the specified Lease

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

Arguments

  • name

    name of the Lease

  • namespace

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

  • body

  • optional

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

impl Lease[src]

pub fn watch_lease_for_all_namespaces(
    optional: WatchLeaseForAllNamespacesOptional
) -> Result<(Request<Vec<u8>>, fn(_: StatusCode) -> ResponseBody<WatchLeaseForAllNamespacesResponse>), RequestError>
[src]

list or watch objects of kind Lease

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

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

Arguments

  • optional

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

impl Lease[src]

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

list or watch objects of kind Lease

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

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

Trait Implementations

impl Resource for Lease[src]

impl Metadata for Lease[src]

type Ty = ObjectMeta

The type of the metadata object.

impl Default for Lease[src]

impl PartialEq<Lease> for Lease[src]

impl Clone for Lease[src]

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

Performs copy-assignment from source. Read more

impl Debug for Lease[src]

impl Serialize for Lease[src]

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

Auto Trait Implementations

impl Send for Lease

impl Sync for Lease

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> 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> Any for T where
    T: 'static + ?Sized
[src]

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