@@ -141,6 +141,29 @@ def test_attach_tag_example(self):
141
141
except ApiException as e :
142
142
pytest .fail (str (e ))
143
143
144
+ @needscredentials
145
+ def test_attach_tag_query_example (self ):
146
+ """
147
+ attach_tag request example
148
+ """
149
+ try :
150
+ print ('\n attach_tag() result:' )
151
+ # begin-attach_tag
152
+
153
+ filter = 'crn: "%s"' (resource_crn )
154
+ query_string_model = {'query_string' : 'resource_crn }
155
+
156
+ tag_results = global_tagging_service .attach_tag (
157
+ query = query_string_model , tag_names = ['tag_test_3' , 'tag_test_4' ], tag_type = 'user'
158
+ ).get_result ()
159
+
160
+ print (json .dumps (tag_results , indent = 2 ))
161
+
162
+ # end-attach_tag
163
+
164
+ except ApiException as e :
165
+ pytest .fail (str (e ))
166
+
144
167
@needscredentials
145
168
def test_detach_tag_example (self ):
146
169
"""
@@ -163,6 +186,29 @@ def test_detach_tag_example(self):
163
186
except ApiException as e :
164
187
pytest .fail (str (e ))
165
188
189
+ @needscredentials
190
+ def test_detach_tag_query_example (self ):
191
+ """
192
+ detach_tag request example
193
+ """
194
+ try :
195
+ print ('\n attach_tag() result:' )
196
+ # begin-attach_tag
197
+
198
+ filter = 'crn: "%s"' (resource_crn )
199
+ query_string_model = {'query_string' : 'resource_crn }
200
+
201
+ tag_results = global_tagging_service .detach_tag (
202
+ query = query_string_model , tag_names = ['tag_test_3' , 'tag_test_4' ], tag_type = 'user'
203
+ ).get_result ()
204
+
205
+ print (json .dumps (tag_results , indent = 2 ))
206
+
207
+ # end-attach_tag
208
+
209
+ except ApiException as e :
210
+ pytest .fail (str (e ))
211
+
166
212
@needscredentials
167
213
def test_delete_tag_example (self ):
168
214
"""
0 commit comments