pds-metronome 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/README.md +164 -0
- data/Rakefile +10 -0
- data/docs/AccessManagementApi.md +300 -0
- data/docs/AccessType.md +15 -0
- data/docs/AgingOffsetUnit.md +15 -0
- data/docs/AgingStrategy.md +15 -0
- data/docs/ApiKeyData.md +28 -0
- data/docs/ApiKeyDataListResponse.md +20 -0
- data/docs/ApiKeyListResponse.md +20 -0
- data/docs/CreateApiKeyRequest.md +22 -0
- data/docs/CreateOrModifyApiKeyResponse.md +22 -0
- data/docs/CreateOrModifyPolicyRequest.md +22 -0
- data/docs/CreateOrModifyPolicyResponse.md +20 -0
- data/docs/DataExpiryApi.md +79 -0
- data/docs/ExpireItemResponse.md +20 -0
- data/docs/ExpireSubItemResponse.md +22 -0
- data/docs/ExpiryResponse.md +22 -0
- data/docs/ExpiryResponsePendingInner.md +79 -0
- data/docs/GetManyApiKeys200Response.md +79 -0
- data/docs/GetManyPolicies200Response.md +79 -0
- data/docs/ItemAccessApi.md +605 -0
- data/docs/ItemExpiry.md +20 -0
- data/docs/ItemMetadataResponse.md +28 -0
- data/docs/ItemOrSubItemAccessLog.md +32 -0
- data/docs/ItemOrSubItemPolicyResponse.md +22 -0
- data/docs/ModifyApiKeyRequest.md +20 -0
- data/docs/Permission.md +15 -0
- data/docs/PermissionDeniedResponse.md +30 -0
- data/docs/PolicyData.md +26 -0
- data/docs/PolicyDataListResponse.md +28 -0
- data/docs/PolicyListResponse.md +28 -0
- data/docs/PolicyManagementApi.md +379 -0
- data/docs/PutApiKeyRequest.md +49 -0
- data/docs/SignupRequest.md +18 -0
- data/docs/SignupResponse.md +24 -0
- data/docs/SubItemMetadataResponse.md +22 -0
- data/docs/SubItemsExpiry.md +22 -0
- data/docs/TelemetryApi.md +80 -0
- data/docs/TelemetryObservation.md +20 -0
- data/docs/TelemetryRequest.md +22 -0
- data/docs/ValidationErrorResponseInner.md +22 -0
- data/docs/ValidationProblem.md +22 -0
- data/lib/metronome/api/access_management_api.rb +285 -0
- data/lib/metronome/api/data_expiry_api.rb +105 -0
- data/lib/metronome/api/item_access_api.rb +549 -0
- data/lib/metronome/api/policy_management_api.rb +348 -0
- data/lib/metronome/api/telemetry_api.rb +84 -0
- data/lib/metronome/api_client.rb +393 -0
- data/lib/metronome/api_error.rb +58 -0
- data/lib/metronome/configuration.rb +312 -0
- data/lib/metronome/models/access_type.rb +41 -0
- data/lib/metronome/models/aging_offset_unit.rb +41 -0
- data/lib/metronome/models/aging_strategy.rb +40 -0
- data/lib/metronome/models/api_key_data.rb +330 -0
- data/lib/metronome/models/api_key_data_list_response.rb +241 -0
- data/lib/metronome/models/api_key_list_response.rb +241 -0
- data/lib/metronome/models/create_api_key_request.rb +239 -0
- data/lib/metronome/models/create_or_modify_api_key_response.rb +255 -0
- data/lib/metronome/models/create_or_modify_policy_request.rb +293 -0
- data/lib/metronome/models/create_or_modify_policy_response.rb +240 -0
- data/lib/metronome/models/expire_item_response.rb +240 -0
- data/lib/metronome/models/expire_sub_item_response.rb +254 -0
- data/lib/metronome/models/expiry_response.rb +299 -0
- data/lib/metronome/models/expiry_response_pending_inner.rb +55 -0
- data/lib/metronome/models/get_many_api_keys200_response.rb +55 -0
- data/lib/metronome/models/get_many_policies200_response.rb +55 -0
- data/lib/metronome/models/item_expiry.rb +239 -0
- data/lib/metronome/models/item_metadata_response.rb +274 -0
- data/lib/metronome/models/item_or_sub_item_access_log.rb +337 -0
- data/lib/metronome/models/item_or_sub_item_policy_response.rb +245 -0
- data/lib/metronome/models/modify_api_key_request.rb +230 -0
- data/lib/metronome/models/permission.rb +45 -0
- data/lib/metronome/models/permission_denied_response.rb +338 -0
- data/lib/metronome/models/policy_data.rb +364 -0
- data/lib/metronome/models/policy_data_list_response.rb +286 -0
- data/lib/metronome/models/policy_list_response.rb +286 -0
- data/lib/metronome/models/put_api_key_request.rb +105 -0
- data/lib/metronome/models/signup_request.rb +225 -0
- data/lib/metronome/models/signup_response.rb +266 -0
- data/lib/metronome/models/sub_item_metadata_response.rb +245 -0
- data/lib/metronome/models/sub_items_expiry.rb +255 -0
- data/lib/metronome/models/telemetry_observation.rb +240 -0
- data/lib/metronome/models/telemetry_request.rb +259 -0
- data/lib/metronome/models/validation_error_response_inner.rb +254 -0
- data/lib/metronome/models/validation_problem.rb +254 -0
- data/lib/metronome/version.rb +15 -0
- data/lib/metronome.rb +80 -0
- data/shell.nix +6 -0
- data/spec/api/access_management_api_spec.rb +82 -0
- data/spec/api/data_expiry_api_spec.rb +46 -0
- data/spec/api/item_access_api_spec.rb +132 -0
- data/spec/api/policy_management_api_spec.rb +94 -0
- data/spec/api/telemetry_api_spec.rb +46 -0
- data/spec/api_client_spec.rb +228 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/access_type_spec.rb +28 -0
- data/spec/models/aging_offset_unit_spec.rb +28 -0
- data/spec/models/aging_strategy_spec.rb +28 -0
- data/spec/models/api_key_data_list_response_spec.rb +40 -0
- data/spec/models/api_key_data_spec.rb +68 -0
- data/spec/models/api_key_list_response_spec.rb +40 -0
- data/spec/models/create_api_key_request_spec.rb +46 -0
- data/spec/models/create_or_modify_api_key_response_spec.rb +46 -0
- data/spec/models/create_or_modify_policy_request_spec.rb +46 -0
- data/spec/models/create_or_modify_policy_response_spec.rb +40 -0
- data/spec/models/expire_item_response_spec.rb +40 -0
- data/spec/models/expire_sub_item_response_spec.rb +46 -0
- data/spec/models/expiry_response_pending_inner_spec.rb +43 -0
- data/spec/models/expiry_response_spec.rb +46 -0
- data/spec/models/get_many_api_keys200_response_spec.rb +43 -0
- data/spec/models/get_many_policies200_response_spec.rb +43 -0
- data/spec/models/item_expiry_spec.rb +40 -0
- data/spec/models/item_metadata_response_spec.rb +64 -0
- data/spec/models/item_or_sub_item_access_log_spec.rb +76 -0
- data/spec/models/item_or_sub_item_policy_response_spec.rb +46 -0
- data/spec/models/modify_api_key_request_spec.rb +40 -0
- data/spec/models/permission_denied_response_spec.rb +82 -0
- data/spec/models/permission_spec.rb +28 -0
- data/spec/models/policy_data_list_response_spec.rb +64 -0
- data/spec/models/policy_data_spec.rb +58 -0
- data/spec/models/policy_list_response_spec.rb +64 -0
- data/spec/models/put_api_key_request_spec.rb +31 -0
- data/spec/models/signup_request_spec.rb +34 -0
- data/spec/models/signup_response_spec.rb +52 -0
- data/spec/models/sub_item_metadata_response_spec.rb +46 -0
- data/spec/models/sub_items_expiry_spec.rb +46 -0
- data/spec/models/telemetry_observation_spec.rb +40 -0
- data/spec/models/telemetry_request_spec.rb +46 -0
- data/spec/models/validation_error_response_inner_spec.rb +46 -0
- data/spec/models/validation_problem_spec.rb +46 -0
- data/spec/spec_helper.rb +111 -0
- metadata +260 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Metronome::ModifyApiKeyRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **status** | **String** | | [optional] |
|
|
8
|
+
| **permissions** | [**Array<Permission>**](Permission.md) | | [optional] |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'metronome'
|
|
14
|
+
|
|
15
|
+
instance = Metronome::ModifyApiKeyRequest.new(
|
|
16
|
+
status: disabled,
|
|
17
|
+
permissions: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
data/docs/Permission.md
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Metronome::PermissionDeniedResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **error_code** | **String** | | |
|
|
8
|
+
| **customer_status** | **String** | | [optional] |
|
|
9
|
+
| **api_key_status** | **String** | | [optional] |
|
|
10
|
+
| **granted_permissions** | [**Array<Permission>**](Permission.md) | | [optional] |
|
|
11
|
+
| **required_permission** | [**Permission**](Permission.md) | | [optional] |
|
|
12
|
+
| **internal_contact** | **String** | | [optional] |
|
|
13
|
+
| **message** | **String** | | [optional] |
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```ruby
|
|
18
|
+
require 'metronome'
|
|
19
|
+
|
|
20
|
+
instance = Metronome::PermissionDeniedResponse.new(
|
|
21
|
+
error_code: null,
|
|
22
|
+
customer_status: null,
|
|
23
|
+
api_key_status: null,
|
|
24
|
+
granted_permissions: null,
|
|
25
|
+
required_permission: null,
|
|
26
|
+
internal_contact: data-protection-it-manager@yourdomain.com,
|
|
27
|
+
message: null
|
|
28
|
+
)
|
|
29
|
+
```
|
|
30
|
+
|
data/docs/PolicyData.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Metronome::PolicyData
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **policy_id** | **String** | | |
|
|
8
|
+
| **create_date** | **Date** | Date in YYYYMMDD format. | |
|
|
9
|
+
| **aging_strategy** | [**AgingStrategy**](AgingStrategy.md) | | |
|
|
10
|
+
| **aging_offset_amount** | **Integer** | | |
|
|
11
|
+
| **aging_offset_unit** | [**AgingOffsetUnit**](AgingOffsetUnit.md) | | |
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```ruby
|
|
16
|
+
require 'metronome'
|
|
17
|
+
|
|
18
|
+
instance = Metronome::PolicyData.new(
|
|
19
|
+
policy_id: account-login,
|
|
20
|
+
create_date: null,
|
|
21
|
+
aging_strategy: null,
|
|
22
|
+
aging_offset_amount: null,
|
|
23
|
+
aging_offset_unit: null
|
|
24
|
+
)
|
|
25
|
+
```
|
|
26
|
+
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Metronome::PolicyDataListResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **response_type** | **String** | Always the value \"PolicyDataListResponse\" | |
|
|
8
|
+
| **count** | **Integer** | The number of policies with the given prefix. Count of all policies if no prefix was given. | |
|
|
9
|
+
| **offset** | **Integer** | How many items were skipped, specified in the request. | [optional] |
|
|
10
|
+
| **limit** | **Integer** | The maximum number of items to return, specified in the request. | [optional] |
|
|
11
|
+
| **prefix** | **String** | The string prefix to limit policy names, specified in the request. | [optional] |
|
|
12
|
+
| **result** | [**Array<PolicyData>**](PolicyData.md) | | |
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```ruby
|
|
17
|
+
require 'metronome'
|
|
18
|
+
|
|
19
|
+
instance = Metronome::PolicyDataListResponse.new(
|
|
20
|
+
response_type: null,
|
|
21
|
+
count: null,
|
|
22
|
+
offset: null,
|
|
23
|
+
limit: null,
|
|
24
|
+
prefix: null,
|
|
25
|
+
result: null
|
|
26
|
+
)
|
|
27
|
+
```
|
|
28
|
+
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Metronome::PolicyListResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **response_type** | **String** | Always the value \"PolicyListResponse\" | |
|
|
8
|
+
| **count** | **Integer** | The number of policies with the given prefix. Count of all policies if no prefix was given. | |
|
|
9
|
+
| **offset** | **Integer** | How many items were skipped, specified in the request. | [optional] |
|
|
10
|
+
| **limit** | **Integer** | The maximum number of items to return, specified in the request. | [optional] |
|
|
11
|
+
| **prefix** | **String** | The string prefix to limit policy names, specified in the request. | [optional] |
|
|
12
|
+
| **result** | **Array<String>** | | |
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```ruby
|
|
17
|
+
require 'metronome'
|
|
18
|
+
|
|
19
|
+
instance = Metronome::PolicyListResponse.new(
|
|
20
|
+
response_type: null,
|
|
21
|
+
count: null,
|
|
22
|
+
offset: null,
|
|
23
|
+
limit: null,
|
|
24
|
+
prefix: null,
|
|
25
|
+
result: ["account-login","sales-order-processing","marketing-email"]
|
|
26
|
+
)
|
|
27
|
+
```
|
|
28
|
+
|
|
@@ -0,0 +1,379 @@
|
|
|
1
|
+
# Metronome::PolicyManagementApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://YOUR-CUSTOMER-ID.api.eu-north-1.privatedataservices.com*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**get_many_policies**](PolicyManagementApi.md#get_many_policies) | **GET** /v1/metronome/policies | |
|
|
8
|
+
| [**get_policy**](PolicyManagementApi.md#get_policy) | **GET** /v1/metronome/policies/{policy-id} | |
|
|
9
|
+
| [**get_policy_log**](PolicyManagementApi.md#get_policy_log) | **GET** /v1/metronome/policies/{policy-id}/log | |
|
|
10
|
+
| [**get_policy_members**](PolicyManagementApi.md#get_policy_members) | **GET** /v1/metronome/policies/{policy-id}/members | |
|
|
11
|
+
| [**put_policy**](PolicyManagementApi.md#put_policy) | **PUT** /v1/metronome/policies/{policy-id} | |
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## get_many_policies
|
|
15
|
+
|
|
16
|
+
> <GetManyPolicies200Response> get_many_policies(opts)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
Read many policies alphanumerically sorted
|
|
21
|
+
|
|
22
|
+
### Examples
|
|
23
|
+
|
|
24
|
+
```ruby
|
|
25
|
+
require 'time'
|
|
26
|
+
require 'metronome'
|
|
27
|
+
# setup authorization
|
|
28
|
+
Metronome.configure do |config|
|
|
29
|
+
# Configure API key authorization: ApiKeyAuth
|
|
30
|
+
config.api_key['ApiKeyAuth'] = 'YOUR API KEY'
|
|
31
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
32
|
+
# config.api_key_prefix['ApiKeyAuth'] = 'Bearer'
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
api_instance = Metronome::PolicyManagementApi.new
|
|
36
|
+
opts = {
|
|
37
|
+
prefix: 'marketing-', # String |
|
|
38
|
+
offset: 56, # Integer | The number of policies to drop from the start
|
|
39
|
+
limit: 56, # Integer | The number of policies to include
|
|
40
|
+
include_data: true # Boolean | Whether to include aging-strategy, aging-offset-amount, aging-offset-unit etc.
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
begin
|
|
44
|
+
|
|
45
|
+
result = api_instance.get_many_policies(opts)
|
|
46
|
+
p result
|
|
47
|
+
rescue Metronome::ApiError => e
|
|
48
|
+
puts "Error when calling PolicyManagementApi->get_many_policies: #{e}"
|
|
49
|
+
end
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
#### Using the get_many_policies_with_http_info variant
|
|
53
|
+
|
|
54
|
+
This returns an Array which contains the response data, status code and headers.
|
|
55
|
+
|
|
56
|
+
> <Array(<GetManyPolicies200Response>, Integer, Hash)> get_many_policies_with_http_info(opts)
|
|
57
|
+
|
|
58
|
+
```ruby
|
|
59
|
+
begin
|
|
60
|
+
|
|
61
|
+
data, status_code, headers = api_instance.get_many_policies_with_http_info(opts)
|
|
62
|
+
p status_code # => 2xx
|
|
63
|
+
p headers # => { ... }
|
|
64
|
+
p data # => <GetManyPolicies200Response>
|
|
65
|
+
rescue Metronome::ApiError => e
|
|
66
|
+
puts "Error when calling PolicyManagementApi->get_many_policies_with_http_info: #{e}"
|
|
67
|
+
end
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Parameters
|
|
71
|
+
|
|
72
|
+
| Name | Type | Description | Notes |
|
|
73
|
+
| ---- | ---- | ----------- | ----- |
|
|
74
|
+
| **prefix** | **String** | | [optional] |
|
|
75
|
+
| **offset** | **Integer** | The number of policies to drop from the start | [optional] |
|
|
76
|
+
| **limit** | **Integer** | The number of policies to include | [optional] |
|
|
77
|
+
| **include_data** | **Boolean** | Whether to include aging-strategy, aging-offset-amount, aging-offset-unit etc. | [optional] |
|
|
78
|
+
|
|
79
|
+
### Return type
|
|
80
|
+
|
|
81
|
+
[**GetManyPolicies200Response**](GetManyPolicies200Response.md)
|
|
82
|
+
|
|
83
|
+
### Authorization
|
|
84
|
+
|
|
85
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
86
|
+
|
|
87
|
+
### HTTP request headers
|
|
88
|
+
|
|
89
|
+
- **Content-Type**: Not defined
|
|
90
|
+
- **Accept**: application/json
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
## get_policy
|
|
94
|
+
|
|
95
|
+
> <PolicyData> get_policy(policy_id)
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
Read a specific policy
|
|
100
|
+
|
|
101
|
+
### Examples
|
|
102
|
+
|
|
103
|
+
```ruby
|
|
104
|
+
require 'time'
|
|
105
|
+
require 'metronome'
|
|
106
|
+
# setup authorization
|
|
107
|
+
Metronome.configure do |config|
|
|
108
|
+
# Configure API key authorization: ApiKeyAuth
|
|
109
|
+
config.api_key['ApiKeyAuth'] = 'YOUR API KEY'
|
|
110
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
111
|
+
# config.api_key_prefix['ApiKeyAuth'] = 'Bearer'
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
api_instance = Metronome::PolicyManagementApi.new
|
|
115
|
+
policy_id = 'policy_id_example' # String |
|
|
116
|
+
|
|
117
|
+
begin
|
|
118
|
+
|
|
119
|
+
result = api_instance.get_policy(policy_id)
|
|
120
|
+
p result
|
|
121
|
+
rescue Metronome::ApiError => e
|
|
122
|
+
puts "Error when calling PolicyManagementApi->get_policy: #{e}"
|
|
123
|
+
end
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
#### Using the get_policy_with_http_info variant
|
|
127
|
+
|
|
128
|
+
This returns an Array which contains the response data, status code and headers.
|
|
129
|
+
|
|
130
|
+
> <Array(<PolicyData>, Integer, Hash)> get_policy_with_http_info(policy_id)
|
|
131
|
+
|
|
132
|
+
```ruby
|
|
133
|
+
begin
|
|
134
|
+
|
|
135
|
+
data, status_code, headers = api_instance.get_policy_with_http_info(policy_id)
|
|
136
|
+
p status_code # => 2xx
|
|
137
|
+
p headers # => { ... }
|
|
138
|
+
p data # => <PolicyData>
|
|
139
|
+
rescue Metronome::ApiError => e
|
|
140
|
+
puts "Error when calling PolicyManagementApi->get_policy_with_http_info: #{e}"
|
|
141
|
+
end
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
### Parameters
|
|
145
|
+
|
|
146
|
+
| Name | Type | Description | Notes |
|
|
147
|
+
| ---- | ---- | ----------- | ----- |
|
|
148
|
+
| **policy_id** | **String** | | |
|
|
149
|
+
|
|
150
|
+
### Return type
|
|
151
|
+
|
|
152
|
+
[**PolicyData**](PolicyData.md)
|
|
153
|
+
|
|
154
|
+
### Authorization
|
|
155
|
+
|
|
156
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
157
|
+
|
|
158
|
+
### HTTP request headers
|
|
159
|
+
|
|
160
|
+
- **Content-Type**: Not defined
|
|
161
|
+
- **Accept**: application/json
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
## get_policy_log
|
|
165
|
+
|
|
166
|
+
> <PolicyData> get_policy_log(policy_id)
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
Read a specific policy's access log
|
|
171
|
+
|
|
172
|
+
### Examples
|
|
173
|
+
|
|
174
|
+
```ruby
|
|
175
|
+
require 'time'
|
|
176
|
+
require 'metronome'
|
|
177
|
+
# setup authorization
|
|
178
|
+
Metronome.configure do |config|
|
|
179
|
+
# Configure API key authorization: ApiKeyAuth
|
|
180
|
+
config.api_key['ApiKeyAuth'] = 'YOUR API KEY'
|
|
181
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
182
|
+
# config.api_key_prefix['ApiKeyAuth'] = 'Bearer'
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
api_instance = Metronome::PolicyManagementApi.new
|
|
186
|
+
policy_id = 'policy_id_example' # String |
|
|
187
|
+
|
|
188
|
+
begin
|
|
189
|
+
|
|
190
|
+
result = api_instance.get_policy_log(policy_id)
|
|
191
|
+
p result
|
|
192
|
+
rescue Metronome::ApiError => e
|
|
193
|
+
puts "Error when calling PolicyManagementApi->get_policy_log: #{e}"
|
|
194
|
+
end
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
#### Using the get_policy_log_with_http_info variant
|
|
198
|
+
|
|
199
|
+
This returns an Array which contains the response data, status code and headers.
|
|
200
|
+
|
|
201
|
+
> <Array(<PolicyData>, Integer, Hash)> get_policy_log_with_http_info(policy_id)
|
|
202
|
+
|
|
203
|
+
```ruby
|
|
204
|
+
begin
|
|
205
|
+
|
|
206
|
+
data, status_code, headers = api_instance.get_policy_log_with_http_info(policy_id)
|
|
207
|
+
p status_code # => 2xx
|
|
208
|
+
p headers # => { ... }
|
|
209
|
+
p data # => <PolicyData>
|
|
210
|
+
rescue Metronome::ApiError => e
|
|
211
|
+
puts "Error when calling PolicyManagementApi->get_policy_log_with_http_info: #{e}"
|
|
212
|
+
end
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
### Parameters
|
|
216
|
+
|
|
217
|
+
| Name | Type | Description | Notes |
|
|
218
|
+
| ---- | ---- | ----------- | ----- |
|
|
219
|
+
| **policy_id** | **String** | | |
|
|
220
|
+
|
|
221
|
+
### Return type
|
|
222
|
+
|
|
223
|
+
[**PolicyData**](PolicyData.md)
|
|
224
|
+
|
|
225
|
+
### Authorization
|
|
226
|
+
|
|
227
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
228
|
+
|
|
229
|
+
### HTTP request headers
|
|
230
|
+
|
|
231
|
+
- **Content-Type**: Not defined
|
|
232
|
+
- **Accept**: application/json
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
## get_policy_members
|
|
236
|
+
|
|
237
|
+
> <PolicyData> get_policy_members(policy_id)
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
Read the items and sub-items that have been used for a specific policy
|
|
242
|
+
|
|
243
|
+
### Examples
|
|
244
|
+
|
|
245
|
+
```ruby
|
|
246
|
+
require 'time'
|
|
247
|
+
require 'metronome'
|
|
248
|
+
# setup authorization
|
|
249
|
+
Metronome.configure do |config|
|
|
250
|
+
# Configure API key authorization: ApiKeyAuth
|
|
251
|
+
config.api_key['ApiKeyAuth'] = 'YOUR API KEY'
|
|
252
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
253
|
+
# config.api_key_prefix['ApiKeyAuth'] = 'Bearer'
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
api_instance = Metronome::PolicyManagementApi.new
|
|
257
|
+
policy_id = 'policy_id_example' # String |
|
|
258
|
+
|
|
259
|
+
begin
|
|
260
|
+
|
|
261
|
+
result = api_instance.get_policy_members(policy_id)
|
|
262
|
+
p result
|
|
263
|
+
rescue Metronome::ApiError => e
|
|
264
|
+
puts "Error when calling PolicyManagementApi->get_policy_members: #{e}"
|
|
265
|
+
end
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
#### Using the get_policy_members_with_http_info variant
|
|
269
|
+
|
|
270
|
+
This returns an Array which contains the response data, status code and headers.
|
|
271
|
+
|
|
272
|
+
> <Array(<PolicyData>, Integer, Hash)> get_policy_members_with_http_info(policy_id)
|
|
273
|
+
|
|
274
|
+
```ruby
|
|
275
|
+
begin
|
|
276
|
+
|
|
277
|
+
data, status_code, headers = api_instance.get_policy_members_with_http_info(policy_id)
|
|
278
|
+
p status_code # => 2xx
|
|
279
|
+
p headers # => { ... }
|
|
280
|
+
p data # => <PolicyData>
|
|
281
|
+
rescue Metronome::ApiError => e
|
|
282
|
+
puts "Error when calling PolicyManagementApi->get_policy_members_with_http_info: #{e}"
|
|
283
|
+
end
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
### Parameters
|
|
287
|
+
|
|
288
|
+
| Name | Type | Description | Notes |
|
|
289
|
+
| ---- | ---- | ----------- | ----- |
|
|
290
|
+
| **policy_id** | **String** | | |
|
|
291
|
+
|
|
292
|
+
### Return type
|
|
293
|
+
|
|
294
|
+
[**PolicyData**](PolicyData.md)
|
|
295
|
+
|
|
296
|
+
### Authorization
|
|
297
|
+
|
|
298
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
299
|
+
|
|
300
|
+
### HTTP request headers
|
|
301
|
+
|
|
302
|
+
- **Content-Type**: Not defined
|
|
303
|
+
- **Accept**: application/json
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
## put_policy
|
|
307
|
+
|
|
308
|
+
> <CreateOrModifyPolicyResponse> put_policy(policy_id, opts)
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
Create or modify a policy
|
|
313
|
+
|
|
314
|
+
### Examples
|
|
315
|
+
|
|
316
|
+
```ruby
|
|
317
|
+
require 'time'
|
|
318
|
+
require 'metronome'
|
|
319
|
+
# setup authorization
|
|
320
|
+
Metronome.configure do |config|
|
|
321
|
+
# Configure API key authorization: ApiKeyAuth
|
|
322
|
+
config.api_key['ApiKeyAuth'] = 'YOUR API KEY'
|
|
323
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
324
|
+
# config.api_key_prefix['ApiKeyAuth'] = 'Bearer'
|
|
325
|
+
end
|
|
326
|
+
|
|
327
|
+
api_instance = Metronome::PolicyManagementApi.new
|
|
328
|
+
policy_id = 'policy_id_example' # String | The name of the policy to be created
|
|
329
|
+
opts = {
|
|
330
|
+
create_or_modify_policy_request: Metronome::CreateOrModifyPolicyRequest.new({aging_strategy: Metronome::AgingStrategy::FIRST_READ_OR_WRITE, aging_offset_amount: 37, aging_offset_unit: Metronome::AgingOffsetUnit::YEAR}) # CreateOrModifyPolicyRequest |
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
begin
|
|
334
|
+
|
|
335
|
+
result = api_instance.put_policy(policy_id, opts)
|
|
336
|
+
p result
|
|
337
|
+
rescue Metronome::ApiError => e
|
|
338
|
+
puts "Error when calling PolicyManagementApi->put_policy: #{e}"
|
|
339
|
+
end
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
#### Using the put_policy_with_http_info variant
|
|
343
|
+
|
|
344
|
+
This returns an Array which contains the response data, status code and headers.
|
|
345
|
+
|
|
346
|
+
> <Array(<CreateOrModifyPolicyResponse>, Integer, Hash)> put_policy_with_http_info(policy_id, opts)
|
|
347
|
+
|
|
348
|
+
```ruby
|
|
349
|
+
begin
|
|
350
|
+
|
|
351
|
+
data, status_code, headers = api_instance.put_policy_with_http_info(policy_id, opts)
|
|
352
|
+
p status_code # => 2xx
|
|
353
|
+
p headers # => { ... }
|
|
354
|
+
p data # => <CreateOrModifyPolicyResponse>
|
|
355
|
+
rescue Metronome::ApiError => e
|
|
356
|
+
puts "Error when calling PolicyManagementApi->put_policy_with_http_info: #{e}"
|
|
357
|
+
end
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
### Parameters
|
|
361
|
+
|
|
362
|
+
| Name | Type | Description | Notes |
|
|
363
|
+
| ---- | ---- | ----------- | ----- |
|
|
364
|
+
| **policy_id** | **String** | The name of the policy to be created | |
|
|
365
|
+
| **create_or_modify_policy_request** | [**CreateOrModifyPolicyRequest**](CreateOrModifyPolicyRequest.md) | | [optional] |
|
|
366
|
+
|
|
367
|
+
### Return type
|
|
368
|
+
|
|
369
|
+
[**CreateOrModifyPolicyResponse**](CreateOrModifyPolicyResponse.md)
|
|
370
|
+
|
|
371
|
+
### Authorization
|
|
372
|
+
|
|
373
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
374
|
+
|
|
375
|
+
### HTTP request headers
|
|
376
|
+
|
|
377
|
+
- **Content-Type**: application/json
|
|
378
|
+
- **Accept**: application/json
|
|
379
|
+
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Metronome::PutApiKeyRequest
|
|
2
|
+
|
|
3
|
+
## Class instance methods
|
|
4
|
+
|
|
5
|
+
### `openapi_one_of`
|
|
6
|
+
|
|
7
|
+
Returns the list of classes defined in oneOf.
|
|
8
|
+
|
|
9
|
+
#### Example
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
require 'metronome'
|
|
13
|
+
|
|
14
|
+
Metronome::PutApiKeyRequest.openapi_one_of
|
|
15
|
+
# =>
|
|
16
|
+
# [
|
|
17
|
+
# :'CreateApiKeyRequest',
|
|
18
|
+
# :'ModifyApiKeyRequest'
|
|
19
|
+
# ]
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
### build
|
|
23
|
+
|
|
24
|
+
Find the appropriate object from the `openapi_one_of` list and casts the data into it.
|
|
25
|
+
|
|
26
|
+
#### Example
|
|
27
|
+
|
|
28
|
+
```ruby
|
|
29
|
+
require 'metronome'
|
|
30
|
+
|
|
31
|
+
Metronome::PutApiKeyRequest.build(data)
|
|
32
|
+
# => #<CreateApiKeyRequest:0x00007fdd4aab02a0>
|
|
33
|
+
|
|
34
|
+
Metronome::PutApiKeyRequest.build(data_that_doesnt_match)
|
|
35
|
+
# => nil
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
#### Parameters
|
|
39
|
+
|
|
40
|
+
| Name | Type | Description |
|
|
41
|
+
| ---- | ---- | ----------- |
|
|
42
|
+
| **data** | **Mixed** | data to be matched against the list of oneOf items |
|
|
43
|
+
|
|
44
|
+
#### Return type
|
|
45
|
+
|
|
46
|
+
- `CreateApiKeyRequest`
|
|
47
|
+
- `ModifyApiKeyRequest`
|
|
48
|
+
- `nil` (if no type matches)
|
|
49
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Metronome::SignupRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **internal_contact** | **String** | | |
|
|
8
|
+
|
|
9
|
+
## Example
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
require 'metronome'
|
|
13
|
+
|
|
14
|
+
instance = Metronome::SignupRequest.new(
|
|
15
|
+
internal_contact: data-protection-it-manager@yourdomain.com
|
|
16
|
+
)
|
|
17
|
+
```
|
|
18
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Metronome::SignupResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **dev_api_url** | **String** | | |
|
|
8
|
+
| **dev_master_api_key** | **String** | | |
|
|
9
|
+
| **production_api_url** | **String** | | |
|
|
10
|
+
| **production_master_api_key** | **String** | | |
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
require 'metronome'
|
|
16
|
+
|
|
17
|
+
instance = Metronome::SignupResponse.new(
|
|
18
|
+
dev_api_url: https://your-customer-id.dev-api.eu-north-1.tantalus.privatedataservices.com,
|
|
19
|
+
dev_master_api_key: abcdefgh1234567,
|
|
20
|
+
production_api_url: https://your-customer-id.api.eu-north-1.tantalus.privatedataservices.com,
|
|
21
|
+
production_master_api_key: abcdefgh1234567
|
|
22
|
+
)
|
|
23
|
+
```
|
|
24
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Metronome::SubItemMetadataResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **expired** | **Boolean** | Present and true only when the item has expired | [optional] |
|
|
8
|
+
| **policy_id** | **String** | The policy which currently governs how long this item will be retained | |
|
|
9
|
+
| **expiry_date** | **Date** | The date at which this item will expire if it is not used again | [optional] |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'metronome'
|
|
15
|
+
|
|
16
|
+
instance = Metronome::SubItemMetadataResponse.new(
|
|
17
|
+
expired: null,
|
|
18
|
+
policy_id: null,
|
|
19
|
+
expiry_date: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Metronome::SubItemsExpiry
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **expiry_type** | **String** | Always the value \"SubItemsExpiry\" | |
|
|
8
|
+
| **parent_item_id** | **String** | | |
|
|
9
|
+
| **sub_items** | **Array<String>** | | |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'metronome'
|
|
15
|
+
|
|
16
|
+
instance = Metronome::SubItemsExpiry.new(
|
|
17
|
+
expiry_type: null,
|
|
18
|
+
parent_item_id: customer-123,
|
|
19
|
+
sub_items: ["email","mobile-phone"]
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|