latestOpenAPI 3.0.02026-08-10221235717.8 KB

e21ad140ec3c

public
ResourceDefinition

List Resource Definitions.

Filter criteria can be applied to obtain all the resource definitions that could match the filters, grouped by type and sorted by matching rank. Resources marked as deleted are not listed in the response, unless specified via deleted query parameter.

get/orgs/{orgId}/resources/defs

Path parameters

orgIdstring required

The Organization ID.

Query parameters

appstring

(Optional) Filter Resource Definitions that may match a specific Application.

envstring

(Optional) Filter Resource Definitions that may match a specific Environment.

env_typestring

(Optional) Filter Resource Definitions that may match a specific Environment Type.

resstring

(Optional) Filter Resource Definitions that may match a specific Resource.

res_typestring

(Optional) Filter Resource Definitions that may match a specific Resource Type.

classstring

(Optional) Filter Resource Definitions that may match a specific Class.

deletedboolean

If returns also resource definitions which has been deleted.

Response

A possibly empty list of Resources Definitions.

created_atstring date-time required

The timestamp of when this record has been created.

created_bystring required

The user who created this record.

updated_atstring date-time

The timestamp of when this record has been updated.

updated_bystring

The user who updated this record.

driver_accountstring

(Optional) Security account required by the driver.

driver_typestring required

The driver to be used to create the resource.

idstring required

The Resource Definition ID.

active_version_idstring required

The active Resource Definition Version ID.

in_place_driver_changeboolean required

If true, the Operator will not delete resources provisioned by the previous driver when driver_type changes on a later update; the new driver takes over the existing infrastructure in place. Applies to the Operator provisioning path only.

is_defaultboolean required

Indicates this definition is a built-in one (provided by Humanitec).

is_deletedboolean required

Indicates if this record has been marked for deletion. The Resource Definition that has been marked for deletion cannot be used to provision new resources.

namestring required

The display name.

org_idstring required

The Organization ID.

provisionobject

(Optional) A map where the keys are resType#resId (if resId is omitted, the same id of the current resource definition is used) of the resources that should be provisioned when the current resource is provisioned. This also specifies if the resources have a dependency on the current resource.

typestring required

The Resource Type.

Example response

[
  {
    "created_at": "2020-05-23T12:32:16Z",
    "created_by": "a.user@example.com",
    "criteria": [
      {
        "env_type": "development",
        "id": "123456"
      }
    ],
    "driver_account": "gcp-dev-cloudsql",
    "driver_inputs": {
      "secret_refs": {
        "credentials": {
          "password": {
            "value": "<secret>"
          },
          "user": {
            "ref": "vault/path/to/data/secrets/user",
            "store": "my-external-vault",
            "version": "1"
          }
        }
      },
      "values": {
        "instance": "my-dev-project:my-region:dev-db"
      }
    },
    "driver_type": "humanitec/postgres-cloudsql",
    "id": "dev-postgres",
    "is_default": false,
    "is_deleted": false,
    "name": "Dev Postgres Instance",
    "org_id": "test-org",
    "provision": {
      "aws-policy": {
        "is_dependent": false,
        "match_dependents": false
      },
      "dns#my-dns": {}
    },
    "type": "postgres"
  }
]