ibm_cloud_resource_controller 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/README.md +148 -0
- data/Rakefile +10 -0
- data/docs/Credentials.md +25 -0
- data/docs/ErrorReport.md +23 -0
- data/docs/PlanHistoryItem.md +19 -0
- data/docs/Reclamation.md +45 -0
- data/docs/ReclamationActionsPost.md +19 -0
- data/docs/ReclamationsList.md +17 -0
- data/docs/ResourceAlias.md +57 -0
- data/docs/ResourceAliasPatch.md +17 -0
- data/docs/ResourceAliasPost.md +21 -0
- data/docs/ResourceAliasesApi.md +302 -0
- data/docs/ResourceAliasesList.md +21 -0
- data/docs/ResourceBinding.md +57 -0
- data/docs/ResourceBindingPatch.md +17 -0
- data/docs/ResourceBindingPost.md +25 -0
- data/docs/ResourceBindingPostParameters.md +17 -0
- data/docs/ResourceBindingsApi.md +300 -0
- data/docs/ResourceBindingsList.md +21 -0
- data/docs/ResourceInstance.md +81 -0
- data/docs/ResourceInstancePatch.md +23 -0
- data/docs/ResourceInstancePost.md +29 -0
- data/docs/ResourceInstancesApi.md +418 -0
- data/docs/ResourceInstancesList.md +21 -0
- data/docs/ResourceKey.md +53 -0
- data/docs/ResourceKeyPatch.md +17 -0
- data/docs/ResourceKeyPost.md +23 -0
- data/docs/ResourceKeysApi.md +298 -0
- data/docs/ResourceKeysList.md +21 -0
- data/docs/ResourceReclamationsApi.md +128 -0
- data/git_push.sh +58 -0
- data/ibm_cloud_resource_controller.gemspec +38 -0
- data/lib/ibm_cloud_resource_controller.rb +67 -0
- data/lib/ibm_cloud_resource_controller/api/resource_aliases_api.rb +363 -0
- data/lib/ibm_cloud_resource_controller/api/resource_bindings_api.rb +360 -0
- data/lib/ibm_cloud_resource_controller/api/resource_instances_api.rb +493 -0
- data/lib/ibm_cloud_resource_controller/api/resource_keys_api.rb +357 -0
- data/lib/ibm_cloud_resource_controller/api/resource_reclamations_api.rb +156 -0
- data/lib/ibm_cloud_resource_controller/api_client.rb +388 -0
- data/lib/ibm_cloud_resource_controller/api_error.rb +57 -0
- data/lib/ibm_cloud_resource_controller/configuration.rb +248 -0
- data/lib/ibm_cloud_resource_controller/models/credentials.rb +250 -0
- data/lib/ibm_cloud_resource_controller/models/error_report.rb +240 -0
- data/lib/ibm_cloud_resource_controller/models/plan_history_item.rb +230 -0
- data/lib/ibm_cloud_resource_controller/models/reclamation.rb +352 -0
- data/lib/ibm_cloud_resource_controller/models/reclamation_actions_post.rb +220 -0
- data/lib/ibm_cloud_resource_controller/models/reclamations_list.rb +212 -0
- data/lib/ibm_cloud_resource_controller/models/resource_alias.rb +410 -0
- data/lib/ibm_cloud_resource_controller/models/resource_alias_patch.rb +236 -0
- data/lib/ibm_cloud_resource_controller/models/resource_alias_post.rb +266 -0
- data/lib/ibm_cloud_resource_controller/models/resource_aliases_list.rb +247 -0
- data/lib/ibm_cloud_resource_controller/models/resource_binding.rb +410 -0
- data/lib/ibm_cloud_resource_controller/models/resource_binding_patch.rb +236 -0
- data/lib/ibm_cloud_resource_controller/models/resource_binding_post.rb +278 -0
- data/lib/ibm_cloud_resource_controller/models/resource_binding_post_parameters.rb +210 -0
- data/lib/ibm_cloud_resource_controller/models/resource_bindings_list.rb +247 -0
- data/lib/ibm_cloud_resource_controller/models/resource_instance.rb +536 -0
- data/lib/ibm_cloud_resource_controller/models/resource_instance_patch.rb +259 -0
- data/lib/ibm_cloud_resource_controller/models/resource_instance_post.rb +317 -0
- data/lib/ibm_cloud_resource_controller/models/resource_instances_list.rb +247 -0
- data/lib/ibm_cloud_resource_controller/models/resource_key.rb +390 -0
- data/lib/ibm_cloud_resource_controller/models/resource_key_patch.rb +236 -0
- data/lib/ibm_cloud_resource_controller/models/resource_key_post.rb +251 -0
- data/lib/ibm_cloud_resource_controller/models/resource_keys_list.rb +247 -0
- data/lib/ibm_cloud_resource_controller/version.rb +15 -0
- data/spec/api/resource_aliases_api_spec.rb +104 -0
- data/spec/api/resource_bindings_api_spec.rb +103 -0
- data/spec/api/resource_instances_api_spec.rb +130 -0
- data/spec/api/resource_keys_api_spec.rb +102 -0
- data/spec/api/resource_reclamations_api_spec.rb +62 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/credentials_spec.rb +65 -0
- data/spec/models/error_report_spec.rb +59 -0
- data/spec/models/plan_history_item_spec.rb +47 -0
- data/spec/models/reclamation_actions_post_spec.rb +47 -0
- data/spec/models/reclamation_spec.rb +125 -0
- data/spec/models/reclamations_list_spec.rb +41 -0
- data/spec/models/resource_alias_patch_spec.rb +41 -0
- data/spec/models/resource_alias_post_spec.rb +53 -0
- data/spec/models/resource_alias_spec.rb +143 -0
- data/spec/models/resource_aliases_list_spec.rb +53 -0
- data/spec/models/resource_binding_patch_spec.rb +41 -0
- data/spec/models/resource_binding_post_parameters_spec.rb +41 -0
- data/spec/models/resource_binding_post_spec.rb +65 -0
- data/spec/models/resource_binding_spec.rb +137 -0
- data/spec/models/resource_bindings_list_spec.rb +53 -0
- data/spec/models/resource_instance_patch_spec.rb +59 -0
- data/spec/models/resource_instance_post_spec.rb +77 -0
- data/spec/models/resource_instance_spec.rb +191 -0
- data/spec/models/resource_instances_list_spec.rb +53 -0
- data/spec/models/resource_key_patch_spec.rb +41 -0
- data/spec/models/resource_key_post_spec.rb +59 -0
- data/spec/models/resource_key_spec.rb +125 -0
- data/spec/models/resource_keys_list_spec.rb +53 -0
- data/spec/spec_helper.rb +111 -0
- metadata +211 -0
@@ -0,0 +1,21 @@
|
|
1
|
+
# IbmCloudResourceController::ResourceInstancesList
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**next_url** | **String** | The URL for requesting the next page of results. |
|
8
|
+
**resources** | [**Array<ResourceInstance>**](ResourceInstance.md) | A list of resource instances. |
|
9
|
+
**rows_count** | **Integer** | The number of resource instances in `resources`. |
|
10
|
+
|
11
|
+
## Code Sample
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
require 'IbmCloudResourceController'
|
15
|
+
|
16
|
+
instance = IbmCloudResourceController::ResourceInstancesList.new(next_url: null,
|
17
|
+
resources: null,
|
18
|
+
rows_count: null)
|
19
|
+
```
|
20
|
+
|
21
|
+
|
data/docs/ResourceKey.md
ADDED
@@ -0,0 +1,53 @@
|
|
1
|
+
# IbmCloudResourceController::ResourceKey
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**id** | **String** | The ID associated with the key. | [optional]
|
8
|
+
**guid** | **String** | When you create a new key, a globally unique identifier (GUID) is assigned. This GUID is a unique internal identifier managed by the resource controller that corresponds to the key. | [optional]
|
9
|
+
**crn** | **String** | The full Cloud Resource Name (CRN) associated with the key. For more information about this format, see [Cloud Resource Names](https://cloud.ibm.com/docs/overview?topic=overview-crn). | [optional]
|
10
|
+
**url** | **String** | When you created a new key, a relative URL path is created identifying the location of the key. | [optional]
|
11
|
+
**name** | **String** | The human-readable name of the key. | [optional]
|
12
|
+
**account_id** | **String** | An alpha-numeric value identifying the account ID. | [optional]
|
13
|
+
**resource_group_id** | **String** | The short ID of the resource group. | [optional]
|
14
|
+
**source_crn** | **String** | The CRN of resource instance or alias associated to the key. | [optional]
|
15
|
+
**role** | **String** | The role CRN. | [optional]
|
16
|
+
**state** | **String** | The state of the key. | [optional]
|
17
|
+
**credentials** | [**Credentials**](Credentials.md) | The credentials for the key. Additional key-value pairs are passed through from the resource brokers. Refer to service’s documentation for additional details. | [optional]
|
18
|
+
**iam_compatible** | **Boolean** | Specifies whether the key’s credentials support IAM. | [optional]
|
19
|
+
**resource_instance_url** | **String** | The relative path to the resource. | [optional]
|
20
|
+
**created_at** | **DateTime** | The date when the key was created. | [optional]
|
21
|
+
**updated_at** | **DateTime** | The date when the key was last updated. | [optional]
|
22
|
+
**deleted_at** | **DateTime** | The date when the key was deleted. | [optional]
|
23
|
+
**created_by** | **String** | The subject who created the key. | [optional]
|
24
|
+
**updated_by** | **String** | The subject who updated the key. | [optional]
|
25
|
+
**deleted_by** | **String** | The subject who deleted the key. | [optional]
|
26
|
+
|
27
|
+
## Code Sample
|
28
|
+
|
29
|
+
```ruby
|
30
|
+
require 'IbmCloudResourceController'
|
31
|
+
|
32
|
+
instance = IbmCloudResourceController::ResourceKey.new(id: null,
|
33
|
+
guid: null,
|
34
|
+
crn: null,
|
35
|
+
url: null,
|
36
|
+
name: null,
|
37
|
+
account_id: null,
|
38
|
+
resource_group_id: null,
|
39
|
+
source_crn: null,
|
40
|
+
role: null,
|
41
|
+
state: null,
|
42
|
+
credentials: null,
|
43
|
+
iam_compatible: null,
|
44
|
+
resource_instance_url: null,
|
45
|
+
created_at: null,
|
46
|
+
updated_at: null,
|
47
|
+
deleted_at: null,
|
48
|
+
created_by: null,
|
49
|
+
updated_by: null,
|
50
|
+
deleted_by: null)
|
51
|
+
```
|
52
|
+
|
53
|
+
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# IbmCloudResourceController::ResourceKeyPatch
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**name** | **String** | The new name of the key. Must be 180 characters or less and cannot include any special characters other than `(space) - . _ :`. |
|
8
|
+
|
9
|
+
## Code Sample
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'IbmCloudResourceController'
|
13
|
+
|
14
|
+
instance = IbmCloudResourceController::ResourceKeyPatch.new(name: my-new-key-name)
|
15
|
+
```
|
16
|
+
|
17
|
+
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# IbmCloudResourceController::ResourceKeyPost
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**name** | **String** | The name of the key. |
|
8
|
+
**source** | **String** | The short or long ID of resource instance or alias. |
|
9
|
+
**parameters** | [**ResourceBindingPostParameters**](ResourceBindingPostParameters.md) | | [optional]
|
10
|
+
**role** | **String** | The role name or it's CRN. | [optional] [default to 'Writer']
|
11
|
+
|
12
|
+
## Code Sample
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
require 'IbmCloudResourceController'
|
16
|
+
|
17
|
+
instance = IbmCloudResourceController::ResourceKeyPost.new(name: my-key,
|
18
|
+
source: 25eba2a9-beef-450b-82cf-f5ad5e36c6dd,
|
19
|
+
parameters: null,
|
20
|
+
role: Writer)
|
21
|
+
```
|
22
|
+
|
23
|
+
|
@@ -0,0 +1,298 @@
|
|
1
|
+
# IbmCloudResourceController::ResourceKeysApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://resource-controller.cloud.ibm.com*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**create_resource_key**](ResourceKeysApi.md#create_resource_key) | **POST** /v2/resource_keys | Create a new resource key
|
8
|
+
[**delete_resource_key**](ResourceKeysApi.md#delete_resource_key) | **DELETE** /v2/resource_keys/{id} | Delete a resource key by ID
|
9
|
+
[**get_resource_key**](ResourceKeysApi.md#get_resource_key) | **GET** /v2/resource_keys/{id} | Get resource key by ID
|
10
|
+
[**list_resource_keys**](ResourceKeysApi.md#list_resource_keys) | **GET** /v2/resource_keys | Get a list of all of the resource keys.
|
11
|
+
[**update_resource_key**](ResourceKeysApi.md#update_resource_key) | **PATCH** /v2/resource_keys/{id} | Update a resource key
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
## create_resource_key
|
16
|
+
|
17
|
+
> ResourceKey create_resource_key(resource_key_post)
|
18
|
+
|
19
|
+
Create a new resource key
|
20
|
+
|
21
|
+
Create a new resource key.
|
22
|
+
|
23
|
+
### Example
|
24
|
+
|
25
|
+
```ruby
|
26
|
+
# load the gem
|
27
|
+
require 'ibm_cloud_resource_controller'
|
28
|
+
# setup authorization
|
29
|
+
IbmCloudResourceController.configure do |config|
|
30
|
+
# Configure API key authorization: IAM
|
31
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
32
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
33
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
34
|
+
end
|
35
|
+
|
36
|
+
api_instance = IbmCloudResourceController::ResourceKeysApi.new
|
37
|
+
resource_key_post = IbmCloudResourceController::ResourceKeyPost.new # ResourceKeyPost |
|
38
|
+
|
39
|
+
begin
|
40
|
+
#Create a new resource key
|
41
|
+
result = api_instance.create_resource_key(resource_key_post)
|
42
|
+
p result
|
43
|
+
rescue IbmCloudResourceController::ApiError => e
|
44
|
+
puts "Exception when calling ResourceKeysApi->create_resource_key: #{e}"
|
45
|
+
end
|
46
|
+
```
|
47
|
+
|
48
|
+
### Parameters
|
49
|
+
|
50
|
+
|
51
|
+
Name | Type | Description | Notes
|
52
|
+
------------- | ------------- | ------------- | -------------
|
53
|
+
**resource_key_post** | [**ResourceKeyPost**](ResourceKeyPost.md)| |
|
54
|
+
|
55
|
+
### Return type
|
56
|
+
|
57
|
+
[**ResourceKey**](ResourceKey.md)
|
58
|
+
|
59
|
+
### Authorization
|
60
|
+
|
61
|
+
[IAM](../README.md#IAM)
|
62
|
+
|
63
|
+
### HTTP request headers
|
64
|
+
|
65
|
+
- **Content-Type**: application/json
|
66
|
+
- **Accept**: application/json
|
67
|
+
|
68
|
+
|
69
|
+
## delete_resource_key
|
70
|
+
|
71
|
+
> delete_resource_key(id)
|
72
|
+
|
73
|
+
Delete a resource key by ID
|
74
|
+
|
75
|
+
Delete a resource key by ID.
|
76
|
+
|
77
|
+
### Example
|
78
|
+
|
79
|
+
```ruby
|
80
|
+
# load the gem
|
81
|
+
require 'ibm_cloud_resource_controller'
|
82
|
+
# setup authorization
|
83
|
+
IbmCloudResourceController.configure do |config|
|
84
|
+
# Configure API key authorization: IAM
|
85
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
86
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
87
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
88
|
+
end
|
89
|
+
|
90
|
+
api_instance = IbmCloudResourceController::ResourceKeysApi.new
|
91
|
+
id = 'id_example' # String | The short or long ID of the key.
|
92
|
+
|
93
|
+
begin
|
94
|
+
#Delete a resource key by ID
|
95
|
+
api_instance.delete_resource_key(id)
|
96
|
+
rescue IbmCloudResourceController::ApiError => e
|
97
|
+
puts "Exception when calling ResourceKeysApi->delete_resource_key: #{e}"
|
98
|
+
end
|
99
|
+
```
|
100
|
+
|
101
|
+
### Parameters
|
102
|
+
|
103
|
+
|
104
|
+
Name | Type | Description | Notes
|
105
|
+
------------- | ------------- | ------------- | -------------
|
106
|
+
**id** | **String**| The short or long ID of the key. |
|
107
|
+
|
108
|
+
### Return type
|
109
|
+
|
110
|
+
nil (empty response body)
|
111
|
+
|
112
|
+
### Authorization
|
113
|
+
|
114
|
+
[IAM](../README.md#IAM)
|
115
|
+
|
116
|
+
### HTTP request headers
|
117
|
+
|
118
|
+
- **Content-Type**: Not defined
|
119
|
+
- **Accept**: application/json
|
120
|
+
|
121
|
+
|
122
|
+
## get_resource_key
|
123
|
+
|
124
|
+
> ResourceKey get_resource_key(id)
|
125
|
+
|
126
|
+
Get resource key by ID
|
127
|
+
|
128
|
+
Get resource key by ID.
|
129
|
+
|
130
|
+
### Example
|
131
|
+
|
132
|
+
```ruby
|
133
|
+
# load the gem
|
134
|
+
require 'ibm_cloud_resource_controller'
|
135
|
+
# setup authorization
|
136
|
+
IbmCloudResourceController.configure do |config|
|
137
|
+
# Configure API key authorization: IAM
|
138
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
139
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
140
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
141
|
+
end
|
142
|
+
|
143
|
+
api_instance = IbmCloudResourceController::ResourceKeysApi.new
|
144
|
+
id = 'id_example' # String | The short or long ID of the key.
|
145
|
+
|
146
|
+
begin
|
147
|
+
#Get resource key by ID
|
148
|
+
result = api_instance.get_resource_key(id)
|
149
|
+
p result
|
150
|
+
rescue IbmCloudResourceController::ApiError => e
|
151
|
+
puts "Exception when calling ResourceKeysApi->get_resource_key: #{e}"
|
152
|
+
end
|
153
|
+
```
|
154
|
+
|
155
|
+
### Parameters
|
156
|
+
|
157
|
+
|
158
|
+
Name | Type | Description | Notes
|
159
|
+
------------- | ------------- | ------------- | -------------
|
160
|
+
**id** | **String**| The short or long ID of the key. |
|
161
|
+
|
162
|
+
### Return type
|
163
|
+
|
164
|
+
[**ResourceKey**](ResourceKey.md)
|
165
|
+
|
166
|
+
### Authorization
|
167
|
+
|
168
|
+
[IAM](../README.md#IAM)
|
169
|
+
|
170
|
+
### HTTP request headers
|
171
|
+
|
172
|
+
- **Content-Type**: Not defined
|
173
|
+
- **Accept**: application/json
|
174
|
+
|
175
|
+
|
176
|
+
## list_resource_keys
|
177
|
+
|
178
|
+
> ResourceKeysList list_resource_keys(opts)
|
179
|
+
|
180
|
+
Get a list of all of the resource keys.
|
181
|
+
|
182
|
+
List all resource keys.
|
183
|
+
|
184
|
+
### Example
|
185
|
+
|
186
|
+
```ruby
|
187
|
+
# load the gem
|
188
|
+
require 'ibm_cloud_resource_controller'
|
189
|
+
# setup authorization
|
190
|
+
IbmCloudResourceController.configure do |config|
|
191
|
+
# Configure API key authorization: IAM
|
192
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
193
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
194
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
195
|
+
end
|
196
|
+
|
197
|
+
api_instance = IbmCloudResourceController::ResourceKeysApi.new
|
198
|
+
opts = {
|
199
|
+
guid: 'guid_example', # String | When you create a new key, a GUID (globally unique identifier) is assigned. This is a unique internal GUID managed by Resource controller that corresponds to the key.
|
200
|
+
name: 'name_example', # String | The human-readable name of the key.
|
201
|
+
resource_group_id: 'resource_group_id_example', # String | The short ID of the resource group.
|
202
|
+
resource_id: 'resource_id_example', # String | The unique ID of the offering. This value is provided by and stored in the global catalog.
|
203
|
+
limit: 'limit_example', # String | Limit on how many items should be returned.
|
204
|
+
updated_from: '2019-01-08T00:00:00.000Z', # String | Start date inclusive filter.
|
205
|
+
updated_to: '2019-01-08T00:00:00.000Z' # String | End date inclusive filter.
|
206
|
+
}
|
207
|
+
|
208
|
+
begin
|
209
|
+
#Get a list of all of the resource keys.
|
210
|
+
result = api_instance.list_resource_keys(opts)
|
211
|
+
p result
|
212
|
+
rescue IbmCloudResourceController::ApiError => e
|
213
|
+
puts "Exception when calling ResourceKeysApi->list_resource_keys: #{e}"
|
214
|
+
end
|
215
|
+
```
|
216
|
+
|
217
|
+
### Parameters
|
218
|
+
|
219
|
+
|
220
|
+
Name | Type | Description | Notes
|
221
|
+
------------- | ------------- | ------------- | -------------
|
222
|
+
**guid** | **String**| When you create a new key, a GUID (globally unique identifier) is assigned. This is a unique internal GUID managed by Resource controller that corresponds to the key. | [optional]
|
223
|
+
**name** | **String**| The human-readable name of the key. | [optional]
|
224
|
+
**resource_group_id** | **String**| The short ID of the resource group. | [optional]
|
225
|
+
**resource_id** | **String**| The unique ID of the offering. This value is provided by and stored in the global catalog. | [optional]
|
226
|
+
**limit** | **String**| Limit on how many items should be returned. | [optional]
|
227
|
+
**updated_from** | **String**| Start date inclusive filter. | [optional]
|
228
|
+
**updated_to** | **String**| End date inclusive filter. | [optional]
|
229
|
+
|
230
|
+
### Return type
|
231
|
+
|
232
|
+
[**ResourceKeysList**](ResourceKeysList.md)
|
233
|
+
|
234
|
+
### Authorization
|
235
|
+
|
236
|
+
[IAM](../README.md#IAM)
|
237
|
+
|
238
|
+
### HTTP request headers
|
239
|
+
|
240
|
+
- **Content-Type**: Not defined
|
241
|
+
- **Accept**: application/json
|
242
|
+
|
243
|
+
|
244
|
+
## update_resource_key
|
245
|
+
|
246
|
+
> ResourceKey update_resource_key(id, resource_key_patch)
|
247
|
+
|
248
|
+
Update a resource key
|
249
|
+
|
250
|
+
Update a resource key by ID.
|
251
|
+
|
252
|
+
### Example
|
253
|
+
|
254
|
+
```ruby
|
255
|
+
# load the gem
|
256
|
+
require 'ibm_cloud_resource_controller'
|
257
|
+
# setup authorization
|
258
|
+
IbmCloudResourceController.configure do |config|
|
259
|
+
# Configure API key authorization: IAM
|
260
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
261
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
262
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
263
|
+
end
|
264
|
+
|
265
|
+
api_instance = IbmCloudResourceController::ResourceKeysApi.new
|
266
|
+
id = 'id_example' # String | The short or long ID of the key.
|
267
|
+
resource_key_patch = IbmCloudResourceController::ResourceKeyPatch.new # ResourceKeyPatch |
|
268
|
+
|
269
|
+
begin
|
270
|
+
#Update a resource key
|
271
|
+
result = api_instance.update_resource_key(id, resource_key_patch)
|
272
|
+
p result
|
273
|
+
rescue IbmCloudResourceController::ApiError => e
|
274
|
+
puts "Exception when calling ResourceKeysApi->update_resource_key: #{e}"
|
275
|
+
end
|
276
|
+
```
|
277
|
+
|
278
|
+
### Parameters
|
279
|
+
|
280
|
+
|
281
|
+
Name | Type | Description | Notes
|
282
|
+
------------- | ------------- | ------------- | -------------
|
283
|
+
**id** | **String**| The short or long ID of the key. |
|
284
|
+
**resource_key_patch** | [**ResourceKeyPatch**](ResourceKeyPatch.md)| |
|
285
|
+
|
286
|
+
### Return type
|
287
|
+
|
288
|
+
[**ResourceKey**](ResourceKey.md)
|
289
|
+
|
290
|
+
### Authorization
|
291
|
+
|
292
|
+
[IAM](../README.md#IAM)
|
293
|
+
|
294
|
+
### HTTP request headers
|
295
|
+
|
296
|
+
- **Content-Type**: application/json
|
297
|
+
- **Accept**: application/json
|
298
|
+
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# IbmCloudResourceController::ResourceKeysList
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**next_url** | **String** | The URL for requesting the next page of results. |
|
8
|
+
**resources** | [**Array<ResourceKey>**](ResourceKey.md) | A list of resource keys. |
|
9
|
+
**rows_count** | **Integer** | The number of resource keys in `resources`. |
|
10
|
+
|
11
|
+
## Code Sample
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
require 'IbmCloudResourceController'
|
15
|
+
|
16
|
+
instance = IbmCloudResourceController::ResourceKeysList.new(next_url: null,
|
17
|
+
resources: null,
|
18
|
+
rows_count: null)
|
19
|
+
```
|
20
|
+
|
21
|
+
|
@@ -0,0 +1,128 @@
|
|
1
|
+
# IbmCloudResourceController::ResourceReclamationsApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://resource-controller.cloud.ibm.com*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**list_reclamations**](ResourceReclamationsApi.md#list_reclamations) | **GET** /v1/reclamations | Get a list of all reclamations
|
8
|
+
[**run_reclamation_action**](ResourceReclamationsApi.md#run_reclamation_action) | **POST** /v1/reclamations/{id}/actions/{action_name} | Perform a reclamation action
|
9
|
+
|
10
|
+
|
11
|
+
|
12
|
+
## list_reclamations
|
13
|
+
|
14
|
+
> ReclamationsList list_reclamations(opts)
|
15
|
+
|
16
|
+
Get a list of all reclamations
|
17
|
+
|
18
|
+
Get a list of all reclamations.
|
19
|
+
|
20
|
+
### Example
|
21
|
+
|
22
|
+
```ruby
|
23
|
+
# load the gem
|
24
|
+
require 'ibm_cloud_resource_controller'
|
25
|
+
# setup authorization
|
26
|
+
IbmCloudResourceController.configure do |config|
|
27
|
+
# Configure API key authorization: IAM
|
28
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
29
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
30
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
31
|
+
end
|
32
|
+
|
33
|
+
api_instance = IbmCloudResourceController::ResourceReclamationsApi.new
|
34
|
+
opts = {
|
35
|
+
account_id: 'account_id_example', # String | An alpha-numeric value identifying the account ID.
|
36
|
+
resource_instance_id: 'resource_instance_id_example' # String | The short ID of the resource instance.
|
37
|
+
}
|
38
|
+
|
39
|
+
begin
|
40
|
+
#Get a list of all reclamations
|
41
|
+
result = api_instance.list_reclamations(opts)
|
42
|
+
p result
|
43
|
+
rescue IbmCloudResourceController::ApiError => e
|
44
|
+
puts "Exception when calling ResourceReclamationsApi->list_reclamations: #{e}"
|
45
|
+
end
|
46
|
+
```
|
47
|
+
|
48
|
+
### Parameters
|
49
|
+
|
50
|
+
|
51
|
+
Name | Type | Description | Notes
|
52
|
+
------------- | ------------- | ------------- | -------------
|
53
|
+
**account_id** | **String**| An alpha-numeric value identifying the account ID. | [optional]
|
54
|
+
**resource_instance_id** | **String**| The short ID of the resource instance. | [optional]
|
55
|
+
|
56
|
+
### Return type
|
57
|
+
|
58
|
+
[**ReclamationsList**](ReclamationsList.md)
|
59
|
+
|
60
|
+
### Authorization
|
61
|
+
|
62
|
+
[IAM](../README.md#IAM)
|
63
|
+
|
64
|
+
### HTTP request headers
|
65
|
+
|
66
|
+
- **Content-Type**: Not defined
|
67
|
+
- **Accept**: application/json
|
68
|
+
|
69
|
+
|
70
|
+
## run_reclamation_action
|
71
|
+
|
72
|
+
> Reclamation run_reclamation_action(id, action_name, opts)
|
73
|
+
|
74
|
+
Perform a reclamation action
|
75
|
+
|
76
|
+
Reclaim (provisionally delete) a resource so that it can no longer be used, or restore a resource so that it's usable again.
|
77
|
+
|
78
|
+
### Example
|
79
|
+
|
80
|
+
```ruby
|
81
|
+
# load the gem
|
82
|
+
require 'ibm_cloud_resource_controller'
|
83
|
+
# setup authorization
|
84
|
+
IbmCloudResourceController.configure do |config|
|
85
|
+
# Configure API key authorization: IAM
|
86
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
87
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
88
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
89
|
+
end
|
90
|
+
|
91
|
+
api_instance = IbmCloudResourceController::ResourceReclamationsApi.new
|
92
|
+
id = 'id_example' # String | The ID associated with the reclamation.
|
93
|
+
action_name = 'action_name_example' # String | The reclamation action name. Specify `reclaim` to delete a resource, or `restore` to restore a resource.
|
94
|
+
opts = {
|
95
|
+
reclamation_actions_post: IbmCloudResourceController::ReclamationActionsPost.new # ReclamationActionsPost |
|
96
|
+
}
|
97
|
+
|
98
|
+
begin
|
99
|
+
#Perform a reclamation action
|
100
|
+
result = api_instance.run_reclamation_action(id, action_name, opts)
|
101
|
+
p result
|
102
|
+
rescue IbmCloudResourceController::ApiError => e
|
103
|
+
puts "Exception when calling ResourceReclamationsApi->run_reclamation_action: #{e}"
|
104
|
+
end
|
105
|
+
```
|
106
|
+
|
107
|
+
### Parameters
|
108
|
+
|
109
|
+
|
110
|
+
Name | Type | Description | Notes
|
111
|
+
------------- | ------------- | ------------- | -------------
|
112
|
+
**id** | **String**| The ID associated with the reclamation. |
|
113
|
+
**action_name** | **String**| The reclamation action name. Specify `reclaim` to delete a resource, or `restore` to restore a resource. |
|
114
|
+
**reclamation_actions_post** | [**ReclamationActionsPost**](ReclamationActionsPost.md)| | [optional]
|
115
|
+
|
116
|
+
### Return type
|
117
|
+
|
118
|
+
[**Reclamation**](Reclamation.md)
|
119
|
+
|
120
|
+
### Authorization
|
121
|
+
|
122
|
+
[IAM](../README.md#IAM)
|
123
|
+
|
124
|
+
### HTTP request headers
|
125
|
+
|
126
|
+
- **Content-Type**: application/json
|
127
|
+
- **Accept**: application/json
|
128
|
+
|