ibm_cloud_iam 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 +131 -0
- data/Rakefile +10 -0
- data/docs/ApiKey.md +43 -0
- data/docs/ApiKeyInsideCreateServiceIdRequest.md +23 -0
- data/docs/ApiKeyList.md +29 -0
- data/docs/CreateApiKeyRequest.md +27 -0
- data/docs/CreateServiceIdRequest.md +25 -0
- data/docs/EnityHistoryRecord.md +27 -0
- data/docs/Error.md +23 -0
- data/docs/ExceptionResponse.md +23 -0
- data/docs/ExceptionResponseContext.md +39 -0
- data/docs/IdentityOperationsApi.md +828 -0
- data/docs/InlineObject.md +19 -0
- data/docs/InlineObject1.md +23 -0
- data/docs/InlineObject2.md +21 -0
- data/docs/InlineObject3.md +25 -0
- data/docs/MFARequirementsResponse.md +21 -0
- data/docs/OidcExceptionResponse.md +25 -0
- data/docs/ResponseContext.md +37 -0
- data/docs/ServiceId.md +43 -0
- data/docs/ServiceIdList.md +29 -0
- data/docs/TokenOperationsApi.md +226 -0
- data/docs/TokenResponse.md +27 -0
- data/docs/UpdateApiKeyRequest.md +19 -0
- data/docs/UpdateServiceIdRequest.md +21 -0
- data/git_push.sh +58 -0
- data/ibm_cloud_iam-1.0.0.gem +0 -0
- data/ibm_cloud_iam.gemspec +38 -0
- data/lib/ibm_cloud_iam.rb +62 -0
- data/lib/ibm_cloud_iam/api/identity_operations_api.rb +1083 -0
- data/lib/ibm_cloud_iam/api/token_operations_api.rb +351 -0
- data/lib/ibm_cloud_iam/api_client.rb +387 -0
- data/lib/ibm_cloud_iam/api_error.rb +57 -0
- data/lib/ibm_cloud_iam/configuration.rb +241 -0
- data/lib/ibm_cloud_iam/models/api_key.rb +381 -0
- data/lib/ibm_cloud_iam/models/api_key_inside_create_service_id_request.rb +245 -0
- data/lib/ibm_cloud_iam/models/api_key_list.rb +276 -0
- data/lib/ibm_cloud_iam/models/create_api_key_request.rb +270 -0
- data/lib/ibm_cloud_iam/models/create_service_id_request.rb +261 -0
- data/lib/ibm_cloud_iam/models/enity_history_record.rb +292 -0
- data/lib/ibm_cloud_iam/models/error.rb +255 -0
- data/lib/ibm_cloud_iam/models/exception_response.rb +251 -0
- data/lib/ibm_cloud_iam/models/exception_response_context.rb +320 -0
- data/lib/ibm_cloud_iam/models/inline_object.rb +229 -0
- data/lib/ibm_cloud_iam/models/inline_object1.rb +254 -0
- data/lib/ibm_cloud_iam/models/inline_object2.rb +244 -0
- data/lib/ibm_cloud_iam/models/inline_object3.rb +269 -0
- data/lib/ibm_cloud_iam/models/mfa_requirements_response.rb +245 -0
- data/lib/ibm_cloud_iam/models/oidc_exception_response.rb +258 -0
- data/lib/ibm_cloud_iam/models/response_context.rb +310 -0
- data/lib/ibm_cloud_iam/models/service_id.rb +377 -0
- data/lib/ibm_cloud_iam/models/service_id_list.rb +276 -0
- data/lib/ibm_cloud_iam/models/token_response.rb +260 -0
- data/lib/ibm_cloud_iam/models/update_api_key_request.rb +220 -0
- data/lib/ibm_cloud_iam/models/update_service_id_request.rb +232 -0
- data/lib/ibm_cloud_iam/version.rb +15 -0
- data/spec/api/identity_operations_api_spec.rb +253 -0
- data/spec/api/token_operations_api_spec.rb +94 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/api_key_inside_create_service_id_request_spec.rb +59 -0
- data/spec/models/api_key_list_spec.rb +77 -0
- data/spec/models/api_key_spec.rb +119 -0
- data/spec/models/create_api_key_request_spec.rb +71 -0
- data/spec/models/create_service_id_request_spec.rb +65 -0
- data/spec/models/enity_history_record_spec.rb +71 -0
- data/spec/models/error_spec.rb +59 -0
- data/spec/models/exception_response_context_spec.rb +107 -0
- data/spec/models/exception_response_spec.rb +59 -0
- data/spec/models/inline_object1_spec.rb +59 -0
- data/spec/models/inline_object2_spec.rb +53 -0
- data/spec/models/inline_object3_spec.rb +65 -0
- data/spec/models/inline_object_spec.rb +47 -0
- data/spec/models/mfa_requirements_response_spec.rb +53 -0
- data/spec/models/oidc_exception_response_spec.rb +65 -0
- data/spec/models/response_context_spec.rb +101 -0
- data/spec/models/service_id_list_spec.rb +77 -0
- data/spec/models/service_id_spec.rb +119 -0
- data/spec/models/token_response_spec.rb +71 -0
- data/spec/models/update_api_key_request_spec.rb +47 -0
- data/spec/models/update_service_id_request_spec.rb +53 -0
- data/spec/spec_helper.rb +111 -0
- metadata +192 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 9d57905d48fc44f923084ccbb7635288f58dced897f5acf7a84cae0d717db4e7
|
4
|
+
data.tar.gz: d0aadbe5d0e29c022c30586845964dc8698a6f61991a2ef1c8417b718d7bbbc7
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: '050685c355e74b642ae420541ef31fc8ed6e6af6f75a685d64aceb661b09345b66e948c611701512222509bef2e9f43af5f91d09b50f8e3f321bceaf63e88610'
|
7
|
+
data.tar.gz: 3b7a3a6c8224a36c207db7d024beed88f934719a63f4801052a75490e1760c441ab515ab15d9d6bb187bf52ac80887b70e44191b99e870db5ec00553ad0beb0a
|
data/Gemfile
ADDED
data/README.md
ADDED
@@ -0,0 +1,131 @@
|
|
1
|
+
# ibm_cloud_iam
|
2
|
+
|
3
|
+
IbmCloudIam - the Ruby gem for the IAM Identity Services API
|
4
|
+
|
5
|
+
The IAM Identity Service API allows for the management of Identities (Service IDs, ApiKeys).
|
6
|
+
|
7
|
+
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
8
|
+
|
9
|
+
- API version: 1.0.0
|
10
|
+
- Package version: 1.0.0
|
11
|
+
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
12
|
+
|
13
|
+
## Installation
|
14
|
+
|
15
|
+
### Build a gem
|
16
|
+
|
17
|
+
To build the Ruby code into a gem:
|
18
|
+
|
19
|
+
```shell
|
20
|
+
gem build ibm_cloud_iam.gemspec
|
21
|
+
```
|
22
|
+
|
23
|
+
Then either install the gem locally:
|
24
|
+
|
25
|
+
```shell
|
26
|
+
gem install ./ibm_cloud_iam-1.0.0.gem
|
27
|
+
```
|
28
|
+
|
29
|
+
(for development, run `gem install --dev ./ibm_cloud_iam-1.0.0.gem` to install the development dependencies)
|
30
|
+
|
31
|
+
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
32
|
+
|
33
|
+
Finally add this to the Gemfile:
|
34
|
+
|
35
|
+
gem 'ibm_cloud_iam', '~> 1.0.0'
|
36
|
+
|
37
|
+
### Install from Git
|
38
|
+
|
39
|
+
If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
|
40
|
+
|
41
|
+
gem 'ibm_cloud_iam', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
|
42
|
+
|
43
|
+
### Include the Ruby code directly
|
44
|
+
|
45
|
+
Include the Ruby code directly using `-I` as follows:
|
46
|
+
|
47
|
+
```shell
|
48
|
+
ruby -Ilib script.rb
|
49
|
+
```
|
50
|
+
|
51
|
+
## Getting Started
|
52
|
+
|
53
|
+
Please follow the [installation](#installation) procedure and then run the following code:
|
54
|
+
|
55
|
+
```ruby
|
56
|
+
# Load the gem
|
57
|
+
require 'ibm_cloud_iam'
|
58
|
+
|
59
|
+
api_instance = IbmCloudIam::IdentityOperationsApi.new
|
60
|
+
create_api_key_request = IbmCloudIam::CreateApiKeyRequest.new # CreateApiKeyRequest | Request to create an API key
|
61
|
+
opts = {
|
62
|
+
authorization: 'authorization_example', # String | Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: 'No authorization header found'. Please make sure that the provided token has the required authority for the request.
|
63
|
+
entity_lock: 'false' # String | Indicates if the API key is locked for further write operations. False by default.
|
64
|
+
}
|
65
|
+
|
66
|
+
begin
|
67
|
+
#Create an API key
|
68
|
+
result = api_instance.create_api_key(create_api_key_request, opts)
|
69
|
+
p result
|
70
|
+
rescue IbmCloudIam::ApiError => e
|
71
|
+
puts "Exception when calling IdentityOperationsApi->create_api_key: #{e}"
|
72
|
+
end
|
73
|
+
|
74
|
+
```
|
75
|
+
|
76
|
+
## Documentation for API Endpoints
|
77
|
+
|
78
|
+
All URIs are relative to *https://iam.cloud.ibm.com*
|
79
|
+
|
80
|
+
Class | Method | HTTP request | Description
|
81
|
+
------------ | ------------- | ------------- | -------------
|
82
|
+
*IbmCloudIam::IdentityOperationsApi* | [**create_api_key**](docs/IdentityOperationsApi.md#create_api_key) | **POST** /v1/apikeys | Create an API key
|
83
|
+
*IbmCloudIam::IdentityOperationsApi* | [**create_service_id**](docs/IdentityOperationsApi.md#create_service_id) | **POST** /v1/serviceids/ | Create a service ID
|
84
|
+
*IbmCloudIam::IdentityOperationsApi* | [**delete_api_key**](docs/IdentityOperationsApi.md#delete_api_key) | **DELETE** /v1/apikeys/{id} | Deletes an API key
|
85
|
+
*IbmCloudIam::IdentityOperationsApi* | [**delete_service_id**](docs/IdentityOperationsApi.md#delete_service_id) | **DELETE** /v1/serviceids/{id} | Deletes a service ID and associated API keys
|
86
|
+
*IbmCloudIam::IdentityOperationsApi* | [**get_api_key**](docs/IdentityOperationsApi.md#get_api_key) | **GET** /v1/apikeys/{id} | Get details of an API key
|
87
|
+
*IbmCloudIam::IdentityOperationsApi* | [**get_api_keys_details**](docs/IdentityOperationsApi.md#get_api_keys_details) | **GET** /v1/apikeys/details | Get details of an API key by its value
|
88
|
+
*IbmCloudIam::IdentityOperationsApi* | [**get_service_id**](docs/IdentityOperationsApi.md#get_service_id) | **GET** /v1/serviceids/{id} | Get details of a service ID
|
89
|
+
*IbmCloudIam::IdentityOperationsApi* | [**list_api_keys**](docs/IdentityOperationsApi.md#list_api_keys) | **GET** /v1/apikeys | Get API keys for a given service or user IAM ID and account ID
|
90
|
+
*IbmCloudIam::IdentityOperationsApi* | [**list_service_ids**](docs/IdentityOperationsApi.md#list_service_ids) | **GET** /v1/serviceids/ | List service IDs
|
91
|
+
*IbmCloudIam::IdentityOperationsApi* | [**lock_api_key**](docs/IdentityOperationsApi.md#lock_api_key) | **POST** /v1/apikeys/{id}/lock | Lock the API key
|
92
|
+
*IbmCloudIam::IdentityOperationsApi* | [**lock_service_id**](docs/IdentityOperationsApi.md#lock_service_id) | **POST** /v1/serviceids/{id}/lock | Lock the service ID
|
93
|
+
*IbmCloudIam::IdentityOperationsApi* | [**unlock_api_key**](docs/IdentityOperationsApi.md#unlock_api_key) | **DELETE** /v1/apikeys/{id}/lock | Unlock the API key
|
94
|
+
*IbmCloudIam::IdentityOperationsApi* | [**unlock_service_id**](docs/IdentityOperationsApi.md#unlock_service_id) | **DELETE** /v1/serviceids/{id}/lock | Unlock the service ID
|
95
|
+
*IbmCloudIam::IdentityOperationsApi* | [**update_api_key**](docs/IdentityOperationsApi.md#update_api_key) | **PUT** /v1/apikeys/{id} | Updates an API key
|
96
|
+
*IbmCloudIam::IdentityOperationsApi* | [**update_service_id**](docs/IdentityOperationsApi.md#update_service_id) | **PUT** /v1/serviceids/{id} | Update service ID
|
97
|
+
*IbmCloudIam::TokenOperationsApi* | [**get_token_api_key**](docs/TokenOperationsApi.md#get_token_api_key) | **POST** /identity/token#apikey | Create an IAM access token for a user or service ID using an API key
|
98
|
+
*IbmCloudIam::TokenOperationsApi* | [**get_token_api_key_delegated_refresh_token**](docs/TokenOperationsApi.md#get_token_api_key_delegated_refresh_token) | **POST** /identity/token#apikey-delegated-refresh-token | Create an IAM access token and delegated refresh token for a user or service ID
|
99
|
+
*IbmCloudIam::TokenOperationsApi* | [**get_token_iam_authz**](docs/TokenOperationsApi.md#get_token_iam_authz) | **POST** /identity/token#iam-authz | Create an IAM access token based on an authorization policy
|
100
|
+
*IbmCloudIam::TokenOperationsApi* | [**get_token_password**](docs/TokenOperationsApi.md#get_token_password) | **POST** /identity/token#password | Create an IAM access token for a user using username / password credentials and an optional account identifier
|
101
|
+
|
102
|
+
|
103
|
+
## Documentation for Models
|
104
|
+
|
105
|
+
- [IbmCloudIam::ApiKey](docs/ApiKey.md)
|
106
|
+
- [IbmCloudIam::ApiKeyInsideCreateServiceIdRequest](docs/ApiKeyInsideCreateServiceIdRequest.md)
|
107
|
+
- [IbmCloudIam::ApiKeyList](docs/ApiKeyList.md)
|
108
|
+
- [IbmCloudIam::CreateApiKeyRequest](docs/CreateApiKeyRequest.md)
|
109
|
+
- [IbmCloudIam::CreateServiceIdRequest](docs/CreateServiceIdRequest.md)
|
110
|
+
- [IbmCloudIam::EnityHistoryRecord](docs/EnityHistoryRecord.md)
|
111
|
+
- [IbmCloudIam::Error](docs/Error.md)
|
112
|
+
- [IbmCloudIam::ExceptionResponse](docs/ExceptionResponse.md)
|
113
|
+
- [IbmCloudIam::ExceptionResponseContext](docs/ExceptionResponseContext.md)
|
114
|
+
- [IbmCloudIam::InlineObject](docs/InlineObject.md)
|
115
|
+
- [IbmCloudIam::InlineObject1](docs/InlineObject1.md)
|
116
|
+
- [IbmCloudIam::InlineObject2](docs/InlineObject2.md)
|
117
|
+
- [IbmCloudIam::InlineObject3](docs/InlineObject3.md)
|
118
|
+
- [IbmCloudIam::MFARequirementsResponse](docs/MFARequirementsResponse.md)
|
119
|
+
- [IbmCloudIam::OidcExceptionResponse](docs/OidcExceptionResponse.md)
|
120
|
+
- [IbmCloudIam::ResponseContext](docs/ResponseContext.md)
|
121
|
+
- [IbmCloudIam::ServiceId](docs/ServiceId.md)
|
122
|
+
- [IbmCloudIam::ServiceIdList](docs/ServiceIdList.md)
|
123
|
+
- [IbmCloudIam::TokenResponse](docs/TokenResponse.md)
|
124
|
+
- [IbmCloudIam::UpdateApiKeyRequest](docs/UpdateApiKeyRequest.md)
|
125
|
+
- [IbmCloudIam::UpdateServiceIdRequest](docs/UpdateServiceIdRequest.md)
|
126
|
+
|
127
|
+
|
128
|
+
## Documentation for Authorization
|
129
|
+
|
130
|
+
All endpoints do not require authorization.
|
131
|
+
|
data/Rakefile
ADDED
data/docs/ApiKey.md
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
# IbmCloudIam::ApiKey
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**context** | [**ResponseContext**](ResponseContext.md) | | [optional]
|
8
|
+
**id** | **String** | Unique identifier of this API Key. |
|
9
|
+
**entity_tag** | **String** | Version of the API Key details object. You need to specify this value when updating the API key to avoid stale updates. | [optional]
|
10
|
+
**crn** | **String** | Cloud Resource Name of the item. Example Cloud Resource Name: 'crn:v1:bluemix:public:iam-identity:us-south:a/myaccount::apikey:1234-9012-5678' |
|
11
|
+
**locked** | **Boolean** | The API key cannot be changed if set to true. |
|
12
|
+
**created_at** | **DateTime** | If set contains a date time string of the creation date in ISO format | [optional]
|
13
|
+
**created_by** | **String** | IAM ID of the user or service which created the API key. |
|
14
|
+
**modified_at** | **DateTime** | If set contains a date time string of the last modification date in ISO format | [optional]
|
15
|
+
**name** | **String** | Name of the API key. The name is not checked for uniqueness. Therefore multiple names with the same value can exist. Access is done via the UUID of the API key. |
|
16
|
+
**description** | **String** | The optional description of the API key. The 'description' property is only available if a description was provided during a create of an API key. | [optional]
|
17
|
+
**iam_id** | **String** | The iam_id that this API key authenticates. |
|
18
|
+
**account_id** | **String** | ID of the account that this API key authenticates for. |
|
19
|
+
**apikey** | **String** | The API key value. This property only contains the API key value for the following cases: create an API key, update a service ID API key that stores the API key value as retrievable, or get a service ID API key that stores the API key value as retrievable. All other operations don't return the API key value, for example all user API key related operations, except for create, don't contain the API key value. |
|
20
|
+
**history** | [**Array<EnityHistoryRecord>**](EnityHistoryRecord.md) | History of the API key | [optional]
|
21
|
+
|
22
|
+
## Code Sample
|
23
|
+
|
24
|
+
```ruby
|
25
|
+
require 'IbmCloudIam'
|
26
|
+
|
27
|
+
instance = IbmCloudIam::ApiKey.new(context: null,
|
28
|
+
id: null,
|
29
|
+
entity_tag: null,
|
30
|
+
crn: null,
|
31
|
+
locked: null,
|
32
|
+
created_at: null,
|
33
|
+
created_by: null,
|
34
|
+
modified_at: null,
|
35
|
+
name: null,
|
36
|
+
description: null,
|
37
|
+
iam_id: null,
|
38
|
+
account_id: null,
|
39
|
+
apikey: null,
|
40
|
+
history: null)
|
41
|
+
```
|
42
|
+
|
43
|
+
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# IbmCloudIam::ApiKeyInsideCreateServiceIdRequest
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**name** | **String** | Name of the API key. The name is not checked for uniqueness. Therefore multiple names with the same value can exist. Access is done via the UUID of the API key. |
|
8
|
+
**description** | **String** | The optional description of the API key. The 'description' property is only available if a description was provided during a create of an API key. | [optional]
|
9
|
+
**apikey** | **String** | You can optionally passthrough the API key value for this API key. If passed, NO validation of that apiKey value is done, i.e. the value can be non-URL safe. If omitted, the API key management will create an URL safe opaque API key value. The value of the API key is checked for uniqueness. Please ensure enough variations when passing in this value. | [optional]
|
10
|
+
**store_value** | **Boolean** | Send true or false to set whether the API key value is retrievable in the future by using the Get details of an API key request. If you create an API key for a user, you must specify `false` or omit the value. We don't allow storing of API keys for users. | [optional]
|
11
|
+
|
12
|
+
## Code Sample
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
require 'IbmCloudIam'
|
16
|
+
|
17
|
+
instance = IbmCloudIam::ApiKeyInsideCreateServiceIdRequest.new(name: null,
|
18
|
+
description: null,
|
19
|
+
apikey: null,
|
20
|
+
store_value: null)
|
21
|
+
```
|
22
|
+
|
23
|
+
|
data/docs/ApiKeyList.md
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# IbmCloudIam::ApiKeyList
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**context** | [**ResponseContext**](ResponseContext.md) | | [optional]
|
8
|
+
**offset** | **Integer** | The offset of the current page. | [optional]
|
9
|
+
**limit** | **Integer** | Optional size of a single page. Default is 20 items per page. Valid range is 1 to 100 | [optional]
|
10
|
+
**first** | **String** | Link to the first page. | [optional]
|
11
|
+
**previous** | **String** | Link to the previous available page. If 'previous' property is not part of the response no previous page is available. | [optional]
|
12
|
+
**_next** | **String** | Link to the next available page. If 'next' property is not part of the response no next page is available. | [optional]
|
13
|
+
**apikeys** | [**Array<ApiKey>**](ApiKey.md) | List of API keys based on the query paramters and the page size. The apikeys array is always part of the response but might be empty depending on the query parameters values provided. |
|
14
|
+
|
15
|
+
## Code Sample
|
16
|
+
|
17
|
+
```ruby
|
18
|
+
require 'IbmCloudIam'
|
19
|
+
|
20
|
+
instance = IbmCloudIam::ApiKeyList.new(context: null,
|
21
|
+
offset: null,
|
22
|
+
limit: null,
|
23
|
+
first: null,
|
24
|
+
previous: null,
|
25
|
+
_next: null,
|
26
|
+
apikeys: null)
|
27
|
+
```
|
28
|
+
|
29
|
+
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# IbmCloudIam::CreateApiKeyRequest
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**name** | **String** | Name of the API key. The name is not checked for uniqueness. Therefore multiple names with the same value can exist. Access is done via the UUID of the API key. |
|
8
|
+
**description** | **String** | The optional description of the API key. The 'description' property is only available if a description was provided during a create of an API key. | [optional]
|
9
|
+
**iam_id** | **String** | The iam_id that this API key authenticates. |
|
10
|
+
**account_id** | **String** | The account ID of the API key. | [optional]
|
11
|
+
**apikey** | **String** | You can optionally passthrough the API key value for this API key. If passed, NO validation of that apiKey value is done, i.e. the value can be non-URL safe. If omitted, the API key management will create an URL safe opaque API key value. The value of the API key is checked for uniqueness. Please ensure enough variations when passing in this value. | [optional]
|
12
|
+
**store_value** | **Boolean** | Send true or false to set whether the API key value is retrievable in the future by using the Get details of an API key request. If you create an API key for a user, you must specify `false` or omit the value. We don't allow storing of API keys for users. | [optional]
|
13
|
+
|
14
|
+
## Code Sample
|
15
|
+
|
16
|
+
```ruby
|
17
|
+
require 'IbmCloudIam'
|
18
|
+
|
19
|
+
instance = IbmCloudIam::CreateApiKeyRequest.new(name: null,
|
20
|
+
description: null,
|
21
|
+
iam_id: null,
|
22
|
+
account_id: null,
|
23
|
+
apikey: null,
|
24
|
+
store_value: null)
|
25
|
+
```
|
26
|
+
|
27
|
+
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# IbmCloudIam::CreateServiceIdRequest
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**account_id** | **String** | ID of the account the service ID belongs to. |
|
8
|
+
**name** | **String** | Name of the Service Id. The name is not checked for uniqueness. Therefore multiple names with the same value can exist. Access is done via the UUID of the Service Id. |
|
9
|
+
**description** | **String** | The optional description of the Service Id. The 'description' property is only available if a description was provided during a create of a Service Id. | [optional]
|
10
|
+
**unique_instance_crns** | **Array<String>** | Optional list of CRNs (string array) which point to the services connected to the service ID. | [optional]
|
11
|
+
**apikey** | [**ApiKeyInsideCreateServiceIdRequest**](ApiKeyInsideCreateServiceIdRequest.md) | | [optional]
|
12
|
+
|
13
|
+
## Code Sample
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
require 'IbmCloudIam'
|
17
|
+
|
18
|
+
instance = IbmCloudIam::CreateServiceIdRequest.new(account_id: null,
|
19
|
+
name: null,
|
20
|
+
description: null,
|
21
|
+
unique_instance_crns: null,
|
22
|
+
apikey: null)
|
23
|
+
```
|
24
|
+
|
25
|
+
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# IbmCloudIam::EnityHistoryRecord
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**timestamp** | **String** | Timestamp when the action was triggered |
|
8
|
+
**iam_id** | **String** | IAM ID of the identity which triggered the action |
|
9
|
+
**iam_id_account** | **String** | Account of the identity which triggered the action |
|
10
|
+
**action** | **String** | Action of the history entry |
|
11
|
+
**params** | **Array<String>** | Params of the history entry |
|
12
|
+
**message** | **String** | Message which summarizes the executed action |
|
13
|
+
|
14
|
+
## Code Sample
|
15
|
+
|
16
|
+
```ruby
|
17
|
+
require 'IbmCloudIam'
|
18
|
+
|
19
|
+
instance = IbmCloudIam::EnityHistoryRecord.new(timestamp: null,
|
20
|
+
iam_id: null,
|
21
|
+
iam_id_account: null,
|
22
|
+
action: null,
|
23
|
+
params: null,
|
24
|
+
message: null)
|
25
|
+
```
|
26
|
+
|
27
|
+
|
data/docs/Error.md
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
# IbmCloudIam::Error
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**code** | **String** | Error code of the REST Exception. |
|
8
|
+
**message_code** | **String** | Error message code of the REST Exception. |
|
9
|
+
**message** | **String** | Error message of the REST Exception. Error messages are derived base on the input locale of the REST request and the available Message catalogs. Dynamic fallback to 'us-english' is happening if no message catalog is available for the provided input locale. |
|
10
|
+
**details** | **String** | Error details of the REST Exception. | [optional]
|
11
|
+
|
12
|
+
## Code Sample
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
require 'IbmCloudIam'
|
16
|
+
|
17
|
+
instance = IbmCloudIam::Error.new(code: null,
|
18
|
+
message_code: null,
|
19
|
+
message: null,
|
20
|
+
details: null)
|
21
|
+
```
|
22
|
+
|
23
|
+
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# IbmCloudIam::ExceptionResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**context** | [**ResponseContext**](ResponseContext.md) | | [optional]
|
8
|
+
**status_code** | **String** | Error message code of the REST Exception. |
|
9
|
+
**errors** | [**Array<Error>**](Error.md) | List of errors that occured. |
|
10
|
+
**trace** | **String** | Unique ID of the requst. | [optional]
|
11
|
+
|
12
|
+
## Code Sample
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
require 'IbmCloudIam'
|
16
|
+
|
17
|
+
instance = IbmCloudIam::ExceptionResponse.new(context: null,
|
18
|
+
status_code: null,
|
19
|
+
errors: null,
|
20
|
+
trace: null)
|
21
|
+
```
|
22
|
+
|
23
|
+
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# IbmCloudIam::ExceptionResponseContext
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**request_id** | **String** | The request ID of the inbound REST request. | [optional]
|
8
|
+
**request_type** | **String** | The request type of the inbound REST request. | [optional]
|
9
|
+
**user_agent** | **String** | The user agent of the inbound REST request. | [optional]
|
10
|
+
**url** | **String** | The URL of that cluster. | [optional]
|
11
|
+
**instance_id** | **String** | The instance ID of the server instance processing the request. | [optional]
|
12
|
+
**thread_id** | **String** | The thread ID of the server instance processing the request. | [optional]
|
13
|
+
**host** | **String** | The host of the server instance processing the request. | [optional]
|
14
|
+
**start_time** | **String** | The start time of the request. | [optional]
|
15
|
+
**end_time** | **String** | The finish time of the request. | [optional]
|
16
|
+
**elapsed_time** | **String** | The elapsed time in msec. | [optional]
|
17
|
+
**locale** | **String** | The language used to present the error message. | [optional]
|
18
|
+
**cluster_name** | **String** | The cluster name. | [optional]
|
19
|
+
|
20
|
+
## Code Sample
|
21
|
+
|
22
|
+
```ruby
|
23
|
+
require 'IbmCloudIam'
|
24
|
+
|
25
|
+
instance = IbmCloudIam::ExceptionResponseContext.new(request_id: null,
|
26
|
+
request_type: null,
|
27
|
+
user_agent: null,
|
28
|
+
url: null,
|
29
|
+
instance_id: null,
|
30
|
+
thread_id: null,
|
31
|
+
host: null,
|
32
|
+
start_time: null,
|
33
|
+
end_time: null,
|
34
|
+
elapsed_time: null,
|
35
|
+
locale: null,
|
36
|
+
cluster_name: null)
|
37
|
+
```
|
38
|
+
|
39
|
+
|
@@ -0,0 +1,828 @@
|
|
1
|
+
# IbmCloudIam::IdentityOperationsApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://iam.cloud.ibm.com*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**create_api_key**](IdentityOperationsApi.md#create_api_key) | **POST** /v1/apikeys | Create an API key
|
8
|
+
[**create_service_id**](IdentityOperationsApi.md#create_service_id) | **POST** /v1/serviceids/ | Create a service ID
|
9
|
+
[**delete_api_key**](IdentityOperationsApi.md#delete_api_key) | **DELETE** /v1/apikeys/{id} | Deletes an API key
|
10
|
+
[**delete_service_id**](IdentityOperationsApi.md#delete_service_id) | **DELETE** /v1/serviceids/{id} | Deletes a service ID and associated API keys
|
11
|
+
[**get_api_key**](IdentityOperationsApi.md#get_api_key) | **GET** /v1/apikeys/{id} | Get details of an API key
|
12
|
+
[**get_api_keys_details**](IdentityOperationsApi.md#get_api_keys_details) | **GET** /v1/apikeys/details | Get details of an API key by its value
|
13
|
+
[**get_service_id**](IdentityOperationsApi.md#get_service_id) | **GET** /v1/serviceids/{id} | Get details of a service ID
|
14
|
+
[**list_api_keys**](IdentityOperationsApi.md#list_api_keys) | **GET** /v1/apikeys | Get API keys for a given service or user IAM ID and account ID
|
15
|
+
[**list_service_ids**](IdentityOperationsApi.md#list_service_ids) | **GET** /v1/serviceids/ | List service IDs
|
16
|
+
[**lock_api_key**](IdentityOperationsApi.md#lock_api_key) | **POST** /v1/apikeys/{id}/lock | Lock the API key
|
17
|
+
[**lock_service_id**](IdentityOperationsApi.md#lock_service_id) | **POST** /v1/serviceids/{id}/lock | Lock the service ID
|
18
|
+
[**unlock_api_key**](IdentityOperationsApi.md#unlock_api_key) | **DELETE** /v1/apikeys/{id}/lock | Unlock the API key
|
19
|
+
[**unlock_service_id**](IdentityOperationsApi.md#unlock_service_id) | **DELETE** /v1/serviceids/{id}/lock | Unlock the service ID
|
20
|
+
[**update_api_key**](IdentityOperationsApi.md#update_api_key) | **PUT** /v1/apikeys/{id} | Updates an API key
|
21
|
+
[**update_service_id**](IdentityOperationsApi.md#update_service_id) | **PUT** /v1/serviceids/{id} | Update service ID
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
## create_api_key
|
26
|
+
|
27
|
+
> ApiKey create_api_key(create_api_key_request, opts)
|
28
|
+
|
29
|
+
Create an API key
|
30
|
+
|
31
|
+
Creates an API key for a UserID or service ID. Users can manage user API keys for themself, or service ID API keys for service IDs that are bound to an entity they have access to.
|
32
|
+
|
33
|
+
### Example
|
34
|
+
|
35
|
+
```ruby
|
36
|
+
# load the gem
|
37
|
+
require 'ibm_cloud_iam'
|
38
|
+
|
39
|
+
api_instance = IbmCloudIam::IdentityOperationsApi.new
|
40
|
+
create_api_key_request = IbmCloudIam::CreateApiKeyRequest.new # CreateApiKeyRequest | Request to create an API key
|
41
|
+
opts = {
|
42
|
+
authorization: 'authorization_example', # String | Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: 'No authorization header found'. Please make sure that the provided token has the required authority for the request.
|
43
|
+
entity_lock: 'false' # String | Indicates if the API key is locked for further write operations. False by default.
|
44
|
+
}
|
45
|
+
|
46
|
+
begin
|
47
|
+
#Create an API key
|
48
|
+
result = api_instance.create_api_key(create_api_key_request, opts)
|
49
|
+
p result
|
50
|
+
rescue IbmCloudIam::ApiError => e
|
51
|
+
puts "Exception when calling IdentityOperationsApi->create_api_key: #{e}"
|
52
|
+
end
|
53
|
+
```
|
54
|
+
|
55
|
+
### Parameters
|
56
|
+
|
57
|
+
|
58
|
+
Name | Type | Description | Notes
|
59
|
+
------------- | ------------- | ------------- | -------------
|
60
|
+
**create_api_key_request** | [**CreateApiKeyRequest**](CreateApiKeyRequest.md)| Request to create an API key |
|
61
|
+
**authorization** | **String**| Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: 'No authorization header found'. Please make sure that the provided token has the required authority for the request. | [optional]
|
62
|
+
**entity_lock** | **String**| Indicates if the API key is locked for further write operations. False by default. | [optional] [default to 'false']
|
63
|
+
|
64
|
+
### Return type
|
65
|
+
|
66
|
+
[**ApiKey**](ApiKey.md)
|
67
|
+
|
68
|
+
### Authorization
|
69
|
+
|
70
|
+
No authorization required
|
71
|
+
|
72
|
+
### HTTP request headers
|
73
|
+
|
74
|
+
- **Content-Type**: application/json
|
75
|
+
- **Accept**: application/json
|
76
|
+
|
77
|
+
|
78
|
+
## create_service_id
|
79
|
+
|
80
|
+
> ServiceId create_service_id(create_service_id_request, opts)
|
81
|
+
|
82
|
+
Create a service ID
|
83
|
+
|
84
|
+
Creates a service ID for an IBM Cloud account. Users can manage user API keys for themself, or service ID API keys for service IDs that are bound to an entity they have access to.
|
85
|
+
|
86
|
+
### Example
|
87
|
+
|
88
|
+
```ruby
|
89
|
+
# load the gem
|
90
|
+
require 'ibm_cloud_iam'
|
91
|
+
|
92
|
+
api_instance = IbmCloudIam::IdentityOperationsApi.new
|
93
|
+
create_service_id_request = IbmCloudIam::CreateServiceIdRequest.new # CreateServiceIdRequest | Request to create a service ID
|
94
|
+
opts = {
|
95
|
+
authorization: 'authorization_example', # String | Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: 'No authorization header found'. Please make sure that the provided token has the required authority for the request.
|
96
|
+
entity_lock: 'false' # String | Indicates if the service ID is locked for further write operations. False by default.
|
97
|
+
}
|
98
|
+
|
99
|
+
begin
|
100
|
+
#Create a service ID
|
101
|
+
result = api_instance.create_service_id(create_service_id_request, opts)
|
102
|
+
p result
|
103
|
+
rescue IbmCloudIam::ApiError => e
|
104
|
+
puts "Exception when calling IdentityOperationsApi->create_service_id: #{e}"
|
105
|
+
end
|
106
|
+
```
|
107
|
+
|
108
|
+
### Parameters
|
109
|
+
|
110
|
+
|
111
|
+
Name | Type | Description | Notes
|
112
|
+
------------- | ------------- | ------------- | -------------
|
113
|
+
**create_service_id_request** | [**CreateServiceIdRequest**](CreateServiceIdRequest.md)| Request to create a service ID |
|
114
|
+
**authorization** | **String**| Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: 'No authorization header found'. Please make sure that the provided token has the required authority for the request. | [optional]
|
115
|
+
**entity_lock** | **String**| Indicates if the service ID is locked for further write operations. False by default. | [optional] [default to 'false']
|
116
|
+
|
117
|
+
### Return type
|
118
|
+
|
119
|
+
[**ServiceId**](ServiceId.md)
|
120
|
+
|
121
|
+
### Authorization
|
122
|
+
|
123
|
+
No authorization required
|
124
|
+
|
125
|
+
### HTTP request headers
|
126
|
+
|
127
|
+
- **Content-Type**: application/json
|
128
|
+
- **Accept**: application/json
|
129
|
+
|
130
|
+
|
131
|
+
## delete_api_key
|
132
|
+
|
133
|
+
> delete_api_key(id, opts)
|
134
|
+
|
135
|
+
Deletes an API key
|
136
|
+
|
137
|
+
Deletes an API key. Existing tokens will remain valid until expired. Refresh tokens will not work any more for this API key. Users can manage user API keys for themself, or service ID API keys for service IDs that are bound to an entity they have access to.
|
138
|
+
|
139
|
+
### Example
|
140
|
+
|
141
|
+
```ruby
|
142
|
+
# load the gem
|
143
|
+
require 'ibm_cloud_iam'
|
144
|
+
|
145
|
+
api_instance = IbmCloudIam::IdentityOperationsApi.new
|
146
|
+
id = 'id_example' # String | Unique ID of the API key.
|
147
|
+
opts = {
|
148
|
+
authorization: 'authorization_example' # String | Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: 'No authorization header found'. Please make sure that the provided token has the required authority for the request.
|
149
|
+
}
|
150
|
+
|
151
|
+
begin
|
152
|
+
#Deletes an API key
|
153
|
+
api_instance.delete_api_key(id, opts)
|
154
|
+
rescue IbmCloudIam::ApiError => e
|
155
|
+
puts "Exception when calling IdentityOperationsApi->delete_api_key: #{e}"
|
156
|
+
end
|
157
|
+
```
|
158
|
+
|
159
|
+
### Parameters
|
160
|
+
|
161
|
+
|
162
|
+
Name | Type | Description | Notes
|
163
|
+
------------- | ------------- | ------------- | -------------
|
164
|
+
**id** | **String**| Unique ID of the API key. |
|
165
|
+
**authorization** | **String**| Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: 'No authorization header found'. Please make sure that the provided token has the required authority for the request. | [optional]
|
166
|
+
|
167
|
+
### Return type
|
168
|
+
|
169
|
+
nil (empty response body)
|
170
|
+
|
171
|
+
### Authorization
|
172
|
+
|
173
|
+
No authorization required
|
174
|
+
|
175
|
+
### HTTP request headers
|
176
|
+
|
177
|
+
- **Content-Type**: Not defined
|
178
|
+
- **Accept**: Not defined
|
179
|
+
|
180
|
+
|
181
|
+
## delete_service_id
|
182
|
+
|
183
|
+
> delete_service_id(id, opts)
|
184
|
+
|
185
|
+
Deletes a service ID and associated API keys
|
186
|
+
|
187
|
+
Deletes a service ID and all API keys associated to it. Before deleting the service ID, all associated API keys are deleted. In case a Delete Conflict (status code 409) a retry of the request may help as the service ID is only deleted if the associated API keys were successfully deleted before. Users can manage user API keys for themself, or service ID API keys for service IDs that are bound to an entity they have access to.
|
188
|
+
|
189
|
+
### Example
|
190
|
+
|
191
|
+
```ruby
|
192
|
+
# load the gem
|
193
|
+
require 'ibm_cloud_iam'
|
194
|
+
|
195
|
+
api_instance = IbmCloudIam::IdentityOperationsApi.new
|
196
|
+
id = 'id_example' # String | Unique ID of the service ID.
|
197
|
+
opts = {
|
198
|
+
authorization: 'authorization_example' # String | Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: 'No authorization header found'. Please make sure that the provided token has the required authority for the request.
|
199
|
+
}
|
200
|
+
|
201
|
+
begin
|
202
|
+
#Deletes a service ID and associated API keys
|
203
|
+
api_instance.delete_service_id(id, opts)
|
204
|
+
rescue IbmCloudIam::ApiError => e
|
205
|
+
puts "Exception when calling IdentityOperationsApi->delete_service_id: #{e}"
|
206
|
+
end
|
207
|
+
```
|
208
|
+
|
209
|
+
### Parameters
|
210
|
+
|
211
|
+
|
212
|
+
Name | Type | Description | Notes
|
213
|
+
------------- | ------------- | ------------- | -------------
|
214
|
+
**id** | **String**| Unique ID of the service ID. |
|
215
|
+
**authorization** | **String**| Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: 'No authorization header found'. Please make sure that the provided token has the required authority for the request. | [optional]
|
216
|
+
|
217
|
+
### Return type
|
218
|
+
|
219
|
+
nil (empty response body)
|
220
|
+
|
221
|
+
### Authorization
|
222
|
+
|
223
|
+
No authorization required
|
224
|
+
|
225
|
+
### HTTP request headers
|
226
|
+
|
227
|
+
- **Content-Type**: Not defined
|
228
|
+
- **Accept**: Not defined
|
229
|
+
|
230
|
+
|
231
|
+
## get_api_key
|
232
|
+
|
233
|
+
> ApiKey get_api_key(id, opts)
|
234
|
+
|
235
|
+
Get details of an API key
|
236
|
+
|
237
|
+
Returns the details of an API key. Users can manage user API keys for themself, or service ID API keys for service IDs that are bound to an entity they have access to. In case of service IDs and their API keys, a user must be either an account owner, a IBM Cloud org manager or IBM Cloud space developer in order to manage service IDs of the entity.
|
238
|
+
|
239
|
+
### Example
|
240
|
+
|
241
|
+
```ruby
|
242
|
+
# load the gem
|
243
|
+
require 'ibm_cloud_iam'
|
244
|
+
|
245
|
+
api_instance = IbmCloudIam::IdentityOperationsApi.new
|
246
|
+
id = 'id_example' # String | Unique ID of the API key.
|
247
|
+
opts = {
|
248
|
+
include_history: false, # Boolean | Defines if the entity history is included in the response.
|
249
|
+
authorization: 'authorization_example' # String | Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: 'No authorization header found'. Please make sure that the provided token has the required authority for the request.
|
250
|
+
}
|
251
|
+
|
252
|
+
begin
|
253
|
+
#Get details of an API key
|
254
|
+
result = api_instance.get_api_key(id, opts)
|
255
|
+
p result
|
256
|
+
rescue IbmCloudIam::ApiError => e
|
257
|
+
puts "Exception when calling IdentityOperationsApi->get_api_key: #{e}"
|
258
|
+
end
|
259
|
+
```
|
260
|
+
|
261
|
+
### Parameters
|
262
|
+
|
263
|
+
|
264
|
+
Name | Type | Description | Notes
|
265
|
+
------------- | ------------- | ------------- | -------------
|
266
|
+
**id** | **String**| Unique ID of the API key. |
|
267
|
+
**include_history** | **Boolean**| Defines if the entity history is included in the response. | [optional] [default to false]
|
268
|
+
**authorization** | **String**| Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: 'No authorization header found'. Please make sure that the provided token has the required authority for the request. | [optional]
|
269
|
+
|
270
|
+
### Return type
|
271
|
+
|
272
|
+
[**ApiKey**](ApiKey.md)
|
273
|
+
|
274
|
+
### Authorization
|
275
|
+
|
276
|
+
No authorization required
|
277
|
+
|
278
|
+
### HTTP request headers
|
279
|
+
|
280
|
+
- **Content-Type**: Not defined
|
281
|
+
- **Accept**: application/json
|
282
|
+
|
283
|
+
|
284
|
+
## get_api_keys_details
|
285
|
+
|
286
|
+
> ApiKey get_api_keys_details(opts)
|
287
|
+
|
288
|
+
Get details of an API key by its value
|
289
|
+
|
290
|
+
Returns the details of an API key by its value. Users can manage user API keys for themself, or service ID API keys for service IDs that are bound to an entity they have access to.
|
291
|
+
|
292
|
+
### Example
|
293
|
+
|
294
|
+
```ruby
|
295
|
+
# load the gem
|
296
|
+
require 'ibm_cloud_iam'
|
297
|
+
|
298
|
+
api_instance = IbmCloudIam::IdentityOperationsApi.new
|
299
|
+
opts = {
|
300
|
+
iam_api_key: 'iam_api_key_example', # String | API key value.
|
301
|
+
include_history: false, # Boolean | Defines if the entity history is included in the response
|
302
|
+
authorization: 'authorization_example' # String | Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: 'No authorization header found'. Please make sure that the provided token has the required authority for the request.
|
303
|
+
}
|
304
|
+
|
305
|
+
begin
|
306
|
+
#Get details of an API key by its value
|
307
|
+
result = api_instance.get_api_keys_details(opts)
|
308
|
+
p result
|
309
|
+
rescue IbmCloudIam::ApiError => e
|
310
|
+
puts "Exception when calling IdentityOperationsApi->get_api_keys_details: #{e}"
|
311
|
+
end
|
312
|
+
```
|
313
|
+
|
314
|
+
### Parameters
|
315
|
+
|
316
|
+
|
317
|
+
Name | Type | Description | Notes
|
318
|
+
------------- | ------------- | ------------- | -------------
|
319
|
+
**iam_api_key** | **String**| API key value. | [optional]
|
320
|
+
**include_history** | **Boolean**| Defines if the entity history is included in the response | [optional] [default to false]
|
321
|
+
**authorization** | **String**| Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: 'No authorization header found'. Please make sure that the provided token has the required authority for the request. | [optional]
|
322
|
+
|
323
|
+
### Return type
|
324
|
+
|
325
|
+
[**ApiKey**](ApiKey.md)
|
326
|
+
|
327
|
+
### Authorization
|
328
|
+
|
329
|
+
No authorization required
|
330
|
+
|
331
|
+
### HTTP request headers
|
332
|
+
|
333
|
+
- **Content-Type**: Not defined
|
334
|
+
- **Accept**: application/json
|
335
|
+
|
336
|
+
|
337
|
+
## get_service_id
|
338
|
+
|
339
|
+
> ServiceId get_service_id(id, opts)
|
340
|
+
|
341
|
+
Get details of a service ID
|
342
|
+
|
343
|
+
Returns the details of a service ID. Users can manage user API keys for themself, or service ID API keys for service IDs that are bound to an entity they have access to.
|
344
|
+
|
345
|
+
### Example
|
346
|
+
|
347
|
+
```ruby
|
348
|
+
# load the gem
|
349
|
+
require 'ibm_cloud_iam'
|
350
|
+
|
351
|
+
api_instance = IbmCloudIam::IdentityOperationsApi.new
|
352
|
+
id = 'id_example' # String | Unique ID of the service ID.
|
353
|
+
opts = {
|
354
|
+
authorization: 'authorization_example', # String | Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: 'No authorization header found'. Please make sure that the provided token has the required authority for the request.
|
355
|
+
include_history: false # Boolean | Defines if the entity history is included in the response.
|
356
|
+
}
|
357
|
+
|
358
|
+
begin
|
359
|
+
#Get details of a service ID
|
360
|
+
result = api_instance.get_service_id(id, opts)
|
361
|
+
p result
|
362
|
+
rescue IbmCloudIam::ApiError => e
|
363
|
+
puts "Exception when calling IdentityOperationsApi->get_service_id: #{e}"
|
364
|
+
end
|
365
|
+
```
|
366
|
+
|
367
|
+
### Parameters
|
368
|
+
|
369
|
+
|
370
|
+
Name | Type | Description | Notes
|
371
|
+
------------- | ------------- | ------------- | -------------
|
372
|
+
**id** | **String**| Unique ID of the service ID. |
|
373
|
+
**authorization** | **String**| Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: 'No authorization header found'. Please make sure that the provided token has the required authority for the request. | [optional]
|
374
|
+
**include_history** | **Boolean**| Defines if the entity history is included in the response. | [optional] [default to false]
|
375
|
+
|
376
|
+
### Return type
|
377
|
+
|
378
|
+
[**ServiceId**](ServiceId.md)
|
379
|
+
|
380
|
+
### Authorization
|
381
|
+
|
382
|
+
No authorization required
|
383
|
+
|
384
|
+
### HTTP request headers
|
385
|
+
|
386
|
+
- **Content-Type**: Not defined
|
387
|
+
- **Accept**: application/json
|
388
|
+
|
389
|
+
|
390
|
+
## list_api_keys
|
391
|
+
|
392
|
+
> ApiKeyList list_api_keys(opts)
|
393
|
+
|
394
|
+
Get API keys for a given service or user IAM ID and account ID
|
395
|
+
|
396
|
+
Returns the list of API key details for a given service or user IAM ID and account ID. Users can manage user API keys for themself, or service ID API keys for service IDs that are bound to an entity they have access to. In case of service IDs and their API keys, a user must be either an account owner, a IBM Cloud org manager or IBM Cloud space developer in order to manage service IDs of the entity.
|
397
|
+
|
398
|
+
### Example
|
399
|
+
|
400
|
+
```ruby
|
401
|
+
# load the gem
|
402
|
+
require 'ibm_cloud_iam'
|
403
|
+
|
404
|
+
api_instance = IbmCloudIam::IdentityOperationsApi.new
|
405
|
+
opts = {
|
406
|
+
account_id: 'account_id_example', # String | Account ID of the API keys(s) to query. If a service IAM ID is specified in iam_id then account_id must match the account of the IAM ID. If a user IAM ID is specified in iam_id then then account_id must match the account of the Authorization token.
|
407
|
+
iam_id: 'iam_id_example', # String | IAM ID of the API key(s) to be queried. The IAM ID may be that of a user or a service. For a user IAM ID iam_id must match the Authorization token.
|
408
|
+
pagesize: 56, # Integer | Optional size of a single page. Default is 20 items per page. Valid range is 1 to 100.
|
409
|
+
pagetoken: 'pagetoken_example', # String | Optional Prev or Next page token returned from a previous query execution. Default is start with first page.
|
410
|
+
scope: 'entity', # String | Optional parameter to define the scope of the queried API Keys. Can be 'entity' (default) or 'account'.
|
411
|
+
type: 'type_example', # String | Optional parameter to filter the type of the queried API Keys. Can be 'user' or 'serviceid'.
|
412
|
+
sort: 'sort_example', # String | Optional sort property, valid values are name, description, created_at and created_by. If specified, the items are sorted by the value of this property.
|
413
|
+
order: 'asc', # String | Optional sort order, valid values are asc and desc. Default: asc.
|
414
|
+
include_history: false, # Boolean | Defines if the entity history is included in the response.
|
415
|
+
authorization: 'authorization_example' # String | Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: 'No authorization header found'. Please make sure that the provided token has the required authority for the request.
|
416
|
+
}
|
417
|
+
|
418
|
+
begin
|
419
|
+
#Get API keys for a given service or user IAM ID and account ID
|
420
|
+
result = api_instance.list_api_keys(opts)
|
421
|
+
p result
|
422
|
+
rescue IbmCloudIam::ApiError => e
|
423
|
+
puts "Exception when calling IdentityOperationsApi->list_api_keys: #{e}"
|
424
|
+
end
|
425
|
+
```
|
426
|
+
|
427
|
+
### Parameters
|
428
|
+
|
429
|
+
|
430
|
+
Name | Type | Description | Notes
|
431
|
+
------------- | ------------- | ------------- | -------------
|
432
|
+
**account_id** | **String**| Account ID of the API keys(s) to query. If a service IAM ID is specified in iam_id then account_id must match the account of the IAM ID. If a user IAM ID is specified in iam_id then then account_id must match the account of the Authorization token. | [optional]
|
433
|
+
**iam_id** | **String**| IAM ID of the API key(s) to be queried. The IAM ID may be that of a user or a service. For a user IAM ID iam_id must match the Authorization token. | [optional]
|
434
|
+
**pagesize** | **Integer**| Optional size of a single page. Default is 20 items per page. Valid range is 1 to 100. | [optional]
|
435
|
+
**pagetoken** | **String**| Optional Prev or Next page token returned from a previous query execution. Default is start with first page. | [optional]
|
436
|
+
**scope** | **String**| Optional parameter to define the scope of the queried API Keys. Can be 'entity' (default) or 'account'. | [optional] [default to 'entity']
|
437
|
+
**type** | **String**| Optional parameter to filter the type of the queried API Keys. Can be 'user' or 'serviceid'. | [optional]
|
438
|
+
**sort** | **String**| Optional sort property, valid values are name, description, created_at and created_by. If specified, the items are sorted by the value of this property. | [optional]
|
439
|
+
**order** | **String**| Optional sort order, valid values are asc and desc. Default: asc. | [optional] [default to 'asc']
|
440
|
+
**include_history** | **Boolean**| Defines if the entity history is included in the response. | [optional] [default to false]
|
441
|
+
**authorization** | **String**| Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: 'No authorization header found'. Please make sure that the provided token has the required authority for the request. | [optional]
|
442
|
+
|
443
|
+
### Return type
|
444
|
+
|
445
|
+
[**ApiKeyList**](ApiKeyList.md)
|
446
|
+
|
447
|
+
### Authorization
|
448
|
+
|
449
|
+
No authorization required
|
450
|
+
|
451
|
+
### HTTP request headers
|
452
|
+
|
453
|
+
- **Content-Type**: Not defined
|
454
|
+
- **Accept**: application/json
|
455
|
+
|
456
|
+
|
457
|
+
## list_service_ids
|
458
|
+
|
459
|
+
> ServiceIdList list_service_ids(opts)
|
460
|
+
|
461
|
+
List service IDs
|
462
|
+
|
463
|
+
Returns a list of service IDs. Users can manage user API keys for themself, or service ID API keys for service IDs that are bound to an entity they have access to.
|
464
|
+
|
465
|
+
### Example
|
466
|
+
|
467
|
+
```ruby
|
468
|
+
# load the gem
|
469
|
+
require 'ibm_cloud_iam'
|
470
|
+
|
471
|
+
api_instance = IbmCloudIam::IdentityOperationsApi.new
|
472
|
+
opts = {
|
473
|
+
account_id: 'account_id_example', # String | Account ID of the service ID(s) to query. This parameter is required (unless using a pagetoken).
|
474
|
+
name: 'name_example', # String | Name of the service ID(s) to query. Optional.20 items per page. Valid range is 1 to 100.
|
475
|
+
pagesize: 56, # Integer | Optional size of a single page. Default is 20 items per page. Valid range is 1 to 100.
|
476
|
+
pagetoken: 'pagetoken_example', # String | Optional Prev or Next page token returned from a previous query execution. Default is start with first page.
|
477
|
+
sort: 'sort_example', # String | Optional sort property, valid values are name, description, created_at and modified_at. If specified, the items are sorted by the value of this property.
|
478
|
+
order: 'asc', # String | Optional sort order, valid values are asc and desc. Default: asc.
|
479
|
+
include_history: false, # Boolean | Defines if the entity history is included in the response
|
480
|
+
authorization: 'authorization_example' # String | Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: 'No authorization header found'. Please make sure that the provided token has the required authority for the request.
|
481
|
+
}
|
482
|
+
|
483
|
+
begin
|
484
|
+
#List service IDs
|
485
|
+
result = api_instance.list_service_ids(opts)
|
486
|
+
p result
|
487
|
+
rescue IbmCloudIam::ApiError => e
|
488
|
+
puts "Exception when calling IdentityOperationsApi->list_service_ids: #{e}"
|
489
|
+
end
|
490
|
+
```
|
491
|
+
|
492
|
+
### Parameters
|
493
|
+
|
494
|
+
|
495
|
+
Name | Type | Description | Notes
|
496
|
+
------------- | ------------- | ------------- | -------------
|
497
|
+
**account_id** | **String**| Account ID of the service ID(s) to query. This parameter is required (unless using a pagetoken). | [optional]
|
498
|
+
**name** | **String**| Name of the service ID(s) to query. Optional.20 items per page. Valid range is 1 to 100. | [optional]
|
499
|
+
**pagesize** | **Integer**| Optional size of a single page. Default is 20 items per page. Valid range is 1 to 100. | [optional]
|
500
|
+
**pagetoken** | **String**| Optional Prev or Next page token returned from a previous query execution. Default is start with first page. | [optional]
|
501
|
+
**sort** | **String**| Optional sort property, valid values are name, description, created_at and modified_at. If specified, the items are sorted by the value of this property. | [optional]
|
502
|
+
**order** | **String**| Optional sort order, valid values are asc and desc. Default: asc. | [optional] [default to 'asc']
|
503
|
+
**include_history** | **Boolean**| Defines if the entity history is included in the response | [optional] [default to false]
|
504
|
+
**authorization** | **String**| Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: 'No authorization header found'. Please make sure that the provided token has the required authority for the request. | [optional]
|
505
|
+
|
506
|
+
### Return type
|
507
|
+
|
508
|
+
[**ServiceIdList**](ServiceIdList.md)
|
509
|
+
|
510
|
+
### Authorization
|
511
|
+
|
512
|
+
No authorization required
|
513
|
+
|
514
|
+
### HTTP request headers
|
515
|
+
|
516
|
+
- **Content-Type**: Not defined
|
517
|
+
- **Accept**: application/json
|
518
|
+
|
519
|
+
|
520
|
+
## lock_api_key
|
521
|
+
|
522
|
+
> lock_api_key(id, opts)
|
523
|
+
|
524
|
+
Lock the API key
|
525
|
+
|
526
|
+
Locks an API key by ID. Users can manage user API keys for themself, or service ID API keys for service IDs that are bound to an entity they have access to. In case of service IDs and their API keys, a user must be either an account owner, a IBM Cloud org manager or IBM Cloud space developer in order to manage service IDs of the entity.
|
527
|
+
|
528
|
+
### Example
|
529
|
+
|
530
|
+
```ruby
|
531
|
+
# load the gem
|
532
|
+
require 'ibm_cloud_iam'
|
533
|
+
|
534
|
+
api_instance = IbmCloudIam::IdentityOperationsApi.new
|
535
|
+
id = 'id_example' # String | Unique ID of the API key.
|
536
|
+
opts = {
|
537
|
+
authorization: 'authorization_example' # String | Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: 'No authorization header found'. Please make sure that the provided token has the required authority for the request.
|
538
|
+
}
|
539
|
+
|
540
|
+
begin
|
541
|
+
#Lock the API key
|
542
|
+
api_instance.lock_api_key(id, opts)
|
543
|
+
rescue IbmCloudIam::ApiError => e
|
544
|
+
puts "Exception when calling IdentityOperationsApi->lock_api_key: #{e}"
|
545
|
+
end
|
546
|
+
```
|
547
|
+
|
548
|
+
### Parameters
|
549
|
+
|
550
|
+
|
551
|
+
Name | Type | Description | Notes
|
552
|
+
------------- | ------------- | ------------- | -------------
|
553
|
+
**id** | **String**| Unique ID of the API key. |
|
554
|
+
**authorization** | **String**| Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: 'No authorization header found'. Please make sure that the provided token has the required authority for the request. | [optional]
|
555
|
+
|
556
|
+
### Return type
|
557
|
+
|
558
|
+
nil (empty response body)
|
559
|
+
|
560
|
+
### Authorization
|
561
|
+
|
562
|
+
No authorization required
|
563
|
+
|
564
|
+
### HTTP request headers
|
565
|
+
|
566
|
+
- **Content-Type**: Not defined
|
567
|
+
- **Accept**: Not defined
|
568
|
+
|
569
|
+
|
570
|
+
## lock_service_id
|
571
|
+
|
572
|
+
> lock_service_id(id, opts)
|
573
|
+
|
574
|
+
Lock the service ID
|
575
|
+
|
576
|
+
Locks a service ID by ID. Users can manage user API keys for themself, or service ID API keys for service IDs that are bound to an entity they have access to. In case of service IDs and their API keys, a user must be either an account owner, a IBM Cloud org manager or IBM Cloud space developer in order to manage service IDs of the entity.
|
577
|
+
|
578
|
+
### Example
|
579
|
+
|
580
|
+
```ruby
|
581
|
+
# load the gem
|
582
|
+
require 'ibm_cloud_iam'
|
583
|
+
|
584
|
+
api_instance = IbmCloudIam::IdentityOperationsApi.new
|
585
|
+
id = 'id_example' # String | Unique ID of the service ID.
|
586
|
+
opts = {
|
587
|
+
authorization: 'authorization_example' # String | Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: 'No authorization header found'. Please make sure that the provided token has the required authority for the request.
|
588
|
+
}
|
589
|
+
|
590
|
+
begin
|
591
|
+
#Lock the service ID
|
592
|
+
api_instance.lock_service_id(id, opts)
|
593
|
+
rescue IbmCloudIam::ApiError => e
|
594
|
+
puts "Exception when calling IdentityOperationsApi->lock_service_id: #{e}"
|
595
|
+
end
|
596
|
+
```
|
597
|
+
|
598
|
+
### Parameters
|
599
|
+
|
600
|
+
|
601
|
+
Name | Type | Description | Notes
|
602
|
+
------------- | ------------- | ------------- | -------------
|
603
|
+
**id** | **String**| Unique ID of the service ID. |
|
604
|
+
**authorization** | **String**| Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: 'No authorization header found'. Please make sure that the provided token has the required authority for the request. | [optional]
|
605
|
+
|
606
|
+
### Return type
|
607
|
+
|
608
|
+
nil (empty response body)
|
609
|
+
|
610
|
+
### Authorization
|
611
|
+
|
612
|
+
No authorization required
|
613
|
+
|
614
|
+
### HTTP request headers
|
615
|
+
|
616
|
+
- **Content-Type**: Not defined
|
617
|
+
- **Accept**: Not defined
|
618
|
+
|
619
|
+
|
620
|
+
## unlock_api_key
|
621
|
+
|
622
|
+
> unlock_api_key(id, opts)
|
623
|
+
|
624
|
+
Unlock the API key
|
625
|
+
|
626
|
+
Unlocks an API key by ID. Users can manage user API keys for themself, or service ID API keys for service IDs that are bound to an entity they have access to. In case of service IDs and their API keys, a user must be either an account owner, a IBM Cloud org manager or IBM Cloud space developer in order to manage service IDs of the entity.
|
627
|
+
|
628
|
+
### Example
|
629
|
+
|
630
|
+
```ruby
|
631
|
+
# load the gem
|
632
|
+
require 'ibm_cloud_iam'
|
633
|
+
|
634
|
+
api_instance = IbmCloudIam::IdentityOperationsApi.new
|
635
|
+
id = 'id_example' # String | Unique ID of the API key.
|
636
|
+
opts = {
|
637
|
+
authorization: 'authorization_example' # String | Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: 'No authorization header found'. Please make sure that the provided token has the required authority for the request.
|
638
|
+
}
|
639
|
+
|
640
|
+
begin
|
641
|
+
#Unlock the API key
|
642
|
+
api_instance.unlock_api_key(id, opts)
|
643
|
+
rescue IbmCloudIam::ApiError => e
|
644
|
+
puts "Exception when calling IdentityOperationsApi->unlock_api_key: #{e}"
|
645
|
+
end
|
646
|
+
```
|
647
|
+
|
648
|
+
### Parameters
|
649
|
+
|
650
|
+
|
651
|
+
Name | Type | Description | Notes
|
652
|
+
------------- | ------------- | ------------- | -------------
|
653
|
+
**id** | **String**| Unique ID of the API key. |
|
654
|
+
**authorization** | **String**| Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: 'No authorization header found'. Please make sure that the provided token has the required authority for the request. | [optional]
|
655
|
+
|
656
|
+
### Return type
|
657
|
+
|
658
|
+
nil (empty response body)
|
659
|
+
|
660
|
+
### Authorization
|
661
|
+
|
662
|
+
No authorization required
|
663
|
+
|
664
|
+
### HTTP request headers
|
665
|
+
|
666
|
+
- **Content-Type**: Not defined
|
667
|
+
- **Accept**: Not defined
|
668
|
+
|
669
|
+
|
670
|
+
## unlock_service_id
|
671
|
+
|
672
|
+
> unlock_service_id(id, opts)
|
673
|
+
|
674
|
+
Unlock the service ID
|
675
|
+
|
676
|
+
Unlocks a service ID by ID. Users can manage user API keys for themself, or service ID API keys for service IDs that are bound to an entity they have access to. In case of service IDs and their API keys, a user must be either an account owner, a IBM Cloud org manager or IBM Cloud space developer in order to manage service IDs of the entity.
|
677
|
+
|
678
|
+
### Example
|
679
|
+
|
680
|
+
```ruby
|
681
|
+
# load the gem
|
682
|
+
require 'ibm_cloud_iam'
|
683
|
+
|
684
|
+
api_instance = IbmCloudIam::IdentityOperationsApi.new
|
685
|
+
id = 'id_example' # String | Unique ID of the service ID.
|
686
|
+
opts = {
|
687
|
+
authorization: 'authorization_example' # String | Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: 'No authorization header found'. Please make sure that the provided token has the required authority for the request.
|
688
|
+
}
|
689
|
+
|
690
|
+
begin
|
691
|
+
#Unlock the service ID
|
692
|
+
api_instance.unlock_service_id(id, opts)
|
693
|
+
rescue IbmCloudIam::ApiError => e
|
694
|
+
puts "Exception when calling IdentityOperationsApi->unlock_service_id: #{e}"
|
695
|
+
end
|
696
|
+
```
|
697
|
+
|
698
|
+
### Parameters
|
699
|
+
|
700
|
+
|
701
|
+
Name | Type | Description | Notes
|
702
|
+
------------- | ------------- | ------------- | -------------
|
703
|
+
**id** | **String**| Unique ID of the service ID. |
|
704
|
+
**authorization** | **String**| Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: 'No authorization header found'. Please make sure that the provided token has the required authority for the request. | [optional]
|
705
|
+
|
706
|
+
### Return type
|
707
|
+
|
708
|
+
nil (empty response body)
|
709
|
+
|
710
|
+
### Authorization
|
711
|
+
|
712
|
+
No authorization required
|
713
|
+
|
714
|
+
### HTTP request headers
|
715
|
+
|
716
|
+
- **Content-Type**: Not defined
|
717
|
+
- **Accept**: Not defined
|
718
|
+
|
719
|
+
|
720
|
+
## update_api_key
|
721
|
+
|
722
|
+
> ApiKey update_api_key(id, if_match, update_api_key_request, opts)
|
723
|
+
|
724
|
+
Updates an API key
|
725
|
+
|
726
|
+
Updates properties of an API key. This does NOT affect existing access tokens. Their token content will stay unchanged until the access token is refreshed. To update an API key, pass the property to be modified. To delete one property's value, pass the property with an empty value \"\".Users can manage user API keys for themself, or service ID API keys for service IDs that are bound to an entity they have access to.
|
727
|
+
|
728
|
+
### Example
|
729
|
+
|
730
|
+
```ruby
|
731
|
+
# load the gem
|
732
|
+
require 'ibm_cloud_iam'
|
733
|
+
|
734
|
+
api_instance = IbmCloudIam::IdentityOperationsApi.new
|
735
|
+
id = 'id_example' # String | Unique ID of the API key to be updated.
|
736
|
+
if_match = 'if_match_example' # String | Version of the API key to be updated. Specify the version that you retrieved when reading the API key. This value helps identifying parallel usage of this API. Pass * to indicate to update any version available. This might result in stale updates.
|
737
|
+
update_api_key_request = IbmCloudIam::UpdateApiKeyRequest.new # UpdateApiKeyRequest | Request to update an API key
|
738
|
+
opts = {
|
739
|
+
authorization: 'authorization_example' # String | Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: 'No authorization header found'. Please make sure that the provided token has the required authority for the request.
|
740
|
+
}
|
741
|
+
|
742
|
+
begin
|
743
|
+
#Updates an API key
|
744
|
+
result = api_instance.update_api_key(id, if_match, update_api_key_request, opts)
|
745
|
+
p result
|
746
|
+
rescue IbmCloudIam::ApiError => e
|
747
|
+
puts "Exception when calling IdentityOperationsApi->update_api_key: #{e}"
|
748
|
+
end
|
749
|
+
```
|
750
|
+
|
751
|
+
### Parameters
|
752
|
+
|
753
|
+
|
754
|
+
Name | Type | Description | Notes
|
755
|
+
------------- | ------------- | ------------- | -------------
|
756
|
+
**id** | **String**| Unique ID of the API key to be updated. |
|
757
|
+
**if_match** | **String**| Version of the API key to be updated. Specify the version that you retrieved when reading the API key. This value helps identifying parallel usage of this API. Pass * to indicate to update any version available. This might result in stale updates. |
|
758
|
+
**update_api_key_request** | [**UpdateApiKeyRequest**](UpdateApiKeyRequest.md)| Request to update an API key |
|
759
|
+
**authorization** | **String**| Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: 'No authorization header found'. Please make sure that the provided token has the required authority for the request. | [optional]
|
760
|
+
|
761
|
+
### Return type
|
762
|
+
|
763
|
+
[**ApiKey**](ApiKey.md)
|
764
|
+
|
765
|
+
### Authorization
|
766
|
+
|
767
|
+
No authorization required
|
768
|
+
|
769
|
+
### HTTP request headers
|
770
|
+
|
771
|
+
- **Content-Type**: application/json
|
772
|
+
- **Accept**: application/json
|
773
|
+
|
774
|
+
|
775
|
+
## update_service_id
|
776
|
+
|
777
|
+
> ServiceId update_service_id(id, if_match, update_service_id_request, opts)
|
778
|
+
|
779
|
+
Update service ID
|
780
|
+
|
781
|
+
Updates properties of a service ID. This does NOT affect existing access tokens. Their token content will stay unchanged until the access token is refreshed. To update a service ID, pass the property to be modified. To delete one property's value, pass the property with an empty value \"\".Users can manage user API keys for themself, or service ID API keys for service IDs that are bound to an entity they have access to.
|
782
|
+
|
783
|
+
### Example
|
784
|
+
|
785
|
+
```ruby
|
786
|
+
# load the gem
|
787
|
+
require 'ibm_cloud_iam'
|
788
|
+
|
789
|
+
api_instance = IbmCloudIam::IdentityOperationsApi.new
|
790
|
+
id = 'id_example' # String | Unique ID of the service ID to be updated.
|
791
|
+
if_match = 'if_match_example' # String | Version of the service ID to be updated. Specify the version that you retrieved as entity_tag (ETag header) when reading the service ID. This value helps identifying parallel usage of this API. Pass * to indicate to update any version available. This might result in stale updates.
|
792
|
+
update_service_id_request = IbmCloudIam::UpdateServiceIdRequest.new # UpdateServiceIdRequest | Request to update a service ID
|
793
|
+
opts = {
|
794
|
+
authorization: 'authorization_example' # String | Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: 'No authorization header found'. Please make sure that the provided token has the required authority for the request.
|
795
|
+
}
|
796
|
+
|
797
|
+
begin
|
798
|
+
#Update service ID
|
799
|
+
result = api_instance.update_service_id(id, if_match, update_service_id_request, opts)
|
800
|
+
p result
|
801
|
+
rescue IbmCloudIam::ApiError => e
|
802
|
+
puts "Exception when calling IdentityOperationsApi->update_service_id: #{e}"
|
803
|
+
end
|
804
|
+
```
|
805
|
+
|
806
|
+
### Parameters
|
807
|
+
|
808
|
+
|
809
|
+
Name | Type | Description | Notes
|
810
|
+
------------- | ------------- | ------------- | -------------
|
811
|
+
**id** | **String**| Unique ID of the service ID to be updated. |
|
812
|
+
**if_match** | **String**| Version of the service ID to be updated. Specify the version that you retrieved as entity_tag (ETag header) when reading the service ID. This value helps identifying parallel usage of this API. Pass * to indicate to update any version available. This might result in stale updates. |
|
813
|
+
**update_service_id_request** | [**UpdateServiceIdRequest**](UpdateServiceIdRequest.md)| Request to update a service ID |
|
814
|
+
**authorization** | **String**| Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: 'No authorization header found'. Please make sure that the provided token has the required authority for the request. | [optional]
|
815
|
+
|
816
|
+
### Return type
|
817
|
+
|
818
|
+
[**ServiceId**](ServiceId.md)
|
819
|
+
|
820
|
+
### Authorization
|
821
|
+
|
822
|
+
No authorization required
|
823
|
+
|
824
|
+
### HTTP request headers
|
825
|
+
|
826
|
+
- **Content-Type**: application/json
|
827
|
+
- **Accept**: application/json
|
828
|
+
|