Skip to content

Commit a66fb7a

Browse files
Azure CLI BotSDKAuto
andauthored
[AutoRelease] t2-imagebuilder-2021-12-07-29506 (Azure#22027)
* CodeGen from PR 16669 in Azure/azure-rest-api-specs Image Builder 2021-10-01 API (Gen2 Support, Error Schema Fix) (Azure#16669) * first commit * first changes for 2021 version * updated readme.md * changed systemData path to v1 and removed in CloudError * renpeng description change * removed location from ListImageTemplates.json * removing more locations from examples * adding back location * common types resource * TrackedResource referenced * added location for listimagetempbyrg.json * version,CHANGELOG Co-authored-by: SDKAuto <[email protected]> Co-authored-by: PythonSdkPipelines <PythonSdkPipelines>
1 parent 7cd811d commit a66fb7a

File tree

14 files changed

+382
-274
lines changed

14 files changed

+382
-274
lines changed

sdk/compute/azure-mgmt-imagebuilder/CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
# Release History
22

3+
## 1.0.0 (2021-12-07)
4+
5+
**Features**
6+
7+
- Model ImageTemplate has a new parameter system_data
8+
- Model VirtualNetworkConfig has a new parameter proxy_vm_size
9+
- Model ImageTemplateVmProfile has a new parameter user_assigned_identities
10+
- Model ImageTemplatePlatformImageSource has a new parameter exact_version
11+
12+
**Breaking changes**
13+
14+
- Model Resource no longer has parameter tags
15+
- Model Resource no longer has parameter location
16+
317
## 1.0.0b1 (2021-05-25)
418

519
This is beta preview version.
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"autorest": "3.4.2",
2+
"autorest": "3.4.5",
33
"use": [
4-
"@autorest/[email protected].0",
5-
"@autorest/[email protected].1"
4+
"@autorest/[email protected].4",
5+
"@autorest/[email protected].2"
66
],
7-
"commit": "07645fedb21cef2cbc6e3ac950e368490ab9fb5f",
7+
"commit": "c6fc51d3b5e900961dab94f7655ba63d2813da19",
88
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
9-
"autorest_command": "autorest specification/imagebuilder/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/[email protected].0 --use=@autorest/[email protected].1 --version=3.4.2",
9+
"autorest_command": "autorest specification/imagebuilder/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/[email protected].4 --use=@autorest/[email protected].2 --version=3.4.5",
1010
"readme": "specification/imagebuilder/resource-manager/readme.md"
1111
}

sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/_configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def __init__(
4848

4949
self.credential = credential
5050
self.subscription_id = subscription_id
51-
self.api_version = "2020-02-14"
51+
self.api_version = "2021-10-01"
5252
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
5353
kwargs.setdefault('sdk_moniker', 'mgmt-imagebuilder/{}'.format(VERSION))
5454
self._configure(**kwargs)

sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/_metadata.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"chosen_version": "2020-02-14",
3-
"total_api_version_list": ["2020-02-14"],
2+
"chosen_version": "2021-10-01",
3+
"total_api_version_list": ["2021-10-01"],
44
"client": {
55
"name": "ImageBuilderClient",
66
"filename": "_image_builder_client",

sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
VERSION = "1.0.0b1"
9+
VERSION = "1.0.0"

sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/aio/_configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def __init__(
4545

4646
self.credential = credential
4747
self.subscription_id = subscription_id
48-
self.api_version = "2020-02-14"
48+
self.api_version = "2021-10-01"
4949
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
5050
kwargs.setdefault('sdk_moniker', 'mgmt-imagebuilder/{}'.format(VERSION))
5151
self._configure(**kwargs)

sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/aio/operations/_operations.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def list(
5757
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
5858
}
5959
error_map.update(kwargs.pop('error_map', {}))
60-
api_version = "2020-02-14"
60+
api_version = "2021-10-01"
6161
accept = "application/json"
6262

6363
def prepare_request(next_link=None):
@@ -93,9 +93,8 @@ async def get_next(next_link=None):
9393
response = pipeline_response.http_response
9494

9595
if response.status_code not in [200]:
96-
error = self._deserialize.failsafe_deserialize(_models.ApiError, response)
9796
map_error(status_code=response.status_code, response=response, error_map=error_map)
98-
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
97+
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
9998

10099
return pipeline_response
101100

sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/aio/operations/_virtual_machine_image_templates_operations.py

Lines changed: 20 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def list(
5959
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
6060
}
6161
error_map.update(kwargs.pop('error_map', {}))
62-
api_version = "2020-02-14"
62+
api_version = "2021-10-01"
6363
accept = "application/json"
6464

6565
def prepare_request(next_link=None):
@@ -99,9 +99,8 @@ async def get_next(next_link=None):
9999
response = pipeline_response.http_response
100100

101101
if response.status_code not in [200]:
102-
error = self._deserialize.failsafe_deserialize(_models.ApiError, response)
103102
map_error(status_code=response.status_code, response=response, error_map=error_map)
104-
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
103+
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
105104

106105
return pipeline_response
107106

@@ -129,7 +128,7 @@ def list_by_resource_group(
129128
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
130129
}
131130
error_map.update(kwargs.pop('error_map', {}))
132-
api_version = "2020-02-14"
131+
api_version = "2021-10-01"
133132
accept = "application/json"
134133

135134
def prepare_request(next_link=None):
@@ -170,9 +169,8 @@ async def get_next(next_link=None):
170169
response = pipeline_response.http_response
171170

172171
if response.status_code not in [200]:
173-
error = self._deserialize.failsafe_deserialize(_models.ApiError, response)
174172
map_error(status_code=response.status_code, response=response, error_map=error_map)
175-
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
173+
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
176174

177175
return pipeline_response
178176

@@ -193,7 +191,7 @@ async def _create_or_update_initial(
193191
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
194192
}
195193
error_map.update(kwargs.pop('error_map', {}))
196-
api_version = "2020-02-14"
194+
api_version = "2021-10-01"
197195
content_type = kwargs.pop("content_type", "application/json")
198196
accept = "application/json"
199197

@@ -224,8 +222,7 @@ async def _create_or_update_initial(
224222

225223
if response.status_code not in [200, 201]:
226224
map_error(status_code=response.status_code, response=response, error_map=error_map)
227-
error = self._deserialize.failsafe_deserialize(_models.ApiError, response)
228-
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
225+
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
229226

230227
if response.status_code == 200:
231228
deserialized = self._deserialize('ImageTemplate', pipeline_response)
@@ -322,7 +319,7 @@ async def _update_initial(
322319
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
323320
}
324321
error_map.update(kwargs.pop('error_map', {}))
325-
api_version = "2020-02-14"
322+
api_version = "2021-10-01"
326323
content_type = kwargs.pop("content_type", "application/json")
327324
accept = "application/json"
328325

@@ -353,8 +350,7 @@ async def _update_initial(
353350

354351
if response.status_code not in [200, 202]:
355352
map_error(status_code=response.status_code, response=response, error_map=error_map)
356-
error = self._deserialize.failsafe_deserialize(_models.ApiError, response)
357-
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
353+
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
358354

359355
deserialized = None
360356
if response.status_code == 200:
@@ -459,7 +455,7 @@ async def get(
459455
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
460456
}
461457
error_map.update(kwargs.pop('error_map', {}))
462-
api_version = "2020-02-14"
458+
api_version = "2021-10-01"
463459
accept = "application/json"
464460

465461
# Construct URL
@@ -485,8 +481,7 @@ async def get(
485481

486482
if response.status_code not in [200]:
487483
map_error(status_code=response.status_code, response=response, error_map=error_map)
488-
error = self._deserialize.failsafe_deserialize(_models.ApiError, response)
489-
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
484+
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
490485

491486
deserialized = self._deserialize('ImageTemplate', pipeline_response)
492487

@@ -507,7 +502,7 @@ async def _delete_initial(
507502
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
508503
}
509504
error_map.update(kwargs.pop('error_map', {}))
510-
api_version = "2020-02-14"
505+
api_version = "2021-10-01"
511506
accept = "application/json"
512507

513508
# Construct URL
@@ -533,8 +528,7 @@ async def _delete_initial(
533528

534529
if response.status_code not in [200, 202, 204]:
535530
map_error(status_code=response.status_code, response=response, error_map=error_map)
536-
error = self._deserialize.failsafe_deserialize(_models.ApiError, response)
537-
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
531+
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
538532

539533
if cls:
540534
return cls(pipeline_response, None, {})
@@ -616,7 +610,7 @@ async def _run_initial(
616610
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
617611
}
618612
error_map.update(kwargs.pop('error_map', {}))
619-
api_version = "2020-02-14"
613+
api_version = "2021-10-01"
620614
accept = "application/json"
621615

622616
# Construct URL
@@ -642,8 +636,7 @@ async def _run_initial(
642636

643637
if response.status_code not in [200, 202, 204]:
644638
map_error(status_code=response.status_code, response=response, error_map=error_map)
645-
error = self._deserialize.failsafe_deserialize(_models.ApiError, response)
646-
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
639+
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
647640

648641
if cls:
649642
return cls(pipeline_response, None, {})
@@ -725,7 +718,7 @@ async def _cancel_initial(
725718
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
726719
}
727720
error_map.update(kwargs.pop('error_map', {}))
728-
api_version = "2020-02-14"
721+
api_version = "2021-10-01"
729722
accept = "application/json"
730723

731724
# Construct URL
@@ -751,8 +744,7 @@ async def _cancel_initial(
751744

752745
if response.status_code not in [200, 202, 204]:
753746
map_error(status_code=response.status_code, response=response, error_map=error_map)
754-
error = self._deserialize.failsafe_deserialize(_models.ApiError, response)
755-
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
747+
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
756748

757749
if cls:
758750
return cls(pipeline_response, None, {})
@@ -845,7 +837,7 @@ def list_run_outputs(
845837
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
846838
}
847839
error_map.update(kwargs.pop('error_map', {}))
848-
api_version = "2020-02-14"
840+
api_version = "2021-10-01"
849841
accept = "application/json"
850842

851843
def prepare_request(next_link=None):
@@ -887,9 +879,8 @@ async def get_next(next_link=None):
887879
response = pipeline_response.http_response
888880

889881
if response.status_code not in [200]:
890-
error = self._deserialize.failsafe_deserialize(_models.ApiError, response)
891882
map_error(status_code=response.status_code, response=response, error_map=error_map)
892-
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
883+
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
893884

894885
return pipeline_response
895886

@@ -923,7 +914,7 @@ async def get_run_output(
923914
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
924915
}
925916
error_map.update(kwargs.pop('error_map', {}))
926-
api_version = "2020-02-14"
917+
api_version = "2021-10-01"
927918
accept = "application/json"
928919

929920
# Construct URL
@@ -950,8 +941,7 @@ async def get_run_output(
950941

951942
if response.status_code not in [200]:
952943
map_error(status_code=response.status_code, response=response, error_map=error_map)
953-
error = self._deserialize.failsafe_deserialize(_models.ApiError, response)
954-
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
944+
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
955945

956946
deserialized = self._deserialize('RunOutput', pipeline_response)
957947

sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/__init__.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
# --------------------------------------------------------------------------
88

99
try:
10-
from ._models_py3 import ApiError
11-
from ._models_py3 import ApiErrorBase
10+
from ._models_py3 import CloudErrorBody
1211
from ._models_py3 import ComponentsVrq145SchemasImagetemplateidentityPropertiesUserassignedidentitiesAdditionalproperties
1312
from ._models_py3 import ImageTemplate
1413
from ._models_py3 import ImageTemplateCustomizer
@@ -30,7 +29,6 @@
3029
from ._models_py3 import ImageTemplateVhdDistributor
3130
from ._models_py3 import ImageTemplateVmProfile
3231
from ._models_py3 import ImageTemplateWindowsUpdateCustomizer
33-
from ._models_py3 import InnerError
3432
from ._models_py3 import Operation
3533
from ._models_py3 import OperationDisplay
3634
from ._models_py3 import OperationListResult
@@ -40,10 +38,11 @@
4038
from ._models_py3 import RunOutput
4139
from ._models_py3 import RunOutputCollection
4240
from ._models_py3 import SubResource
41+
from ._models_py3 import SystemData
42+
from ._models_py3 import TrackedResource
4343
from ._models_py3 import VirtualNetworkConfig
4444
except (SyntaxError, ImportError):
45-
from ._models import ApiError # type: ignore
46-
from ._models import ApiErrorBase # type: ignore
45+
from ._models import CloudErrorBody # type: ignore
4746
from ._models import ComponentsVrq145SchemasImagetemplateidentityPropertiesUserassignedidentitiesAdditionalproperties # type: ignore
4847
from ._models import ImageTemplate # type: ignore
4948
from ._models import ImageTemplateCustomizer # type: ignore
@@ -65,7 +64,6 @@
6564
from ._models import ImageTemplateVhdDistributor # type: ignore
6665
from ._models import ImageTemplateVmProfile # type: ignore
6766
from ._models import ImageTemplateWindowsUpdateCustomizer # type: ignore
68-
from ._models import InnerError # type: ignore
6967
from ._models import Operation # type: ignore
7068
from ._models import OperationDisplay # type: ignore
7169
from ._models import OperationListResult # type: ignore
@@ -75,9 +73,12 @@
7573
from ._models import RunOutput # type: ignore
7674
from ._models import RunOutputCollection # type: ignore
7775
from ._models import SubResource # type: ignore
76+
from ._models import SystemData # type: ignore
77+
from ._models import TrackedResource # type: ignore
7878
from ._models import VirtualNetworkConfig # type: ignore
7979

8080
from ._image_builder_client_enums import (
81+
CreatedByType,
8182
ProvisioningErrorCode,
8283
ProvisioningState,
8384
ResourceIdentityType,
@@ -87,8 +88,7 @@
8788
)
8889

8990
__all__ = [
90-
'ApiError',
91-
'ApiErrorBase',
91+
'CloudErrorBody',
9292
'ComponentsVrq145SchemasImagetemplateidentityPropertiesUserassignedidentitiesAdditionalproperties',
9393
'ImageTemplate',
9494
'ImageTemplateCustomizer',
@@ -110,7 +110,6 @@
110110
'ImageTemplateVhdDistributor',
111111
'ImageTemplateVmProfile',
112112
'ImageTemplateWindowsUpdateCustomizer',
113-
'InnerError',
114113
'Operation',
115114
'OperationDisplay',
116115
'OperationListResult',
@@ -120,7 +119,10 @@
120119
'RunOutput',
121120
'RunOutputCollection',
122121
'SubResource',
122+
'SystemData',
123+
'TrackedResource',
123124
'VirtualNetworkConfig',
125+
'CreatedByType',
124126
'ProvisioningErrorCode',
125127
'ProvisioningState',
126128
'ResourceIdentityType',

sdk/compute/azure-mgmt-imagebuilder/azure/mgmt/imagebuilder/models/_image_builder_client_enums.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,15 @@ def __getattr__(cls, name):
2626
raise AttributeError(name)
2727

2828

29+
class CreatedByType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
30+
"""The type of identity that created the resource.
31+
"""
32+
33+
USER = "User"
34+
APPLICATION = "Application"
35+
MANAGED_IDENTITY = "ManagedIdentity"
36+
KEY = "Key"
37+
2938
class ProvisioningErrorCode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
3039
"""Error code of the provisioning failure
3140
"""

0 commit comments

Comments
 (0)