Workload Policies

List Policies

GET https://$(tvm_address):8780/v1/$(tenant_id)/workload_policy

Requests the list of available Workload Policies

Path Parameters

Name
Type
Description

tvm_address

string

IP or FQDN of Trilio service

tenant_id

string

ID of Tenant/Project

Headers

Name
Type
Description

X-Auth-Project-Id

string

Project to authenticate against

X-Auth-Token

string

Authentication token to use

Accept

string

application/json

User-Agent

string

python-workloadmgrclient

HTTP/1.1 200 OK
Server: nginx/1.16.1
Date: Fri, 13 Nov 2020 13:56:08 GMT
Content-Type: application/json
Content-Length: 1399
Connection: keep-alive
X-Compute-Request-Id: req-4618161e-64e4-489a-b8fc-f3cb21d94096

{
   "policy_list":[
      {
         "id":"b79aa5f3-405b-4da4-96e2-893abf7cb5fd",
         "created_at":"2020-10-26T12:52:22.000000",
         "updated_at":"2020-10-26T12:52:22.000000",
         "status":"available",
         "name":"Gold",
         "description":"",
         "metadata":[
            
         ],
         "field_values":[
            {
               "created_at":"2020-10-26T12:52:22.000000",
               "updated_at":null,
               "deleted_at":null,
               "deleted":false,
               "version":"4.0.115",
               "id":"0201f8b4-482d-4ec1-9b92-8cf3092abcc2",
               "policy_id":"b79aa5f3-405b-4da4-96e2-893abf7cb5fd",
               "policy_field_name":"retention_policy_value",
               "value":"10"
            },
            {
               "created_at":"2020-10-26T12:52:22.000000",
               "updated_at":null,
               "deleted_at":null,
               "deleted":false,
               "version":"4.0.115",
               "id":"48cc7007-e221-44de-bd4e-6a66841bdee0",
               "policy_id":"b79aa5f3-405b-4da4-96e2-893abf7cb5fd",
               "policy_field_name":"interval",
               "value":"5"
            },
            {
               "created_at":"2020-10-26T12:52:22.000000",
               "updated_at":null,
               "deleted_at":null,
               "deleted":false,
               "version":"4.0.115",
               "id":"79070c67-9021-4220-8a79-648ffeebc144",
               "policy_id":"b79aa5f3-405b-4da4-96e2-893abf7cb5fd",
               "policy_field_name":"retention_policy_type",
               "value":"Number of Snapshots to Keep"
            },
            {
               "created_at":"2020-10-26T12:52:22.000000",
               "updated_at":null,
               "deleted_at":null,
               "deleted":false,
               "version":"4.0.115",
               "id":"9fec205a-9528-45ea-a118-ffb64d8c7d9d",
               "policy_id":"b79aa5f3-405b-4da4-96e2-893abf7cb5fd",
               "policy_field_name":"fullbackup_interval",
               "value":"-1"
            }
         ]
      }
   ]
}

Show Policy

GET https://$(tvm_address):8780/v1/$(tenant_id)/workload_policy/<policy_id>

Requests the details of a given policy

Path Parameters

Name
Type
Description

tvm_address

string

IP or FQDN of Trilio service

tenant_id

string

ID of Tenant/Project

policy_id

string

ID of the Policy to show

Headers

Name
Type
Description

X-Auth-Project-Id

string

Project to authenticate against

X-Auth-Token

string

Authentication token to use

Accept

string

application/json

User-Agent

string

python-workloadmgrclient

list assigned Policies

GET https://$(tvm_address):8780/v1/$(tenant_id)/workload_policy/assigned/<project_id>

Requests the lists of Policies assigned to a Project.

Path Parameters

Name
Type
Description

tvm_address

string

IP or FQDN of Trilio service

tenant_id

string

ID of Tenant/Project

project_id

string

ID of the Project to fetch assigned Policies from

Headers

Name
Type
Description

X-Auth-Project-Id

string

Project to authenticate against

X-Auth-Token

string

Authentication token to use

Accept

string

application/json

User-Agent

string

python-workloadmgrclient

Create Policy

POST https://$(tvm_address):8780/v1/$(tenant_id)/workload_policy

Creates a Policy with the given parameters

Path Parameters

Name
Type
Description

tvm_address

string

IP or FQDN of Trilio service

tenant_id

string

ID of the Tenant/Project to do the restore in

Headers

Name
Type
Description

X-Auth-Project-Id

string

Project to authenticate against

X-Auth-Token

string

Authentication token to use

Content-Type

string

application/json

Accept

string

application/json

User-Agent

string

python-workloadmgrclient

Body Format

Update Policy

PUT https://$(tvm_address):8780/v1/$(tenant_id)/workload_policy/<policy-id>

Updates a Policy with the given information

Path Parameters

Name
Type
Description

tvm_address

string

IP or FQDN of Trilio service

tenant_id

string

ID of the Tenant/Project to do the restore in

policy_id

string

ID of the Policy to update

Headers

Name
Type
Description

X-Auth-Project-Id

string

Project to authenticate against

X-Auth-Token

string

Authentication token to use

Content-Type

string

application/json

Accept

string

application/json

User-Agent

string

python-workloadmgrclient

Body Format

Assign Policy

POST https://$(tvm_address):8780/v1/$(tenant_id)/workload_policy/<policy-id>

Updates a Policy with the given information

Path Parameters

Name
Type
Description

tvm_address

string

IP or FQDN of Trilio service

tenant_id

string

ID of the Tenant/Project to do the restore in

policy_id

string

ID of the Policy to assign

Headers

Name
Type
Description

X-Auth-Project-Id

string

Project to authenticate against

X-Auth-Token

string

Authentication token to use

Content-Type

string

application/json

Accept

string

application/json

User-Agent

string

python-workloadmgrclient

Body Format

Delete Policy

DELETE https://$(tvm_address):8780/v1/$(tenant_id)/workload_policy/<policy_id>

Deletes a given Policy

Path Parameters

Name
Type
Description

tvm_address

string

IP or FQDN of Trilio service

tenant_id

string

ID of Tenant/Project

policy_id

string

ID of the Policy to delete

Headers

Name
Type
Description

X-Auth-Project-Id

string

Project to authenticate against

X-Auth-Token

string

Authentication token to use

Accept

string

application/json

User-Agent

string

python-workloadmgrclient

Last updated

Was this helpful?