pub struct Project {
pub metadata: ObjectMeta,
pub spec: Option<ProjectSpec>,
pub status: Option<ProjectStatus>,
}
Expand description
Projects are the unit of isolation and collaboration in OpenShift. A project has one or more members, a quota on the resources that the project may consume, and the security controls on the resources in the project. Within a project, members may have different roles - project administrators can set membership, editors can create and manage the resources, and viewers can see but not access running containers. In a normal cluster project administrators are not able to alter their quotas - that is restricted to cluster administrators.
Listing or watching projects will return only projects the user has the reader role on.
An OpenShift project is an alternative representation of a Kubernetes namespace. Projects are exposed as editable to end users while namespaces are not. Direct creation of a project is typically restricted to administrators, while end users should use the requestproject resource.
Fields§
§metadata: ObjectMeta
Standard object’s metadata.
spec: Option<ProjectSpec>
Spec defines the behavior of the Namespace.
status: Option<ProjectStatus>
Status describes the current status of a Namespace
Implementations§
Source§impl Project
impl Project
Sourcepub fn create_project(
body: &Project,
optional: CreateOptional<'_>,
) -> Result<(Request<Vec<u8>>, fn(StatusCode) -> ResponseBody<CreateResponse<Self>>), RequestError>
pub fn create_project( body: &Project, optional: CreateOptional<'_>, ) -> Result<(Request<Vec<u8>>, fn(StatusCode) -> ResponseBody<CreateResponse<Self>>), RequestError>
create a Project
Use the returned k8s_openapi::ResponseBody
<
k8s_openapi::CreateResponse
<Self>>
constructor, or k8s_openapi::CreateResponse
<Self>
directly, to parse the HTTP response.
§Arguments
-
body
-
optional
Optional parameters. Use
Default::default()
to not pass any.
Source§impl Project
impl Project
Sourcepub fn delete_project(
name: &str,
optional: DeleteOptional<'_>,
) -> Result<(Request<Vec<u8>>, fn(StatusCode) -> ResponseBody<DeleteResponse<Self>>), RequestError>
pub fn delete_project( name: &str, optional: DeleteOptional<'_>, ) -> Result<(Request<Vec<u8>>, fn(StatusCode) -> ResponseBody<DeleteResponse<Self>>), RequestError>
delete a Project
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 Project
-
optional
Optional parameters. Use
Default::default()
to not pass any.
Source§impl Project
impl Project
Sourcepub fn list_project(
optional: ListOptional<'_>,
) -> Result<(Request<Vec<u8>>, fn(StatusCode) -> ResponseBody<ListResponse<Self>>), RequestError>
pub fn list_project( optional: ListOptional<'_>, ) -> Result<(Request<Vec<u8>>, fn(StatusCode) -> ResponseBody<ListResponse<Self>>), RequestError>
list or watch objects of kind Project
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 Project
impl Project
Sourcepub fn patch_project(
name: &str,
body: &Patch,
optional: PatchOptional<'_>,
) -> Result<(Request<Vec<u8>>, fn(StatusCode) -> ResponseBody<PatchResponse<Self>>), RequestError>
pub fn patch_project( name: &str, body: &Patch, optional: PatchOptional<'_>, ) -> Result<(Request<Vec<u8>>, fn(StatusCode) -> ResponseBody<PatchResponse<Self>>), RequestError>
partially update the specified Project
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 Project
-
body
-
optional
Optional parameters. Use
Default::default()
to not pass any.
Source§impl Project
impl Project
Sourcepub fn read_project(
name: &str,
optional: ReadProjectOptional<'_>,
) -> Result<(Request<Vec<u8>>, fn(StatusCode) -> ResponseBody<ReadProjectResponse>), RequestError>
pub fn read_project( name: &str, optional: ReadProjectOptional<'_>, ) -> Result<(Request<Vec<u8>>, fn(StatusCode) -> ResponseBody<ReadProjectResponse>), RequestError>
read the specified Project
Use the returned k8s_openapi::ResponseBody
<
ReadProjectResponse
>
constructor, or ReadProjectResponse
directly, to parse the HTTP response.
§Arguments
-
name
name of the Project
-
optional
Optional parameters. Use
Default::default()
to not pass any.
Source§impl Project
impl Project
Sourcepub fn replace_project(
name: &str,
body: &Project,
optional: ReplaceOptional<'_>,
) -> Result<(Request<Vec<u8>>, fn(StatusCode) -> ResponseBody<ReplaceResponse<Self>>), RequestError>
pub fn replace_project( name: &str, body: &Project, optional: ReplaceOptional<'_>, ) -> Result<(Request<Vec<u8>>, fn(StatusCode) -> ResponseBody<ReplaceResponse<Self>>), RequestError>
replace the specified Project
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 Project
-
body
-
optional
Optional parameters. Use
Default::default()
to not pass any.
Source§impl Project
impl Project
Sourcepub fn watch_project(
optional: WatchOptional<'_>,
) -> Result<(Request<Vec<u8>>, fn(StatusCode) -> ResponseBody<WatchResponse<Self>>), RequestError>
pub fn watch_project( optional: WatchOptional<'_>, ) -> Result<(Request<Vec<u8>>, fn(StatusCode) -> ResponseBody<WatchResponse<Self>>), RequestError>
list or watch objects of kind Project
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 Project
impl<'de> Deserialize<'de> for Project
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 Project
impl ListableResource for Project
Source§impl Resource for Project
impl Resource for Project
Source§const API_VERSION: &'static str = "project.openshift.io/v1"
const API_VERSION: &'static str = "project.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