Listing Your Projects

You can list your projects using Cockpit and OKS CLI.

Listing Your Projects Using Cockpit

See the Projects dashboard.

Listing Your Projects Using octl

The ListProjects command lists one or more of your projects. The response can be filtered using the parameters.

Request sample
$ 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).

Result sample
{
  "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"
    }
  ]
}

Listing Your Projects Using OKS CLI

The project list command allows you to list your projects:

Request sample
$ oks-cli project list \
    --output json

This command contains the following options that you may need to specify:

  • (optional) deleted: The ability to list deleted projects.

  • (optional) output: The output format for the response (json | yaml).

The project list command returns the following elements:

  • name: The name of the project.

  • created: The time elapsed since the project was created (e.g., "5 minutes ago").

  • status: The current state of the project (pending | ready | deploying | updating | upgrading | failed | deleting).

  • default: Indicates whether this project is the default one (with * meaning it is the default).

Result sample
+----------------+----------------+----------------+------------+---------+
|      NAME      |    CREATED     |    UPDATED     |   STATUS   | DEFAULT |
+----------------+----------------+----------------+------------+---------+
|   my-project   |  5 minutes ago |  3 minutes ago |   ready    |    *    |
+----------------+----------------+----------------+------------+---------+

Related Pages

Corresponding API Method