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] Create "2021-06-01-preview" api-version for Azure Attestation service (private endpoint required changes) #5942

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
1 change: 1 addition & 0 deletions sdk/attestation/azure-mgmt-attestation/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
include _meta.json
recursive-include tests *.py *.yaml
include *.md
include azure/__init__.py
Expand Down
8 changes: 8 additions & 0 deletions sdk/attestation/azure-mgmt-attestation/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"autorest": "V2",
"use": "@microsoft.azure/autorest.python@~4.0.71",
"commit": "7c66235f0f2b488ef3e7c78bbfaf8d9206a7e6af",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/attestation/resource-manager/readme.md --keep-version-file --multiapi --no-async --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --use=@microsoft.azure/autorest.python@~4.0.71 --version=V2",
"readme": "specification/attestation/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
from ._models_py3 import OperationList
from ._models_py3 import OperationsDefinition
from ._models_py3 import OperationsDisplayDefinition
from ._models_py3 import PrivateEndpoint
from ._models_py3 import PrivateEndpointConnection
from ._models_py3 import PrivateLinkServiceConnectionState
from ._models_py3 import ProxyResource
from ._models_py3 import Resource
from ._models_py3 import SystemData
Expand All @@ -38,7 +40,9 @@
from ._models import OperationList
from ._models import OperationsDefinition
from ._models import OperationsDisplayDefinition
from ._models import PrivateEndpoint
from ._models import PrivateEndpointConnection
from ._models import PrivateLinkServiceConnectionState
from ._models import ProxyResource
from ._models import Resource
from ._models import SystemData
Expand All @@ -47,6 +51,7 @@
from ._attestation_management_client_enums import (
CreatedByType,
AttestationServiceStatus,
PrivateEndpointServiceConnectionStatus,
PrivateEndpointConnectionProvisioningState,
)

Expand All @@ -62,13 +67,16 @@
'OperationList',
'OperationsDefinition',
'OperationsDisplayDefinition',
'PrivateEndpoint',
'PrivateEndpointConnection',
'PrivateLinkServiceConnectionState',
'ProxyResource',
'Resource',
'SystemData',
'TrackedResource',
'PrivateEndpointConnectionPaged',
'CreatedByType',
'AttestationServiceStatus',
'PrivateEndpointServiceConnectionStatus',
'PrivateEndpointConnectionProvisioningState',
]
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ class AttestationServiceStatus(str, Enum):
error = "Error"


class PrivateEndpointServiceConnectionStatus(str, Enum):

pending = "Pending"
approved = "Approved"
rejected = "Rejected"


class PrivateEndpointConnectionProvisioningState(str, Enum):

succeeded = "Succeeded"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -560,12 +560,37 @@ def __init__(self, **kwargs):
self.description = kwargs.get('description', None)


class PrivateEndpoint(Model):
"""The Private Endpoint resource.

Variables are only populated by the server, and will be ignored when
sending a request.

:ivar id: The ARM identifier for Private Endpoint
:vartype id: str
"""

_validation = {
'id': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
}

def __init__(self, **kwargs):
super(PrivateEndpoint, self).__init__(**kwargs)
self.id = None


class PrivateEndpointConnection(Resource):
"""The Private Endpoint Connection resource.

Variables are only populated by the server, and will be ignored when
sending a request.

All required parameters must be populated in order to send to Azure.

:ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
:vartype id: str
Expand All @@ -574,9 +599,16 @@ class PrivateEndpointConnection(Resource):
:ivar type: The type of the resource. E.g.
"Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
:vartype type: str
:param provisioning_state: Provisioning state of the private endpoint
connection. Possible values include: 'Succeeded', 'Creating', 'Deleting',
'Failed'
:param private_endpoint: The resource of private end point.
:type private_endpoint: ~azure.mgmt.attestation.models.PrivateEndpoint
:param private_link_service_connection_state: Required. A collection of
information about the state of the connection between service consumer and
provider.
:type private_link_service_connection_state:
~azure.mgmt.attestation.models.PrivateLinkServiceConnectionState
:param provisioning_state: The provisioning state of the private endpoint
connection resource. Possible values include: 'Succeeded', 'Creating',
'Deleting', 'Failed'
:type provisioning_state: str or
~azure.mgmt.attestation.models.PrivateEndpointConnectionProvisioningState
"""
Expand All @@ -585,20 +617,54 @@ class PrivateEndpointConnection(Resource):
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'private_link_service_connection_state': {'required': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'},
'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'},
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
}

def __init__(self, **kwargs):
super(PrivateEndpointConnection, self).__init__(**kwargs)
self.private_endpoint = kwargs.get('private_endpoint', None)
self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None)
self.provisioning_state = kwargs.get('provisioning_state', None)


class PrivateLinkServiceConnectionState(Model):
"""A collection of information about the state of the connection between
service consumer and provider.

:param status: Indicates whether the connection has been
Approved/Rejected/Removed by the owner of the service. Possible values
include: 'Pending', 'Approved', 'Rejected'
:type status: str or
~azure.mgmt.attestation.models.PrivateEndpointServiceConnectionStatus
:param description: The reason for approval/rejection of the connection.
:type description: str
:param actions_required: A message indicating if changes on the service
provider require any updates on the consumer.
:type actions_required: str
"""

_attribute_map = {
'status': {'key': 'status', 'type': 'str'},
'description': {'key': 'description', 'type': 'str'},
'actions_required': {'key': 'actionsRequired', 'type': 'str'},
}

def __init__(self, **kwargs):
super(PrivateLinkServiceConnectionState, self).__init__(**kwargs)
self.status = kwargs.get('status', None)
self.description = kwargs.get('description', None)
self.actions_required = kwargs.get('actions_required', None)


class ProxyResource(Resource):
"""Proxy Resource.

Expand Down Expand Up @@ -651,8 +717,7 @@ class SystemData(Model):
'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.
:param last_modified_at: The timestamp of resource last modification (UTC)
:type last_modified_at: datetime
"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -560,12 +560,37 @@ def __init__(self, *, provider: str=None, resource: str=None, operation: str=Non
self.description = description


class PrivateEndpoint(Model):
"""The Private Endpoint resource.

Variables are only populated by the server, and will be ignored when
sending a request.

:ivar id: The ARM identifier for Private Endpoint
:vartype id: str
"""

_validation = {
'id': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
}

def __init__(self, **kwargs) -> None:
super(PrivateEndpoint, self).__init__(**kwargs)
self.id = None


class PrivateEndpointConnection(Resource):
"""The Private Endpoint Connection resource.

Variables are only populated by the server, and will be ignored when
sending a request.

All required parameters must be populated in order to send to Azure.

:ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
:vartype id: str
Expand All @@ -574,9 +599,16 @@ class PrivateEndpointConnection(Resource):
:ivar type: The type of the resource. E.g.
"Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
:vartype type: str
:param provisioning_state: Provisioning state of the private endpoint
connection. Possible values include: 'Succeeded', 'Creating', 'Deleting',
'Failed'
:param private_endpoint: The resource of private end point.
:type private_endpoint: ~azure.mgmt.attestation.models.PrivateEndpoint
:param private_link_service_connection_state: Required. A collection of
information about the state of the connection between service consumer and
provider.
:type private_link_service_connection_state:
~azure.mgmt.attestation.models.PrivateLinkServiceConnectionState
:param provisioning_state: The provisioning state of the private endpoint
connection resource. Possible values include: 'Succeeded', 'Creating',
'Deleting', 'Failed'
:type provisioning_state: str or
~azure.mgmt.attestation.models.PrivateEndpointConnectionProvisioningState
"""
Expand All @@ -585,20 +617,54 @@ class PrivateEndpointConnection(Resource):
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'private_link_service_connection_state': {'required': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'},
'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'},
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
}

def __init__(self, *, provisioning_state=None, **kwargs) -> None:
def __init__(self, *, private_link_service_connection_state, private_endpoint=None, provisioning_state=None, **kwargs) -> None:
super(PrivateEndpointConnection, self).__init__(**kwargs)
self.private_endpoint = private_endpoint
self.private_link_service_connection_state = private_link_service_connection_state
self.provisioning_state = provisioning_state


class PrivateLinkServiceConnectionState(Model):
"""A collection of information about the state of the connection between
service consumer and provider.

:param status: Indicates whether the connection has been
Approved/Rejected/Removed by the owner of the service. Possible values
include: 'Pending', 'Approved', 'Rejected'
:type status: str or
~azure.mgmt.attestation.models.PrivateEndpointServiceConnectionStatus
:param description: The reason for approval/rejection of the connection.
:type description: str
:param actions_required: A message indicating if changes on the service
provider require any updates on the consumer.
:type actions_required: str
"""

_attribute_map = {
'status': {'key': 'status', 'type': 'str'},
'description': {'key': 'description', 'type': 'str'},
'actions_required': {'key': 'actionsRequired', 'type': 'str'},
}

def __init__(self, *, status=None, description: str=None, actions_required: str=None, **kwargs) -> None:
super(PrivateLinkServiceConnectionState, self).__init__(**kwargs)
self.status = status
self.description = description
self.actions_required = actions_required


class ProxyResource(Resource):
"""Proxy Resource.

Expand Down Expand Up @@ -651,8 +717,7 @@ class SystemData(Model):
'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.
:param last_modified_at: The timestamp of resource last modification (UTC)
:type last_modified_at: datetime
"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def get(
url = self.get.metadata['url']
path_format_arguments = {
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1),
'providerName': self._serialize.url("provider_name", provider_name, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
Expand Down Expand Up @@ -127,7 +127,7 @@ def create(
url = self.create.metadata['url']
path_format_arguments = {
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1),
'providerName': self._serialize.url("provider_name", provider_name, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
Expand Down Expand Up @@ -200,7 +200,7 @@ def update(
url = self.update.metadata['url']
path_format_arguments = {
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1),
'providerName': self._serialize.url("provider_name", provider_name, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
Expand Down Expand Up @@ -265,7 +265,7 @@ def delete(
url = self.delete.metadata['url']
path_format_arguments = {
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1),
'providerName': self._serialize.url("provider_name", provider_name, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
Expand Down Expand Up @@ -374,7 +374,7 @@ def list_by_resource_group(
# Construct URL
url = self.list_by_resource_group.metadata['url']
path_format_arguments = {
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1),
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1)
}
url = self._client.format_url(url, **path_format_arguments)
Expand Down
Loading