Raw JSON schema

Open JSON schema file

Examples

CreateResourceRequest

{
  "type": "file",
  "inputProperties": {
    "path": "pubkey.txt",
    "content": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQD"
  }
}

CreateResourceResponse

{
  "outputProperties": {
    "id": "vm-12w94ty8",
    "interfaces": {
      "eth0": {
        "ipv4": "198.51.100.11"
      }
    }
  }
}

NixOps4 Resource Protocol Schema

Raw JSON schema

Title: NixOps4 Resource Protocol Schema

Typecombining
RequiredNo
Additional propertiesAny type allowed

Description: This schema describes the protocol between NixOps4 and a resource provider. See doc/developing-resources.md for more information.

1. Property CreateResourceRequest

Typeobject
RequiredNo
Additional propertiesNot allowed
Defined in#/definitions/CreateResourceRequest
PropertyTypePatternTitle/Description
+ typestringNoProvider-defined resource type
+ inputPropertiesobjectNoInput properties

1.1. Property type

Title: Provider-defined resource type

Typestring
RequiredYes

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.

1.2. Property inputProperties

Title: Input properties

Typeobject
RequiredYes
Additional propertiesAny type allowed

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.

PropertyTypePatternTitle/Description
-objectNo-

2. Property CreateResourceResponse

Typeobject
RequiredNo
Additional propertiesNot allowed
Defined in#/definitions/CreateResourceResponse
PropertyTypePatternTitle/Description
+ outputPropertiesobjectNoOutput properties

2.1. Property outputProperties

Title: Output properties

Typeobject
RequiredYes
Additional propertiesAny type allowed

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.

PropertyTypePatternTitle/Description
-objectNo-