airflow_balancer.config.Host

pydantic model airflow_balancer.config.Host[source]

Bases: BaseModel

Show JSON schema
{
   "title": "Host",
   "type": "object",
   "properties": {
      "name": {
         "title": "Name",
         "type": "string"
      },
      "username": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Username"
      },
      "password": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "$ref": "#/$defs/Variable"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Password"
      },
      "key_file": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Key File"
      },
      "os": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Os"
      },
      "pool": {
         "anyOf": [
            {
               "$ref": "#/$defs/Pool"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "size": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Size"
      },
      "queues": {
         "items": {
            "type": "string"
         },
         "title": "Queues",
         "type": "array"
      },
      "tags": {
         "items": {
            "type": "string"
         },
         "title": "Tags",
         "type": "array"
      }
   },
   "$defs": {
      "Pool": {
         "properties": {
            "pool": {
               "description": "Pool name",
               "title": "Pool",
               "type": "string"
            },
            "slots": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Number of slots in the pool",
               "title": "Slots"
            },
            "description": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": "",
               "description": "Pool description",
               "title": "Description"
            },
            "include_deferred": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": false,
               "description": "Whether to include deferred tasks in the pool",
               "title": "Include Deferred"
            }
         },
         "required": [
            "pool"
         ],
         "title": "Pool",
         "type": "object"
      },
      "Variable": {
         "properties": {
            "key": {
               "description": "Variable key",
               "title": "Key",
               "type": "string"
            },
            "_val": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": "",
               "description": "Variable value",
               "title": "Val"
            },
            "description": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": "",
               "description": "Variable description",
               "title": "Description"
            },
            "is_encrypted": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": false,
               "description": "Whether the variable is encrypted",
               "title": "Is Encrypted"
            },
            "deserialize_json": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": false,
               "description": "Whether to deserialize JSON",
               "title": "Deserialize Json"
            }
         },
         "required": [
            "key"
         ],
         "title": "Variable",
         "type": "object"
      }
   },
   "required": [
      "name"
   ]
}

Fields:
  • key_file (str | None)

  • name (str)

  • os (str | None)

  • password (str | airflow_pydantic.utils.variable.Variable | None)

  • pool (airflow_pydantic.utils.pool.Pool | None)

  • queues (List[str])

  • size (int | None)

  • tags (List[str])

  • username (str | None)

field name: str [Required]
field username: str | None = None
field password: str | Variable | None = None
field key_file: str | None = None
field os: str | None = None
field pool: Pool | None = None
field size: int | None = None
field queues: List[str] [Optional]
field tags: List[str] [Optional]
override(**kwargs) Host[source]
hook(username: str = None, use_local: bool = True, **hook_kwargs) SSHHook[source]