Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
PUT /v3/profiles/<profile-name>

A user profile can be created or updated with an HTTP PUT method to the URL:

Code Block
PUT /v3/namespaces/<namespace-id>/profiles/<profile-name>

The request body must be a JSON object that specifies the profile details.

Code Block
$ PUT /v3/namespace/default/profiles/dataproc -d
{
  "label": "Dataproc",
  "description": "My Dataproc profile",
  "provisioner": {
    "name": "gcp-dataproc",
    "properties": [
      {
        "name": "projectId",
        "value": "my project id",
        "isEditable": false
      },
      ...
    ]
  }
}

List Profiles

To list all system profiles, submit an HTTP GET request:

Code Block
GET /v3/profiles

To list all user profiles, submit an HTTP GET request:

Code Block
GET /v3/namespaces/<namespace-id>/profiles[?includeSystem=true]

This will return a JSON array that lists each profile. For the user profiles endpoint, if the includeSystem query param is set to true, all system profiles will also be returned in the response.

Code Block
$ GET /v3/namespaces/default/profiles
[
  {
    "name": "dataproc",
    "label": "Dataproc",
    "description": "My Dataproc Profile",
    "scope": "SYSTEM",
    "status": "ENABLED",
    "created": 1234567890,
    "provisioner": {
      "name": "gcp-dataproc",
      "properties": [
        {
          "name": "projectId",
          "value": "my project id",
          "isEditable": false
        },
        ...
      ]
    }
  },
  ...
]

Retrieve Profile Details

To retrieve details about a system profile, submit an HTTP GET request:

Code Block
GET /v3/profiles/<profile-name>

To retrieve details about a user profile, submit an HTTP GET request:

Code Block
GET /v3/namespaces/<namespace-id>/profiles/<profile-name>

This will return a JSON object that contains details about the profile.

Code Block
$ GET /v3/namespaces/default/profiles/dataproc
{
  "name": "dataproc",
  "label": "Dataproc",
  "description": "My Dataproc Profile",
  "scope": "SYSTEM",
  "status": "ENABLED",
  "created": 1234567890,
  "provisioner": {
    "name": "gcp-dataproc",
    "properties": [
      {
        "name": "projectId",
        "value": "my project id",
        "isEditable": false
      },
      ...
    ]
  }
}

Disable Profile

To disable a system profile, submit an HTTP POST request:

Code Block
POST /v3/profiles/<profile-name>/disable

To disable a user profile, submit an HTTP POST request:

Code Block
POST /v3/namespaces/<namespace-id>/profiles/<profile-name>/disable

Enable Profile

To enable a system profile, submit an HTTP POST request:

Code Block
POST /v3/profiles/<profile-name>/enable

To enable a user profile, submit an HTTP POST request:

Code Block
POST /v3/namespaces/<namespace-id>/profiles/<profile-name>/enable

Delete Profile

To delete a system profile, submit an HTTP DELETE request:

Code Block
DELETE /v3/profiles/<profile-name>

To delete a user profile, submit an HTTP POST request:

Code Block
DELETE /v3/namespaces/<namespace-id>/profiles/<profile-name>

In order to delete a profile, the profile must be disabled, it must not be assigned to any entity, and it must not be in use by any active program runs. If any of these conditions is not met, a 409 will be returned.