Skip to content

Commit 022e775

Browse files
authored
[T1] attestation 2020 11 17 (Azure#15359)
* test,version,CHANGELOG * version,changelog
1 parent 3c72c80 commit 022e775

File tree

12 files changed

+403
-119
lines changed

12 files changed

+403
-119
lines changed

sdk/attestation/azure-mgmt-attestation/CHANGELOG.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
# Release History
22

3-
## 0.2.0 (2020-04-15)
3+
## 0.2.0 (2020-11-17)
44

55
**Features**
66

7-
- Model AttestationProvider has a new parameter tags
87
- Model AttestationProvider has a new parameter trust_model
8+
- Model AttestationProvider has a new parameter tags
9+
- Model AttestationProvider has a new parameter system_data
10+
- Model AttestationProviderListResult has a new parameter system_data
11+
- Model OperationList has a new parameter system_data
12+
- Added operation AttestationProvidersOperations.get_default_by_location
13+
- Added operation AttestationProvidersOperations.list_default
914
- Added operation AttestationProvidersOperations.update
1015

1116
**Breaking changes**

sdk/attestation/azure-mgmt-attestation/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# Microsoft Azure SDK for Python
22

3-
This is the Microsoft Azure MyService Management Client Library.
3+
This is the Microsoft Azure Attestation Management Client Library.
44
This package has been tested with Python 2.7, 3.5, 3.6, 3.7 and 3.8.
55
For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all).
66

77

88
# Usage
99

10-
For code examples, see [MyService Management](https://docs.microsoft.com/python/api/overview/azure/)
10+
For code examples, see [Attestation Management](https://docs.microsoft.com/python/api/overview/azure/)
1111
on docs.microsoft.com.
1212

1313

sdk/attestation/azure-mgmt-attestation/azure/mgmt/attestation/_attestation_management_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def __init__(
4444
super(AttestationManagementClient, self).__init__(self.config.credentials, self.config)
4545

4646
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
47-
self.api_version = '2018-09-01-preview'
47+
self.api_version = '2020-10-01'
4848
self._serialize = Serializer(client_models)
4949
self._deserialize = Deserializer(client_models)
5050

sdk/attestation/azure-mgmt-attestation/azure/mgmt/attestation/models/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
from ._models_py3 import OperationsDisplayDefinition
2424
from ._models_py3 import ProxyResource
2525
from ._models_py3 import Resource
26+
from ._models_py3 import SystemData
2627
from ._models_py3 import TrackedResource
2728
except (SyntaxError, ImportError):
2829
from ._models import AttestationProvider
@@ -38,8 +39,10 @@
3839
from ._models import OperationsDisplayDefinition
3940
from ._models import ProxyResource
4041
from ._models import Resource
42+
from ._models import SystemData
4143
from ._models import TrackedResource
4244
from ._attestation_management_client_enums import (
45+
CreatedByType,
4346
AttestationServiceStatus,
4447
)
4548

@@ -57,6 +60,8 @@
5760
'OperationsDisplayDefinition',
5861
'ProxyResource',
5962
'Resource',
63+
'SystemData',
6064
'TrackedResource',
65+
'CreatedByType',
6166
'AttestationServiceStatus',
6267
]

sdk/attestation/azure-mgmt-attestation/azure/mgmt/attestation/models/_attestation_management_client_enums.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@
1212
from enum import Enum
1313

1414

15+
class CreatedByType(str, Enum):
16+
17+
user = "User"
18+
application = "Application"
19+
managed_identity = "ManagedIdentity"
20+
key = "Key"
21+
22+
1523
class AttestationServiceStatus(str, Enum):
1624

1725
ready = "Ready"

sdk/attestation/azure-mgmt-attestation/azure/mgmt/attestation/models/_models.py

Lines changed: 100 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,19 @@
1616
class Resource(Model):
1717
"""Resource.
1818
19+
Common fields that are returned in the response for all Azure Resource
20+
Manager resources.
21+
1922
Variables are only populated by the server, and will be ignored when
2023
sending a request.
2124
22-
:ivar id: Fully qualified resource Id for the resource. Ex -
25+
:ivar id: Fully qualified resource ID for the resource. Ex -
2326
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
2427
:vartype id: str
2528
:ivar name: The name of the resource
2629
:vartype name: str
27-
:ivar type: The type of the resource. Ex-
28-
Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
30+
:ivar type: The type of the resource. E.g.
31+
"Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
2932
:vartype type: str
3033
"""
3134

@@ -49,20 +52,23 @@ def __init__(self, **kwargs):
4952

5053

5154
class TrackedResource(Resource):
52-
"""The resource model definition for a ARM tracked top level resource.
55+
"""Tracked Resource.
56+
57+
The resource model definition for an Azure Resource Manager tracked top
58+
level resource which has 'tags' and a 'location'.
5359
5460
Variables are only populated by the server, and will be ignored when
5561
sending a request.
5662
5763
All required parameters must be populated in order to send to Azure.
5864
59-
:ivar id: Fully qualified resource Id for the resource. Ex -
65+
:ivar id: Fully qualified resource ID for the resource. Ex -
6066
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
6167
:vartype id: str
6268
:ivar name: The name of the resource
6369
:vartype name: str
64-
:ivar type: The type of the resource. Ex-
65-
Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
70+
:ivar type: The type of the resource. E.g.
71+
"Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
6672
:vartype type: str
6773
:param tags: Resource tags.
6874
:type tags: dict[str, str]
@@ -99,22 +105,24 @@ class AttestationProvider(TrackedResource):
99105
100106
All required parameters must be populated in order to send to Azure.
101107
102-
:ivar id: Fully qualified resource Id for the resource. Ex -
108+
:ivar id: Fully qualified resource ID for the resource. Ex -
103109
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
104110
:vartype id: str
105111
:ivar name: The name of the resource
106112
:vartype name: str
107-
:ivar type: The type of the resource. Ex-
108-
Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
113+
:ivar type: The type of the resource. E.g.
114+
"Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
109115
:vartype type: str
110116
:param tags: Resource tags.
111117
:type tags: dict[str, str]
112118
:param location: Required. The geo-location where the resource lives
113119
:type location: str
120+
:ivar system_data: The system metadata relating to this resource
121+
:vartype system_data: ~azure.mgmt.attestation.models.SystemData
114122
:param trust_model: Trust model for the attestation service instance.
115123
:type trust_model: str
116-
:param status: Required. Status of attestation service. Possible values
117-
include: 'Ready', 'NotReady', 'Error'
124+
:param status: Status of attestation service. Possible values include:
125+
'Ready', 'NotReady', 'Error'
118126
:type status: str or
119127
~azure.mgmt.attestation.models.AttestationServiceStatus
120128
:param attest_uri: Gets the uri of attestation service
@@ -126,7 +134,7 @@ class AttestationProvider(TrackedResource):
126134
'name': {'readonly': True},
127135
'type': {'readonly': True},
128136
'location': {'required': True},
129-
'status': {'required': True},
137+
'system_data': {'readonly': True},
130138
}
131139

132140
_attribute_map = {
@@ -135,13 +143,15 @@ class AttestationProvider(TrackedResource):
135143
'type': {'key': 'type', 'type': 'str'},
136144
'tags': {'key': 'tags', 'type': '{str}'},
137145
'location': {'key': 'location', 'type': 'str'},
146+
'system_data': {'key': 'systemData', 'type': 'SystemData'},
138147
'trust_model': {'key': 'properties.trustModel', 'type': 'str'},
139148
'status': {'key': 'properties.status', 'type': 'str'},
140149
'attest_uri': {'key': 'properties.attestUri', 'type': 'str'},
141150
}
142151

143152
def __init__(self, **kwargs):
144153
super(AttestationProvider, self).__init__(**kwargs)
154+
self.system_data = None
145155
self.trust_model = kwargs.get('trust_model', None)
146156
self.status = kwargs.get('status', None)
147157
self.attest_uri = kwargs.get('attest_uri', None)
@@ -150,16 +160,27 @@ def __init__(self, **kwargs):
150160
class AttestationProviderListResult(Model):
151161
"""Attestation Providers List.
152162
163+
Variables are only populated by the server, and will be ignored when
164+
sending a request.
165+
166+
:ivar system_data: The system metadata relating to this resource
167+
:vartype system_data: ~azure.mgmt.attestation.models.SystemData
153168
:param value: Attestation Provider array.
154169
:type value: list[~azure.mgmt.attestation.models.AttestationProvider]
155170
"""
156171

172+
_validation = {
173+
'system_data': {'readonly': True},
174+
}
175+
157176
_attribute_map = {
177+
'system_data': {'key': 'systemData', 'type': 'SystemData'},
158178
'value': {'key': 'value', 'type': '[AttestationProvider]'},
159179
}
160180

161181
def __init__(self, **kwargs):
162182
super(AttestationProviderListResult, self).__init__(**kwargs)
183+
self.system_data = None
163184
self.value = kwargs.get('value', None)
164185

165186

@@ -202,8 +223,6 @@ class AttestationServiceCreationSpecificParams(Model):
202223
"""Client supplied parameters used to create a new attestation service
203224
instance.
204225
205-
:param attestation_policy: Name of attestation policy.
206-
:type attestation_policy: str
207226
:param policy_signing_certificates: JSON Web Key Set defining a set of
208227
X.509 Certificates that will represent the parent certificate for the
209228
signing certificate used for policy operations
@@ -212,13 +231,11 @@ class AttestationServiceCreationSpecificParams(Model):
212231
"""
213232

214233
_attribute_map = {
215-
'attestation_policy': {'key': 'attestationPolicy', 'type': 'str'},
216234
'policy_signing_certificates': {'key': 'policySigningCertificates', 'type': 'JSONWebKeySet'},
217235
}
218236

219237
def __init__(self, **kwargs):
220238
super(AttestationServiceCreationSpecificParams, self).__init__(**kwargs)
221-
self.attestation_policy = kwargs.get('attestation_policy', None)
222239
self.policy_signing_certificates = kwargs.get('policy_signing_certificates', None)
223240

224241

@@ -240,19 +257,21 @@ def __init__(self, **kwargs):
240257

241258

242259
class AzureEntityResource(Resource):
243-
"""The resource model definition for a Azure Resource Manager resource with an
244-
etag.
260+
"""Entity Resource.
261+
262+
The resource model definition for an Azure Resource Manager resource with
263+
an etag.
245264
246265
Variables are only populated by the server, and will be ignored when
247266
sending a request.
248267
249-
:ivar id: Fully qualified resource Id for the resource. Ex -
268+
:ivar id: Fully qualified resource ID for the resource. Ex -
250269
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
251270
:vartype id: str
252271
:ivar name: The name of the resource
253272
:vartype name: str
254-
:ivar type: The type of the resource. Ex-
255-
Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
273+
:ivar type: The type of the resource. E.g.
274+
"Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
256275
:vartype type: str
257276
:ivar etag: Resource Etag.
258277
:vartype etag: str
@@ -470,16 +489,27 @@ def __init__(self, **kwargs):
470489
class OperationList(Model):
471490
"""List of supported operations.
472491
492+
Variables are only populated by the server, and will be ignored when
493+
sending a request.
494+
495+
:ivar system_data: The system metadata relating to this resource
496+
:vartype system_data: ~azure.mgmt.attestation.models.SystemData
473497
:param value: List of supported operations.
474498
:type value: list[~azure.mgmt.attestation.models.OperationsDefinition]
475499
"""
476500

501+
_validation = {
502+
'system_data': {'readonly': True},
503+
}
504+
477505
_attribute_map = {
506+
'system_data': {'key': 'systemData', 'type': 'SystemData'},
478507
'value': {'key': 'value', 'type': '[OperationsDefinition]'},
479508
}
480509

481510
def __init__(self, **kwargs):
482511
super(OperationList, self).__init__(**kwargs)
512+
self.system_data = None
483513
self.value = kwargs.get('value', None)
484514

485515

@@ -532,19 +562,21 @@ def __init__(self, **kwargs):
532562

533563

534564
class ProxyResource(Resource):
535-
"""The resource model definition for a ARM proxy resource. It will have
536-
everything other than required location and tags.
565+
"""Proxy Resource.
566+
567+
The resource model definition for a Azure Resource Manager proxy resource.
568+
It will not have tags and a location.
537569
538570
Variables are only populated by the server, and will be ignored when
539571
sending a request.
540572
541-
:ivar id: Fully qualified resource Id for the resource. Ex -
573+
:ivar id: Fully qualified resource ID for the resource. Ex -
542574
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
543575
:vartype id: str
544576
:ivar name: The name of the resource
545577
:vartype name: str
546-
:ivar type: The type of the resource. Ex-
547-
Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
578+
:ivar type: The type of the resource. E.g.
579+
"Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
548580
:vartype type: str
549581
"""
550582

@@ -562,3 +594,44 @@ class ProxyResource(Resource):
562594

563595
def __init__(self, **kwargs):
564596
super(ProxyResource, self).__init__(**kwargs)
597+
598+
599+
class SystemData(Model):
600+
"""Metadata pertaining to creation and last modification of the resource.
601+
602+
:param created_by: The identity that created the resource.
603+
:type created_by: str
604+
:param created_by_type: The type of identity that created the resource.
605+
Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key'
606+
:type created_by_type: str or ~azure.mgmt.attestation.models.CreatedByType
607+
:param created_at: The timestamp of resource creation (UTC).
608+
:type created_at: datetime
609+
:param last_modified_by: The identity that last modified the resource.
610+
:type last_modified_by: str
611+
:param last_modified_by_type: The type of identity that last modified the
612+
resource. Possible values include: 'User', 'Application',
613+
'ManagedIdentity', 'Key'
614+
:type last_modified_by_type: str or
615+
~azure.mgmt.attestation.models.CreatedByType
616+
:param last_modified_at: The type of identity that last modified the
617+
resource.
618+
:type last_modified_at: datetime
619+
"""
620+
621+
_attribute_map = {
622+
'created_by': {'key': 'createdBy', 'type': 'str'},
623+
'created_by_type': {'key': 'createdByType', 'type': 'str'},
624+
'created_at': {'key': 'createdAt', 'type': 'iso-8601'},
625+
'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'},
626+
'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'},
627+
'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'},
628+
}
629+
630+
def __init__(self, **kwargs):
631+
super(SystemData, self).__init__(**kwargs)
632+
self.created_by = kwargs.get('created_by', None)
633+
self.created_by_type = kwargs.get('created_by_type', None)
634+
self.created_at = kwargs.get('created_at', None)
635+
self.last_modified_by = kwargs.get('last_modified_by', None)
636+
self.last_modified_by_type = kwargs.get('last_modified_by_type', None)
637+
self.last_modified_at = kwargs.get('last_modified_at', None)

0 commit comments

Comments
 (0)