diff --git a/client/client.gen.go b/client/client.gen.go
index 4f09f86..3f069fe 100644
--- a/client/client.gen.go
+++ b/client/client.gen.go
@@ -1466,6 +1466,9 @@ type PatchResourceDefinitionRequestRequest struct {
// DriverInputs ValuesSecretsRefs stores data that should be passed around split by sensitivity.
DriverInputs *ValuesSecretsRefsRequest `json:"driver_inputs,omitempty"`
+ // DriverType The driver to be used to create the resource.
+ DriverType *string `json:"driver_type,omitempty"`
+
// Name (Optional) Resource display name
Name *string `json:"name"`
@@ -2587,6 +2590,9 @@ type UpdateResourceDefinitionRequestRequest struct {
// DriverInputs ValuesSecretsRefs stores data that should be passed around split by sensitivity.
DriverInputs *ValuesSecretsRefsRequest `json:"driver_inputs,omitempty"`
+ // DriverType The driver to be used to create the resource.
+ DriverType *string `json:"driver_type,omitempty"`
+
// Name The display name.
Name string `json:"name"`
@@ -3734,6 +3740,9 @@ type ListResourceDefinitionsParams struct {
// Class (Optional) Filter Resource Definitions that may match a specific Class.
//
Class *string `form:"class,omitempty" json:"class,omitempty"`
+
+ // Deleted If returns also resource definitions which has been deleted.
+ Deleted *bool `form:"deleted,omitempty" json:"deleted,omitempty"`
}
// DeleteResourceDefinitionParams defines parameters for DeleteResourceDefinition.
@@ -3743,6 +3752,12 @@ type DeleteResourceDefinitionParams struct {
Force *bool `form:"force,omitempty" json:"force,omitempty"`
}
+// GetResourceDefinitionParams defines parameters for GetResourceDefinition.
+type GetResourceDefinitionParams struct {
+ // Deleted If returns the resource definition even if it has been deleted.
+ Deleted *bool `form:"deleted,omitempty" json:"deleted,omitempty"`
+}
+
// UpdateResourceDefinitionCriteriaJSONBody defines parameters for UpdateResourceDefinitionCriteria.
type UpdateResourceDefinitionCriteriaJSONBody = []MatchingCriteriaRuleRequest
@@ -5351,14 +5366,11 @@ type ClientInterface interface {
CreateResourceDefinition(ctx context.Context, orgId string, body CreateResourceDefinitionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
- // GetResourceDefinitionVersion request
- GetResourceDefinitionVersion(ctx context.Context, orgId OrgIdPathParam, defVersionId DefVersionIdPathParam, reqEditors ...RequestEditorFn) (*http.Response, error)
-
// DeleteResourceDefinition request
DeleteResourceDefinition(ctx context.Context, orgId string, defId string, params *DeleteResourceDefinitionParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetResourceDefinition request
- GetResourceDefinition(ctx context.Context, orgId string, defId string, reqEditors ...RequestEditorFn) (*http.Response, error)
+ GetResourceDefinition(ctx context.Context, orgId string, defId string, params *GetResourceDefinitionParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// PatchResourceDefinitionWithBody request with any body
PatchResourceDefinitionWithBody(ctx context.Context, orgId string, defId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
@@ -5389,6 +5401,9 @@ type ClientInterface interface {
// ListResourceDefinitionVersions request
ListResourceDefinitionVersions(ctx context.Context, orgId OrgIdPathParam, defId DefIdPathParam, params *ListResourceDefinitionVersionsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
+ // GetResourceDefinitionVersion request
+ GetResourceDefinitionVersion(ctx context.Context, orgId OrgIdPathParam, defId DefIdPathParam, defVersionId DefVersionIdPathParam, reqEditors ...RequestEditorFn) (*http.Response, error)
+
// ListResourceDrivers request
ListResourceDrivers(ctx context.Context, orgId string, reqEditors ...RequestEditorFn) (*http.Response, error)
@@ -8058,18 +8073,6 @@ func (c *Client) CreateResourceDefinition(ctx context.Context, orgId string, bod
return c.Client.Do(req)
}
-func (c *Client) GetResourceDefinitionVersion(ctx context.Context, orgId OrgIdPathParam, defVersionId DefVersionIdPathParam, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewGetResourceDefinitionVersionRequest(c.Server, orgId, defVersionId)
- if err != nil {
- return nil, err
- }
- req = req.WithContext(ctx)
- if err := c.applyEditors(ctx, req, reqEditors); err != nil {
- return nil, err
- }
- return c.Client.Do(req)
-}
-
func (c *Client) DeleteResourceDefinition(ctx context.Context, orgId string, defId string, params *DeleteResourceDefinitionParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
req, err := NewDeleteResourceDefinitionRequest(c.Server, orgId, defId, params)
if err != nil {
@@ -8082,8 +8085,8 @@ func (c *Client) DeleteResourceDefinition(ctx context.Context, orgId string, def
return c.Client.Do(req)
}
-func (c *Client) GetResourceDefinition(ctx context.Context, orgId string, defId string, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewGetResourceDefinitionRequest(c.Server, orgId, defId)
+func (c *Client) GetResourceDefinition(ctx context.Context, orgId string, defId string, params *GetResourceDefinitionParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewGetResourceDefinitionRequest(c.Server, orgId, defId, params)
if err != nil {
return nil, err
}
@@ -8226,6 +8229,18 @@ func (c *Client) ListResourceDefinitionVersions(ctx context.Context, orgId OrgId
return c.Client.Do(req)
}
+func (c *Client) GetResourceDefinitionVersion(ctx context.Context, orgId OrgIdPathParam, defId DefIdPathParam, defVersionId DefVersionIdPathParam, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewGetResourceDefinitionVersionRequest(c.Server, orgId, defId, defVersionId)
+ if err != nil {
+ return nil, err
+ }
+ req = req.WithContext(ctx)
+ if err := c.applyEditors(ctx, req, reqEditors); err != nil {
+ return nil, err
+ }
+ return c.Client.Do(req)
+}
+
func (c *Client) ListResourceDrivers(ctx context.Context, orgId string, reqEditors ...RequestEditorFn) (*http.Response, error) {
req, err := NewListResourceDriversRequest(c.Server, orgId)
if err != nil {
@@ -18079,6 +18094,22 @@ func NewListResourceDefinitionsRequest(server string, orgId string, params *List
}
+ if params.Deleted != nil {
+
+ if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted", runtime.ParamLocationQuery, *params.Deleted); err != nil {
+ return nil, err
+ } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
+ return nil, err
+ } else {
+ for k, v := range parsed {
+ for _, v2 := range v {
+ queryValues.Add(k, v2)
+ }
+ }
+ }
+
+ }
+
queryURL.RawQuery = queryValues.Encode()
}
@@ -18137,47 +18168,6 @@ func NewCreateResourceDefinitionRequestWithBody(server string, orgId string, con
return req, nil
}
-// NewGetResourceDefinitionVersionRequest generates requests for GetResourceDefinitionVersion
-func NewGetResourceDefinitionVersionRequest(server string, orgId OrgIdPathParam, defVersionId DefVersionIdPathParam) (*http.Request, error) {
- var err error
-
- var pathParam0 string
-
- pathParam0, err = runtime.StyleParamWithLocation("simple", false, "orgId", runtime.ParamLocationPath, orgId)
- if err != nil {
- return nil, err
- }
-
- var pathParam1 string
-
- pathParam1, err = runtime.StyleParamWithLocation("simple", false, "defVersionId", runtime.ParamLocationPath, defVersionId)
- if err != nil {
- return nil, err
- }
-
- serverURL, err := url.Parse(server)
- if err != nil {
- return nil, err
- }
-
- operationPath := fmt.Sprintf("/orgs/%s/resources/defs/versions/%s", pathParam0, pathParam1)
- if operationPath[0] == '/' {
- operationPath = "." + operationPath
- }
-
- queryURL, err := serverURL.Parse(operationPath)
- if err != nil {
- return nil, err
- }
-
- req, err := http.NewRequest("GET", queryURL.String(), nil)
- if err != nil {
- return nil, err
- }
-
- return req, nil
-}
-
// NewDeleteResourceDefinitionRequest generates requests for DeleteResourceDefinition
func NewDeleteResourceDefinitionRequest(server string, orgId string, defId string, params *DeleteResourceDefinitionParams) (*http.Request, error) {
var err error
@@ -18242,7 +18232,7 @@ func NewDeleteResourceDefinitionRequest(server string, orgId string, defId strin
}
// NewGetResourceDefinitionRequest generates requests for GetResourceDefinition
-func NewGetResourceDefinitionRequest(server string, orgId string, defId string) (*http.Request, error) {
+func NewGetResourceDefinitionRequest(server string, orgId string, defId string, params *GetResourceDefinitionParams) (*http.Request, error) {
var err error
var pathParam0 string
@@ -18274,6 +18264,28 @@ func NewGetResourceDefinitionRequest(server string, orgId string, defId string)
return nil, err
}
+ if params != nil {
+ queryValues := queryURL.Query()
+
+ if params.Deleted != nil {
+
+ if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleted", runtime.ParamLocationQuery, *params.Deleted); err != nil {
+ return nil, err
+ } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
+ return nil, err
+ } else {
+ for k, v := range parsed {
+ for _, v2 := range v {
+ queryValues.Add(k, v2)
+ }
+ }
+ }
+
+ }
+
+ queryURL.RawQuery = queryValues.Encode()
+ }
+
req, err := http.NewRequest("GET", queryURL.String(), nil)
if err != nil {
return nil, err
@@ -18704,6 +18716,54 @@ func NewListResourceDefinitionVersionsRequest(server string, orgId OrgIdPathPara
return req, nil
}
+// NewGetResourceDefinitionVersionRequest generates requests for GetResourceDefinitionVersion
+func NewGetResourceDefinitionVersionRequest(server string, orgId OrgIdPathParam, defId DefIdPathParam, defVersionId DefVersionIdPathParam) (*http.Request, error) {
+ var err error
+
+ var pathParam0 string
+
+ pathParam0, err = runtime.StyleParamWithLocation("simple", false, "orgId", runtime.ParamLocationPath, orgId)
+ if err != nil {
+ return nil, err
+ }
+
+ var pathParam1 string
+
+ pathParam1, err = runtime.StyleParamWithLocation("simple", false, "defId", runtime.ParamLocationPath, defId)
+ if err != nil {
+ return nil, err
+ }
+
+ var pathParam2 string
+
+ pathParam2, err = runtime.StyleParamWithLocation("simple", false, "defVersionId", runtime.ParamLocationPath, defVersionId)
+ if err != nil {
+ return nil, err
+ }
+
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
+ }
+
+ operationPath := fmt.Sprintf("/orgs/%s/resources/defs/%s/versions/%s", pathParam0, pathParam1, pathParam2)
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
+ }
+
+ queryURL, err := serverURL.Parse(operationPath)
+ if err != nil {
+ return nil, err
+ }
+
+ req, err := http.NewRequest("GET", queryURL.String(), nil)
+ if err != nil {
+ return nil, err
+ }
+
+ return req, nil
+}
+
// NewListResourceDriversRequest generates requests for ListResourceDrivers
func NewListResourceDriversRequest(server string, orgId string) (*http.Request, error) {
var err error
@@ -20953,14 +21013,11 @@ type ClientWithResponsesInterface interface {
CreateResourceDefinitionWithResponse(ctx context.Context, orgId string, body CreateResourceDefinitionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateResourceDefinitionResponse, error)
- // GetResourceDefinitionVersionWithResponse request
- GetResourceDefinitionVersionWithResponse(ctx context.Context, orgId OrgIdPathParam, defVersionId DefVersionIdPathParam, reqEditors ...RequestEditorFn) (*GetResourceDefinitionVersionResponse, error)
-
// DeleteResourceDefinitionWithResponse request
DeleteResourceDefinitionWithResponse(ctx context.Context, orgId string, defId string, params *DeleteResourceDefinitionParams, reqEditors ...RequestEditorFn) (*DeleteResourceDefinitionResponse, error)
// GetResourceDefinitionWithResponse request
- GetResourceDefinitionWithResponse(ctx context.Context, orgId string, defId string, reqEditors ...RequestEditorFn) (*GetResourceDefinitionResponse, error)
+ GetResourceDefinitionWithResponse(ctx context.Context, orgId string, defId string, params *GetResourceDefinitionParams, reqEditors ...RequestEditorFn) (*GetResourceDefinitionResponse, error)
// PatchResourceDefinitionWithBodyWithResponse request with any body
PatchResourceDefinitionWithBodyWithResponse(ctx context.Context, orgId string, defId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchResourceDefinitionResponse, error)
@@ -20991,6 +21048,9 @@ type ClientWithResponsesInterface interface {
// ListResourceDefinitionVersionsWithResponse request
ListResourceDefinitionVersionsWithResponse(ctx context.Context, orgId OrgIdPathParam, defId DefIdPathParam, params *ListResourceDefinitionVersionsParams, reqEditors ...RequestEditorFn) (*ListResourceDefinitionVersionsResponse, error)
+ // GetResourceDefinitionVersionWithResponse request
+ GetResourceDefinitionVersionWithResponse(ctx context.Context, orgId OrgIdPathParam, defId DefIdPathParam, defVersionId DefVersionIdPathParam, reqEditors ...RequestEditorFn) (*GetResourceDefinitionVersionResponse, error)
+
// ListResourceDriversWithResponse request
ListResourceDriversWithResponse(ctx context.Context, orgId string, reqEditors ...RequestEditorFn) (*ListResourceDriversResponse, error)
@@ -24830,29 +24890,6 @@ func (r CreateResourceDefinitionResponse) StatusCode() int {
return 0
}
-type GetResourceDefinitionVersionResponse struct {
- Body []byte
- HTTPResponse *http.Response
- JSON200 *ResourceDefinitionVersion
- JSON404 *HumanitecErrorResponse
-}
-
-// Status returns HTTPResponse.Status
-func (r GetResourceDefinitionVersionResponse) Status() string {
- if r.HTTPResponse != nil {
- return r.HTTPResponse.Status
- }
- return http.StatusText(0)
-}
-
-// StatusCode returns HTTPResponse.StatusCode
-func (r GetResourceDefinitionVersionResponse) StatusCode() int {
- if r.HTTPResponse != nil {
- return r.HTTPResponse.StatusCode
- }
- return 0
-}
-
type DeleteResourceDefinitionResponse struct {
Body []byte
HTTPResponse *http.Response
@@ -25074,6 +25111,29 @@ func (r ListResourceDefinitionVersionsResponse) StatusCode() int {
return 0
}
+type GetResourceDefinitionVersionResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+ JSON200 *ResourceDefinitionVersion
+ JSON404 *HumanitecErrorResponse
+}
+
+// Status returns HTTPResponse.Status
+func (r GetResourceDefinitionVersionResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r GetResourceDefinitionVersionResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
+
type ListResourceDriversResponse struct {
Body []byte
HTTPResponse *http.Response
@@ -27711,15 +27771,6 @@ func (c *ClientWithResponses) CreateResourceDefinitionWithResponse(ctx context.C
return ParseCreateResourceDefinitionResponse(rsp)
}
-// GetResourceDefinitionVersionWithResponse request returning *GetResourceDefinitionVersionResponse
-func (c *ClientWithResponses) GetResourceDefinitionVersionWithResponse(ctx context.Context, orgId OrgIdPathParam, defVersionId DefVersionIdPathParam, reqEditors ...RequestEditorFn) (*GetResourceDefinitionVersionResponse, error) {
- rsp, err := c.GetResourceDefinitionVersion(ctx, orgId, defVersionId, reqEditors...)
- if err != nil {
- return nil, err
- }
- return ParseGetResourceDefinitionVersionResponse(rsp)
-}
-
// DeleteResourceDefinitionWithResponse request returning *DeleteResourceDefinitionResponse
func (c *ClientWithResponses) DeleteResourceDefinitionWithResponse(ctx context.Context, orgId string, defId string, params *DeleteResourceDefinitionParams, reqEditors ...RequestEditorFn) (*DeleteResourceDefinitionResponse, error) {
rsp, err := c.DeleteResourceDefinition(ctx, orgId, defId, params, reqEditors...)
@@ -27730,8 +27781,8 @@ func (c *ClientWithResponses) DeleteResourceDefinitionWithResponse(ctx context.C
}
// GetResourceDefinitionWithResponse request returning *GetResourceDefinitionResponse
-func (c *ClientWithResponses) GetResourceDefinitionWithResponse(ctx context.Context, orgId string, defId string, reqEditors ...RequestEditorFn) (*GetResourceDefinitionResponse, error) {
- rsp, err := c.GetResourceDefinition(ctx, orgId, defId, reqEditors...)
+func (c *ClientWithResponses) GetResourceDefinitionWithResponse(ctx context.Context, orgId string, defId string, params *GetResourceDefinitionParams, reqEditors ...RequestEditorFn) (*GetResourceDefinitionResponse, error) {
+ rsp, err := c.GetResourceDefinition(ctx, orgId, defId, params, reqEditors...)
if err != nil {
return nil, err
}
@@ -27833,6 +27884,15 @@ func (c *ClientWithResponses) ListResourceDefinitionVersionsWithResponse(ctx con
return ParseListResourceDefinitionVersionsResponse(rsp)
}
+// GetResourceDefinitionVersionWithResponse request returning *GetResourceDefinitionVersionResponse
+func (c *ClientWithResponses) GetResourceDefinitionVersionWithResponse(ctx context.Context, orgId OrgIdPathParam, defId DefIdPathParam, defVersionId DefVersionIdPathParam, reqEditors ...RequestEditorFn) (*GetResourceDefinitionVersionResponse, error) {
+ rsp, err := c.GetResourceDefinitionVersion(ctx, orgId, defId, defVersionId, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseGetResourceDefinitionVersionResponse(rsp)
+}
+
// ListResourceDriversWithResponse request returning *ListResourceDriversResponse
func (c *ClientWithResponses) ListResourceDriversWithResponse(ctx context.Context, orgId string, reqEditors ...RequestEditorFn) (*ListResourceDriversResponse, error) {
rsp, err := c.ListResourceDrivers(ctx, orgId, reqEditors...)
@@ -33974,39 +34034,6 @@ func ParseCreateResourceDefinitionResponse(rsp *http.Response) (*CreateResourceD
return response, nil
}
-// ParseGetResourceDefinitionVersionResponse parses an HTTP response from a GetResourceDefinitionVersionWithResponse call
-func ParseGetResourceDefinitionVersionResponse(rsp *http.Response) (*GetResourceDefinitionVersionResponse, error) {
- bodyBytes, err := io.ReadAll(rsp.Body)
- defer func() { _ = rsp.Body.Close() }()
- if err != nil {
- return nil, err
- }
-
- response := &GetResourceDefinitionVersionResponse{
- Body: bodyBytes,
- HTTPResponse: rsp,
- }
-
- switch {
- case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
- var dest ResourceDefinitionVersion
- if err := json.Unmarshal(bodyBytes, &dest); err != nil {
- return nil, err
- }
- response.JSON200 = &dest
-
- case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
- var dest HumanitecErrorResponse
- if err := json.Unmarshal(bodyBytes, &dest); err != nil {
- return nil, err
- }
- response.JSON404 = &dest
-
- }
-
- return response, nil
-}
-
// ParseDeleteResourceDefinitionResponse parses an HTTP response from a DeleteResourceDefinitionWithResponse call
func ParseDeleteResourceDefinitionResponse(rsp *http.Response) (*DeleteResourceDefinitionResponse, error) {
bodyBytes, err := io.ReadAll(rsp.Body)
@@ -34402,6 +34429,39 @@ func ParseListResourceDefinitionVersionsResponse(rsp *http.Response) (*ListResou
return response, nil
}
+// ParseGetResourceDefinitionVersionResponse parses an HTTP response from a GetResourceDefinitionVersionWithResponse call
+func ParseGetResourceDefinitionVersionResponse(rsp *http.Response) (*GetResourceDefinitionVersionResponse, error) {
+ bodyBytes, err := io.ReadAll(rsp.Body)
+ defer func() { _ = rsp.Body.Close() }()
+ if err != nil {
+ return nil, err
+ }
+
+ response := &GetResourceDefinitionVersionResponse{
+ Body: bodyBytes,
+ HTTPResponse: rsp,
+ }
+
+ switch {
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
+ var dest ResourceDefinitionVersion
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON200 = &dest
+
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
+ var dest HumanitecErrorResponse
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON404 = &dest
+
+ }
+
+ return response, nil
+}
+
// ParseListResourceDriversResponse parses an HTTP response from a ListResourceDriversWithResponse call
func ParseListResourceDriversResponse(rsp *http.Response) (*ListResourceDriversResponse, error) {
bodyBytes, err := io.ReadAll(rsp.Body)
diff --git a/docs/openapi.json b/docs/openapi.json
index b5961b3..55eec87 100644
--- a/docs/openapi.json
+++ b/docs/openapi.json
@@ -2,7 +2,7 @@
"openapi": "3.0.0",
"info": {
"title": "Humanitec API",
- "version": "0.25.15",
+ "version": "0.26.1",
"description": "# Introduction\nThe *Humanitec API* allows you to automate and integrate Humanitec into your developer and operational workflows.\nThe API is a REST based API. It is based around a set of concepts:\n\n* Core\n* External Resources\n* Sets and Deltas\n\n## Authentication\n\nAlmost all requests made to the Humanitec API require Authentication. See our [Developer Docs on API Authentication](https://developer.humanitec.com/platform-orchestrator/reference/api-references/#authentication) for instructions.\n\n## Content Types\nAll of the Humanitec API unless explicitly only accepts content types of `application/json` and will always return valid `application/json` or an empty response.\n\n## Response Codes\n### Success\nAny response code in the `2xx` range should be regarded as success.\n\n| **Code** | **Meaning** |\n| --- | --- |\n| `200` | Success |\n| `201` | Success (In future, `201` will be replaced by `200`) |\n| `204` | Success, but no content in response |\n\n_Note: We plan to simplify the interface by replacing 201 with 200 status codes._\n\n### Failure\nAny response code in the `4xx` should be regarded as an error which can be rectified by the client. `5xx` error codes indicate errors that cannot be corrected by the client.\n\n| **Code** | **Meaning** |\n| --- | --- |\n| `400` | General error. (Body will contain details) |\n| `401` | Attempt to access protected resource without `Authorization` Header. |\n| `403` | The `Bearer` or `JWT` does not grant access to the requested resource. |\n| `404` | Resource not found. |\n| `405` | Method not allowed |\n| `409` | Conflict. Usually indicated a resource with that ID already exists. |\n| `422` | Unprocessable Entity. The body was not valid JSON, was empty or contained an object different from what was expected. |\n| `429` | Too many requests - request rate limit has been reached. |\n| `500` | Internal Error. If it occurs repeatedly, contact support. |\n",
"contact": {
"name": "API Support",
@@ -6904,7 +6904,7 @@
],
"summary": "List Resource Definitions.",
"operationId": "listResourceDefinitions",
- "description": "Filter criteria can be applied to obtain all the resource definitions that could match the filters, grouped by type and sorted by matching rank.",
+ "description": "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.",
"parameters": [
{
"name": "orgId",
@@ -6962,6 +6962,15 @@
"schema": {
"type": "string"
}
+ },
+ {
+ "name": "deleted",
+ "in": "query",
+ "description": "If returns also resource definitions which has been deleted.",
+ "schema": {
+ "type": "boolean",
+ "default": false
+ }
}
],
"responses": {
@@ -7069,7 +7078,8 @@
"public",
"ResourceDefinition"
],
- "summary": "Get a specific Resource Definition.",
+ "summary": "Get a Resource Definition.",
+ "description": "If the resource is marked as deleted it is not shown in the response, unless specified via `deleted` query parameter.",
"operationId": "getResourceDefinition",
"parameters": [
{
@@ -7089,6 +7099,15 @@
"schema": {
"type": "string"
}
+ },
+ {
+ "name": "deleted",
+ "in": "query",
+ "description": "If returns the resource definition even if it has been deleted.",
+ "schema": {
+ "type": "boolean",
+ "default": false
+ }
}
],
"responses": {
@@ -7152,7 +7171,7 @@
}
],
"requestBody": {
- "description": "The Resource Definition record details.\n\nThe PUT operation updates a resource definition using the provided payload. An empty driver_account or driver_inputs property will unset the existing values.\n\nCurrently the resource and driver types can't be changed.",
+ "description": "The Resource Definition record details.\n\nThe PUT operation updates a resource definition using the provided payload. An empty driver_account or driver_inputs property will unset the existing values.\n\nIf driver_type changes and an Active Resource which uses this Resource Definition exists, the resource provisioned with the previous used driver_type will be deleted.\nAs driver_type can't be empty, an empty driver_type means existing value will be used.\n\nCurrently the resource can't be changed.",
"required": true,
"content": {
"application/json": {
@@ -7212,7 +7231,7 @@
],
"summary": "Delete a Resource Definition.",
"operationId": "deleteResourceDefinition",
- "description": "If there **are no** Active Resources provisioned via the current definition, the Resource Definition is deleted immediately.\n\nIf there **are** Active Resources provisioned via the current definition, the request fails. The response will describe the changes to the affected Active Resources if operation is forced.\n\nThe request can take an optional `force` query parameter. If set to `true`, the current Resource Definition is **marked as** pending deletion and will be deleted (purged) as soon as no existing Active Resources reference it. With the next deployment matching criteria for Resources will be re-evaluated, and current Active Resources for the target environment would be either linked to another matching Resource Definition or decommissioned and created using the new or default Resource Definition (when available).\n\nThe Resource Definition that has been marked for deletion cannot be used to provision new resources.",
+ "description": "If there **are no** Active Resources provisioned via the current definition, the Resource Definition is deleted immediately.\n\nIf there **are** Active Resources provisioned via the current definition, the request fails. The response will describe the changes to the affected Active Resources if operation is forced.\n\nThe request can take an optional `force` query parameter. If set to `true`, the current Resource Definition is deleted immediately even if there are Active Resources linked to it. \nThe Resource Definition that has been marked for deletion cannot be used to provision new resources.\n\nWith the next deployment, matching criteria for Resources will be re-evaluated, and current Active Resources for the target environment would be either linked to another matching Resource Definition or decommissioned and created using the new or default Resource Definition (when available).",
"parameters": [
{
"name": "orgId",
@@ -7243,7 +7262,7 @@
],
"responses": {
"204": {
- "description": "Resource Definition has been marked for deletion.\n\n"
+ "description": "Resource Definition has been marked as deleted.\n\n"
},
"404": {
"description": "A Resource Driver with the 'driverId' ID is not found or is not accessible by the organization.\n\n",
@@ -7308,7 +7327,7 @@
}
],
"requestBody": {
- "description": "The Resource Definition record details.\n\nThe PATCH operation would change the value of the property if it is included in the request payload JSON, and not `null`. Missing and `null` properties are ignored.\n\nFor the map properties, such as PatchResourceDefinitionRequest.DriverInputs, the merge operation is applied.\n\nMerge rules are as follows:\n\n- If a map property has a value, it is replaced (or added).\n\n- If a map property is set to `null`, it is removed.\n\n- If a map property is not included (missing in JSON), it remains unchanged.",
+ "description": "The Resource Definition record details.\n\nThe PATCH operation would change the value of the property if it is included in the request payload JSON, and not `null`. Missing and `null` properties are ignored.\n\nFor the map properties, such as PatchResourceDefinitionRequest.DriverInputs, the merge operation is applied.\n\nMerge rules are as follows:\n\n- If a map property has a value, it is replaced (or added).\n\n- If a map property is set to `null`, it is removed.\n\n- If a map property is not included (missing in JSON), it remains unchanged.\n\nIf driver_type changes and an Active Resource which uses this Resource Definition exists, the resource provisioned with the previous used driver_type will be deleted.",
"required": true,
"content": {
"application/json": {
@@ -7368,7 +7387,8 @@
"public",
"ResourceDefinitionVersion"
],
- "summary": "Get Resource Definition Versions of a specific Resource Definition. First 50 Versions are kept along with all the Versions referenced by an Active Resource.\nTo obtain Versions of a deleted Resource Definition, the `deleted` parameter needs to be used.\n",
+ "summary": "Get Versions of a Resource Definition.",
+ "description": "First 50 Versions are kept along with all the Versions referenced by an Active Resource.\n\n To obtain Versions of a deleted Resource Definition, the `deleted` parameter needs to be used.",
"operationId": "listResourceDefinitionVersions",
"parameters": [
{
@@ -7432,18 +7452,21 @@
}
}
},
- "/orgs/{orgId}/resources/defs/versions/{defVersionId}": {
+ "/orgs/{orgId}/resources/defs/{defId}/versions/{defVersionId}": {
"get": {
"tags": [
"public",
"ResourceDefinitionVersion"
],
- "summary": "Get a Specific Resource Definition Version.",
+ "summary": "Get a Resource Definition Version.",
"operationId": "getResourceDefinitionVersion",
"parameters": [
{
"$ref": "#/components/parameters/orgIdPathParam"
},
+ {
+ "$ref": "#/components/parameters/defIdPathParam"
+ },
{
"$ref": "#/components/parameters/defVersionIdPathParam"
}
@@ -16927,6 +16950,7 @@
"description": "PatchResourceDefinitionRequest describes a ResourceDefinition change request.",
"example": {
"driver_account": "gcp-dev-cloudsql",
+ "driver_type": "humanitec/terraform",
"driver_inputs": {
"secret_refs": {
"dbcredentials": {
@@ -16962,6 +16986,10 @@
"$ref": "#/components/schemas/ValuesSecretsRefsRequest",
"description": "(Optional) Additional input data to be passed to the driver."
},
+ "driver_type": {
+ "description": "The driver to be used to create the resource.",
+ "type": "string"
+ },
"name": {
"description": "(Optional) Resource display name",
"nullable": true,
@@ -17720,6 +17748,7 @@
"UpdateResourceDefinitionRequestRequest": {
"description": "UpdateResourceDefinitionRequest describes a ResourceDefinition change request.",
"example": {
+ "driver_type": "humanitec/terraform",
"driver_account": "gcp-dev-cloudsql",
"driver_inputs": {
"secret_refs": {
@@ -17747,6 +17776,10 @@
}
},
"properties": {
+ "driver_type": {
+ "description": "The driver to be used to create the resource.",
+ "type": "string"
+ },
"driver_account": {
"description": "(Optional) Security account required by the driver.",
"nullable": true,
@@ -19695,9 +19728,11 @@
"DriverDefinition",
"MatchingCriteria",
"ResourceDefinition",
+ "ResourceDefinitionVersion",
"ResourceProvision",
"ResourceAccount",
- "ResourceType"
+ "ResourceType",
+ "ResourceClass"
]
},
{
@@ -19750,6 +19785,11 @@
"x-displayName": "Definitions",
"description": "A Resource Definitions describes how and when a resource should be provisioned. It links a driver (the how) along with a Matching Criteria (the when) to a Resource Type. This allows Humanitec to invoke a particular driver for the required Resource Type in the context of a particular Application and Environment.\n\nThe schema for the `driver_inputs` is defined by the `input_schema` property on the DriverDefinition identified by the `driver_type` property.\n\n"
},
+ {
+ "name": "ResourceDefinitionVersion",
+ "x-displayName": "Definition Versions",
+ "description": "A Resource Definition Version represents a version of a Resource Definition.\n\n"
+ },
{
"name": "ResourceProvision",
"x-displayName": "Resources Dependency",