ibm_cloud_resource_controller 1.0.1
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 +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,81 @@
|
|
|
1
|
+
# IbmCloudResourceController::ResourceInstance
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**id** | **String** | The ID associated with the instance. | [optional]
|
|
8
|
+
**guid** | **String** | When you create a new resource, a globally unique identifier (GUID) is assigned. This GUID is a unique internal identifier managed by the resource controller that corresponds to the instance. | [optional]
|
|
9
|
+
**crn** | **String** | The full Cloud Resource Name (CRN) associated with the instance. 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 provision a new resource, a relative URL path is created identifying the location of the instance. | [optional]
|
|
11
|
+
**name** | **String** | The human-readable name of the instance. | [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
|
+
**resource_group_crn** | **String** | The long ID (full CRN) of the resource group. | [optional]
|
|
15
|
+
**resource_id** | **String** | The unique ID of the offering. This value is provided by and stored in the global catalog. | [optional]
|
|
16
|
+
**resource_plan_id** | **String** | The unique ID of the plan associated with the offering. This value is provided by and stored in the global catalog. | [optional]
|
|
17
|
+
**target_crn** | **String** | The full deployment CRN as defined in the global catalog. The Cloud Resource Name (CRN) of the deployment location where the instance is provisioned. | [optional]
|
|
18
|
+
**parameters** | **Hash<String, Object>** | The current configuration parameters of the instance. | [optional]
|
|
19
|
+
**state** | **String** | The current state of the instance. For example, if the instance is deleted, it will return removed. | [optional]
|
|
20
|
+
**type** | **String** | The type of the instance, e.g. `service_instance`. | [optional]
|
|
21
|
+
**sub_type** | **String** | The sub-type of instance, e.g. `cfaas`. | [optional]
|
|
22
|
+
**allow_cleanup** | **Boolean** | A boolean that dictates if the resource instance should be deleted (cleaned up) during the processing of a region instance delete call. | [optional]
|
|
23
|
+
**locked** | **Boolean** | A boolean that dictates if the resource instance is locked or not. | [optional]
|
|
24
|
+
**last_operation** | **Hash<String, Object>** | The status of the last operation requested on the instance. | [optional]
|
|
25
|
+
**dashboard_url** | **String** | The resource-broker-provided URL to access administrative features of the instance. | [optional]
|
|
26
|
+
**plan_history** | [**Array<PlanHistoryItem>**](PlanHistoryItem.md) | The plan history of the instance. | [optional]
|
|
27
|
+
**resource_aliases_url** | **String** | The relative path to the resource aliases for the instance. | [optional]
|
|
28
|
+
**resource_bindings_url** | **String** | The relative path to the resource bindings for the instance. | [optional]
|
|
29
|
+
**resource_keys_url** | **String** | The relative path to the resource keys for the instance. | [optional]
|
|
30
|
+
**created_at** | **DateTime** | The date when the instance was created. | [optional]
|
|
31
|
+
**created_by** | **String** | The subject who created the instance. | [optional]
|
|
32
|
+
**updated_at** | **DateTime** | The date when the instance was last updated. | [optional]
|
|
33
|
+
**updated_by** | **String** | The subject who updated the instance. | [optional]
|
|
34
|
+
**deleted_at** | **DateTime** | The date when the instance was deleted. | [optional]
|
|
35
|
+
**deleted_by** | **String** | The subject who deleted the instance. | [optional]
|
|
36
|
+
**scheduled_reclaim_at** | **DateTime** | The date when the instance was scheduled for reclamation. | [optional]
|
|
37
|
+
**scheduled_reclaim_by** | **String** | The subject who initiated the instance reclamation. | [optional]
|
|
38
|
+
**restored_at** | **DateTime** | The date when the instance under reclamation was restored. | [optional]
|
|
39
|
+
**restored_by** | **String** | The subject who restored the instance back from reclamation. | [optional]
|
|
40
|
+
|
|
41
|
+
## Code Sample
|
|
42
|
+
|
|
43
|
+
```ruby
|
|
44
|
+
require 'IbmCloudResourceController'
|
|
45
|
+
|
|
46
|
+
instance = IbmCloudResourceController::ResourceInstance.new(id: null,
|
|
47
|
+
guid: null,
|
|
48
|
+
crn: null,
|
|
49
|
+
url: null,
|
|
50
|
+
name: null,
|
|
51
|
+
account_id: null,
|
|
52
|
+
resource_group_id: null,
|
|
53
|
+
resource_group_crn: null,
|
|
54
|
+
resource_id: null,
|
|
55
|
+
resource_plan_id: null,
|
|
56
|
+
target_crn: null,
|
|
57
|
+
parameters: null,
|
|
58
|
+
state: null,
|
|
59
|
+
type: null,
|
|
60
|
+
sub_type: null,
|
|
61
|
+
allow_cleanup: null,
|
|
62
|
+
locked: null,
|
|
63
|
+
last_operation: null,
|
|
64
|
+
dashboard_url: null,
|
|
65
|
+
plan_history: null,
|
|
66
|
+
resource_aliases_url: null,
|
|
67
|
+
resource_bindings_url: null,
|
|
68
|
+
resource_keys_url: null,
|
|
69
|
+
created_at: null,
|
|
70
|
+
created_by: null,
|
|
71
|
+
updated_at: null,
|
|
72
|
+
updated_by: null,
|
|
73
|
+
deleted_at: null,
|
|
74
|
+
deleted_by: null,
|
|
75
|
+
scheduled_reclaim_at: null,
|
|
76
|
+
scheduled_reclaim_by: null,
|
|
77
|
+
restored_at: null,
|
|
78
|
+
restored_by: null)
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# IbmCloudResourceController::ResourceInstancePatch
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**name** | **String** | The new name of the instance. Must be 180 characters or less and cannot include any special characters other than `(space) - . _ :`. | [optional]
|
|
8
|
+
**parameters** | **Hash<String, Object>** | The new configuration options for the instance. | [optional]
|
|
9
|
+
**resource_plan_id** | **String** | The unique ID of the plan associated with the offering. This value is provided by and stored in the global catalog. | [optional]
|
|
10
|
+
**allow_cleanup** | **Boolean** | A boolean that dictates if the resource instance should be deleted (cleaned up) during the processing of a region instance delete call. | [optional]
|
|
11
|
+
|
|
12
|
+
## Code Sample
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
require 'IbmCloudResourceController'
|
|
16
|
+
|
|
17
|
+
instance = IbmCloudResourceController::ResourceInstancePatch.new(name: my-new-instance-name,
|
|
18
|
+
parameters: null,
|
|
19
|
+
resource_plan_id: a8dff6d3-d287-4668-a81d-c87c55c2656d,
|
|
20
|
+
allow_cleanup: null)
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# IbmCloudResourceController::ResourceInstancePost
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**name** | **String** | The name of the instance. Must be 180 characters or less and cannot include any special characters other than `(space) - . _ :`. |
|
|
8
|
+
**target** | **String** | The deployment location where the instance should be hosted. |
|
|
9
|
+
**resource_group** | **String** | Short or long ID of resource group |
|
|
10
|
+
**resource_plan_id** | **String** | The unique ID of the plan associated with the offering. This value is provided by and stored in the global catalog. |
|
|
11
|
+
**tags** | **Array<String>** | Tags that are attached to the instance after provisioning. These tags can be searched and managed through the Tagging API in IBM Cloud. | [optional]
|
|
12
|
+
**allow_cleanup** | **Boolean** | A boolean that dictates if the resource instance should be deleted (cleaned up) during the processing of a region instance delete call. | [optional] [default to false]
|
|
13
|
+
**parameters** | **Hash<String, Object>** | Configuration options represented as key-value pairs that are passed through to the target resource brokers. | [optional]
|
|
14
|
+
|
|
15
|
+
## Code Sample
|
|
16
|
+
|
|
17
|
+
```ruby
|
|
18
|
+
require 'IbmCloudResourceController'
|
|
19
|
+
|
|
20
|
+
instance = IbmCloudResourceController::ResourceInstancePost.new(name: my-instance,
|
|
21
|
+
target: bluemix-us-south,
|
|
22
|
+
resource_group: 5c49eabc-f5e8-5881-a37e-2d100a33b3df,
|
|
23
|
+
resource_plan_id: cloudant-standard,
|
|
24
|
+
tags: null,
|
|
25
|
+
allow_cleanup: null,
|
|
26
|
+
parameters: null)
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
|
|
@@ -0,0 +1,418 @@
|
|
|
1
|
+
# IbmCloudResourceController::ResourceInstancesApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://resource-controller.cloud.ibm.com*
|
|
4
|
+
|
|
5
|
+
Method | HTTP request | Description
|
|
6
|
+
------------- | ------------- | -------------
|
|
7
|
+
[**create_resource_instance**](ResourceInstancesApi.md#create_resource_instance) | **POST** /v2/resource_instances | Create (provision) a new resource instance
|
|
8
|
+
[**delete_resource_instance**](ResourceInstancesApi.md#delete_resource_instance) | **DELETE** /v2/resource_instances/{id} | Delete a resource instance
|
|
9
|
+
[**get_resource_instance**](ResourceInstancesApi.md#get_resource_instance) | **GET** /v2/resource_instances/{id} | Get a resource instance
|
|
10
|
+
[**list_resource_instances**](ResourceInstancesApi.md#list_resource_instances) | **GET** /v2/resource_instances | Get a list of all resource instances
|
|
11
|
+
[**lock_resource_instance**](ResourceInstancesApi.md#lock_resource_instance) | **POST** /v2/resource_instances/{id}/lock | Lock a resource instance
|
|
12
|
+
[**unlock_resource_instance**](ResourceInstancesApi.md#unlock_resource_instance) | **DELETE** /v2/resource_instances/{id}/lock | Unlock a resource instance
|
|
13
|
+
[**update_resource_instance**](ResourceInstancesApi.md#update_resource_instance) | **PATCH** /v2/resource_instances/{id} | Update a resource instance
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## create_resource_instance
|
|
18
|
+
|
|
19
|
+
> ResourceInstance create_resource_instance(resource_instance_post, opts)
|
|
20
|
+
|
|
21
|
+
Create (provision) a new resource instance
|
|
22
|
+
|
|
23
|
+
Provision a new resource in the specified location for the selected plan.
|
|
24
|
+
|
|
25
|
+
### Example
|
|
26
|
+
|
|
27
|
+
```ruby
|
|
28
|
+
# load the gem
|
|
29
|
+
require 'ibm_cloud_resource_controller'
|
|
30
|
+
# setup authorization
|
|
31
|
+
IbmCloudResourceController.configure do |config|
|
|
32
|
+
# Configure API key authorization: IAM
|
|
33
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
|
34
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
35
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
api_instance = IbmCloudResourceController::ResourceInstancesApi.new
|
|
39
|
+
resource_instance_post = IbmCloudResourceController::ResourceInstancePost.new # ResourceInstancePost |
|
|
40
|
+
opts = {
|
|
41
|
+
entity_lock: 'false' # String | Indicates if the resource instance is locked for further update or delete operations. It does not affect actions performed on child resources like aliases, bindings or keys. False by default.
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
begin
|
|
45
|
+
#Create (provision) a new resource instance
|
|
46
|
+
result = api_instance.create_resource_instance(resource_instance_post, opts)
|
|
47
|
+
p result
|
|
48
|
+
rescue IbmCloudResourceController::ApiError => e
|
|
49
|
+
puts "Exception when calling ResourceInstancesApi->create_resource_instance: #{e}"
|
|
50
|
+
end
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Parameters
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
Name | Type | Description | Notes
|
|
57
|
+
------------- | ------------- | ------------- | -------------
|
|
58
|
+
**resource_instance_post** | [**ResourceInstancePost**](ResourceInstancePost.md)| |
|
|
59
|
+
**entity_lock** | **String**| Indicates if the resource instance is locked for further update or delete operations. It does not affect actions performed on child resources like aliases, bindings or keys. False by default. | [optional] [default to 'false']
|
|
60
|
+
|
|
61
|
+
### Return type
|
|
62
|
+
|
|
63
|
+
[**ResourceInstance**](ResourceInstance.md)
|
|
64
|
+
|
|
65
|
+
### Authorization
|
|
66
|
+
|
|
67
|
+
[IAM](../README.md#IAM)
|
|
68
|
+
|
|
69
|
+
### HTTP request headers
|
|
70
|
+
|
|
71
|
+
- **Content-Type**: application/json
|
|
72
|
+
- **Accept**: application/json
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
## delete_resource_instance
|
|
76
|
+
|
|
77
|
+
> delete_resource_instance(id)
|
|
78
|
+
|
|
79
|
+
Delete a resource instance
|
|
80
|
+
|
|
81
|
+
Delete a resource instance by ID.
|
|
82
|
+
|
|
83
|
+
### Example
|
|
84
|
+
|
|
85
|
+
```ruby
|
|
86
|
+
# load the gem
|
|
87
|
+
require 'ibm_cloud_resource_controller'
|
|
88
|
+
# setup authorization
|
|
89
|
+
IbmCloudResourceController.configure do |config|
|
|
90
|
+
# Configure API key authorization: IAM
|
|
91
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
|
92
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
93
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
api_instance = IbmCloudResourceController::ResourceInstancesApi.new
|
|
97
|
+
id = 'id_example' # String | The short or long ID of the instance.
|
|
98
|
+
|
|
99
|
+
begin
|
|
100
|
+
#Delete a resource instance
|
|
101
|
+
api_instance.delete_resource_instance(id)
|
|
102
|
+
rescue IbmCloudResourceController::ApiError => e
|
|
103
|
+
puts "Exception when calling ResourceInstancesApi->delete_resource_instance: #{e}"
|
|
104
|
+
end
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### Parameters
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
Name | Type | Description | Notes
|
|
111
|
+
------------- | ------------- | ------------- | -------------
|
|
112
|
+
**id** | **String**| The short or long ID of the instance. |
|
|
113
|
+
|
|
114
|
+
### Return type
|
|
115
|
+
|
|
116
|
+
nil (empty response body)
|
|
117
|
+
|
|
118
|
+
### Authorization
|
|
119
|
+
|
|
120
|
+
[IAM](../README.md#IAM)
|
|
121
|
+
|
|
122
|
+
### HTTP request headers
|
|
123
|
+
|
|
124
|
+
- **Content-Type**: Not defined
|
|
125
|
+
- **Accept**: application/json
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
## get_resource_instance
|
|
129
|
+
|
|
130
|
+
> ResourceInstance get_resource_instance(id)
|
|
131
|
+
|
|
132
|
+
Get a resource instance
|
|
133
|
+
|
|
134
|
+
Retrieve a resource instance by ID.
|
|
135
|
+
|
|
136
|
+
### Example
|
|
137
|
+
|
|
138
|
+
```ruby
|
|
139
|
+
# load the gem
|
|
140
|
+
require 'ibm_cloud_resource_controller'
|
|
141
|
+
# setup authorization
|
|
142
|
+
IbmCloudResourceController.configure do |config|
|
|
143
|
+
# Configure API key authorization: IAM
|
|
144
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
|
145
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
146
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
api_instance = IbmCloudResourceController::ResourceInstancesApi.new
|
|
150
|
+
id = 'id_example' # String | The short or long ID of the instance.
|
|
151
|
+
|
|
152
|
+
begin
|
|
153
|
+
#Get a resource instance
|
|
154
|
+
result = api_instance.get_resource_instance(id)
|
|
155
|
+
p result
|
|
156
|
+
rescue IbmCloudResourceController::ApiError => e
|
|
157
|
+
puts "Exception when calling ResourceInstancesApi->get_resource_instance: #{e}"
|
|
158
|
+
end
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
### Parameters
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
Name | Type | Description | Notes
|
|
165
|
+
------------- | ------------- | ------------- | -------------
|
|
166
|
+
**id** | **String**| The short or long ID of the instance. |
|
|
167
|
+
|
|
168
|
+
### Return type
|
|
169
|
+
|
|
170
|
+
[**ResourceInstance**](ResourceInstance.md)
|
|
171
|
+
|
|
172
|
+
### Authorization
|
|
173
|
+
|
|
174
|
+
[IAM](../README.md#IAM)
|
|
175
|
+
|
|
176
|
+
### HTTP request headers
|
|
177
|
+
|
|
178
|
+
- **Content-Type**: Not defined
|
|
179
|
+
- **Accept**: application/json
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
## list_resource_instances
|
|
183
|
+
|
|
184
|
+
> ResourceInstancesList list_resource_instances(opts)
|
|
185
|
+
|
|
186
|
+
Get a list of all resource instances
|
|
187
|
+
|
|
188
|
+
Get a list of all resource instances.
|
|
189
|
+
|
|
190
|
+
### Example
|
|
191
|
+
|
|
192
|
+
```ruby
|
|
193
|
+
# load the gem
|
|
194
|
+
require 'ibm_cloud_resource_controller'
|
|
195
|
+
# setup authorization
|
|
196
|
+
IbmCloudResourceController.configure do |config|
|
|
197
|
+
# Configure API key authorization: IAM
|
|
198
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
|
199
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
200
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
api_instance = IbmCloudResourceController::ResourceInstancesApi.new
|
|
204
|
+
opts = {
|
|
205
|
+
guid: 'guid_example', # String | When you provision a new resource in the specified location for the selected plan, a GUID (globally unique identifier) is created. This is a unique internal GUID managed by Resource controller that corresponds to the instance.
|
|
206
|
+
name: 'name_example', # String | The human-readable name of the instance.
|
|
207
|
+
resource_group_id: 'resource_group_id_example', # String | Short ID of a resource group.
|
|
208
|
+
resource_id: 'resource_id_example', # String | The unique ID of the offering. This value is provided by and stored in the global catalog.
|
|
209
|
+
resource_plan_id: 'resource_plan_id_example', # String | The unique ID of the plan associated with the offering. This value is provided by and stored in the global catalog.
|
|
210
|
+
type: 'type_example', # String | The type of the instance. For example, `service_instance`.
|
|
211
|
+
sub_type: 'sub_type_example', # String | The sub-type of instance, e.g. `cfaas`.
|
|
212
|
+
limit: 'limit_example', # String | Limit on how many items should be returned.
|
|
213
|
+
updated_from: '2019-01-08T00:00:00.000Z', # String | Start date inclusive filter.
|
|
214
|
+
updated_to: '2019-01-08T00:00:00.000Z' # String | End date inclusive filter.
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
begin
|
|
218
|
+
#Get a list of all resource instances
|
|
219
|
+
result = api_instance.list_resource_instances(opts)
|
|
220
|
+
p result
|
|
221
|
+
rescue IbmCloudResourceController::ApiError => e
|
|
222
|
+
puts "Exception when calling ResourceInstancesApi->list_resource_instances: #{e}"
|
|
223
|
+
end
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
### Parameters
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
Name | Type | Description | Notes
|
|
230
|
+
------------- | ------------- | ------------- | -------------
|
|
231
|
+
**guid** | **String**| When you provision a new resource in the specified location for the selected plan, a GUID (globally unique identifier) is created. This is a unique internal GUID managed by Resource controller that corresponds to the instance. | [optional]
|
|
232
|
+
**name** | **String**| The human-readable name of the instance. | [optional]
|
|
233
|
+
**resource_group_id** | **String**| Short ID of a resource group. | [optional]
|
|
234
|
+
**resource_id** | **String**| The unique ID of the offering. This value is provided by and stored in the global catalog. | [optional]
|
|
235
|
+
**resource_plan_id** | **String**| The unique ID of the plan associated with the offering. This value is provided by and stored in the global catalog. | [optional]
|
|
236
|
+
**type** | **String**| The type of the instance. For example, `service_instance`. | [optional]
|
|
237
|
+
**sub_type** | **String**| The sub-type of instance, e.g. `cfaas`. | [optional]
|
|
238
|
+
**limit** | **String**| Limit on how many items should be returned. | [optional]
|
|
239
|
+
**updated_from** | **String**| Start date inclusive filter. | [optional]
|
|
240
|
+
**updated_to** | **String**| End date inclusive filter. | [optional]
|
|
241
|
+
|
|
242
|
+
### Return type
|
|
243
|
+
|
|
244
|
+
[**ResourceInstancesList**](ResourceInstancesList.md)
|
|
245
|
+
|
|
246
|
+
### Authorization
|
|
247
|
+
|
|
248
|
+
[IAM](../README.md#IAM)
|
|
249
|
+
|
|
250
|
+
### HTTP request headers
|
|
251
|
+
|
|
252
|
+
- **Content-Type**: Not defined
|
|
253
|
+
- **Accept**: application/json
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
## lock_resource_instance
|
|
257
|
+
|
|
258
|
+
> ResourceInstance lock_resource_instance(id)
|
|
259
|
+
|
|
260
|
+
Lock a resource instance
|
|
261
|
+
|
|
262
|
+
Locks a resource instance by ID. A locked instance can not be updated or deleted. It does not affect actions performed on child resources like aliases, bindings or keys.
|
|
263
|
+
|
|
264
|
+
### Example
|
|
265
|
+
|
|
266
|
+
```ruby
|
|
267
|
+
# load the gem
|
|
268
|
+
require 'ibm_cloud_resource_controller'
|
|
269
|
+
# setup authorization
|
|
270
|
+
IbmCloudResourceController.configure do |config|
|
|
271
|
+
# Configure API key authorization: IAM
|
|
272
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
|
273
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
274
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
|
275
|
+
end
|
|
276
|
+
|
|
277
|
+
api_instance = IbmCloudResourceController::ResourceInstancesApi.new
|
|
278
|
+
id = 'id_example' # String | The short or long ID of the instance.
|
|
279
|
+
|
|
280
|
+
begin
|
|
281
|
+
#Lock a resource instance
|
|
282
|
+
result = api_instance.lock_resource_instance(id)
|
|
283
|
+
p result
|
|
284
|
+
rescue IbmCloudResourceController::ApiError => e
|
|
285
|
+
puts "Exception when calling ResourceInstancesApi->lock_resource_instance: #{e}"
|
|
286
|
+
end
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
### Parameters
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
Name | Type | Description | Notes
|
|
293
|
+
------------- | ------------- | ------------- | -------------
|
|
294
|
+
**id** | **String**| The short or long ID of the instance. |
|
|
295
|
+
|
|
296
|
+
### Return type
|
|
297
|
+
|
|
298
|
+
[**ResourceInstance**](ResourceInstance.md)
|
|
299
|
+
|
|
300
|
+
### Authorization
|
|
301
|
+
|
|
302
|
+
[IAM](../README.md#IAM)
|
|
303
|
+
|
|
304
|
+
### HTTP request headers
|
|
305
|
+
|
|
306
|
+
- **Content-Type**: Not defined
|
|
307
|
+
- **Accept**: application/json
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
## unlock_resource_instance
|
|
311
|
+
|
|
312
|
+
> ResourceInstance unlock_resource_instance(id)
|
|
313
|
+
|
|
314
|
+
Unlock a resource instance
|
|
315
|
+
|
|
316
|
+
Unlocks a resource instance by ID.
|
|
317
|
+
|
|
318
|
+
### Example
|
|
319
|
+
|
|
320
|
+
```ruby
|
|
321
|
+
# load the gem
|
|
322
|
+
require 'ibm_cloud_resource_controller'
|
|
323
|
+
# setup authorization
|
|
324
|
+
IbmCloudResourceController.configure do |config|
|
|
325
|
+
# Configure API key authorization: IAM
|
|
326
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
|
327
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
328
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
|
329
|
+
end
|
|
330
|
+
|
|
331
|
+
api_instance = IbmCloudResourceController::ResourceInstancesApi.new
|
|
332
|
+
id = 'id_example' # String | The short or long ID of the instance.
|
|
333
|
+
|
|
334
|
+
begin
|
|
335
|
+
#Unlock a resource instance
|
|
336
|
+
result = api_instance.unlock_resource_instance(id)
|
|
337
|
+
p result
|
|
338
|
+
rescue IbmCloudResourceController::ApiError => e
|
|
339
|
+
puts "Exception when calling ResourceInstancesApi->unlock_resource_instance: #{e}"
|
|
340
|
+
end
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
### Parameters
|
|
344
|
+
|
|
345
|
+
|
|
346
|
+
Name | Type | Description | Notes
|
|
347
|
+
------------- | ------------- | ------------- | -------------
|
|
348
|
+
**id** | **String**| The short or long ID of the instance. |
|
|
349
|
+
|
|
350
|
+
### Return type
|
|
351
|
+
|
|
352
|
+
[**ResourceInstance**](ResourceInstance.md)
|
|
353
|
+
|
|
354
|
+
### Authorization
|
|
355
|
+
|
|
356
|
+
[IAM](../README.md#IAM)
|
|
357
|
+
|
|
358
|
+
### HTTP request headers
|
|
359
|
+
|
|
360
|
+
- **Content-Type**: Not defined
|
|
361
|
+
- **Accept**: application/json
|
|
362
|
+
|
|
363
|
+
|
|
364
|
+
## update_resource_instance
|
|
365
|
+
|
|
366
|
+
> ResourceInstance update_resource_instance(id, resource_instance_patch)
|
|
367
|
+
|
|
368
|
+
Update a resource instance
|
|
369
|
+
|
|
370
|
+
Update a resource instance by ID.
|
|
371
|
+
|
|
372
|
+
### Example
|
|
373
|
+
|
|
374
|
+
```ruby
|
|
375
|
+
# load the gem
|
|
376
|
+
require 'ibm_cloud_resource_controller'
|
|
377
|
+
# setup authorization
|
|
378
|
+
IbmCloudResourceController.configure do |config|
|
|
379
|
+
# Configure API key authorization: IAM
|
|
380
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
|
381
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
382
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
|
383
|
+
end
|
|
384
|
+
|
|
385
|
+
api_instance = IbmCloudResourceController::ResourceInstancesApi.new
|
|
386
|
+
id = 'id_example' # String | The short or long ID of the instance.
|
|
387
|
+
resource_instance_patch = IbmCloudResourceController::ResourceInstancePatch.new # ResourceInstancePatch |
|
|
388
|
+
|
|
389
|
+
begin
|
|
390
|
+
#Update a resource instance
|
|
391
|
+
result = api_instance.update_resource_instance(id, resource_instance_patch)
|
|
392
|
+
p result
|
|
393
|
+
rescue IbmCloudResourceController::ApiError => e
|
|
394
|
+
puts "Exception when calling ResourceInstancesApi->update_resource_instance: #{e}"
|
|
395
|
+
end
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
### Parameters
|
|
399
|
+
|
|
400
|
+
|
|
401
|
+
Name | Type | Description | Notes
|
|
402
|
+
------------- | ------------- | ------------- | -------------
|
|
403
|
+
**id** | **String**| The short or long ID of the instance. |
|
|
404
|
+
**resource_instance_patch** | [**ResourceInstancePatch**](ResourceInstancePatch.md)| |
|
|
405
|
+
|
|
406
|
+
### Return type
|
|
407
|
+
|
|
408
|
+
[**ResourceInstance**](ResourceInstance.md)
|
|
409
|
+
|
|
410
|
+
### Authorization
|
|
411
|
+
|
|
412
|
+
[IAM](../README.md#IAM)
|
|
413
|
+
|
|
414
|
+
### HTTP request headers
|
|
415
|
+
|
|
416
|
+
- **Content-Type**: application/json
|
|
417
|
+
- **Accept**: application/json
|
|
418
|
+
|