Sign in Start for free

Machine Policies

Get a paginated list of the Machine Policies in the supplied Octopus Deploy Space. The results will be sorted alphabetically by name

GET /api/{spaceId}/machinepolicies

Also reachable at /api/machinepolicies, /api/spaces/{spaceIdentifier}/machinepolicies.

Path Parameters

  • spaceId string (required)
    The ID of the space containing the resource(s).

Query Parameters

  • ids array of string
    Specific machine policy IDs to filter out.
  • partialName string
    A partial machine policy name used for a sub-string search.
  • skip integer
    Number of items to skip. Defaults to zero. Minimum 0.
  • take integer
    Number of items to take. Defaults to 30. Minimum 0.

Response

200 — A paginated list of the Machine Policies in the supplied Octopus Deploy Space (sorted alphabetically by name).

  • Id string
    Gets or sets a unique identifier for this resource.
  • ItemType string
  • Items array of object
    • ConnectionConnectTimeout string
      Format date-span.
    • ConnectionRetryCountLimit integer
    • ConnectionRetrySleepInterval string
      Format date-span.
    • ConnectionRetryTimeLimit string
      Format date-span.
    • Description string
    • Id string
      Gets or sets a unique identifier for this resource.
    • IsDefault boolean
    • LastModifiedBy string
      Gets or sets the username of the user who last modified this resource.
    • LastModifiedOn string
      Gets or sets the date/time that this resource was last modified. Format date-time.
    • Links object
      Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.
    • MachineCleanupPolicy object
    • MachineConnectivityPolicy object
    • MachineHealthCheckPolicy object
    • MachinePackageCacheRetentionPolicy object
    • MachineRpcCallRetryPolicy object
    • MachineUpdatePolicy object
    • Name string
    • PollingRequestQueueTimeout string
      Format date-span.
    • SpaceId string
  • ItemsPerPage integer
  • LastModifiedBy string
    Gets or sets the username of the user who last modified this resource.
  • LastModifiedOn string
    Gets or sets the date/time that this resource was last modified. Format date-time.
  • LastPageNumber integer
  • Links object
    Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.
  • NumberOfPages integer
  • TotalResults integer

Example Response

JSON
{
  "Id": "string",
  "ItemType": "string",
  "Items": [
    {
      "ConnectionConnectTimeout": "string",
      "ConnectionRetryCountLimit": 0,
      "ConnectionRetrySleepInterval": "string",
      "ConnectionRetryTimeLimit": "string",
      "Description": "string",
      "Id": "string",
      "IsDefault": true,
      "LastModifiedBy": "string",
      "LastModifiedOn": "2020-01-01T00:00:00.000Z",
      "Links": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "MachineCleanupPolicy": {
        "DeleteMachinesBehavior": "DoNotDelete",
        "DeleteMachinesElapsedTimeSpan": "string"
      },
      "MachineConnectivityPolicy": {
        "MachineConnectivityBehavior": "ExpectedToBeOnline"
      },
      "MachineHealthCheckPolicy": {
        "BashHealthCheckPolicy": {},
        "HealthCheckCron": "string",
        "HealthCheckCronTimezone": "string",
        "HealthCheckInterval": "string",
        "HealthCheckType": "RunScript",
        "PowerShellHealthCheckPolicy": {}
      },
      "MachinePackageCacheRetentionPolicy": {
        "PackageUnit": "Items",
        "QuantityOfPackagesToKeep": 0,
        "QuantityOfVersionsToKeep": 0,
        "Strategy": "Default",
        "VersionUnit": "Items"
      },
      "MachineRpcCallRetryPolicy": {
        "Enabled": true,
        "HealthCheckRetryDuration": "string",
        "RetryDuration": "string"
      },
      "MachineUpdatePolicy": {
        "CalamariUpdateBehavior": "UpdateOnDeployment",
        "KubernetesAgentUpdateBehavior": "NeverUpdate",
        "TentacleUpdateAccountId": "string",
        "TentacleUpdateBehavior": "NeverUpdate"
      },
      "Name": "string",
      "PollingRequestQueueTimeout": "string",
      "SpaceId": "string"
    }
  ],
  "ItemsPerPage": 0,
  "LastModifiedBy": "string",
  "LastModifiedOn": "2020-01-01T00:00:00.000Z",
  "LastPageNumber": 0,
  "Links": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  },
  "NumberOfPages": 0,
  "TotalResults": 0
}

Create a new Machine Policy

POST /api/{spaceId}/machinepolicies

Also reachable at /api/machinepolicies, /api/spaces/{spaceIdentifier}/machinepolicies.

Path Parameters

  • spaceId string (required)

Request Body

  • ConnectionConnectTimeout string
    Format date-span.
  • ConnectionRetryCountLimit integer
  • ConnectionRetrySleepInterval string
    Format date-span.
  • ConnectionRetryTimeLimit string
    Format date-span.
  • Description string
  • IsDefault boolean
  • MachineCleanupPolicy object
    • DeleteMachinesBehavior enum
      Allowed values: DoNotDelete, DeleteUnavailableMachines.
    • DeleteMachinesElapsedTimeSpan string
      Format date-span.
  • MachineConnectivityPolicy object
    • MachineConnectivityBehavior enum
      Allowed values: ExpectedToBeOnline, MayBeOfflineAndCanBeSkipped.
  • MachineHealthCheckPolicy object
    • BashHealthCheckPolicy object
    • HealthCheckCron string
    • HealthCheckCronTimezone string
    • HealthCheckInterval string
      Format date-span.
    • HealthCheckType enum
      Allowed values: RunScript, OnlyConnectivity.
    • PowerShellHealthCheckPolicy object
  • MachinePackageCacheRetentionPolicy object
    • PackageUnit enum
      Allowed values: Items.
    • QuantityOfPackagesToKeep integer
    • QuantityOfVersionsToKeep integer
    • Strategy enum
      Allowed values: Default, Quantities.
    • VersionUnit enum
      Allowed values: Items.
  • MachineRpcCallRetryPolicy object
    • Enabled boolean
    • HealthCheckRetryDuration string
      Format date-span.
    • RetryDuration string
      Format date-span.
  • MachineUpdatePolicy object
    • CalamariUpdateBehavior enum
      Allowed values: UpdateOnDeployment, UpdateOnNewMachine, UpdateAlways.
    • KubernetesAgentUpdateBehavior enum
      Allowed values: NeverUpdate, Update, Block.
    • TentacleUpdateAccountId string
    • TentacleUpdateBehavior enum
      Allowed values: NeverUpdate, Update.
  • Name string (required)
    Minimum length 1.
  • PollingRequestQueueTimeout string
    Format date-span.
  • SpaceId string (required)

Response

201 — Created

  • ConnectionConnectTimeout string
    Format date-span.
  • ConnectionRetryCountLimit integer
  • ConnectionRetrySleepInterval string
    Format date-span.
  • ConnectionRetryTimeLimit string
    Format date-span.
  • Description string
  • Id string
    Gets or sets a unique identifier for this resource.
  • IsDefault boolean
  • LastModifiedBy string
    Gets or sets the username of the user who last modified this resource.
  • LastModifiedOn string
    Gets or sets the date/time that this resource was last modified. Format date-time.
  • Links object
    Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.
  • MachineCleanupPolicy object
    • DeleteMachinesBehavior enum
      Allowed values: DoNotDelete, DeleteUnavailableMachines.
    • DeleteMachinesElapsedTimeSpan string
      Format date-span.
  • MachineConnectivityPolicy object
    • MachineConnectivityBehavior enum
      Allowed values: ExpectedToBeOnline, MayBeOfflineAndCanBeSkipped.
  • MachineHealthCheckPolicy object
    • BashHealthCheckPolicy object
    • HealthCheckCron string
    • HealthCheckCronTimezone string
    • HealthCheckInterval string
      Format date-span.
    • HealthCheckType enum
      Allowed values: RunScript, OnlyConnectivity.
    • PowerShellHealthCheckPolicy object
  • MachinePackageCacheRetentionPolicy object
    • PackageUnit enum
      Allowed values: Items.
    • QuantityOfPackagesToKeep integer
    • QuantityOfVersionsToKeep integer
    • Strategy enum
      Allowed values: Default, Quantities.
    • VersionUnit enum
      Allowed values: Items.
  • MachineRpcCallRetryPolicy object
    • Enabled boolean
    • HealthCheckRetryDuration string
      Format date-span.
    • RetryDuration string
      Format date-span.
  • MachineUpdatePolicy object
    • CalamariUpdateBehavior enum
      Allowed values: UpdateOnDeployment, UpdateOnNewMachine, UpdateAlways.
    • KubernetesAgentUpdateBehavior enum
      Allowed values: NeverUpdate, Update, Block.
    • TentacleUpdateAccountId string
    • TentacleUpdateBehavior enum
      Allowed values: NeverUpdate, Update.
  • Name string
  • PollingRequestQueueTimeout string
    Format date-span.
  • SpaceId string

Example Request

JSON
{
  "ConnectionConnectTimeout": "string",
  "ConnectionRetryCountLimit": 0,
  "ConnectionRetrySleepInterval": "string",
  "ConnectionRetryTimeLimit": "string",
  "Description": "string",
  "IsDefault": true,
  "MachineCleanupPolicy": {
    "DeleteMachinesBehavior": "DoNotDelete",
    "DeleteMachinesElapsedTimeSpan": "string"
  },
  "MachineConnectivityPolicy": {
    "MachineConnectivityBehavior": "ExpectedToBeOnline"
  },
  "MachineHealthCheckPolicy": {
    "BashHealthCheckPolicy": {
      "RunType": "InheritFromDefault",
      "ScriptBody": "string"
    },
    "HealthCheckCron": "string",
    "HealthCheckCronTimezone": "string",
    "HealthCheckInterval": "string",
    "HealthCheckType": "RunScript",
    "PowerShellHealthCheckPolicy": {
      "RunType": "InheritFromDefault",
      "ScriptBody": "string"
    }
  },
  "MachinePackageCacheRetentionPolicy": {
    "PackageUnit": "Items",
    "QuantityOfPackagesToKeep": 0,
    "QuantityOfVersionsToKeep": 0,
    "Strategy": "Default",
    "VersionUnit": "Items"
  },
  "MachineRpcCallRetryPolicy": {
    "Enabled": true,
    "HealthCheckRetryDuration": "string",
    "RetryDuration": "string"
  },
  "MachineUpdatePolicy": {
    "CalamariUpdateBehavior": "UpdateOnDeployment",
    "KubernetesAgentUpdateBehavior": "NeverUpdate",
    "TentacleUpdateAccountId": "string",
    "TentacleUpdateBehavior": "NeverUpdate"
  },
  "Name": "string",
  "PollingRequestQueueTimeout": "string",
  "SpaceId": "string"
}

Example Response

JSON
{
  "ConnectionConnectTimeout": "string",
  "ConnectionRetryCountLimit": 0,
  "ConnectionRetrySleepInterval": "string",
  "ConnectionRetryTimeLimit": "string",
  "Description": "string",
  "Id": "string",
  "IsDefault": true,
  "LastModifiedBy": "string",
  "LastModifiedOn": "2020-01-01T00:00:00.000Z",
  "Links": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  },
  "MachineCleanupPolicy": {
    "DeleteMachinesBehavior": "DoNotDelete",
    "DeleteMachinesElapsedTimeSpan": "string"
  },
  "MachineConnectivityPolicy": {
    "MachineConnectivityBehavior": "ExpectedToBeOnline"
  },
  "MachineHealthCheckPolicy": {
    "BashHealthCheckPolicy": {
      "RunType": "InheritFromDefault",
      "ScriptBody": "string"
    },
    "HealthCheckCron": "string",
    "HealthCheckCronTimezone": "string",
    "HealthCheckInterval": "string",
    "HealthCheckType": "RunScript",
    "PowerShellHealthCheckPolicy": {
      "RunType": "InheritFromDefault",
      "ScriptBody": "string"
    }
  },
  "MachinePackageCacheRetentionPolicy": {
    "PackageUnit": "Items",
    "QuantityOfPackagesToKeep": 0,
    "QuantityOfVersionsToKeep": 0,
    "Strategy": "Default",
    "VersionUnit": "Items"
  },
  "MachineRpcCallRetryPolicy": {
    "Enabled": true,
    "HealthCheckRetryDuration": "string",
    "RetryDuration": "string"
  },
  "MachineUpdatePolicy": {
    "CalamariUpdateBehavior": "UpdateOnDeployment",
    "KubernetesAgentUpdateBehavior": "NeverUpdate",
    "TentacleUpdateAccountId": "string",
    "TentacleUpdateBehavior": "NeverUpdate"
  },
  "Name": "string",
  "PollingRequestQueueTimeout": "string",
  "SpaceId": "string"
}

Get a list of Machine Policies

GET /api/{spaceId}/machinepolicies/all

Also reachable at /api/machinepolicies/all, /api/spaces/{spaceIdentifier}/machinepolicies/all.

Path Parameters

  • spaceId string (required)

Response

200 — All the Machine Policies in the supplied Octopus Deploy Space.

  • ConnectionConnectTimeout string
    Format date-span.
  • ConnectionRetryCountLimit integer
  • ConnectionRetrySleepInterval string
    Format date-span.
  • ConnectionRetryTimeLimit string
    Format date-span.
  • Description string
  • Id string
    Gets or sets a unique identifier for this resource.
  • IsDefault boolean
  • LastModifiedBy string
    Gets or sets the username of the user who last modified this resource.
  • LastModifiedOn string
    Gets or sets the date/time that this resource was last modified. Format date-time.
  • Links object
    Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.
  • MachineCleanupPolicy object
    • DeleteMachinesBehavior enum
      Allowed values: DoNotDelete, DeleteUnavailableMachines.
    • DeleteMachinesElapsedTimeSpan string
      Format date-span.
  • MachineConnectivityPolicy object
    • MachineConnectivityBehavior enum
      Allowed values: ExpectedToBeOnline, MayBeOfflineAndCanBeSkipped.
  • MachineHealthCheckPolicy object
    • BashHealthCheckPolicy object
    • HealthCheckCron string
    • HealthCheckCronTimezone string
    • HealthCheckInterval string
      Format date-span.
    • HealthCheckType enum
      Allowed values: RunScript, OnlyConnectivity.
    • PowerShellHealthCheckPolicy object
  • MachinePackageCacheRetentionPolicy object
    • PackageUnit enum
      Allowed values: Items.
    • QuantityOfPackagesToKeep integer
    • QuantityOfVersionsToKeep integer
    • Strategy enum
      Allowed values: Default, Quantities.
    • VersionUnit enum
      Allowed values: Items.
  • MachineRpcCallRetryPolicy object
    • Enabled boolean
    • HealthCheckRetryDuration string
      Format date-span.
    • RetryDuration string
      Format date-span.
  • MachineUpdatePolicy object
    • CalamariUpdateBehavior enum
      Allowed values: UpdateOnDeployment, UpdateOnNewMachine, UpdateAlways.
    • KubernetesAgentUpdateBehavior enum
      Allowed values: NeverUpdate, Update, Block.
    • TentacleUpdateAccountId string
    • TentacleUpdateBehavior enum
      Allowed values: NeverUpdate, Update.
  • Name string
  • PollingRequestQueueTimeout string
    Format date-span.
  • SpaceId string

Example Response

JSON
[
  {
    "ConnectionConnectTimeout": "string",
    "ConnectionRetryCountLimit": 0,
    "ConnectionRetrySleepInterval": "string",
    "ConnectionRetryTimeLimit": "string",
    "Description": "string",
    "Id": "string",
    "IsDefault": true,
    "LastModifiedBy": "string",
    "LastModifiedOn": "2020-01-01T00:00:00.000Z",
    "Links": {
      "additionalProp1": "string",
      "additionalProp2": "string",
      "additionalProp3": "string"
    },
    "MachineCleanupPolicy": {
      "DeleteMachinesBehavior": "DoNotDelete",
      "DeleteMachinesElapsedTimeSpan": "string"
    },
    "MachineConnectivityPolicy": {
      "MachineConnectivityBehavior": "ExpectedToBeOnline"
    },
    "MachineHealthCheckPolicy": {
      "BashHealthCheckPolicy": {
        "RunType": "InheritFromDefault",
        "ScriptBody": "string"
      },
      "HealthCheckCron": "string",
      "HealthCheckCronTimezone": "string",
      "HealthCheckInterval": "string",
      "HealthCheckType": "RunScript",
      "PowerShellHealthCheckPolicy": {
        "RunType": "InheritFromDefault",
        "ScriptBody": "string"
      }
    },
    "MachinePackageCacheRetentionPolicy": {
      "PackageUnit": "Items",
      "QuantityOfPackagesToKeep": 0,
      "QuantityOfVersionsToKeep": 0,
      "Strategy": "Default",
      "VersionUnit": "Items"
    },
    "MachineRpcCallRetryPolicy": {
      "Enabled": true,
      "HealthCheckRetryDuration": "string",
      "RetryDuration": "string"
    },
    "MachineUpdatePolicy": {
      "CalamariUpdateBehavior": "UpdateOnDeployment",
      "KubernetesAgentUpdateBehavior": "NeverUpdate",
      "TentacleUpdateAccountId": "string",
      "TentacleUpdateBehavior": "NeverUpdate"
    },
    "Name": "string",
    "PollingRequestQueueTimeout": "string",
    "SpaceId": "string"
  }
]

Get a template for a new Machine Policy, which includes any defaults

GET /api/{spaceId}/machinepolicies/template

Also reachable at /api/machinepolicies/template, /api/spaces/{spaceIdentifier}/machinepolicies/template.

Path Parameters

  • spaceId string (required)

Response

200 — The requested Machine Policy Template

  • ConnectionConnectTimeout string
    Format date-span.
  • ConnectionRetryCountLimit integer
  • ConnectionRetrySleepInterval string
    Format date-span.
  • ConnectionRetryTimeLimit string
    Format date-span.
  • Description string
  • Id string
    Gets or sets a unique identifier for this resource.
  • IsDefault boolean
  • LastModifiedBy string
    Gets or sets the username of the user who last modified this resource.
  • LastModifiedOn string
    Gets or sets the date/time that this resource was last modified. Format date-time.
  • Links object
    Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.
  • MachineCleanupPolicy object
    • DeleteMachinesBehavior enum
      Allowed values: DoNotDelete, DeleteUnavailableMachines.
    • DeleteMachinesElapsedTimeSpan string
      Format date-span.
  • MachineConnectivityPolicy object
    • MachineConnectivityBehavior enum
      Allowed values: ExpectedToBeOnline, MayBeOfflineAndCanBeSkipped.
  • MachineHealthCheckPolicy object
    • BashHealthCheckPolicy object
    • HealthCheckCron string
    • HealthCheckCronTimezone string
    • HealthCheckInterval string
      Format date-span.
    • HealthCheckType enum
      Allowed values: RunScript, OnlyConnectivity.
    • PowerShellHealthCheckPolicy object
  • MachinePackageCacheRetentionPolicy object
    • PackageUnit enum
      Allowed values: Items.
    • QuantityOfPackagesToKeep integer
    • QuantityOfVersionsToKeep integer
    • Strategy enum
      Allowed values: Default, Quantities.
    • VersionUnit enum
      Allowed values: Items.
  • MachineRpcCallRetryPolicy object
    • Enabled boolean
    • HealthCheckRetryDuration string
      Format date-span.
    • RetryDuration string
      Format date-span.
  • MachineUpdatePolicy object
    • CalamariUpdateBehavior enum
      Allowed values: UpdateOnDeployment, UpdateOnNewMachine, UpdateAlways.
    • KubernetesAgentUpdateBehavior enum
      Allowed values: NeverUpdate, Update, Block.
    • TentacleUpdateAccountId string
    • TentacleUpdateBehavior enum
      Allowed values: NeverUpdate, Update.
  • Name string
  • PollingRequestQueueTimeout string
    Format date-span.
  • SpaceId string

Example Response

JSON
{
  "ConnectionConnectTimeout": "string",
  "ConnectionRetryCountLimit": 0,
  "ConnectionRetrySleepInterval": "string",
  "ConnectionRetryTimeLimit": "string",
  "Description": "string",
  "Id": "string",
  "IsDefault": true,
  "LastModifiedBy": "string",
  "LastModifiedOn": "2020-01-01T00:00:00.000Z",
  "Links": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  },
  "MachineCleanupPolicy": {
    "DeleteMachinesBehavior": "DoNotDelete",
    "DeleteMachinesElapsedTimeSpan": "string"
  },
  "MachineConnectivityPolicy": {
    "MachineConnectivityBehavior": "ExpectedToBeOnline"
  },
  "MachineHealthCheckPolicy": {
    "BashHealthCheckPolicy": {
      "RunType": "InheritFromDefault",
      "ScriptBody": "string"
    },
    "HealthCheckCron": "string",
    "HealthCheckCronTimezone": "string",
    "HealthCheckInterval": "string",
    "HealthCheckType": "RunScript",
    "PowerShellHealthCheckPolicy": {
      "RunType": "InheritFromDefault",
      "ScriptBody": "string"
    }
  },
  "MachinePackageCacheRetentionPolicy": {
    "PackageUnit": "Items",
    "QuantityOfPackagesToKeep": 0,
    "QuantityOfVersionsToKeep": 0,
    "Strategy": "Default",
    "VersionUnit": "Items"
  },
  "MachineRpcCallRetryPolicy": {
    "Enabled": true,
    "HealthCheckRetryDuration": "string",
    "RetryDuration": "string"
  },
  "MachineUpdatePolicy": {
    "CalamariUpdateBehavior": "UpdateOnDeployment",
    "KubernetesAgentUpdateBehavior": "NeverUpdate",
    "TentacleUpdateAccountId": "string",
    "TentacleUpdateBehavior": "NeverUpdate"
  },
  "Name": "string",
  "PollingRequestQueueTimeout": "string",
  "SpaceId": "string"
}

Get a Machine Policy by ID

GET /api/{spaceId}/machinepolicies/{id}

Also reachable at /api/machinepolicies/{id}, /api/spaces/{spaceIdentifier}/machinepolicies/{id}.

Path Parameters

  • id string (required)
    ID of the Machine Policy.
  • spaceId string (required)
    The ID of the space containing the resource(s).

Response

200 — The requested machine policy

  • ConnectionConnectTimeout string
    Format date-span.
  • ConnectionRetryCountLimit integer
  • ConnectionRetrySleepInterval string
    Format date-span.
  • ConnectionRetryTimeLimit string
    Format date-span.
  • Description string
  • Id string
    Gets or sets a unique identifier for this resource.
  • IsDefault boolean
  • LastModifiedBy string
    Gets or sets the username of the user who last modified this resource.
  • LastModifiedOn string
    Gets or sets the date/time that this resource was last modified. Format date-time.
  • Links object
    Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.
  • MachineCleanupPolicy object
    • DeleteMachinesBehavior enum
      Allowed values: DoNotDelete, DeleteUnavailableMachines.
    • DeleteMachinesElapsedTimeSpan string
      Format date-span.
  • MachineConnectivityPolicy object
    • MachineConnectivityBehavior enum
      Allowed values: ExpectedToBeOnline, MayBeOfflineAndCanBeSkipped.
  • MachineHealthCheckPolicy object
    • BashHealthCheckPolicy object
    • HealthCheckCron string
    • HealthCheckCronTimezone string
    • HealthCheckInterval string
      Format date-span.
    • HealthCheckType enum
      Allowed values: RunScript, OnlyConnectivity.
    • PowerShellHealthCheckPolicy object
  • MachinePackageCacheRetentionPolicy object
    • PackageUnit enum
      Allowed values: Items.
    • QuantityOfPackagesToKeep integer
    • QuantityOfVersionsToKeep integer
    • Strategy enum
      Allowed values: Default, Quantities.
    • VersionUnit enum
      Allowed values: Items.
  • MachineRpcCallRetryPolicy object
    • Enabled boolean
    • HealthCheckRetryDuration string
      Format date-span.
    • RetryDuration string
      Format date-span.
  • MachineUpdatePolicy object
    • CalamariUpdateBehavior enum
      Allowed values: UpdateOnDeployment, UpdateOnNewMachine, UpdateAlways.
    • KubernetesAgentUpdateBehavior enum
      Allowed values: NeverUpdate, Update, Block.
    • TentacleUpdateAccountId string
    • TentacleUpdateBehavior enum
      Allowed values: NeverUpdate, Update.
  • Name string
  • PollingRequestQueueTimeout string
    Format date-span.
  • SpaceId string

Example Response

JSON
{
  "ConnectionConnectTimeout": "string",
  "ConnectionRetryCountLimit": 0,
  "ConnectionRetrySleepInterval": "string",
  "ConnectionRetryTimeLimit": "string",
  "Description": "string",
  "Id": "string",
  "IsDefault": true,
  "LastModifiedBy": "string",
  "LastModifiedOn": "2020-01-01T00:00:00.000Z",
  "Links": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  },
  "MachineCleanupPolicy": {
    "DeleteMachinesBehavior": "DoNotDelete",
    "DeleteMachinesElapsedTimeSpan": "string"
  },
  "MachineConnectivityPolicy": {
    "MachineConnectivityBehavior": "ExpectedToBeOnline"
  },
  "MachineHealthCheckPolicy": {
    "BashHealthCheckPolicy": {
      "RunType": "InheritFromDefault",
      "ScriptBody": "string"
    },
    "HealthCheckCron": "string",
    "HealthCheckCronTimezone": "string",
    "HealthCheckInterval": "string",
    "HealthCheckType": "RunScript",
    "PowerShellHealthCheckPolicy": {
      "RunType": "InheritFromDefault",
      "ScriptBody": "string"
    }
  },
  "MachinePackageCacheRetentionPolicy": {
    "PackageUnit": "Items",
    "QuantityOfPackagesToKeep": 0,
    "QuantityOfVersionsToKeep": 0,
    "Strategy": "Default",
    "VersionUnit": "Items"
  },
  "MachineRpcCallRetryPolicy": {
    "Enabled": true,
    "HealthCheckRetryDuration": "string",
    "RetryDuration": "string"
  },
  "MachineUpdatePolicy": {
    "CalamariUpdateBehavior": "UpdateOnDeployment",
    "KubernetesAgentUpdateBehavior": "NeverUpdate",
    "TentacleUpdateAccountId": "string",
    "TentacleUpdateBehavior": "NeverUpdate"
  },
  "Name": "string",
  "PollingRequestQueueTimeout": "string",
  "SpaceId": "string"
}

Modify an existing Machine Policy

PUT /api/{spaceId}/machinepolicies/{id}

Also reachable at /api/machinepolicies/{id}, /api/spaces/{spaceIdentifier}/machinepolicies/{id}.

Path Parameters

  • id string (required)
    The Machine Policy ID.
  • spaceId string (required)
    The Space ID.

Request Body

  • ConnectionConnectTimeout string
    Format date-span.
  • ConnectionRetryCountLimit integer
  • ConnectionRetrySleepInterval string
    Format date-span.
  • ConnectionRetryTimeLimit string
    Format date-span.
  • Description string
  • Id string (required)
    The Machine Policy ID.
  • IsDefault boolean
  • MachineCleanupPolicy object
    • DeleteMachinesBehavior enum
      Allowed values: DoNotDelete, DeleteUnavailableMachines.
    • DeleteMachinesElapsedTimeSpan string
      Format date-span.
  • MachineConnectivityPolicy object
    • MachineConnectivityBehavior enum
      Allowed values: ExpectedToBeOnline, MayBeOfflineAndCanBeSkipped.
  • MachineHealthCheckPolicy object
    • BashHealthCheckPolicy object
    • HealthCheckCron string
    • HealthCheckCronTimezone string
    • HealthCheckInterval string
      Format date-span.
    • HealthCheckType enum
      Allowed values: RunScript, OnlyConnectivity.
    • PowerShellHealthCheckPolicy object
  • MachinePackageCacheRetentionPolicy object
    • PackageUnit enum
      Allowed values: Items.
    • QuantityOfPackagesToKeep integer
    • QuantityOfVersionsToKeep integer
    • Strategy enum
      Allowed values: Default, Quantities.
    • VersionUnit enum
      Allowed values: Items.
  • MachineRpcCallRetryPolicy object
    • Enabled boolean
    • HealthCheckRetryDuration string
      Format date-span.
    • RetryDuration string
      Format date-span.
  • MachineUpdatePolicy object
    • CalamariUpdateBehavior enum
      Allowed values: UpdateOnDeployment, UpdateOnNewMachine, UpdateAlways.
    • KubernetesAgentUpdateBehavior enum
      Allowed values: NeverUpdate, Update, Block.
    • TentacleUpdateAccountId string
    • TentacleUpdateBehavior enum
      Allowed values: NeverUpdate, Update.
  • Name string (required)
    Minimum length 1.
  • PollingRequestQueueTimeout string
    Format date-span.
  • SpaceId string (required)
    The Space ID.

Response

200 — Confirmation that the Machine Policy was modified, containing the new Policy

  • ConnectionConnectTimeout string
    Format date-span.
  • ConnectionRetryCountLimit integer
  • ConnectionRetrySleepInterval string
    Format date-span.
  • ConnectionRetryTimeLimit string
    Format date-span.
  • Description string
  • Id string
    Gets or sets a unique identifier for this resource.
  • IsDefault boolean
  • LastModifiedBy string
    Gets or sets the username of the user who last modified this resource.
  • LastModifiedOn string
    Gets or sets the date/time that this resource was last modified. Format date-time.
  • Links object
    Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.
  • MachineCleanupPolicy object
    • DeleteMachinesBehavior enum
      Allowed values: DoNotDelete, DeleteUnavailableMachines.
    • DeleteMachinesElapsedTimeSpan string
      Format date-span.
  • MachineConnectivityPolicy object
    • MachineConnectivityBehavior enum
      Allowed values: ExpectedToBeOnline, MayBeOfflineAndCanBeSkipped.
  • MachineHealthCheckPolicy object
    • BashHealthCheckPolicy object
    • HealthCheckCron string
    • HealthCheckCronTimezone string
    • HealthCheckInterval string
      Format date-span.
    • HealthCheckType enum
      Allowed values: RunScript, OnlyConnectivity.
    • PowerShellHealthCheckPolicy object
  • MachinePackageCacheRetentionPolicy object
    • PackageUnit enum
      Allowed values: Items.
    • QuantityOfPackagesToKeep integer
    • QuantityOfVersionsToKeep integer
    • Strategy enum
      Allowed values: Default, Quantities.
    • VersionUnit enum
      Allowed values: Items.
  • MachineRpcCallRetryPolicy object
    • Enabled boolean
    • HealthCheckRetryDuration string
      Format date-span.
    • RetryDuration string
      Format date-span.
  • MachineUpdatePolicy object
    • CalamariUpdateBehavior enum
      Allowed values: UpdateOnDeployment, UpdateOnNewMachine, UpdateAlways.
    • KubernetesAgentUpdateBehavior enum
      Allowed values: NeverUpdate, Update, Block.
    • TentacleUpdateAccountId string
    • TentacleUpdateBehavior enum
      Allowed values: NeverUpdate, Update.
  • Name string
  • PollingRequestQueueTimeout string
    Format date-span.
  • SpaceId string

Example Request

JSON
{
  "ConnectionConnectTimeout": "string",
  "ConnectionRetryCountLimit": 0,
  "ConnectionRetrySleepInterval": "string",
  "ConnectionRetryTimeLimit": "string",
  "Description": "string",
  "Id": "string",
  "IsDefault": true,
  "MachineCleanupPolicy": {
    "DeleteMachinesBehavior": "DoNotDelete",
    "DeleteMachinesElapsedTimeSpan": "string"
  },
  "MachineConnectivityPolicy": {
    "MachineConnectivityBehavior": "ExpectedToBeOnline"
  },
  "MachineHealthCheckPolicy": {
    "BashHealthCheckPolicy": {
      "RunType": "InheritFromDefault",
      "ScriptBody": "string"
    },
    "HealthCheckCron": "string",
    "HealthCheckCronTimezone": "string",
    "HealthCheckInterval": "string",
    "HealthCheckType": "RunScript",
    "PowerShellHealthCheckPolicy": {
      "RunType": "InheritFromDefault",
      "ScriptBody": "string"
    }
  },
  "MachinePackageCacheRetentionPolicy": {
    "PackageUnit": "Items",
    "QuantityOfPackagesToKeep": 0,
    "QuantityOfVersionsToKeep": 0,
    "Strategy": "Default",
    "VersionUnit": "Items"
  },
  "MachineRpcCallRetryPolicy": {
    "Enabled": true,
    "HealthCheckRetryDuration": "string",
    "RetryDuration": "string"
  },
  "MachineUpdatePolicy": {
    "CalamariUpdateBehavior": "UpdateOnDeployment",
    "KubernetesAgentUpdateBehavior": "NeverUpdate",
    "TentacleUpdateAccountId": "string",
    "TentacleUpdateBehavior": "NeverUpdate"
  },
  "Name": "string",
  "PollingRequestQueueTimeout": "string",
  "SpaceId": "string"
}

Example Response

JSON
{
  "ConnectionConnectTimeout": "string",
  "ConnectionRetryCountLimit": 0,
  "ConnectionRetrySleepInterval": "string",
  "ConnectionRetryTimeLimit": "string",
  "Description": "string",
  "Id": "string",
  "IsDefault": true,
  "LastModifiedBy": "string",
  "LastModifiedOn": "2020-01-01T00:00:00.000Z",
  "Links": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  },
  "MachineCleanupPolicy": {
    "DeleteMachinesBehavior": "DoNotDelete",
    "DeleteMachinesElapsedTimeSpan": "string"
  },
  "MachineConnectivityPolicy": {
    "MachineConnectivityBehavior": "ExpectedToBeOnline"
  },
  "MachineHealthCheckPolicy": {
    "BashHealthCheckPolicy": {
      "RunType": "InheritFromDefault",
      "ScriptBody": "string"
    },
    "HealthCheckCron": "string",
    "HealthCheckCronTimezone": "string",
    "HealthCheckInterval": "string",
    "HealthCheckType": "RunScript",
    "PowerShellHealthCheckPolicy": {
      "RunType": "InheritFromDefault",
      "ScriptBody": "string"
    }
  },
  "MachinePackageCacheRetentionPolicy": {
    "PackageUnit": "Items",
    "QuantityOfPackagesToKeep": 0,
    "QuantityOfVersionsToKeep": 0,
    "Strategy": "Default",
    "VersionUnit": "Items"
  },
  "MachineRpcCallRetryPolicy": {
    "Enabled": true,
    "HealthCheckRetryDuration": "string",
    "RetryDuration": "string"
  },
  "MachineUpdatePolicy": {
    "CalamariUpdateBehavior": "UpdateOnDeployment",
    "KubernetesAgentUpdateBehavior": "NeverUpdate",
    "TentacleUpdateAccountId": "string",
    "TentacleUpdateBehavior": "NeverUpdate"
  },
  "Name": "string",
  "PollingRequestQueueTimeout": "string",
  "SpaceId": "string"
}

Delete the specified Machine Policy

DELETE /api/{spaceId}/machinepolicies/{id}

Also reachable at /api/machinepolicies/{id}, /api/spaces/{spaceIdentifier}/machinepolicies/{id}.

Path Parameters

  • id string (required)
    Id of the Machine Policy to delete.
  • spaceId string (required)
    The ID of the space containing the resource(s).

Response

200 — Success

Get a paginated list of the machines that belong to the given Machine Policy

GET /api/{spaceId}/machinepolicies/{id}/machines

Also reachable at /api/machinepolicies/{id}/machines, /api/spaces/{spaceIdentifier}/machinepolicies/{id}/machines.

Path Parameters

  • id string (required)
    ID of the Machine Policy.
  • spaceId string (required)
    The ID of the space containing the resource(s).

Query Parameters

  • skip integer
    Number of items to skip. Defaults to zero. Minimum 0.
  • take integer
    Number of items to take. Defaults to 10. Minimum 0.

Response

200 — A paginated list of the machines that belong to the given Machine Policy

  • Id string
    Gets or sets a unique identifier for this resource.
  • ItemType string
  • Items array of object
    • Architecture string
    • Endpoint object
    • EnvironmentIds array of string
    • HasLatestCalamari boolean
    • HealthStatus enum
      Allowed values: Healthy, Unavailable, Unknown, HasWarnings, Unhealthy.
    • Id string
      Gets or sets a unique identifier for this resource.
    • IsDisabled boolean
    • IsInProcess boolean
    • LastModifiedBy string
      Gets or sets the username of the user who last modified this resource.
    • LastModifiedOn string
      Gets or sets the date/time that this resource was last modified. Format date-time.
    • Links object
      Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.
    • MachinePolicyId string
    • Name string
    • OperatingSystem string
    • OperatingSystemVersion string
    • Roles array of string
    • ShellName string
    • ShellVersion string
    • SkipInitialHealthCheck boolean
    • Slug string
    • SpaceId string
    • StatusSummary string
    • TenantIds array of string
    • TenantTags array of string
    • TenantedDeploymentParticipation enum
      Allowed values: Untenanted, TenantedOrUntenanted, Tenanted.
    • Thumbprint string
    • Uri string
  • ItemsPerPage integer
  • LastModifiedBy string
    Gets or sets the username of the user who last modified this resource.
  • LastModifiedOn string
    Gets or sets the date/time that this resource was last modified. Format date-time.
  • LastPageNumber integer
  • Links object
    Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.
  • NumberOfPages integer
  • TotalResults integer

Example Response

JSON
{
  "Id": "string",
  "ItemType": "string",
  "Items": [
    {
      "Architecture": "string",
      "Endpoint": {
        "CommunicationStyle": "None",
        "Id": "string",
        "LastModifiedBy": "string",
        "LastModifiedOn": "2020-01-01T00:00:00.000Z",
        "Links": {}
      },
      "EnvironmentIds": [
        "string"
      ],
      "HasLatestCalamari": true,
      "HealthStatus": "Healthy",
      "Id": "string",
      "IsDisabled": true,
      "IsInProcess": true,
      "LastModifiedBy": "string",
      "LastModifiedOn": "2020-01-01T00:00:00.000Z",
      "Links": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "MachinePolicyId": "string",
      "Name": "string",
      "OperatingSystem": "string",
      "OperatingSystemVersion": "string",
      "Roles": [
        "string"
      ],
      "ShellName": "string",
      "ShellVersion": "string",
      "SkipInitialHealthCheck": true,
      "Slug": "string",
      "SpaceId": "string",
      "StatusSummary": "string",
      "TenantIds": [
        "string"
      ],
      "TenantTags": [
        "string"
      ],
      "TenantedDeploymentParticipation": "Untenanted",
      "Thumbprint": "string",
      "Uri": "string"
    }
  ],
  "ItemsPerPage": 0,
  "LastModifiedBy": "string",
  "LastModifiedOn": "2020-01-01T00:00:00.000Z",
  "LastPageNumber": 0,
  "Links": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  },
  "NumberOfPages": 0,
  "TotalResults": 0
}

Delete the specified Machine Policy

DELETE /api/{spaceId}/machinepolicies/{id}/v1

Also reachable at /api/machinepolicies/{id}/v1, /api/spaces/{spaceIdentifier}/machinepolicies/{id}/v1.

Path Parameters

  • id string (required)
    Id of the Machine Policy to delete.
  • spaceId string (required)
    The ID of the space containing the resource(s).

Response

200 — Confirmation that the Machine Policy has been deleted

Example Response

JSON
{}

Get a paginated list of the workers that belong to the given Machine Policy

GET /api/{spaceId}/machinepolicies/{id}/workers

Also reachable at /api/machinepolicies/{id}/workers, /api/spaces/{spaceIdentifier}/machinepolicies/{id}/workers.

Path Parameters

  • id string (required)
    ID of the Machine Policy.
  • spaceId string (required)
    The ID of the space containing the resource(s).

Query Parameters

  • skip integer
    Number of items to skip. Defaults to zero. Minimum 0.
  • take integer
    Number of items to take. Defaults to 10. Minimum 0.

Response

200 — A paginated list of the machines that belong to the given Machine Policy

  • Id string
    Gets or sets a unique identifier for this resource.
  • ItemType string
  • Items array of object
    • Architecture string
    • Endpoint object
    • HasLatestCalamari boolean
    • HealthStatus enum
      Allowed values: Healthy, Unavailable, Unknown, HasWarnings, Unhealthy.
    • Id string
      Gets or sets a unique identifier for this resource.
    • IsDisabled boolean
    • IsInProcess boolean
    • LastModifiedBy string
      Gets or sets the username of the user who last modified this resource.
    • LastModifiedOn string
      Gets or sets the date/time that this resource was last modified. Format date-time.
    • Links object
      Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.
    • MachinePolicyId string
    • Name string
    • OperatingSystem string
    • OperatingSystemVersion string
    • ShellName string
    • ShellVersion string
    • SkipInitialHealthCheck boolean
    • Slug string
    • SpaceId string
    • StatusSummary string
    • Thumbprint string
    • Uri string
    • WorkerPoolIds array of string
  • ItemsPerPage integer
  • LastModifiedBy string
    Gets or sets the username of the user who last modified this resource.
  • LastModifiedOn string
    Gets or sets the date/time that this resource was last modified. Format date-time.
  • LastPageNumber integer
  • Links object
    Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.
  • NumberOfPages integer
  • TotalResults integer

Example Response

JSON
{
  "Id": "string",
  "ItemType": "string",
  "Items": [
    {
      "Architecture": "string",
      "Endpoint": {
        "CommunicationStyle": "None",
        "Id": "string",
        "LastModifiedBy": "string",
        "LastModifiedOn": "2020-01-01T00:00:00.000Z",
        "Links": {}
      },
      "HasLatestCalamari": true,
      "HealthStatus": "Healthy",
      "Id": "string",
      "IsDisabled": true,
      "IsInProcess": true,
      "LastModifiedBy": "string",
      "LastModifiedOn": "2020-01-01T00:00:00.000Z",
      "Links": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "MachinePolicyId": "string",
      "Name": "string",
      "OperatingSystem": "string",
      "OperatingSystemVersion": "string",
      "ShellName": "string",
      "ShellVersion": "string",
      "SkipInitialHealthCheck": true,
      "Slug": "string",
      "SpaceId": "string",
      "StatusSummary": "string",
      "Thumbprint": "string",
      "Uri": "string",
      "WorkerPoolIds": [
        "string"
      ]
    }
  ],
  "ItemsPerPage": 0,
  "LastModifiedBy": "string",
  "LastModifiedOn": "2020-01-01T00:00:00.000Z",
  "LastPageNumber": 0,
  "Links": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  },
  "NumberOfPages": 0,
  "TotalResults": 0
}