Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR azure-mgmt-attestation] add attestation track2 config #3188

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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,
)

Expand All @@ -60,8 +57,6 @@
'OperationsDisplayDefinition',
'ProxyResource',
'Resource',
'SystemData',
'TrackedResource',
'CreatedByType',
'AttestationServiceStatus',
]
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -134,7 +132,6 @@ class AttestationProvider(TrackedResource):
'name': {'readonly': True},
'type': {'readonly': True},
'location': {'required': True},
'system_data': {'readonly': True},
}

_attribute_map = {
Expand All @@ -143,15 +140,13 @@ 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'},
}

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)
Expand All @@ -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)


Expand Down Expand Up @@ -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
Expand All @@ -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)


Expand Down Expand Up @@ -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)


Expand Down Expand Up @@ -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)
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -134,7 +132,6 @@ class AttestationProvider(TrackedResource):
'name': {'readonly': True},
'type': {'readonly': True},
'location': {'required': True},
'system_data': {'readonly': True},
}

_attribute_map = {
Expand All @@ -143,15 +140,13 @@ 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'},
}

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
Expand All @@ -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


Expand Down Expand Up @@ -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
Expand All @@ -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


Expand Down Expand Up @@ -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


Expand Down Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down Expand Up @@ -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.
Expand Down
Loading