[][src]Struct k8s_openapi::api::extensions::v1beta1::NetworkPolicy

pub struct NetworkPolicy {
    pub metadata: Option<ObjectMeta>,
    pub spec: Option<NetworkPolicySpec>,
}

DEPRECATED 1.9 - This group version of NetworkPolicy is deprecated by networking/v1/NetworkPolicy. NetworkPolicy describes what network traffic is allowed for a set of Pods

Fields

metadata: Option<ObjectMeta>

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

spec: Option<NetworkPolicySpec>

Specification of the desired behavior for this NetworkPolicy.

Methods

impl NetworkPolicy[src]

pub fn create_namespaced_network_policy(
    namespace: &str,
    body: &NetworkPolicy,
    optional: CreateNamespacedNetworkPolicyOptional
) -> Result<(Request<Vec<u8>>, fn(_: StatusCode) -> ResponseBody<CreateNamespacedNetworkPolicyResponse>), RequestError>
[src]

create a NetworkPolicy

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

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

delete collection of NetworkPolicy

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

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

delete a NetworkPolicy

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

Arguments

  • name

    name of the NetworkPolicy

  • namespace

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

  • optional

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

impl NetworkPolicy[src]

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

list or watch objects of kind NetworkPolicy

This operation only supports listing all items of this type.

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

pub fn list_network_policy_for_all_namespaces(
    optional: ListNetworkPolicyForAllNamespacesOptional
) -> Result<(Request<Vec<u8>>, fn(_: StatusCode) -> ResponseBody<ListNetworkPolicyForAllNamespacesResponse>), RequestError>
[src]

list or watch objects of kind NetworkPolicy

This operation only supports listing all items of this type.

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

Arguments

  • optional

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

impl NetworkPolicy[src]

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

partially update the specified NetworkPolicy

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

Arguments

  • name

    name of the NetworkPolicy

  • namespace

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

  • body

  • optional

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

impl NetworkPolicy[src]

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

read the specified NetworkPolicy

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

Arguments

  • name

    name of the NetworkPolicy

  • namespace

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

  • optional

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

impl NetworkPolicy[src]

pub fn replace_namespaced_network_policy(
    name: &str,
    namespace: &str,
    body: &NetworkPolicy,
    optional: ReplaceNamespacedNetworkPolicyOptional
) -> Result<(Request<Vec<u8>>, fn(_: StatusCode) -> ResponseBody<ReplaceNamespacedNetworkPolicyResponse>), RequestError>
[src]

replace the specified NetworkPolicy

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

Arguments

  • name

    name of the NetworkPolicy

  • namespace

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

  • body

  • optional

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

impl NetworkPolicy[src]

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

list or watch objects of kind NetworkPolicy

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

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

pub fn watch_network_policy_for_all_namespaces(
    optional: WatchNetworkPolicyForAllNamespacesOptional
) -> Result<(Request<Vec<u8>>, fn(_: StatusCode) -> ResponseBody<WatchNetworkPolicyForAllNamespacesResponse>), RequestError>
[src]

list or watch objects of kind NetworkPolicy

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

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

Arguments

  • optional

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

Trait Implementations

impl Resource for NetworkPolicy[src]

impl Metadata for NetworkPolicy[src]

type Ty = ObjectMeta

The type of the metadata object.

impl Clone for NetworkPolicy[src]

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

Performs copy-assignment from source. Read more

impl PartialEq<NetworkPolicy> for NetworkPolicy[src]

impl Default for NetworkPolicy[src]

impl Debug for NetworkPolicy[src]

impl Serialize for NetworkPolicy[src]

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

Auto Trait Implementations

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]