pnap_tag_api 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: b70aa2b6b69e9fd90165577e7987cc72a8281e681d6c495c4ccbc51f801aee51
4
+ data.tar.gz: 8b58122c10f768995146c7ffd802b07615b11762d01ab2fb5476d7605cb06481
5
+ SHA512:
6
+ metadata.gz: c08b3698c95ea78e4c04dd8f8a3dd04f3ce22164364fd2695d32326cd86918bf653378d1e540df5a8ee77457fbcb7fd826e68459a0f54cb801a985a20f43583b
7
+ data.tar.gz: 51c5dc057fb3633c0aa0c7ae9732818a9527381c27c8d2db4bd9eee5907c282f0337dc8a7fde9dc7a1c531f79da92cedc7355f6e72f03a070c04d79549f2f240
data/Gemfile ADDED
@@ -0,0 +1,9 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
4
+
5
+ group :development, :test do
6
+ gem 'rake', '~> 13.0.1'
7
+ gem 'pry-byebug'
8
+ gem 'rubocop', '~> 0.66.0'
9
+ end
data/README.md ADDED
@@ -0,0 +1,155 @@
1
+ # pnap_tag_api
2
+
3
+ TagApi - the Ruby gem for the Tags API
4
+
5
+ Tags are case-sensitive key-value pairs that simplify resource management. The Tag Manager API allows you to create
6
+ and manage such tags to later assign them to related resources in your Bare Metal Cloud (through the respective
7
+ resource apis) in order to group and categorize them.<br>
8
+ <br>
9
+ <span class='pnap-api-knowledge-base-link'>
10
+ Knowledge base articles to help you can be found
11
+ <a href='https://phoenixnap.com/kb/bmc-server-management-via-api#server-tag-manager-api' target='_blank'>here</a>
12
+ </span><br>
13
+ <br>
14
+ <b>All URLs are relative to (https://api.phoenixnap.com/tag-manager/v1/)</b>
15
+
16
+
17
+ This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
18
+
19
+ - API version: 1.0
20
+ For more information, please visit [https://phoenixnap.com/](https://phoenixnap.com/)
21
+
22
+ ## Installation
23
+
24
+ ### Build a gem
25
+
26
+ To build the Ruby code into a gem:
27
+
28
+ ```shell
29
+ gem build pnap_tag_api.gemspec
30
+ ```
31
+
32
+ Then either install the gem locally, replacing `<VERSION>` with the actual version:
33
+
34
+ ```shell
35
+ gem install ./pnap_tag_api-<VERSION>.gem
36
+ ```
37
+
38
+ (for development, run `gem install --dev ./pnap_tag_api-<VERSION>.gem` to install the development dependencies)
39
+
40
+ or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
41
+
42
+ Finally add this to the Gemfile:
43
+
44
+ gem 'pnap_tag_api', '~> <VERSION>'
45
+
46
+ ### Install from Git
47
+
48
+ To install this Gem from this repository, you'll need to get Bundler by doing `gem install bundler`. Add the following line in your Gemfile:
49
+
50
+ gem 'pnap_tag_api', git: 'https://github.com/phoenixnap/ruby-sdk-bmc-poc', glob: 'TagApi/*.gemspec'
51
+
52
+ If you'd like the development version:
53
+
54
+ gem 'pnap_tag_api', git: 'https://github.com/phoenixnap/ruby-sdk-bmc-poc', glob: 'TagApi/*.gemspec', branch: 'develop'
55
+
56
+ Then run `bundle install`.
57
+
58
+ ### Include the Ruby code directly
59
+
60
+ Include the Ruby code directly using `-I` as follows:
61
+
62
+ ```shell
63
+ ruby -Ilib script.rb
64
+ ```
65
+
66
+ ## Getting Started
67
+
68
+ Please follow the [installation](#installation) procedure and then run the following code:
69
+
70
+ ```ruby
71
+ # Load the gem
72
+ require 'pnap_tag_api'
73
+
74
+ # Setup authorization
75
+ TagApi.configure do |config|
76
+ # Configure OAuth2 access token for authorization: OAuth2
77
+ config.access_token = 'YOUR ACCESS TOKEN'
78
+ end
79
+
80
+ api_instance = TagApi::TagsApi.new
81
+ opts = {
82
+ name: 'env' # String | Query a tag by its name.
83
+ }
84
+
85
+ begin
86
+ #List tags.
87
+ result = api_instance.tags_get(opts)
88
+ p result
89
+ rescue TagApi::ApiError => e
90
+ puts "Exception when calling TagsApi->tags_get: #{e}"
91
+ end
92
+
93
+ ```
94
+
95
+ Authorization can also be setup by using the [`oauth`](https://github.com/oauth-xx/oauth2) library:
96
+
97
+ ```ruby
98
+ # Load the gem
99
+ require 'pnap_tag_api'
100
+ require 'oauth2'
101
+
102
+ # Setup variables for getting a token.
103
+ client_id = 'YOUR_CLIENT_ID'
104
+ client_secret = 'YOUR_CLIENT_SECRET'
105
+ auth_url = 'https://auth.phoenixnap.com/auth/realms/BMC/protocol/openid-connect/token'
106
+
107
+
108
+ # Setup authorization
109
+ TagApi.configure do |config|
110
+ # Retrieve the token using OAuth2.
111
+ client = OAuth2::Client.new(client_id, client_secret, token_url: auth_url)
112
+ token = client.client_credentials.get_token
113
+
114
+ # Configure OAuth2 access token for authorization: OAuth2
115
+ config.access_token = token.token
116
+ end
117
+
118
+ ```
119
+
120
+ ## Documentation for API Endpoints
121
+
122
+ All URIs are relative to *https://api.phoenixnap.com/tag-manager/v1*
123
+
124
+ Class | Method | HTTP request | Description
125
+ ------------ | ------------- | ------------- | -------------
126
+ *TagApi::TagsApi* | [**tags_get**](docs/TagsApi.md#tags_get) | **GET** /tags | List tags.
127
+ *TagApi::TagsApi* | [**tags_post**](docs/TagsApi.md#tags_post) | **POST** /tags | Create a Tag.
128
+ *TagApi::TagsApi* | [**tags_tag_id_delete**](docs/TagsApi.md#tags_tag_id_delete) | **DELETE** /tags/{tagId} | Delete a Tag.
129
+ *TagApi::TagsApi* | [**tags_tag_id_get**](docs/TagsApi.md#tags_tag_id_get) | **GET** /tags/{tagId} | Get a Tag.
130
+ *TagApi::TagsApi* | [**tags_tag_id_patch**](docs/TagsApi.md#tags_tag_id_patch) | **PATCH** /tags/{tagId} | Modify a Tag.
131
+
132
+
133
+ ## Documentation for Models
134
+
135
+ - [TagApi::DeleteResult](docs/DeleteResult.md)
136
+ - [TagApi::Error](docs/Error.md)
137
+ - [TagApi::ResourceAssignment](docs/ResourceAssignment.md)
138
+ - [TagApi::Tag](docs/Tag.md)
139
+ - [TagApi::TagCreate](docs/TagCreate.md)
140
+ - [TagApi::TagUpdate](docs/TagUpdate.md)
141
+
142
+
143
+ ## Documentation for Authorization
144
+
145
+
146
+ ### OAuth2
147
+
148
+
149
+ - **Type**: OAuth
150
+ - **Flow**: application
151
+ - **Authorization URL**:
152
+ - **Scopes**:
153
+ - tags: Grants full access to tags-api.
154
+ - tags.read: Grants read only access to tags-api.
155
+
data/Rakefile ADDED
@@ -0,0 +1,10 @@
1
+ require "bundler/gem_tasks"
2
+
3
+ begin
4
+ require 'rspec/core/rake_task'
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+ task default: :spec
8
+ rescue LoadError
9
+ # no rspec available
10
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 1.0.0
@@ -0,0 +1,20 @@
1
+ # TagApi::DeleteResult
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **result** | **String** | Tag deletion result message. | |
8
+ | **tag_id** | **String** | The unique identifier of the tag. | |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'pnap_tag_api'
14
+
15
+ instance = TagApi::DeleteResult.new(
16
+ result: Tag [tag-name] has been deleted.,
17
+ tag_id: 60ffafcdffb8b074c7968dad
18
+ )
19
+ ```
20
+
data/docs/Error.md ADDED
@@ -0,0 +1,20 @@
1
+ # TagApi::Error
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **message** | **String** | The description detailing the cause of the error code. | |
8
+ | **validation_errors** | **Array&lt;String&gt;** | Validation errors, if any. | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'pnap_tag_api'
14
+
15
+ instance = TagApi::Error.new(
16
+ message: null,
17
+ validation_errors: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,20 @@
1
+ # TagApi::ResourceAssignment
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **resource_name** | **String** | The resource name. | |
8
+ | **value** | **String** | The value of the tag assigned to the resource. | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'pnap_tag_api'
14
+
15
+ instance = TagApi::ResourceAssignment.new(
16
+ resource_name: /bmc/servers/60ffafcdffb8b074c7968dad,
17
+ value: DEV
18
+ )
19
+ ```
20
+
data/docs/Tag.md ADDED
@@ -0,0 +1,30 @@
1
+ # TagApi::Tag
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | The unique id of the tag. | |
8
+ | **name** | **String** | The name of the tag. | |
9
+ | **values** | **Array&lt;String&gt;** | The optional values of the tag. | [optional] |
10
+ | **description** | **String** | The description of the tag. | [optional] |
11
+ | **is_billing_tag** | **Boolean** | Whether or not to show the tag as part of billing and invoices. | |
12
+ | **resource_assignments** | [**Array&lt;ResourceAssignment&gt;**](ResourceAssignment.md) | The tag&#39;s assigned resources. | [optional] |
13
+ | **created_by** | **String** | The tag&#39;s creator. | [optional][default to &#39;USER&#39;] |
14
+
15
+ ## Example
16
+
17
+ ```ruby
18
+ require 'pnap_tag_api'
19
+
20
+ instance = TagApi::Tag.new(
21
+ id: 60ffafcdffb8b074c7968dad,
22
+ name: Environment,
23
+ values: [DEV, PROD],
24
+ description: This tag is used for all resources that need to be assigned to an environment.,
25
+ is_billing_tag: true,
26
+ resource_assignments: null,
27
+ created_by: null
28
+ )
29
+ ```
30
+
data/docs/TagCreate.md ADDED
@@ -0,0 +1,22 @@
1
+ # TagApi::TagCreate
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **name** | **String** | The unique name of the tag. Tag names are case-sensitive, and should be composed of a maximum of 100 characters including UTF-8 Unicode letters, numbers, and the following symbols: &#39;-&#39;, &#39;_&#39;. Regex: [A-zÀ-ú0-9_-]{1,100} | |
8
+ | **description** | **String** | The description of the tag. | [optional] |
9
+ | **is_billing_tag** | **Boolean** | Whether or not to show the tag as part of billing and invoices. | |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'pnap_tag_api'
15
+
16
+ instance = TagApi::TagCreate.new(
17
+ name: Environment,
18
+ description: This tag is used for all resources that need to be assigned to an environment.,
19
+ is_billing_tag: true
20
+ )
21
+ ```
22
+
data/docs/TagUpdate.md ADDED
@@ -0,0 +1,22 @@
1
+ # TagApi::TagUpdate
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **name** | **String** | The unique name of the tag. Tag names are case-sensitive, and should be composed of a maximum of 100 characters including UTF-8 Unicode letters, numbers, and the following symbols: &#39;-&#39;, &#39;_&#39;. Regex: [A-zÀ-ú0-9_-]{1,100} | |
8
+ | **description** | **String** | The description of the tag. | [optional] |
9
+ | **is_billing_tag** | **Boolean** | Whether or not to show the tag as part of billing and invoices. | |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'pnap_tag_api'
15
+
16
+ instance = TagApi::TagUpdate.new(
17
+ name: Environment,
18
+ description: This tag is used for all resources that need to be assigned to an environment.,
19
+ is_billing_tag: true
20
+ )
21
+ ```
22
+
data/docs/TagsApi.md ADDED
@@ -0,0 +1,361 @@
1
+ # TagApi::TagsApi
2
+
3
+ All URIs are relative to *https://api.phoenixnap.com/tag-manager/v1*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**tags_get**](TagsApi.md#tags_get) | **GET** /tags | List tags. |
8
+ | [**tags_post**](TagsApi.md#tags_post) | **POST** /tags | Create a Tag. |
9
+ | [**tags_tag_id_delete**](TagsApi.md#tags_tag_id_delete) | **DELETE** /tags/{tagId} | Delete a Tag. |
10
+ | [**tags_tag_id_get**](TagsApi.md#tags_tag_id_get) | **GET** /tags/{tagId} | Get a Tag. |
11
+ | [**tags_tag_id_patch**](TagsApi.md#tags_tag_id_patch) | **PATCH** /tags/{tagId} | Modify a Tag. |
12
+
13
+
14
+ ## tags_get
15
+
16
+ > <Array<Tag>> tags_get(opts)
17
+
18
+ List tags.
19
+
20
+ Retrieve all tags belonging to the BMC Account.
21
+
22
+ ### Examples
23
+
24
+ ```ruby
25
+ require 'time'
26
+ require 'pnap_tag_api'
27
+ # setup authorization
28
+ TagApi.configure do |config|
29
+ # Configure OAuth2 access token for authorization: OAuth2
30
+ config.access_token = 'YOUR ACCESS TOKEN'
31
+ end
32
+
33
+ api_instance = TagApi::TagsApi.new
34
+ opts = {
35
+ name: 'env' # String | Query a tag by its name.
36
+ }
37
+
38
+ begin
39
+ # List tags.
40
+ result = api_instance.tags_get(opts)
41
+ p result
42
+ rescue TagApi::ApiError => e
43
+ puts "Error when calling TagsApi->tags_get: #{e}"
44
+ end
45
+ ```
46
+
47
+ #### Using the tags_get_with_http_info variant
48
+
49
+ This returns an Array which contains the response data, status code and headers.
50
+
51
+ > <Array(<Array<Tag>>, Integer, Hash)> tags_get_with_http_info(opts)
52
+
53
+ ```ruby
54
+ begin
55
+ # List tags.
56
+ data, status_code, headers = api_instance.tags_get_with_http_info(opts)
57
+ p status_code # => 2xx
58
+ p headers # => { ... }
59
+ p data # => <Array<Tag>>
60
+ rescue TagApi::ApiError => e
61
+ puts "Error when calling TagsApi->tags_get_with_http_info: #{e}"
62
+ end
63
+ ```
64
+
65
+ ### Parameters
66
+
67
+ | Name | Type | Description | Notes |
68
+ | ---- | ---- | ----------- | ----- |
69
+ | **name** | **String** | Query a tag by its name. | [optional] |
70
+
71
+ ### Return type
72
+
73
+ [**Array&lt;Tag&gt;**](Tag.md)
74
+
75
+ ### Authorization
76
+
77
+ [OAuth2](../README.md#OAuth2)
78
+
79
+ ### HTTP request headers
80
+
81
+ - **Content-Type**: Not defined
82
+ - **Accept**: application/json
83
+
84
+
85
+ ## tags_post
86
+
87
+ > <Tag> tags_post(tag_create)
88
+
89
+ Create a Tag.
90
+
91
+ Create a tag with the provided information.
92
+
93
+ ### Examples
94
+
95
+ ```ruby
96
+ require 'time'
97
+ require 'pnap_tag_api'
98
+ # setup authorization
99
+ TagApi.configure do |config|
100
+ # Configure OAuth2 access token for authorization: OAuth2
101
+ config.access_token = 'YOUR ACCESS TOKEN'
102
+ end
103
+
104
+ api_instance = TagApi::TagsApi.new
105
+ tag_create = TagApi::TagCreate.new({name: 'Environment', is_billing_tag: true}) # TagCreate | The body containing the tag details.
106
+
107
+ begin
108
+ # Create a Tag.
109
+ result = api_instance.tags_post(tag_create)
110
+ p result
111
+ rescue TagApi::ApiError => e
112
+ puts "Error when calling TagsApi->tags_post: #{e}"
113
+ end
114
+ ```
115
+
116
+ #### Using the tags_post_with_http_info variant
117
+
118
+ This returns an Array which contains the response data, status code and headers.
119
+
120
+ > <Array(<Tag>, Integer, Hash)> tags_post_with_http_info(tag_create)
121
+
122
+ ```ruby
123
+ begin
124
+ # Create a Tag.
125
+ data, status_code, headers = api_instance.tags_post_with_http_info(tag_create)
126
+ p status_code # => 2xx
127
+ p headers # => { ... }
128
+ p data # => <Tag>
129
+ rescue TagApi::ApiError => e
130
+ puts "Error when calling TagsApi->tags_post_with_http_info: #{e}"
131
+ end
132
+ ```
133
+
134
+ ### Parameters
135
+
136
+ | Name | Type | Description | Notes |
137
+ | ---- | ---- | ----------- | ----- |
138
+ | **tag_create** | [**TagCreate**](TagCreate.md) | The body containing the tag details. | |
139
+
140
+ ### Return type
141
+
142
+ [**Tag**](Tag.md)
143
+
144
+ ### Authorization
145
+
146
+ [OAuth2](../README.md#OAuth2)
147
+
148
+ ### HTTP request headers
149
+
150
+ - **Content-Type**: application/json
151
+ - **Accept**: application/json
152
+
153
+
154
+ ## tags_tag_id_delete
155
+
156
+ > <DeleteResult> tags_tag_id_delete(tag_id)
157
+
158
+ Delete a Tag.
159
+
160
+ Delete the tag with the given ID.
161
+
162
+ ### Examples
163
+
164
+ ```ruby
165
+ require 'time'
166
+ require 'pnap_tag_api'
167
+ # setup authorization
168
+ TagApi.configure do |config|
169
+ # Configure OAuth2 access token for authorization: OAuth2
170
+ config.access_token = 'YOUR ACCESS TOKEN'
171
+ end
172
+
173
+ api_instance = TagApi::TagsApi.new
174
+ tag_id = 'e6afba51-7de8-4080-83ab-0f915570659c' # String | The tag's ID.
175
+
176
+ begin
177
+ # Delete a Tag.
178
+ result = api_instance.tags_tag_id_delete(tag_id)
179
+ p result
180
+ rescue TagApi::ApiError => e
181
+ puts "Error when calling TagsApi->tags_tag_id_delete: #{e}"
182
+ end
183
+ ```
184
+
185
+ #### Using the tags_tag_id_delete_with_http_info variant
186
+
187
+ This returns an Array which contains the response data, status code and headers.
188
+
189
+ > <Array(<DeleteResult>, Integer, Hash)> tags_tag_id_delete_with_http_info(tag_id)
190
+
191
+ ```ruby
192
+ begin
193
+ # Delete a Tag.
194
+ data, status_code, headers = api_instance.tags_tag_id_delete_with_http_info(tag_id)
195
+ p status_code # => 2xx
196
+ p headers # => { ... }
197
+ p data # => <DeleteResult>
198
+ rescue TagApi::ApiError => e
199
+ puts "Error when calling TagsApi->tags_tag_id_delete_with_http_info: #{e}"
200
+ end
201
+ ```
202
+
203
+ ### Parameters
204
+
205
+ | Name | Type | Description | Notes |
206
+ | ---- | ---- | ----------- | ----- |
207
+ | **tag_id** | **String** | The tag&#39;s ID. | |
208
+
209
+ ### Return type
210
+
211
+ [**DeleteResult**](DeleteResult.md)
212
+
213
+ ### Authorization
214
+
215
+ [OAuth2](../README.md#OAuth2)
216
+
217
+ ### HTTP request headers
218
+
219
+ - **Content-Type**: Not defined
220
+ - **Accept**: application/json
221
+
222
+
223
+ ## tags_tag_id_get
224
+
225
+ > <Tag> tags_tag_id_get(tag_id)
226
+
227
+ Get a Tag.
228
+
229
+ Retrieve the tag with the given ID
230
+
231
+ ### Examples
232
+
233
+ ```ruby
234
+ require 'time'
235
+ require 'pnap_tag_api'
236
+ # setup authorization
237
+ TagApi.configure do |config|
238
+ # Configure OAuth2 access token for authorization: OAuth2
239
+ config.access_token = 'YOUR ACCESS TOKEN'
240
+ end
241
+
242
+ api_instance = TagApi::TagsApi.new
243
+ tag_id = 'e6afba51-7de8-4080-83ab-0f915570659c' # String | The tag's ID.
244
+
245
+ begin
246
+ # Get a Tag.
247
+ result = api_instance.tags_tag_id_get(tag_id)
248
+ p result
249
+ rescue TagApi::ApiError => e
250
+ puts "Error when calling TagsApi->tags_tag_id_get: #{e}"
251
+ end
252
+ ```
253
+
254
+ #### Using the tags_tag_id_get_with_http_info variant
255
+
256
+ This returns an Array which contains the response data, status code and headers.
257
+
258
+ > <Array(<Tag>, Integer, Hash)> tags_tag_id_get_with_http_info(tag_id)
259
+
260
+ ```ruby
261
+ begin
262
+ # Get a Tag.
263
+ data, status_code, headers = api_instance.tags_tag_id_get_with_http_info(tag_id)
264
+ p status_code # => 2xx
265
+ p headers # => { ... }
266
+ p data # => <Tag>
267
+ rescue TagApi::ApiError => e
268
+ puts "Error when calling TagsApi->tags_tag_id_get_with_http_info: #{e}"
269
+ end
270
+ ```
271
+
272
+ ### Parameters
273
+
274
+ | Name | Type | Description | Notes |
275
+ | ---- | ---- | ----------- | ----- |
276
+ | **tag_id** | **String** | The tag&#39;s ID. | |
277
+
278
+ ### Return type
279
+
280
+ [**Tag**](Tag.md)
281
+
282
+ ### Authorization
283
+
284
+ [OAuth2](../README.md#OAuth2)
285
+
286
+ ### HTTP request headers
287
+
288
+ - **Content-Type**: Not defined
289
+ - **Accept**: application/json
290
+
291
+
292
+ ## tags_tag_id_patch
293
+
294
+ > <Tag> tags_tag_id_patch(tag_id, tag_update)
295
+
296
+ Modify a Tag.
297
+
298
+ Updates the tag with the given ID.
299
+
300
+ ### Examples
301
+
302
+ ```ruby
303
+ require 'time'
304
+ require 'pnap_tag_api'
305
+ # setup authorization
306
+ TagApi.configure do |config|
307
+ # Configure OAuth2 access token for authorization: OAuth2
308
+ config.access_token = 'YOUR ACCESS TOKEN'
309
+ end
310
+
311
+ api_instance = TagApi::TagsApi.new
312
+ tag_id = 'e6afba51-7de8-4080-83ab-0f915570659c' # String | The tag's ID.
313
+ tag_update = TagApi::TagUpdate.new({name: 'Environment', is_billing_tag: true}) # TagUpdate | The body containing the tag changes.
314
+
315
+ begin
316
+ # Modify a Tag.
317
+ result = api_instance.tags_tag_id_patch(tag_id, tag_update)
318
+ p result
319
+ rescue TagApi::ApiError => e
320
+ puts "Error when calling TagsApi->tags_tag_id_patch: #{e}"
321
+ end
322
+ ```
323
+
324
+ #### Using the tags_tag_id_patch_with_http_info variant
325
+
326
+ This returns an Array which contains the response data, status code and headers.
327
+
328
+ > <Array(<Tag>, Integer, Hash)> tags_tag_id_patch_with_http_info(tag_id, tag_update)
329
+
330
+ ```ruby
331
+ begin
332
+ # Modify a Tag.
333
+ data, status_code, headers = api_instance.tags_tag_id_patch_with_http_info(tag_id, tag_update)
334
+ p status_code # => 2xx
335
+ p headers # => { ... }
336
+ p data # => <Tag>
337
+ rescue TagApi::ApiError => e
338
+ puts "Error when calling TagsApi->tags_tag_id_patch_with_http_info: #{e}"
339
+ end
340
+ ```
341
+
342
+ ### Parameters
343
+
344
+ | Name | Type | Description | Notes |
345
+ | ---- | ---- | ----------- | ----- |
346
+ | **tag_id** | **String** | The tag&#39;s ID. | |
347
+ | **tag_update** | [**TagUpdate**](TagUpdate.md) | The body containing the tag changes. | |
348
+
349
+ ### Return type
350
+
351
+ [**Tag**](Tag.md)
352
+
353
+ ### Authorization
354
+
355
+ [OAuth2](../README.md#OAuth2)
356
+
357
+ ### HTTP request headers
358
+
359
+ - **Content-Type**: application/json
360
+ - **Accept**: application/json
361
+