[−][src]Struct k8s_openapi::api::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/sig-architecture/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]
namespace: &str,
body: &NetworkPolicy,
optional: CreateNamespacedNetworkPolicyOptional
) -> Result<(Request<Vec<u8>>, fn(_: StatusCode) -> ResponseBody<CreateNamespacedNetworkPolicyResponse>), RequestError>
create a NetworkPolicy
Use the returned crate::ResponseBody<CreateNamespacedNetworkPolicyResponse> constructor, or CreateNamespacedNetworkPolicyResponse directly, to parse the HTTP response.
Arguments
-
namespaceobject name and auth scope, such as for teams and projects
-
body -
optionalOptional parameters. Use
Default::default()to not pass any.
impl NetworkPolicy[src]
pub fn delete_collection_namespaced_network_policy(
namespace: &str,
delete_optional: DeleteOptional,
list_optional: ListOptional
) -> Result<(Request<Vec<u8>>, fn(_: StatusCode) -> ResponseBody<DeleteCollectionNamespacedNetworkPolicyResponse>), RequestError>[src]
namespace: &str,
delete_optional: DeleteOptional,
list_optional: ListOptional
) -> Result<(Request<Vec<u8>>, fn(_: StatusCode) -> ResponseBody<DeleteCollectionNamespacedNetworkPolicyResponse>), RequestError>
delete collection of NetworkPolicy
Use the returned crate::ResponseBody<DeleteCollectionNamespacedNetworkPolicyResponse> constructor, or DeleteCollectionNamespacedNetworkPolicyResponse directly, to parse the HTTP response.
Arguments
-
namespaceobject name and auth scope, such as for teams and projects
-
delete_optionalDelete options. Use
Default::default()to not pass any. -
list_optionalList options. Use
Default::default()to not pass any.
impl NetworkPolicy[src]
pub fn delete_namespaced_network_policy(
name: &str,
namespace: &str,
optional: DeleteOptional
) -> Result<(Request<Vec<u8>>, fn(_: StatusCode) -> ResponseBody<DeleteNamespacedNetworkPolicyResponse>), RequestError>[src]
name: &str,
namespace: &str,
optional: DeleteOptional
) -> Result<(Request<Vec<u8>>, fn(_: StatusCode) -> ResponseBody<DeleteNamespacedNetworkPolicyResponse>), RequestError>
delete a NetworkPolicy
Use the returned crate::ResponseBody<DeleteNamespacedNetworkPolicyResponse> constructor, or DeleteNamespacedNetworkPolicyResponse directly, to parse the HTTP response.
Arguments
-
namename of the NetworkPolicy
-
namespaceobject name and auth scope, such as for teams and projects
-
optionalOptional parameters. Use
Default::default()to not pass any.
impl NetworkPolicy[src]
pub fn list_namespaced_network_policy(
namespace: &str,
optional: ListOptional
) -> Result<(Request<Vec<u8>>, fn(_: StatusCode) -> ResponseBody<ListNamespacedNetworkPolicyResponse>), RequestError>[src]
namespace: &str,
optional: ListOptional
) -> Result<(Request<Vec<u8>>, fn(_: StatusCode) -> ResponseBody<ListNamespacedNetworkPolicyResponse>), RequestError>
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
-
namespaceobject name and auth scope, such as for teams and projects
-
optionalOptional parameters. Use
Default::default()to not pass any.
impl NetworkPolicy[src]
pub fn list_network_policy_for_all_namespaces(
optional: ListOptional
) -> Result<(Request<Vec<u8>>, fn(_: StatusCode) -> ResponseBody<ListNetworkPolicyForAllNamespacesResponse>), RequestError>[src]
optional: ListOptional
) -> Result<(Request<Vec<u8>>, fn(_: StatusCode) -> ResponseBody<ListNetworkPolicyForAllNamespacesResponse>), RequestError>
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
-
optionalOptional parameters. Use
Default::default()to not pass any.
impl NetworkPolicy[src]
pub fn patch_namespaced_network_policy(
name: &str,
namespace: &str,
body: &Patch,
optional: PatchOptional
) -> Result<(Request<Vec<u8>>, fn(_: StatusCode) -> ResponseBody<PatchNamespacedNetworkPolicyResponse>), RequestError>[src]
name: &str,
namespace: &str,
body: &Patch,
optional: PatchOptional
) -> Result<(Request<Vec<u8>>, fn(_: StatusCode) -> ResponseBody<PatchNamespacedNetworkPolicyResponse>), RequestError>
partially update the specified NetworkPolicy
Use the returned crate::ResponseBody<PatchNamespacedNetworkPolicyResponse> constructor, or PatchNamespacedNetworkPolicyResponse directly, to parse the HTTP response.
Arguments
-
namename of the NetworkPolicy
-
namespaceobject name and auth scope, such as for teams and projects
-
body -
optionalOptional 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]
name: &str,
namespace: &str,
optional: ReadNamespacedNetworkPolicyOptional
) -> Result<(Request<Vec<u8>>, fn(_: StatusCode) -> ResponseBody<ReadNamespacedNetworkPolicyResponse>), RequestError>
read the specified NetworkPolicy
Use the returned crate::ResponseBody<ReadNamespacedNetworkPolicyResponse> constructor, or ReadNamespacedNetworkPolicyResponse directly, to parse the HTTP response.
Arguments
-
namename of the NetworkPolicy
-
namespaceobject name and auth scope, such as for teams and projects
-
optionalOptional 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]
name: &str,
namespace: &str,
body: &NetworkPolicy,
optional: ReplaceNamespacedNetworkPolicyOptional
) -> Result<(Request<Vec<u8>>, fn(_: StatusCode) -> ResponseBody<ReplaceNamespacedNetworkPolicyResponse>), RequestError>
replace the specified NetworkPolicy
Use the returned crate::ResponseBody<ReplaceNamespacedNetworkPolicyResponse> constructor, or ReplaceNamespacedNetworkPolicyResponse directly, to parse the HTTP response.
Arguments
-
namename of the NetworkPolicy
-
namespaceobject name and auth scope, such as for teams and projects
-
body -
optionalOptional parameters. Use
Default::default()to not pass any.
impl NetworkPolicy[src]
pub fn watch_namespaced_network_policy(
namespace: &str,
optional: WatchOptional
) -> Result<(Request<Vec<u8>>, fn(_: StatusCode) -> ResponseBody<WatchNamespacedNetworkPolicyResponse>), RequestError>[src]
namespace: &str,
optional: WatchOptional
) -> Result<(Request<Vec<u8>>, fn(_: StatusCode) -> ResponseBody<WatchNamespacedNetworkPolicyResponse>), RequestError>
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
-
namespaceobject name and auth scope, such as for teams and projects
-
optionalOptional parameters. Use
Default::default()to not pass any.
impl NetworkPolicy[src]
pub fn watch_network_policy_for_all_namespaces(
optional: WatchOptional
) -> Result<(Request<Vec<u8>>, fn(_: StatusCode) -> ResponseBody<WatchNetworkPolicyForAllNamespacesResponse>), RequestError>[src]
optional: WatchOptional
) -> Result<(Request<Vec<u8>>, fn(_: StatusCode) -> ResponseBody<WatchNetworkPolicyForAllNamespacesResponse>), RequestError>
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
-
optionalOptional parameters. Use
Default::default()to not pass any.
Trait Implementations
impl Resource for NetworkPolicy[src]
fn api_version() -> &'static str[src]
fn group() -> &'static str[src]
fn kind() -> &'static str[src]
fn version() -> &'static str[src]
impl Metadata for NetworkPolicy[src]
impl Default for NetworkPolicy[src]
fn default() -> NetworkPolicy[src]
impl Clone for NetworkPolicy[src]
fn clone(&self) -> 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]
fn eq(&self, other: &NetworkPolicy) -> bool[src]
fn ne(&self, other: &NetworkPolicy) -> bool[src]
impl Debug for NetworkPolicy[src]
impl Serialize for NetworkPolicy[src]
impl<'de> Deserialize<'de> for NetworkPolicy[src]
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>, [src]
D: Deserializer<'de>,
Auto Trait Implementations
impl Sync for NetworkPolicy
impl Unpin for NetworkPolicy
impl Send for NetworkPolicy
impl UnwindSafe for NetworkPolicy
impl RefUnwindSafe for NetworkPolicy
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T> From<T> for T[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>, [src]
T: Deserialize<'de>,