Open JSON schema file
{
"type": "file",
"inputProperties": {
"path": "pubkey.txt",
"content": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQD"
},
"isStateful": false
}
{
"outputProperties": {
"id": "vm-12w94ty8",
"interfaces": {
"eth0": {
"ipv4": "198.51.100.11"
}
}
}
}
Raw JSON schema
Title: NixOps4 Resource Protocol Schema
| |
| Type | combining |
| Required | No |
| Additional properties | Any type allowed |
Description: This schema describes the protocol between NixOps4 and a resource provider. See doc/developing-resources.md for more information.
1. Property Request
| |
| Type | combining |
| Required | No |
| Additional properties | Any type allowed |
| Defined in | #/definitions/Request |
1.1. Property CreateResourceRequest
Title: CreateResourceRequest
| |
| Type | object |
| Required | No |
| Additional properties | Any type allowed |
1.1.1. Property createResourceRequest
| |
| Type | object |
| Required | Yes |
| Additional properties | Not allowed |
| Defined in | #/definitions/CreateResourceRequest |
| Property | Type | Pattern | Title/Description |
| + type | string | No | Provider-defined resource type |
| + inputProperties | object | No | Input properties |
| + isStateful | boolean | No | Stateful resource |
1.1.1.1. Property type
Title: Provider-defined resource type
| |
| Type | string |
| Required | Yes |
| Defined in | #/definitions/resourceType |
Description: The type of the resource to create. The resource provider uses this to distinguish between different types of resources that it manages. Furthermore, the type will be shown to the user. The resource type is chosen by the deployment expression, but must be one of the types that the resource provider supports. The resource provider must not proceed if the type is not supported.
Title: Input properties
| |
| Type | object |
| Required | Yes |
| Additional properties | Any type allowed |
| Defined in | #/definitions/inputProperties |
Description: Arbitrary fields that make up the input properties. The set of valid fields is determined by the resource provider implementation. If any unrecognized fields are present, the resource provider must not proceed and return an error.
| Property | Type | Pattern | Title/Description |
| - | object | No | - |
1.1.1.3. Property isStateful
Title: Stateful resource
Description: Whether the resource is declared to be stateful. If false, the response will not be persisted. If persistence is required, an error must be raised by the resource provider.
1.2. Property UpdateResourceRequest
Title: UpdateResourceRequest
| |
| Type | object |
| Required | No |
| Additional properties | Any type allowed |
1.2.1. Property updateResourceRequest
| |
| Type | object |
| Required | Yes |
| Additional properties | Not allowed |
| Defined in | #/definitions/UpdateResourceRequest |
1.2.1.1. Property resource
| |
| Type | object |
| Required | Yes |
| Additional properties | Not allowed |
| Defined in | #/definitions/ExtantResource |
####### 1.2.1.1.1. Property type
Title: Provider-defined resource type
| |
| Type | string |
| Required | Yes |
| Same definition as | type |
Description: The type of the resource to create. The resource provider uses this to distinguish between different types of resources that it manages. Furthermore, the type will be shown to the user. The resource type is chosen by the deployment expression, but must be one of the types that the resource provider supports. The resource provider must not proceed if the type is not supported.
####### 1.2.1.1.2. Property inputProperties
Title: Input properties
| |
| Type | object |
| Required | Yes |
| Additional properties | Any type allowed |
| Same definition as | inputProperties |
Description: Arbitrary fields that make up the input properties. The set of valid fields is determined by the resource provider implementation. If any unrecognized fields are present, the resource provider must not proceed and return an error.
####### 1.2.1.1.3. Property outputProperties
Title: Output properties
| |
| Type | object |
| Required | No |
| Additional properties | Any type allowed |
| Defined in | #/definitions/outputProperties |
Description: Arbitrary fields that make up the output properties. The set of fields is determined by the resource provider implementation. Unknown fields will be ignored by the Nix expressions.
| Property | Type | Pattern | Title/Description |
| - | object | No | - |
Title: Input properties
| |
| Type | object |
| Required | Yes |
| Additional properties | Any type allowed |
| Same definition as | inputProperties |
Description: Arbitrary fields that make up the input properties. The set of valid fields is determined by the resource provider implementation. If any unrecognized fields are present, the resource provider must not proceed and return an error.
1.3. Property StateResourceEvent
Title: StateResourceEvent
| |
| Type | object |
| Required | No |
| Additional properties | Any type allowed |
Description:
Only implemented by state provider resources
1.3.1. Property stateResourceEvent
| |
| Type | object |
| Required | Yes |
| Additional properties | Not allowed |
| Defined in | #/definitions/StateResourceEvent |
| Property | Type | Pattern | Title/Description |
| + resource | object | No | - |
| + event | string | No | The operation that produced this change. |
| + nixopsVersion | string | No | The version of NixOps that produced this event. |
| + patch | array | No | JSON Patch |
1.3.1.1. Property resource
| |
| Type | object |
| Required | Yes |
| Additional properties | Not allowed |
| Same definition as | resource |
1.3.1.2. Property event
Description: The operation that produced this change.
1.3.1.3. Property nixopsVersion
Description: The version of NixOps that produced this event.
1.3.1.4. Property patch
Title: JSON Patch
| |
| Type | array |
| Required | Yes |
| Defined in | #/definitions/Patch |
Description: JSON Patch operations to apply to the state.
| Array restrictions |
| Min items | N/A |
| Max items | N/A |
| Items unicity | False |
| Additional items | False |
| Tuple validation | See below |
| Each item of this array must be | Description |
| patch items | - |
####### 1.3.1.4.1. patch items
| |
| Type | combining |
| Required | No |
| Additional properties | Any type allowed |
####### 1.3.1.4.1.1. Property item 0
| |
| Type | object |
| Required | No |
| Additional properties | Not allowed |
| Property | Type | Pattern | Title/Description |
| + path | string | No | A JSON Pointer path. |
| + op | enum (of string) | No | The operation to perform. |
| + value | object | No | The value to add, replace or test. |
####### 1.3.1.4.1.1.1. Property path
| |
| Type | string |
| Required | Yes |
| Defined in | #/definitions/path |
Description: A JSON Pointer path.
| Restrictions | |
| Must match regular expression | ^#?(|(/([^/~]|~[01])*)*)$ Test |
####### 1.3.1.4.1.1.2. Property op
| |
| Type | enum (of string) |
| Required | Yes |
Description: The operation to perform.
Must be one of:
####### 1.3.1.4.1.1.3. Property value
| |
| Type | object |
| Required | Yes |
| Additional properties | Any type allowed |
Description: The value to add, replace or test.
####### 1.3.1.4.1.2. Property item 1
| |
| Type | object |
| Required | No |
| Additional properties | Not allowed |
| Property | Type | Pattern | Title/Description |
| + path | string | No | A JSON Pointer path. |
| + op | enum (of string) | No | The operation to perform. |
####### 1.3.1.4.1.2.1. Property path
| |
| Type | string |
| Required | Yes |
| Same definition as | path |
Description: A JSON Pointer path.
####### 1.3.1.4.1.2.2. Property op
| |
| Type | enum (of string) |
| Required | Yes |
Description: The operation to perform.
Must be one of:
####### 1.3.1.4.1.3. Property item 2
| |
| Type | object |
| Required | No |
| Additional properties | Not allowed |
| Property | Type | Pattern | Title/Description |
| + path | string | No | A JSON Pointer path. |
| + op | enum (of string) | No | The operation to perform. |
| + from | string | No | A JSON Pointer path pointing to the location to move/copy from. |
####### 1.3.1.4.1.3.1. Property path
| |
| Type | string |
| Required | Yes |
| Same definition as | path |
Description: A JSON Pointer path.
####### 1.3.1.4.1.3.2. Property op
| |
| Type | enum (of string) |
| Required | Yes |
Description: The operation to perform.
Must be one of:
####### 1.3.1.4.1.3.3. Property from
| |
| Type | string |
| Required | Yes |
| Defined in | #/definitions/path |
Description: A JSON Pointer path pointing to the location to move/copy from.
| Restrictions | |
| Must match regular expression | ^#?(|(/([^/~]|~[01])*)*)$ Test |
1.4. Property StateResourceReadRequest
Title: StateResourceReadRequest
| |
| Type | object |
| Required | No |
| Additional properties | Any type allowed |
Description:
Only implemented by state provider resources
1.4.1. Property stateResourceReadRequest
| |
| Type | object |
| Required | Yes |
| Additional properties | Not allowed |
| Defined in | #/definitions/StateResourceReadRequest |
| Property | Type | Pattern | Title/Description |
| + resource | object | No | - |
1.4.1.1. Property resource
| |
| Type | object |
| Required | Yes |
| Additional properties | Not allowed |
| Same definition as | resource |
2. Property Response
| |
| Type | combining |
| Required | No |
| Additional properties | Any type allowed |
| Defined in | #/definitions/Response |
2.1. Property CreateResourceResponse
Title: CreateResourceResponse
| |
| Type | object |
| Required | No |
| Additional properties | Any type allowed |
2.1.1. Property createResourceResponse
| |
| Type | object |
| Required | Yes |
| Additional properties | Not allowed |
| Defined in | #/definitions/CreateResourceResponse |
| Property | Type | Pattern | Title/Description |
| + outputProperties | object | No | Output properties |
2.1.1.1. Property outputProperties
Title: Output properties
| |
| Type | object |
| Required | Yes |
| Additional properties | Any type allowed |
| Same definition as | outputProperties |
Description: The properties of the created resource. The resource provider may return additional properties that are not defined in the resource type schema. It is not recommended to return verbatim inputProperties here, because that invites a dependency on the provider for information that is already known, deteriorating the user experience; concurrency, completeness of plan, unnecessary strictness, etc.
2.2. Property UpdateResourceResponse
Title: UpdateResourceResponse
| |
| Type | object |
| Required | No |
| Additional properties | Any type allowed |
2.2.1. Property updateResourceResponse
| |
| Type | object |
| Required | Yes |
| Additional properties | Not allowed |
| Defined in | #/definitions/UpdateResourceResponse |
| Property | Type | Pattern | Title/Description |
| + outputProperties | object | No | Output properties |
2.2.1.1. Property outputProperties
Title: Output properties
| |
| Type | object |
| Required | Yes |
| Additional properties | Any type allowed |
| Same definition as | outputProperties |
Description: Arbitrary fields that make up the output properties. The set of fields is determined by the resource provider implementation. Unknown fields will be ignored by the Nix expressions.
2.3. Property StateResourceEventResponse
Title: StateResourceEventResponse
| |
| Type | object |
| Required | No |
| Additional properties | Any type allowed |
Description:
Only implemented by state provider resources
2.3.1. Property stateResourceEventResponse
| |
| Type | object |
| Required | Yes |
| Additional properties | Any type allowed |
| Defined in | #/definitions/StateResourceEventResponse |
2.4. Property StateResourceReadResponse
Title: StateResourceReadResponse
| |
| Type | object |
| Required | No |
| Additional properties | Any type allowed |
Description:
Only implemented by state provider resources
2.4.1. Property stateResourceReadResponse
| |
| Type | object |
| Required | Yes |
| Additional properties | Not allowed |
| Defined in | #/definitions/StateResourceReadResponse |
| Property | Type | Pattern | Title/Description |
| + state | object | No | State |
2.4.1.1. Property state
Title: State
| |
| Type | object |
| Required | Yes |
| Additional properties | Any type allowed |
Description: The state of all the managed resources. This method is only implemented by resources that function as a state storage.
| Property | Type | Pattern | Title/Description |
| - | object | No | - |
2.5. Property ErrorResponse
Title: ErrorResponse
| |
| Type | object |
| Required | No |
| Additional properties | Any type allowed |
| Property | Type | Pattern | Title/Description |
| + errorResponse | object | No | An error response from the resource provider, indicating that the requested operation failed. |
2.5.1. Property errorResponse
| |
| Type | object |
| Required | Yes |
| Additional properties | Not allowed |
| Defined in | #/definitions/ErrorResponse |
Description: An error response from the resource provider, indicating that the requested operation failed.
| Property | Type | Pattern | Title/Description |
| + message | string | No | A human-readable error message describing what went wrong. |
2.5.1.1. Property message
Description: A human-readable error message describing what went wrong.