agilicus 1.246.1__py3-none-any.whl → 1.247.0__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. agilicus/.openapi-generator/FILES +19 -0
  2. agilicus/agilicus_api/__init__.py +6 -0
  3. agilicus/agilicus_api/api/policy_templates_api.py +684 -0
  4. agilicus/agilicus_api/api/policy_templates_api_mock.py +41 -0
  5. agilicus/agilicus_api/api_client.py +1 -1
  6. agilicus/agilicus_api/apis/__init__.py +1 -0
  7. agilicus/agilicus_api/configuration.py +1 -1
  8. agilicus/agilicus_api/docs/ListPolicyTemplateInstancesResponse.md +14 -0
  9. agilicus/agilicus_api/docs/MFAPolicyTemplate.md +15 -0
  10. agilicus/agilicus_api/docs/PolicyTemplate.md +14 -0
  11. agilicus/agilicus_api/docs/PolicyTemplateInstance.md +14 -0
  12. agilicus/agilicus_api/docs/PolicyTemplateInstanceSpec.md +16 -0
  13. agilicus/agilicus_api/docs/PolicyTemplatesApi.md +463 -0
  14. agilicus/agilicus_api/docs/ResourceURL.md +1 -1
  15. agilicus/agilicus_api/model/list_policy_template_instances_response.py +295 -0
  16. agilicus/agilicus_api/model/mfa_policy_template.py +309 -0
  17. agilicus/agilicus_api/model/policy_template.py +358 -0
  18. agilicus/agilicus_api/model/policy_template_instance.py +295 -0
  19. agilicus/agilicus_api/model/policy_template_instance_spec.py +334 -0
  20. agilicus/agilicus_api/model/resource_url.py +2 -2
  21. agilicus/agilicus_api/models/__init__.py +5 -0
  22. agilicus/agilicus_api/test/test_list_policy_template_instances_response.py +38 -0
  23. agilicus/agilicus_api/test/test_mfa_policy_template.py +38 -0
  24. agilicus/agilicus_api/test/test_policy_template.py +40 -0
  25. agilicus/agilicus_api/test/test_policy_template_instance.py +40 -0
  26. agilicus/agilicus_api/test/test_policy_template_instance_spec.py +38 -0
  27. agilicus/agilicus_api/test/test_policy_templates_api.py +64 -0
  28. agilicus/agilicus_api_README.md +11 -1
  29. agilicus/context.py +3 -0
  30. agilicus/policy/policies.py +32 -47
  31. {agilicus-1.246.1.dist-info → agilicus-1.247.0.dist-info}/METADATA +1 -1
  32. {agilicus-1.246.1.dist-info → agilicus-1.247.0.dist-info}/RECORD +35 -16
  33. {agilicus-1.246.1.dist-info → agilicus-1.247.0.dist-info}/LICENSE.txt +0 -0
  34. {agilicus-1.246.1.dist-info → agilicus-1.247.0.dist-info}/WHEEL +0 -0
  35. {agilicus-1.246.1.dist-info → agilicus-1.247.0.dist-info}/entry_points.txt +0 -0
@@ -0,0 +1,684 @@
1
+ """
2
+ Agilicus API
3
+
4
+ Agilicus is API-first. Modern software is controlled by other software, is open, is available for you to use the way you want, securely, simply. The OpenAPI Specification in YAML format is available on [www](https://www.agilicus.com/www/api/agilicus-openapi.yaml) for importing to other tools. A rendered, online viewable and usable version of this specification is available at [api](https://www.agilicus.com/api). You may try the API inline directly in the web page. To do so, first obtain an Authentication Token (the simplest way is to install the Python SDK, and then run `agilicus-cli --issuer https://MYISSUER get-token`). You will need an org-id for most calls (and can obtain from `agilicus-cli --issuer https://MYISSUER list-orgs`). The `MYISSUER` will typically be `auth.MYDOMAIN`, and you will see it as you sign-in to the administrative UI. This API releases on Bearer-Token authentication. To obtain a valid bearer token you will need to Authenticate to an Issuer with OpenID Connect (a superset of OAUTH2). Your \"issuer\" will look like https://auth.MYDOMAIN. For example, when you signed-up, if you said \"use my own domain name\" and assigned a CNAME of cloud.example.com, then your issuer would be https://auth.cloud.example.com. If you selected \"use an Agilicus supplied domain name\", your issuer would look like https://auth.myorg.agilicus.cloud. For test purposes you can use our [Python SDK](https://pypi.org/project/agilicus/) and run `agilicus-cli --issuer https://auth.MYDOMAIN get-token`. This API may be used in any language runtime that supports OpenAPI 3.0, or, you may use our [Python SDK](https://pypi.org/project/agilicus/), our [Typescript SDK](https://www.npmjs.com/package/@agilicus/angular), or our [Golang SDK](https://git.agilicus.com/pub/sdk-go). 100% of the activities in our system our API-driven, from our web-admin, through our progressive web applications, to all internals: there is nothing that is not accessible. For more information, see [developer resources](https://www.agilicus.com/developer). # noqa: E501
5
+
6
+ The version of the OpenAPI document: 2024.03.26
7
+ Contact: dev@agilicus.com
8
+ Generated by: https://openapi-generator.tech
9
+ """
10
+
11
+
12
+ import re # noqa: F401
13
+ import sys # noqa: F401
14
+
15
+ from agilicus_api.api_client import ApiClient, Endpoint as _Endpoint
16
+ from agilicus_api.model_utils import ( # noqa: F401
17
+ check_allowed_values,
18
+ check_validations,
19
+ date,
20
+ datetime,
21
+ file_type,
22
+ none_type,
23
+ validate_and_convert_types
24
+ )
25
+ from agilicus_api.model.error_message import ErrorMessage
26
+ from agilicus_api.model.list_policy_template_instances_response import ListPolicyTemplateInstancesResponse
27
+ from agilicus_api.model.policy_template_instance import PolicyTemplateInstance
28
+
29
+
30
+ class PolicyTemplatesApi(object):
31
+ """NOTE: This class is auto generated by OpenAPI Generator
32
+ Ref: https://openapi-generator.tech
33
+
34
+ Do not edit the class manually.
35
+ """
36
+
37
+ def __init__(self, api_client=None):
38
+ if api_client is None:
39
+ api_client = ApiClient()
40
+ self.api_client = api_client
41
+
42
+ def __create_policy_template_instance(
43
+ self,
44
+ policy_template_instance,
45
+ **kwargs
46
+ ):
47
+ """Add a PolicyTemplateInstance # noqa: E501
48
+
49
+ Adds a new PolicyTemplateInstance. PolicyTemplates must have unique names within an org for a particular type of template. If the name is not unique, a 409 will be returned. # noqa: E501
50
+ This method makes a synchronous HTTP request by default. To make an
51
+ asynchronous HTTP request, please pass async_req=True
52
+
53
+ >>> thread = api.create_policy_template_instance(policy_template_instance, async_req=True)
54
+ >>> result = thread.get()
55
+
56
+ Args:
57
+ policy_template_instance (PolicyTemplateInstance):
58
+
59
+ Keyword Args:
60
+ _return_http_data_only (bool): response data without head status
61
+ code and headers. Default is True.
62
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
63
+ will be returned without reading/decoding response data.
64
+ Default is True.
65
+ _request_timeout (float/tuple): timeout setting for this request. If one
66
+ number provided, it will be total request timeout. It can also
67
+ be a pair (tuple) of (connection, read) timeouts.
68
+ Default is None.
69
+ _check_input_type (bool): specifies if type checking
70
+ should be done one the data sent to the server.
71
+ Default is True.
72
+ _check_return_type (bool): specifies if type checking
73
+ should be done one the data received from the server.
74
+ Default is True.
75
+ _host_index (int/None): specifies the index of the server
76
+ that we want to use.
77
+ Default is read from the configuration.
78
+ async_req (bool): execute request asynchronously
79
+
80
+ Returns:
81
+ PolicyTemplateInstance
82
+ If the method is called asynchronously, returns the request
83
+ thread.
84
+ """
85
+ kwargs['async_req'] = kwargs.get(
86
+ 'async_req', False
87
+ )
88
+ kwargs['_return_http_data_only'] = kwargs.get(
89
+ '_return_http_data_only', True
90
+ )
91
+ kwargs['_preload_content'] = kwargs.get(
92
+ '_preload_content', True
93
+ )
94
+ kwargs['_request_timeout'] = kwargs.get(
95
+ '_request_timeout', None
96
+ )
97
+ kwargs['_check_input_type'] = kwargs.get(
98
+ '_check_input_type', True
99
+ )
100
+ kwargs['_check_return_type'] = kwargs.get(
101
+ '_check_return_type', True
102
+ )
103
+ kwargs['_host_index'] = kwargs.get('_host_index')
104
+ kwargs['policy_template_instance'] = \
105
+ policy_template_instance
106
+ return self.call_with_http_info(**kwargs)
107
+
108
+ if self.create_policy_template_instance is None:
109
+ self.create_policy_template_instance = _Endpoint(
110
+ settings={
111
+ 'response_type': (PolicyTemplateInstance,),
112
+ 'auth': [
113
+ 'token-valid'
114
+ ],
115
+ 'endpoint_path': '/v1/policy_template_instances',
116
+ 'operation_id': 'create_policy_template_instance',
117
+ 'http_method': 'POST',
118
+ 'servers': None,
119
+ },
120
+ params_map={
121
+ 'all': [
122
+ 'policy_template_instance',
123
+ ],
124
+ 'required': [
125
+ 'policy_template_instance',
126
+ ],
127
+ 'nullable': [
128
+ ],
129
+ 'enum': [
130
+ ],
131
+ 'validation': [
132
+ ]
133
+ },
134
+ root_map={
135
+ 'validations': {
136
+ },
137
+ 'allowed_values': {
138
+ },
139
+ 'openapi_types': {
140
+ 'policy_template_instance':
141
+ (PolicyTemplateInstance,),
142
+ },
143
+ 'attribute_map': {
144
+ },
145
+ 'location_map': {
146
+ 'policy_template_instance': 'body',
147
+ },
148
+ 'collection_format_map': {
149
+ }
150
+ },
151
+ headers_map={
152
+ 'accept': [
153
+ 'application/json'
154
+ ],
155
+ 'content_type': [
156
+ 'application/json'
157
+ ]
158
+ },
159
+ api_client=api_client,
160
+ callable=__create_policy_template_instance
161
+ )
162
+
163
+ def __delete_policy_template_instance(
164
+ self,
165
+ template_name,
166
+ **kwargs
167
+ ):
168
+ """Delete a PolicyTemplateInstance # noqa: E501
169
+
170
+ Delete a PolicyTemplateInstance # noqa: E501
171
+ This method makes a synchronous HTTP request by default. To make an
172
+ asynchronous HTTP request, please pass async_req=True
173
+
174
+ >>> thread = api.delete_policy_template_instance(template_name, async_req=True)
175
+ >>> result = thread.get()
176
+
177
+ Args:
178
+ template_name (str): filters based on the template name
179
+
180
+ Keyword Args:
181
+ org_id (str): Organisation Unique identifier. [optional]
182
+ _return_http_data_only (bool): response data without head status
183
+ code and headers. Default is True.
184
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
185
+ will be returned without reading/decoding response data.
186
+ Default is True.
187
+ _request_timeout (float/tuple): timeout setting for this request. If one
188
+ number provided, it will be total request timeout. It can also
189
+ be a pair (tuple) of (connection, read) timeouts.
190
+ Default is None.
191
+ _check_input_type (bool): specifies if type checking
192
+ should be done one the data sent to the server.
193
+ Default is True.
194
+ _check_return_type (bool): specifies if type checking
195
+ should be done one the data received from the server.
196
+ Default is True.
197
+ _host_index (int/None): specifies the index of the server
198
+ that we want to use.
199
+ Default is read from the configuration.
200
+ async_req (bool): execute request asynchronously
201
+
202
+ Returns:
203
+ None
204
+ If the method is called asynchronously, returns the request
205
+ thread.
206
+ """
207
+ kwargs['async_req'] = kwargs.get(
208
+ 'async_req', False
209
+ )
210
+ kwargs['_return_http_data_only'] = kwargs.get(
211
+ '_return_http_data_only', True
212
+ )
213
+ kwargs['_preload_content'] = kwargs.get(
214
+ '_preload_content', True
215
+ )
216
+ kwargs['_request_timeout'] = kwargs.get(
217
+ '_request_timeout', None
218
+ )
219
+ kwargs['_check_input_type'] = kwargs.get(
220
+ '_check_input_type', True
221
+ )
222
+ kwargs['_check_return_type'] = kwargs.get(
223
+ '_check_return_type', True
224
+ )
225
+ kwargs['_host_index'] = kwargs.get('_host_index')
226
+ kwargs['template_name'] = \
227
+ template_name
228
+ return self.call_with_http_info(**kwargs)
229
+
230
+ if self.delete_policy_template_instance is None:
231
+ self.delete_policy_template_instance = _Endpoint(
232
+ settings={
233
+ 'response_type': None,
234
+ 'auth': [
235
+ 'token-valid'
236
+ ],
237
+ 'endpoint_path': '/v1/policy_template_instances/{template_name}',
238
+ 'operation_id': 'delete_policy_template_instance',
239
+ 'http_method': 'DELETE',
240
+ 'servers': None,
241
+ },
242
+ params_map={
243
+ 'all': [
244
+ 'template_name',
245
+ 'org_id',
246
+ ],
247
+ 'required': [
248
+ 'template_name',
249
+ ],
250
+ 'nullable': [
251
+ ],
252
+ 'enum': [
253
+ ],
254
+ 'validation': [
255
+ ]
256
+ },
257
+ root_map={
258
+ 'validations': {
259
+ },
260
+ 'allowed_values': {
261
+ },
262
+ 'openapi_types': {
263
+ 'template_name':
264
+ (str,),
265
+ 'org_id':
266
+ (str,),
267
+ },
268
+ 'attribute_map': {
269
+ 'template_name': 'template_name',
270
+ 'org_id': 'org_id',
271
+ },
272
+ 'location_map': {
273
+ 'template_name': 'path',
274
+ 'org_id': 'query',
275
+ },
276
+ 'collection_format_map': {
277
+ }
278
+ },
279
+ headers_map={
280
+ 'accept': [
281
+ 'application/json'
282
+ ],
283
+ 'content_type': [],
284
+ },
285
+ api_client=api_client,
286
+ callable=__delete_policy_template_instance
287
+ )
288
+
289
+ def __get_policy_template_instance(
290
+ self,
291
+ template_name,
292
+ **kwargs
293
+ ):
294
+ """Get a PolicyTemplateInstance # noqa: E501
295
+
296
+ Get a PolicyTemplateInstance # noqa: E501
297
+ This method makes a synchronous HTTP request by default. To make an
298
+ asynchronous HTTP request, please pass async_req=True
299
+
300
+ >>> thread = api.get_policy_template_instance(template_name, async_req=True)
301
+ >>> result = thread.get()
302
+
303
+ Args:
304
+ template_name (str): filters based on the template name
305
+
306
+ Keyword Args:
307
+ org_id (str): Organisation Unique identifier. [optional]
308
+ _return_http_data_only (bool): response data without head status
309
+ code and headers. Default is True.
310
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
311
+ will be returned without reading/decoding response data.
312
+ Default is True.
313
+ _request_timeout (float/tuple): timeout setting for this request. If one
314
+ number provided, it will be total request timeout. It can also
315
+ be a pair (tuple) of (connection, read) timeouts.
316
+ Default is None.
317
+ _check_input_type (bool): specifies if type checking
318
+ should be done one the data sent to the server.
319
+ Default is True.
320
+ _check_return_type (bool): specifies if type checking
321
+ should be done one the data received from the server.
322
+ Default is True.
323
+ _host_index (int/None): specifies the index of the server
324
+ that we want to use.
325
+ Default is read from the configuration.
326
+ async_req (bool): execute request asynchronously
327
+
328
+ Returns:
329
+ PolicyTemplateInstance
330
+ If the method is called asynchronously, returns the request
331
+ thread.
332
+ """
333
+ kwargs['async_req'] = kwargs.get(
334
+ 'async_req', False
335
+ )
336
+ kwargs['_return_http_data_only'] = kwargs.get(
337
+ '_return_http_data_only', True
338
+ )
339
+ kwargs['_preload_content'] = kwargs.get(
340
+ '_preload_content', True
341
+ )
342
+ kwargs['_request_timeout'] = kwargs.get(
343
+ '_request_timeout', None
344
+ )
345
+ kwargs['_check_input_type'] = kwargs.get(
346
+ '_check_input_type', True
347
+ )
348
+ kwargs['_check_return_type'] = kwargs.get(
349
+ '_check_return_type', True
350
+ )
351
+ kwargs['_host_index'] = kwargs.get('_host_index')
352
+ kwargs['template_name'] = \
353
+ template_name
354
+ return self.call_with_http_info(**kwargs)
355
+
356
+ if self.get_policy_template_instance is None:
357
+ self.get_policy_template_instance = _Endpoint(
358
+ settings={
359
+ 'response_type': (PolicyTemplateInstance,),
360
+ 'auth': [
361
+ 'token-valid'
362
+ ],
363
+ 'endpoint_path': '/v1/policy_template_instances/{template_name}',
364
+ 'operation_id': 'get_policy_template_instance',
365
+ 'http_method': 'GET',
366
+ 'servers': None,
367
+ },
368
+ params_map={
369
+ 'all': [
370
+ 'template_name',
371
+ 'org_id',
372
+ ],
373
+ 'required': [
374
+ 'template_name',
375
+ ],
376
+ 'nullable': [
377
+ ],
378
+ 'enum': [
379
+ ],
380
+ 'validation': [
381
+ ]
382
+ },
383
+ root_map={
384
+ 'validations': {
385
+ },
386
+ 'allowed_values': {
387
+ },
388
+ 'openapi_types': {
389
+ 'template_name':
390
+ (str,),
391
+ 'org_id':
392
+ (str,),
393
+ },
394
+ 'attribute_map': {
395
+ 'template_name': 'template_name',
396
+ 'org_id': 'org_id',
397
+ },
398
+ 'location_map': {
399
+ 'template_name': 'path',
400
+ 'org_id': 'query',
401
+ },
402
+ 'collection_format_map': {
403
+ }
404
+ },
405
+ headers_map={
406
+ 'accept': [
407
+ 'application/json'
408
+ ],
409
+ 'content_type': [],
410
+ },
411
+ api_client=api_client,
412
+ callable=__get_policy_template_instance
413
+ )
414
+
415
+ def __list_policy_template_instances(
416
+ self,
417
+ **kwargs
418
+ ):
419
+ """List all standalone policy_templates # noqa: E501
420
+
421
+ List all PolicyTemplateInstances matching the provided query parameters. # noqa: E501
422
+ This method makes a synchronous HTTP request by default. To make an
423
+ asynchronous HTTP request, please pass async_req=True
424
+
425
+ >>> thread = api.list_policy_template_instances(async_req=True)
426
+ >>> result = thread.get()
427
+
428
+
429
+ Keyword Args:
430
+ limit (int): limit the number of rows in the response. [optional] if omitted the server will use the default value of 500
431
+ name (str): Filters based on whether or not the items in the collection have the given name. . [optional]
432
+ template_type (str): filters based on the template type . [optional]
433
+ org_id (str): Organisation Unique identifier. [optional]
434
+ _return_http_data_only (bool): response data without head status
435
+ code and headers. Default is True.
436
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
437
+ will be returned without reading/decoding response data.
438
+ Default is True.
439
+ _request_timeout (float/tuple): timeout setting for this request. If one
440
+ number provided, it will be total request timeout. It can also
441
+ be a pair (tuple) of (connection, read) timeouts.
442
+ Default is None.
443
+ _check_input_type (bool): specifies if type checking
444
+ should be done one the data sent to the server.
445
+ Default is True.
446
+ _check_return_type (bool): specifies if type checking
447
+ should be done one the data received from the server.
448
+ Default is True.
449
+ _host_index (int/None): specifies the index of the server
450
+ that we want to use.
451
+ Default is read from the configuration.
452
+ async_req (bool): execute request asynchronously
453
+
454
+ Returns:
455
+ ListPolicyTemplateInstancesResponse
456
+ If the method is called asynchronously, returns the request
457
+ thread.
458
+ """
459
+ kwargs['async_req'] = kwargs.get(
460
+ 'async_req', False
461
+ )
462
+ kwargs['_return_http_data_only'] = kwargs.get(
463
+ '_return_http_data_only', True
464
+ )
465
+ kwargs['_preload_content'] = kwargs.get(
466
+ '_preload_content', True
467
+ )
468
+ kwargs['_request_timeout'] = kwargs.get(
469
+ '_request_timeout', None
470
+ )
471
+ kwargs['_check_input_type'] = kwargs.get(
472
+ '_check_input_type', True
473
+ )
474
+ kwargs['_check_return_type'] = kwargs.get(
475
+ '_check_return_type', True
476
+ )
477
+ kwargs['_host_index'] = kwargs.get('_host_index')
478
+ return self.call_with_http_info(**kwargs)
479
+
480
+ if self.list_policy_template_instances is None:
481
+ self.list_policy_template_instances = _Endpoint(
482
+ settings={
483
+ 'response_type': (ListPolicyTemplateInstancesResponse,),
484
+ 'auth': [
485
+ 'token-valid'
486
+ ],
487
+ 'endpoint_path': '/v1/policy_template_instances',
488
+ 'operation_id': 'list_policy_template_instances',
489
+ 'http_method': 'GET',
490
+ 'servers': None,
491
+ },
492
+ params_map={
493
+ 'all': [
494
+ 'limit',
495
+ 'name',
496
+ 'template_type',
497
+ 'org_id',
498
+ ],
499
+ 'required': [],
500
+ 'nullable': [
501
+ ],
502
+ 'enum': [
503
+ ],
504
+ 'validation': [
505
+ 'limit',
506
+ ]
507
+ },
508
+ root_map={
509
+ 'validations': {
510
+ ('limit',): {
511
+
512
+ 'inclusive_maximum': 500,
513
+ 'inclusive_minimum': 1,
514
+ },
515
+ },
516
+ 'allowed_values': {
517
+ },
518
+ 'openapi_types': {
519
+ 'limit':
520
+ (int,),
521
+ 'name':
522
+ (str,),
523
+ 'template_type':
524
+ (str,),
525
+ 'org_id':
526
+ (str,),
527
+ },
528
+ 'attribute_map': {
529
+ 'limit': 'limit',
530
+ 'name': 'name',
531
+ 'template_type': 'template_type',
532
+ 'org_id': 'org_id',
533
+ },
534
+ 'location_map': {
535
+ 'limit': 'query',
536
+ 'name': 'query',
537
+ 'template_type': 'query',
538
+ 'org_id': 'query',
539
+ },
540
+ 'collection_format_map': {
541
+ }
542
+ },
543
+ headers_map={
544
+ 'accept': [
545
+ 'application/json'
546
+ ],
547
+ 'content_type': [],
548
+ },
549
+ api_client=api_client,
550
+ callable=__list_policy_template_instances
551
+ )
552
+
553
+ def __replace_policy_template_instance(
554
+ self,
555
+ template_name,
556
+ **kwargs
557
+ ):
558
+ """update a PolicyTemplateInstance # noqa: E501
559
+
560
+ update a PolicyTemplateInstance # noqa: E501
561
+ This method makes a synchronous HTTP request by default. To make an
562
+ asynchronous HTTP request, please pass async_req=True
563
+
564
+ >>> thread = api.replace_policy_template_instance(template_name, async_req=True)
565
+ >>> result = thread.get()
566
+
567
+ Args:
568
+ template_name (str): filters based on the template name
569
+
570
+ Keyword Args:
571
+ policy_template_instance (PolicyTemplateInstance): [optional]
572
+ _return_http_data_only (bool): response data without head status
573
+ code and headers. Default is True.
574
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
575
+ will be returned without reading/decoding response data.
576
+ Default is True.
577
+ _request_timeout (float/tuple): timeout setting for this request. If one
578
+ number provided, it will be total request timeout. It can also
579
+ be a pair (tuple) of (connection, read) timeouts.
580
+ Default is None.
581
+ _check_input_type (bool): specifies if type checking
582
+ should be done one the data sent to the server.
583
+ Default is True.
584
+ _check_return_type (bool): specifies if type checking
585
+ should be done one the data received from the server.
586
+ Default is True.
587
+ _host_index (int/None): specifies the index of the server
588
+ that we want to use.
589
+ Default is read from the configuration.
590
+ async_req (bool): execute request asynchronously
591
+
592
+ Returns:
593
+ PolicyTemplateInstance
594
+ If the method is called asynchronously, returns the request
595
+ thread.
596
+ """
597
+ kwargs['async_req'] = kwargs.get(
598
+ 'async_req', False
599
+ )
600
+ kwargs['_return_http_data_only'] = kwargs.get(
601
+ '_return_http_data_only', True
602
+ )
603
+ kwargs['_preload_content'] = kwargs.get(
604
+ '_preload_content', True
605
+ )
606
+ kwargs['_request_timeout'] = kwargs.get(
607
+ '_request_timeout', None
608
+ )
609
+ kwargs['_check_input_type'] = kwargs.get(
610
+ '_check_input_type', True
611
+ )
612
+ kwargs['_check_return_type'] = kwargs.get(
613
+ '_check_return_type', True
614
+ )
615
+ kwargs['_host_index'] = kwargs.get('_host_index')
616
+ kwargs['template_name'] = \
617
+ template_name
618
+ return self.call_with_http_info(**kwargs)
619
+
620
+ if self.replace_policy_template_instance is None:
621
+ self.replace_policy_template_instance = _Endpoint(
622
+ settings={
623
+ 'response_type': (PolicyTemplateInstance,),
624
+ 'auth': [
625
+ 'token-valid'
626
+ ],
627
+ 'endpoint_path': '/v1/policy_template_instances/{template_name}',
628
+ 'operation_id': 'replace_policy_template_instance',
629
+ 'http_method': 'PUT',
630
+ 'servers': None,
631
+ },
632
+ params_map={
633
+ 'all': [
634
+ 'template_name',
635
+ 'policy_template_instance',
636
+ ],
637
+ 'required': [
638
+ 'template_name',
639
+ ],
640
+ 'nullable': [
641
+ ],
642
+ 'enum': [
643
+ ],
644
+ 'validation': [
645
+ ]
646
+ },
647
+ root_map={
648
+ 'validations': {
649
+ },
650
+ 'allowed_values': {
651
+ },
652
+ 'openapi_types': {
653
+ 'template_name':
654
+ (str,),
655
+ 'policy_template_instance':
656
+ (PolicyTemplateInstance,),
657
+ },
658
+ 'attribute_map': {
659
+ 'template_name': 'template_name',
660
+ },
661
+ 'location_map': {
662
+ 'template_name': 'path',
663
+ 'policy_template_instance': 'body',
664
+ },
665
+ 'collection_format_map': {
666
+ }
667
+ },
668
+ headers_map={
669
+ 'accept': [
670
+ 'application/json'
671
+ ],
672
+ 'content_type': [
673
+ 'application/json'
674
+ ]
675
+ },
676
+ api_client=api_client,
677
+ callable=__replace_policy_template_instance
678
+ )
679
+
680
+ create_policy_template_instance = None
681
+ delete_policy_template_instance = None
682
+ get_policy_template_instance = None
683
+ list_policy_template_instances = None
684
+ replace_policy_template_instance = None