23
23
from typing import Any , Optional
24
24
25
25
from azure .core .credentials import TokenCredential
26
- from azure .core .pipeline .transport import HttpRequest , HttpResponse
27
26
28
27
class _SDKClient (object ):
29
28
def __init__ (self , * args , ** kwargs ):
@@ -56,16 +55,24 @@ class ContainerRegistryManagementClient(MultiApiClientMixin, _SDKClient):
56
55
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
57
56
"""
58
57
59
- DEFAULT_API_VERSION = '2019-05 -01'
58
+ DEFAULT_API_VERSION = '2021-09 -01'
60
59
_PROFILE_TAG = "azure.mgmt.containerregistry.ContainerRegistryManagementClient"
61
60
LATEST_PROFILE = ProfileDefinition ({
62
61
_PROFILE_TAG : {
63
62
None : DEFAULT_API_VERSION ,
63
+ 'agent_pools' : '2019-06-01-preview' ,
64
64
'build_steps' : '2018-02-01-preview' ,
65
65
'build_tasks' : '2018-02-01-preview' ,
66
66
'builds' : '2018-02-01-preview' ,
67
+ 'connected_registries' : '2021-08-01-preview' ,
68
+ 'export_pipelines' : '2021-08-01-preview' ,
69
+ 'import_pipelines' : '2021-08-01-preview' ,
70
+ 'pipeline_runs' : '2021-08-01-preview' ,
67
71
'runs' : '2019-04-01' ,
72
+ 'scope_maps' : '2021-08-01-preview' ,
73
+ 'task_runs' : '2019-06-01-preview' ,
68
74
'tasks' : '2019-04-01' ,
75
+ 'tokens' : '2021-08-01-preview' ,
69
76
}},
70
77
_PROFILE_TAG + " latest"
71
78
)
@@ -75,12 +82,10 @@ def __init__(
75
82
credential , # type: "TokenCredential"
76
83
subscription_id , # type: str
77
84
api_version = None , # type: Optional[str]
78
- base_url = None , # type: Optional[ str]
85
+ base_url = "https://management.azure.com" , # type: str
79
86
profile = KnownProfiles .default , # type: KnownProfiles
80
87
** kwargs # type: Any
81
88
):
82
- if not base_url :
83
- base_url = 'https://management.azure.com'
84
89
self ._config = ContainerRegistryManagementClientConfiguration (credential , subscription_id , ** kwargs )
85
90
self ._client = ARMPipelineClient (base_url = base_url , config = self ._config , ** kwargs )
86
91
super (ContainerRegistryManagementClient , self ).__init__ (
@@ -108,6 +113,7 @@ def models(cls, api_version=DEFAULT_API_VERSION):
108
113
* 2020-11-01-preview: :mod:`v2020_11_01_preview.models<azure.mgmt.containerregistry.v2020_11_01_preview.models>`
109
114
* 2021-06-01-preview: :mod:`v2021_06_01_preview.models<azure.mgmt.containerregistry.v2021_06_01_preview.models>`
110
115
* 2021-08-01-preview: :mod:`v2021_08_01_preview.models<azure.mgmt.containerregistry.v2021_08_01_preview.models>`
116
+ * 2021-09-01: :mod:`v2021_09_01.models<azure.mgmt.containerregistry.v2021_09_01.models>`
111
117
"""
112
118
if api_version == '2017-03-01' :
113
119
from .v2017_03_01 import models
@@ -145,6 +151,9 @@ def models(cls, api_version=DEFAULT_API_VERSION):
145
151
elif api_version == '2021-08-01-preview' :
146
152
from .v2021_08_01_preview import models
147
153
return models
154
+ elif api_version == '2021-09-01' :
155
+ from .v2021_09_01 import models
156
+ return models
148
157
raise ValueError ("API version {} is not available" .format (api_version ))
149
158
150
159
@property
@@ -273,6 +282,7 @@ def operations(self):
273
282
* 2020-11-01-preview: :class:`Operations<azure.mgmt.containerregistry.v2020_11_01_preview.operations.Operations>`
274
283
* 2021-06-01-preview: :class:`Operations<azure.mgmt.containerregistry.v2021_06_01_preview.operations.Operations>`
275
284
* 2021-08-01-preview: :class:`Operations<azure.mgmt.containerregistry.v2021_08_01_preview.operations.Operations>`
285
+ * 2021-09-01: :class:`Operations<azure.mgmt.containerregistry.v2021_09_01.operations.Operations>`
276
286
"""
277
287
api_version = self ._get_api_version ('operations' )
278
288
if api_version == '2017-03-01' :
@@ -289,6 +299,8 @@ def operations(self):
289
299
from .v2021_06_01_preview .operations import Operations as OperationClass
290
300
elif api_version == '2021-08-01-preview' :
291
301
from .v2021_08_01_preview .operations import Operations as OperationClass
302
+ elif api_version == '2021-09-01' :
303
+ from .v2021_09_01 .operations import Operations as OperationClass
292
304
else :
293
305
raise ValueError ("API version {} does not have operation group 'operations'" .format (api_version ))
294
306
return OperationClass (self ._client , self ._config , Serializer (self ._models_dict (api_version )), Deserializer (self ._models_dict (api_version )))
@@ -323,6 +335,7 @@ def private_endpoint_connections(self):
323
335
* 2020-11-01-preview: :class:`PrivateEndpointConnectionsOperations<azure.mgmt.containerregistry.v2020_11_01_preview.operations.PrivateEndpointConnectionsOperations>`
324
336
* 2021-06-01-preview: :class:`PrivateEndpointConnectionsOperations<azure.mgmt.containerregistry.v2021_06_01_preview.operations.PrivateEndpointConnectionsOperations>`
325
337
* 2021-08-01-preview: :class:`PrivateEndpointConnectionsOperations<azure.mgmt.containerregistry.v2021_08_01_preview.operations.PrivateEndpointConnectionsOperations>`
338
+ * 2021-09-01: :class:`PrivateEndpointConnectionsOperations<azure.mgmt.containerregistry.v2021_09_01.operations.PrivateEndpointConnectionsOperations>`
326
339
"""
327
340
api_version = self ._get_api_version ('private_endpoint_connections' )
328
341
if api_version == '2019-12-01-preview' :
@@ -333,6 +346,8 @@ def private_endpoint_connections(self):
333
346
from .v2021_06_01_preview .operations import PrivateEndpointConnectionsOperations as OperationClass
334
347
elif api_version == '2021-08-01-preview' :
335
348
from .v2021_08_01_preview .operations import PrivateEndpointConnectionsOperations as OperationClass
349
+ elif api_version == '2021-09-01' :
350
+ from .v2021_09_01 .operations import PrivateEndpointConnectionsOperations as OperationClass
336
351
else :
337
352
raise ValueError ("API version {} does not have operation group 'private_endpoint_connections'" .format (api_version ))
338
353
return OperationClass (self ._client , self ._config , Serializer (self ._models_dict (api_version )), Deserializer (self ._models_dict (api_version )))
@@ -353,6 +368,7 @@ def registries(self):
353
368
* 2020-11-01-preview: :class:`RegistriesOperations<azure.mgmt.containerregistry.v2020_11_01_preview.operations.RegistriesOperations>`
354
369
* 2021-06-01-preview: :class:`RegistriesOperations<azure.mgmt.containerregistry.v2021_06_01_preview.operations.RegistriesOperations>`
355
370
* 2021-08-01-preview: :class:`RegistriesOperations<azure.mgmt.containerregistry.v2021_08_01_preview.operations.RegistriesOperations>`
371
+ * 2021-09-01: :class:`RegistriesOperations<azure.mgmt.containerregistry.v2021_09_01.operations.RegistriesOperations>`
356
372
"""
357
373
api_version = self ._get_api_version ('registries' )
358
374
if api_version == '2017-03-01' :
@@ -379,6 +395,8 @@ def registries(self):
379
395
from .v2021_06_01_preview .operations import RegistriesOperations as OperationClass
380
396
elif api_version == '2021-08-01-preview' :
381
397
from .v2021_08_01_preview .operations import RegistriesOperations as OperationClass
398
+ elif api_version == '2021-09-01' :
399
+ from .v2021_09_01 .operations import RegistriesOperations as OperationClass
382
400
else :
383
401
raise ValueError ("API version {} does not have operation group 'registries'" .format (api_version ))
384
402
return OperationClass (self ._client , self ._config , Serializer (self ._models_dict (api_version )), Deserializer (self ._models_dict (api_version )))
@@ -393,6 +411,7 @@ def replications(self):
393
411
* 2020-11-01-preview: :class:`ReplicationsOperations<azure.mgmt.containerregistry.v2020_11_01_preview.operations.ReplicationsOperations>`
394
412
* 2021-06-01-preview: :class:`ReplicationsOperations<azure.mgmt.containerregistry.v2021_06_01_preview.operations.ReplicationsOperations>`
395
413
* 2021-08-01-preview: :class:`ReplicationsOperations<azure.mgmt.containerregistry.v2021_08_01_preview.operations.ReplicationsOperations>`
414
+ * 2021-09-01: :class:`ReplicationsOperations<azure.mgmt.containerregistry.v2021_09_01.operations.ReplicationsOperations>`
396
415
"""
397
416
api_version = self ._get_api_version ('replications' )
398
417
if api_version == '2017-10-01' :
@@ -407,6 +426,8 @@ def replications(self):
407
426
from .v2021_06_01_preview .operations import ReplicationsOperations as OperationClass
408
427
elif api_version == '2021-08-01-preview' :
409
428
from .v2021_08_01_preview .operations import ReplicationsOperations as OperationClass
429
+ elif api_version == '2021-09-01' :
430
+ from .v2021_09_01 .operations import ReplicationsOperations as OperationClass
410
431
else :
411
432
raise ValueError ("API version {} does not have operation group 'replications'" .format (api_version ))
412
433
return OperationClass (self ._client , self ._config , Serializer (self ._models_dict (api_version )), Deserializer (self ._models_dict (api_version )))
@@ -516,6 +537,7 @@ def webhooks(self):
516
537
* 2020-11-01-preview: :class:`WebhooksOperations<azure.mgmt.containerregistry.v2020_11_01_preview.operations.WebhooksOperations>`
517
538
* 2021-06-01-preview: :class:`WebhooksOperations<azure.mgmt.containerregistry.v2021_06_01_preview.operations.WebhooksOperations>`
518
539
* 2021-08-01-preview: :class:`WebhooksOperations<azure.mgmt.containerregistry.v2021_08_01_preview.operations.WebhooksOperations>`
540
+ * 2021-09-01: :class:`WebhooksOperations<azure.mgmt.containerregistry.v2021_09_01.operations.WebhooksOperations>`
519
541
"""
520
542
api_version = self ._get_api_version ('webhooks' )
521
543
if api_version == '2017-10-01' :
@@ -530,6 +552,8 @@ def webhooks(self):
530
552
from .v2021_06_01_preview .operations import WebhooksOperations as OperationClass
531
553
elif api_version == '2021-08-01-preview' :
532
554
from .v2021_08_01_preview .operations import WebhooksOperations as OperationClass
555
+ elif api_version == '2021-09-01' :
556
+ from .v2021_09_01 .operations import WebhooksOperations as OperationClass
533
557
else :
534
558
raise ValueError ("API version {} does not have operation group 'webhooks'" .format (api_version ))
535
559
return OperationClass (self ._client , self ._config , Serializer (self ._models_dict (api_version )), Deserializer (self ._models_dict (api_version )))
0 commit comments