Lister vos projets
Vous pouvez lister vos projets OKS avec Cockpit et nos CLI.
Lister vos projets avec octl
|
À ce jour, cette section est disponible en anglais uniquement. |
The ListProjects command lists one or more of your projects. The response can be filtered using the parameters.
$ octl kube api ListProjects --profile "default" \
--Name "string" \
--Status "string" \
--Cidr "string" \
--Deleted=true \
--Cursor "string" \
--Page 0 \
--Limit 1
This command contains the following options that you need to specify:
-
Cidr: (optional) The IP ranges for the projects, IN CIDR notation (for example,192.0.2.0/16). -
Cursor: (optional) The token to indicate where the next set of results should start. -
Deleted: (optional) If true, returns deleted projects. -
Limit: (optional) The maximum number of results to return in the response.
Minimum value:1. Maximum value:100. -
Name: (optional) The name of the projects. -
Page: (optional) The page number of results to retrieve. -
Status:updating|failed|deleting).
The ListProjects command returns the following elements:
-
ResponseContext: Information about the context of the response.-
RequestId: The ID of the API request.
-
-
Pagination: Information used to split large lists of results into multiple responses (either cursor or offset-based).-
cursor: Information used for cursor-based pagination.-
next_cursor: The pagination token indicating where the next set of results should start.
-
-
offset: Information used for offset-based pagination.-
page: The page number of the current results. -
limit: The maximum number of results returned per page. -
total: The total number of available results.
-
-
-
Projects: The list of retrieved projects.-
id: The ID of the project. -
name: The name of the project. -
description: A description for the project.
Default:. -
cidr: The CIDR block associated with the Net of the project. -
region: The Region on which the project is deployed. -
status: The status of the project (pending|ready|updating|failed|deleting). -
tags: The key/value combinations of the tags associated with the resource, in the following format:"tags":{"TAGKEY1":"TAGVALUE1","TAGKEY2":"TAGVALUE2"}. -
net_specific: The field to configure network-specific behavior for the VPC of the project.-
disable_lan_security_groups: The value used to modify the firewall behavior within the VPC.
-
-
disable_api_termination: If true, project deletion through the API is disabled. If false, it is enabled.
Default: false. -
created_at: The timestamp when the project was created. -
updated_at: The timestamp when the project was last updated. -
deleted_at: The timestamp when the project was deleted (if applicable).
-
{
"ResponseContext": {
"RequestId": "string"
},
"Pagination": {
"cursor": {
"next_cursor": "string"
},
"offset": {
"page": 0,
"limit": 0,
"total": 0
}
},
"Projects": [
{
"id": "string",
"name": "string",
"description": "",
"cidr": "string",
"region": "string",
"status": "string",
"tags": {
"property1": "string",
"property2": "string"
},
"net_specific": {
"disable_lan_security_groups": true
},
"disable_api_termination": false,
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"deleted_at": "2019-08-24T14:15:22Z"
}
]
}
Lister vos projets avec OKS CLI
La commande project list vous permet de lister vos projets :
$ oks-cli project list \
--output json
Cette commande contient les options suivantes que vous pouvez avoir besoin de spécifier :
-
(optionnel)
deleted: La possibilité de lister les projets supprimés. -
(optionnel)
output: Le format de sortie de la réponse (json|yaml).
La commande project list renvoie les éléments suivants :
-
name: Le nom du projet. -
created: Le temps passé depuis la création du projet (par exemple, « 5 minutes ago »). -
status: L’état actuel du projet (pending|ready|deploying|updating|upgrading|failed|deleting). -
default: Indique s’il s’agit du projet par défaut (avec*désignant le projet par défaut).
+----------------+----------------+----------------+------------+---------+
| NAME | CREATED | UPDATED | STATUS | DEFAULT |
+----------------+----------------+----------------+------------+---------+
| my-project | 5 minutes ago | 3 minutes ago | ready | * |
+----------------+----------------+----------------+------------+---------+
Pages connexes
Méthode API correspondante