diff --git a/sdk/attestation/azure-mgmt-attestation/azure/mgmt/attestation/_attestation_management_client.py b/sdk/attestation/azure-mgmt-attestation/azure/mgmt/attestation/_attestation_management_client.py index cce0c89d5058..560d397d2880 100644 --- a/sdk/attestation/azure-mgmt-attestation/azure/mgmt/attestation/_attestation_management_client.py +++ b/sdk/attestation/azure-mgmt-attestation/azure/mgmt/attestation/_attestation_management_client.py @@ -44,7 +44,7 @@ def __init__( super(AttestationManagementClient, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2020-10-01' + self.api_version = '2018-09-01-preview' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) diff --git a/sdk/attestation/azure-mgmt-attestation/azure/mgmt/attestation/models/__init__.py b/sdk/attestation/azure-mgmt-attestation/azure/mgmt/attestation/models/__init__.py index fb7c00fb5f6e..a4b33e5419e9 100644 --- a/sdk/attestation/azure-mgmt-attestation/azure/mgmt/attestation/models/__init__.py +++ b/sdk/attestation/azure-mgmt-attestation/azure/mgmt/attestation/models/__init__.py @@ -23,7 +23,6 @@ from ._models_py3 import OperationsDisplayDefinition from ._models_py3 import ProxyResource from ._models_py3 import Resource - from ._models_py3 import SystemData from ._models_py3 import TrackedResource except (SyntaxError, ImportError): from ._models import AttestationProvider @@ -39,10 +38,8 @@ from ._models import OperationsDisplayDefinition from ._models import ProxyResource from ._models import Resource - from ._models import SystemData from ._models import TrackedResource from ._attestation_management_client_enums import ( - CreatedByType, AttestationServiceStatus, ) @@ -60,8 +57,6 @@ 'OperationsDisplayDefinition', 'ProxyResource', 'Resource', - 'SystemData', 'TrackedResource', - 'CreatedByType', 'AttestationServiceStatus', ] diff --git a/sdk/attestation/azure-mgmt-attestation/azure/mgmt/attestation/models/_attestation_management_client_enums.py b/sdk/attestation/azure-mgmt-attestation/azure/mgmt/attestation/models/_attestation_management_client_enums.py index fcf855284547..4280b5c555e3 100644 --- a/sdk/attestation/azure-mgmt-attestation/azure/mgmt/attestation/models/_attestation_management_client_enums.py +++ b/sdk/attestation/azure-mgmt-attestation/azure/mgmt/attestation/models/_attestation_management_client_enums.py @@ -12,14 +12,6 @@ from enum import Enum -class CreatedByType(str, Enum): - - user = "User" - application = "Application" - managed_identity = "ManagedIdentity" - key = "Key" - - class AttestationServiceStatus(str, Enum): ready = "Ready" diff --git a/sdk/attestation/azure-mgmt-attestation/azure/mgmt/attestation/models/_models.py b/sdk/attestation/azure-mgmt-attestation/azure/mgmt/attestation/models/_models.py index 6705046df07b..13b3a77b9184 100644 --- a/sdk/attestation/azure-mgmt-attestation/azure/mgmt/attestation/models/_models.py +++ b/sdk/attestation/azure-mgmt-attestation/azure/mgmt/attestation/models/_models.py @@ -117,8 +117,6 @@ class AttestationProvider(TrackedResource): :type tags: dict[str, str] :param location: Required. The geo-location where the resource lives :type location: str - :ivar system_data: The system metadata relating to this resource - :vartype system_data: ~azure.mgmt.attestation.models.SystemData :param trust_model: Trust model for the attestation service instance. :type trust_model: str :param status: Status of attestation service. Possible values include: @@ -134,7 +132,6 @@ class AttestationProvider(TrackedResource): 'name': {'readonly': True}, 'type': {'readonly': True}, 'location': {'required': True}, - 'system_data': {'readonly': True}, } _attribute_map = { @@ -143,7 +140,6 @@ class AttestationProvider(TrackedResource): 'type': {'key': 'type', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'location': {'key': 'location', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'trust_model': {'key': 'properties.trustModel', 'type': 'str'}, 'status': {'key': 'properties.status', 'type': 'str'}, 'attest_uri': {'key': 'properties.attestUri', 'type': 'str'}, @@ -151,7 +147,6 @@ class AttestationProvider(TrackedResource): def __init__(self, **kwargs): super(AttestationProvider, self).__init__(**kwargs) - self.system_data = None self.trust_model = kwargs.get('trust_model', None) self.status = kwargs.get('status', None) self.attest_uri = kwargs.get('attest_uri', None) @@ -160,27 +155,16 @@ def __init__(self, **kwargs): class AttestationProviderListResult(Model): """Attestation Providers List. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar system_data: The system metadata relating to this resource - :vartype system_data: ~azure.mgmt.attestation.models.SystemData :param value: Attestation Provider array. :type value: list[~azure.mgmt.attestation.models.AttestationProvider] """ - _validation = { - 'system_data': {'readonly': True}, - } - _attribute_map = { - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'value': {'key': 'value', 'type': '[AttestationProvider]'}, } def __init__(self, **kwargs): super(AttestationProviderListResult, self).__init__(**kwargs) - self.system_data = None self.value = kwargs.get('value', None) @@ -223,6 +207,8 @@ class AttestationServiceCreationSpecificParams(Model): """Client supplied parameters used to create a new attestation service instance. + :param attestation_policy: Name of attestation policy. + :type attestation_policy: str :param policy_signing_certificates: JSON Web Key Set defining a set of X.509 Certificates that will represent the parent certificate for the signing certificate used for policy operations @@ -231,11 +217,13 @@ class AttestationServiceCreationSpecificParams(Model): """ _attribute_map = { + 'attestation_policy': {'key': 'attestationPolicy', 'type': 'str'}, 'policy_signing_certificates': {'key': 'policySigningCertificates', 'type': 'JSONWebKeySet'}, } def __init__(self, **kwargs): super(AttestationServiceCreationSpecificParams, self).__init__(**kwargs) + self.attestation_policy = kwargs.get('attestation_policy', None) self.policy_signing_certificates = kwargs.get('policy_signing_certificates', None) @@ -489,27 +477,16 @@ def __init__(self, **kwargs): class OperationList(Model): """List of supported operations. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar system_data: The system metadata relating to this resource - :vartype system_data: ~azure.mgmt.attestation.models.SystemData :param value: List of supported operations. :type value: list[~azure.mgmt.attestation.models.OperationsDefinition] """ - _validation = { - 'system_data': {'readonly': True}, - } - _attribute_map = { - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'value': {'key': 'value', 'type': '[OperationsDefinition]'}, } def __init__(self, **kwargs): super(OperationList, self).__init__(**kwargs) - self.system_data = None self.value = kwargs.get('value', None) @@ -594,44 +571,3 @@ class ProxyResource(Resource): def __init__(self, **kwargs): super(ProxyResource, self).__init__(**kwargs) - - -class SystemData(Model): - """Metadata pertaining to creation and last modification of the resource. - - :param created_by: The identity that created the resource. - :type created_by: str - :param created_by_type: The type of identity that created the resource. - Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' - :type created_by_type: str or ~azure.mgmt.attestation.models.CreatedByType - :param created_at: The timestamp of resource creation (UTC). - :type created_at: datetime - :param last_modified_by: The identity that last modified the resource. - :type last_modified_by: str - :param last_modified_by_type: The type of identity that last modified the - resource. Possible values include: 'User', 'Application', - 'ManagedIdentity', 'Key' - :type last_modified_by_type: str or - ~azure.mgmt.attestation.models.CreatedByType - :param last_modified_at: The type of identity that last modified the - resource. - :type last_modified_at: datetime - """ - - _attribute_map = { - 'created_by': {'key': 'createdBy', 'type': 'str'}, - 'created_by_type': {'key': 'createdByType', 'type': 'str'}, - 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, - 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, - 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, - 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(SystemData, self).__init__(**kwargs) - self.created_by = kwargs.get('created_by', None) - self.created_by_type = kwargs.get('created_by_type', None) - self.created_at = kwargs.get('created_at', None) - self.last_modified_by = kwargs.get('last_modified_by', None) - self.last_modified_by_type = kwargs.get('last_modified_by_type', None) - self.last_modified_at = kwargs.get('last_modified_at', None) diff --git a/sdk/attestation/azure-mgmt-attestation/azure/mgmt/attestation/models/_models_py3.py b/sdk/attestation/azure-mgmt-attestation/azure/mgmt/attestation/models/_models_py3.py index 31023ef01edd..ef8d5901f7c8 100644 --- a/sdk/attestation/azure-mgmt-attestation/azure/mgmt/attestation/models/_models_py3.py +++ b/sdk/attestation/azure-mgmt-attestation/azure/mgmt/attestation/models/_models_py3.py @@ -117,8 +117,6 @@ class AttestationProvider(TrackedResource): :type tags: dict[str, str] :param location: Required. The geo-location where the resource lives :type location: str - :ivar system_data: The system metadata relating to this resource - :vartype system_data: ~azure.mgmt.attestation.models.SystemData :param trust_model: Trust model for the attestation service instance. :type trust_model: str :param status: Status of attestation service. Possible values include: @@ -134,7 +132,6 @@ class AttestationProvider(TrackedResource): 'name': {'readonly': True}, 'type': {'readonly': True}, 'location': {'required': True}, - 'system_data': {'readonly': True}, } _attribute_map = { @@ -143,7 +140,6 @@ class AttestationProvider(TrackedResource): 'type': {'key': 'type', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'location': {'key': 'location', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'trust_model': {'key': 'properties.trustModel', 'type': 'str'}, 'status': {'key': 'properties.status', 'type': 'str'}, 'attest_uri': {'key': 'properties.attestUri', 'type': 'str'}, @@ -151,7 +147,6 @@ class AttestationProvider(TrackedResource): def __init__(self, *, location: str, tags=None, trust_model: str=None, status=None, attest_uri: str=None, **kwargs) -> None: super(AttestationProvider, self).__init__(tags=tags, location=location, **kwargs) - self.system_data = None self.trust_model = trust_model self.status = status self.attest_uri = attest_uri @@ -160,27 +155,16 @@ def __init__(self, *, location: str, tags=None, trust_model: str=None, status=No class AttestationProviderListResult(Model): """Attestation Providers List. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar system_data: The system metadata relating to this resource - :vartype system_data: ~azure.mgmt.attestation.models.SystemData :param value: Attestation Provider array. :type value: list[~azure.mgmt.attestation.models.AttestationProvider] """ - _validation = { - 'system_data': {'readonly': True}, - } - _attribute_map = { - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'value': {'key': 'value', 'type': '[AttestationProvider]'}, } def __init__(self, *, value=None, **kwargs) -> None: super(AttestationProviderListResult, self).__init__(**kwargs) - self.system_data = None self.value = value @@ -223,6 +207,8 @@ class AttestationServiceCreationSpecificParams(Model): """Client supplied parameters used to create a new attestation service instance. + :param attestation_policy: Name of attestation policy. + :type attestation_policy: str :param policy_signing_certificates: JSON Web Key Set defining a set of X.509 Certificates that will represent the parent certificate for the signing certificate used for policy operations @@ -231,11 +217,13 @@ class AttestationServiceCreationSpecificParams(Model): """ _attribute_map = { + 'attestation_policy': {'key': 'attestationPolicy', 'type': 'str'}, 'policy_signing_certificates': {'key': 'policySigningCertificates', 'type': 'JSONWebKeySet'}, } - def __init__(self, *, policy_signing_certificates=None, **kwargs) -> None: + def __init__(self, *, attestation_policy: str=None, policy_signing_certificates=None, **kwargs) -> None: super(AttestationServiceCreationSpecificParams, self).__init__(**kwargs) + self.attestation_policy = attestation_policy self.policy_signing_certificates = policy_signing_certificates @@ -489,27 +477,16 @@ def __init__(self, *, keys=None, **kwargs) -> None: class OperationList(Model): """List of supported operations. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar system_data: The system metadata relating to this resource - :vartype system_data: ~azure.mgmt.attestation.models.SystemData :param value: List of supported operations. :type value: list[~azure.mgmt.attestation.models.OperationsDefinition] """ - _validation = { - 'system_data': {'readonly': True}, - } - _attribute_map = { - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'value': {'key': 'value', 'type': '[OperationsDefinition]'}, } def __init__(self, *, value=None, **kwargs) -> None: super(OperationList, self).__init__(**kwargs) - self.system_data = None self.value = value @@ -594,44 +571,3 @@ class ProxyResource(Resource): def __init__(self, **kwargs) -> None: super(ProxyResource, self).__init__(**kwargs) - - -class SystemData(Model): - """Metadata pertaining to creation and last modification of the resource. - - :param created_by: The identity that created the resource. - :type created_by: str - :param created_by_type: The type of identity that created the resource. - Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' - :type created_by_type: str or ~azure.mgmt.attestation.models.CreatedByType - :param created_at: The timestamp of resource creation (UTC). - :type created_at: datetime - :param last_modified_by: The identity that last modified the resource. - :type last_modified_by: str - :param last_modified_by_type: The type of identity that last modified the - resource. Possible values include: 'User', 'Application', - 'ManagedIdentity', 'Key' - :type last_modified_by_type: str or - ~azure.mgmt.attestation.models.CreatedByType - :param last_modified_at: The type of identity that last modified the - resource. - :type last_modified_at: datetime - """ - - _attribute_map = { - 'created_by': {'key': 'createdBy', 'type': 'str'}, - 'created_by_type': {'key': 'createdByType', 'type': 'str'}, - 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, - 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, - 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, - 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, - } - - def __init__(self, *, created_by: str=None, created_by_type=None, created_at=None, last_modified_by: str=None, last_modified_by_type=None, last_modified_at=None, **kwargs) -> None: - super(SystemData, self).__init__(**kwargs) - self.created_by = created_by - self.created_by_type = created_by_type - self.created_at = created_at - self.last_modified_by = last_modified_by - self.last_modified_by_type = last_modified_by_type - self.last_modified_at = last_modified_at diff --git a/sdk/attestation/azure-mgmt-attestation/azure/mgmt/attestation/operations/_attestation_providers_operations.py b/sdk/attestation/azure-mgmt-attestation/azure/mgmt/attestation/operations/_attestation_providers_operations.py index e956bb56d419..8fb70911bbdd 100644 --- a/sdk/attestation/azure-mgmt-attestation/azure/mgmt/attestation/operations/_attestation_providers_operations.py +++ b/sdk/attestation/azure-mgmt-attestation/azure/mgmt/attestation/operations/_attestation_providers_operations.py @@ -25,7 +25,7 @@ class AttestationProvidersOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client API version. Current version is 2020-10-01. Constant value: "2020-10-01". + :ivar api_version: Client API version. Constant value: "2018-09-01-preview". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-10-01" + self.api_version = "2018-09-01-preview" self.config = config @@ -103,7 +103,7 @@ def get( def create( self, resource_group_name, provider_name, creation_params, custom_headers=None, raw=False, **operation_config): - """Creates a new Attestation Provider instance. + """Creates or updates the Attestation Provider. :param resource_group_name: The name of the resource group. The name is case insensitive. diff --git a/sdk/attestation/azure-mgmt-attestation/azure/mgmt/attestation/operations/_operations.py b/sdk/attestation/azure-mgmt-attestation/azure/mgmt/attestation/operations/_operations.py index f898ca9ce887..635e4b645882 100644 --- a/sdk/attestation/azure-mgmt-attestation/azure/mgmt/attestation/operations/_operations.py +++ b/sdk/attestation/azure-mgmt-attestation/azure/mgmt/attestation/operations/_operations.py @@ -25,7 +25,7 @@ class Operations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client API version. Current version is 2020-10-01. Constant value: "2020-10-01". + :ivar api_version: Client API version. Constant value: "2018-09-01-preview". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-10-01" + self.api_version = "2018-09-01-preview" self.config = config