diff --git a/sdk/healthcareapis/azure-mgmt-healthcareapis/README.md b/sdk/healthcareapis/azure-mgmt-healthcareapis/README.md index b8354473f458..539d59d859cf 100644 --- a/sdk/healthcareapis/azure-mgmt-healthcareapis/README.md +++ b/sdk/healthcareapis/azure-mgmt-healthcareapis/README.md @@ -1,29 +1,21 @@ -## Microsoft Azure SDK for Python +# Microsoft Azure SDK for Python This is the Microsoft Azure MyService Management Client Library. +This package has been tested with Python 2.7, 3.5, 3.6, 3.7 and 3.8. +For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all). -Azure Resource Manager (ARM) is the next generation of management APIs -that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.5, 3.6 and 3.7. +# Usage -For the older Azure Service Management (ASM) libraries, see -[azure-servicemanagement-legacy](https://pypi.python.org/pypi/azure-servicemanagement-legacy) -library. +For code examples, see [MyService Management](https://docs.microsoft.com/python/api/overview/azure/) +on docs.microsoft.com. -For a more complete set of Azure libraries, see the -[azure sdk python release](https://aka.ms/azsdk/python/all). -## Usage +# Provide Feedback -For code examples, see [MyService -Management](https://docs.microsoft.com/python/api/overview/azure/) on -docs.microsoft.com. - -## Provide Feedback - -If you encounter any bugs or have suggestions, please file an issue in -the [Issues](https://github.com/Azure/azure-sdk-for-python/issues) +If you encounter any bugs or have suggestions, please file an issue in the +[Issues](https://github.com/Azure/azure-sdk-for-python/issues) section of the project. -![image](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-healthcareapis%2FREADME.png) + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-healthcareapis%2FREADME.png) diff --git a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/_healthcare_apis_management_client.py b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/_healthcare_apis_management_client.py index 61807f835bc4..19bb1ab7c1d7 100644 --- a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/_healthcare_apis_management_client.py +++ b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/_healthcare_apis_management_client.py @@ -16,6 +16,8 @@ from .operations import ServicesOperations from .operations import Operations from .operations import OperationResultsOperations +from .operations import PrivateEndpointConnectionsOperations +from .operations import PrivateLinkResourcesOperations from . import models @@ -31,6 +33,10 @@ class HealthcareApisManagementClient(SDKClient): :vartype operations: azure.mgmt.healthcareapis.operations.Operations :ivar operation_results: OperationResults operations :vartype operation_results: azure.mgmt.healthcareapis.operations.OperationResultsOperations + :ivar private_endpoint_connections: PrivateEndpointConnections operations + :vartype private_endpoint_connections: azure.mgmt.healthcareapis.operations.PrivateEndpointConnectionsOperations + :ivar private_link_resources: PrivateLinkResources operations + :vartype private_link_resources: azure.mgmt.healthcareapis.operations.PrivateLinkResourcesOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -47,7 +53,7 @@ def __init__( super(HealthcareApisManagementClient, 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 = '2018-08-20-preview' + self.api_version = '2020-03-30' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) @@ -57,3 +63,7 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.operation_results = OperationResultsOperations( self._client, self.config, self._serialize, self._deserialize) + self.private_endpoint_connections = PrivateEndpointConnectionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.private_link_resources = PrivateLinkResourcesOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/__init__.py b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/__init__.py index cb27d5affb6e..f3c49c7ac97d 100644 --- a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/__init__.py +++ b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/__init__.py @@ -10,66 +10,109 @@ # -------------------------------------------------------------------------- try: + from ._models_py3 import AzureEntityResource from ._models_py3 import CheckNameAvailabilityParameters from ._models_py3 import ErrorDetails, ErrorDetailsException from ._models_py3 import ErrorDetailsInternal from ._models_py3 import Operation from ._models_py3 import OperationDisplay from ._models_py3 import OperationResultsDescription + from ._models_py3 import PrivateEndpoint + from ._models_py3 import PrivateEndpointConnection + from ._models_py3 import PrivateLinkResource + from ._models_py3 import PrivateLinkResourceListResult + from ._models_py3 import PrivateLinkServiceConnectionState + from ._models_py3 import ProxyResource from ._models_py3 import Resource from ._models_py3 import ServiceAccessPolicyEntry from ._models_py3 import ServiceAuthenticationConfigurationInfo from ._models_py3 import ServiceCorsConfigurationInfo from ._models_py3 import ServiceCosmosDbConfigurationInfo + from ._models_py3 import ServiceExportConfigurationInfo from ._models_py3 import ServicesDescription from ._models_py3 import ServicesNameAvailabilityInfo from ._models_py3 import ServicesPatchDescription from ._models_py3 import ServicesProperties + from ._models_py3 import ServicesResource + from ._models_py3 import ServicesResourceIdentity + from ._models_py3 import TrackedResource except (SyntaxError, ImportError): + from ._models import AzureEntityResource from ._models import CheckNameAvailabilityParameters from ._models import ErrorDetails, ErrorDetailsException from ._models import ErrorDetailsInternal from ._models import Operation from ._models import OperationDisplay from ._models import OperationResultsDescription + from ._models import PrivateEndpoint + from ._models import PrivateEndpointConnection + from ._models import PrivateLinkResource + from ._models import PrivateLinkResourceListResult + from ._models import PrivateLinkServiceConnectionState + from ._models import ProxyResource from ._models import Resource from ._models import ServiceAccessPolicyEntry from ._models import ServiceAuthenticationConfigurationInfo from ._models import ServiceCorsConfigurationInfo from ._models import ServiceCosmosDbConfigurationInfo + from ._models import ServiceExportConfigurationInfo from ._models import ServicesDescription from ._models import ServicesNameAvailabilityInfo from ._models import ServicesPatchDescription from ._models import ServicesProperties + from ._models import ServicesResource + from ._models import ServicesResourceIdentity + from ._models import TrackedResource from ._paged_models import OperationPaged +from ._paged_models import PrivateEndpointConnectionPaged from ._paged_models import ServicesDescriptionPaged from ._healthcare_apis_management_client_enums import ( ProvisioningState, + PrivateEndpointServiceConnectionStatus, + PrivateEndpointConnectionProvisioningState, + PublicNetworkAccess, Kind, + ManagedServiceIdentityType, ServiceNameUnavailabilityReason, OperationResultStatus, ) __all__ = [ + 'AzureEntityResource', 'CheckNameAvailabilityParameters', 'ErrorDetails', 'ErrorDetailsException', 'ErrorDetailsInternal', 'Operation', 'OperationDisplay', 'OperationResultsDescription', + 'PrivateEndpoint', + 'PrivateEndpointConnection', + 'PrivateLinkResource', + 'PrivateLinkResourceListResult', + 'PrivateLinkServiceConnectionState', + 'ProxyResource', 'Resource', 'ServiceAccessPolicyEntry', 'ServiceAuthenticationConfigurationInfo', 'ServiceCorsConfigurationInfo', 'ServiceCosmosDbConfigurationInfo', + 'ServiceExportConfigurationInfo', 'ServicesDescription', 'ServicesNameAvailabilityInfo', 'ServicesPatchDescription', 'ServicesProperties', + 'ServicesResource', + 'ServicesResourceIdentity', + 'TrackedResource', 'ServicesDescriptionPaged', 'OperationPaged', + 'PrivateEndpointConnectionPaged', 'ProvisioningState', + 'PrivateEndpointServiceConnectionStatus', + 'PrivateEndpointConnectionProvisioningState', + 'PublicNetworkAccess', 'Kind', + 'ManagedServiceIdentityType', 'ServiceNameUnavailabilityReason', 'OperationResultStatus', ] diff --git a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/_healthcare_apis_management_client_enums.py b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/_healthcare_apis_management_client_enums.py index a910aebf78d1..8732899f1fac 100644 --- a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/_healthcare_apis_management_client_enums.py +++ b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/_healthcare_apis_management_client_enums.py @@ -25,6 +25,27 @@ class ProvisioningState(str, Enum): deprovisioned = "Deprovisioned" +class PrivateEndpointServiceConnectionStatus(str, Enum): + + pending = "Pending" + approved = "Approved" + rejected = "Rejected" + + +class PrivateEndpointConnectionProvisioningState(str, Enum): + + succeeded = "Succeeded" + creating = "Creating" + deleting = "Deleting" + failed = "Failed" + + +class PublicNetworkAccess(str, Enum): + + enabled = "Enabled" + disabled = "Disabled" + + class Kind(str, Enum): fhir = "fhir" @@ -32,6 +53,12 @@ class Kind(str, Enum): fhir_r4 = "fhir-R4" +class ManagedServiceIdentityType(str, Enum): + + system_assigned = "SystemAssigned" + none = "None" + + class ServiceNameUnavailabilityReason(str, Enum): invalid = "Invalid" diff --git a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/_models.py b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/_models.py index 5993183ed587..86c1441f9498 100644 --- a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/_models.py +++ b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/_models.py @@ -13,6 +13,79 @@ from msrest.exceptions import HttpOperationError +class Resource(Model): + """Resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class AzureEntityResource(Resource): + """The resource model definition for a Azure Resource Manager resource with an + etag. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :ivar etag: Resource Etag. + :vartype etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureEntityResource, self).__init__(**kwargs) + self.etag = None + + class CheckNameAvailabilityParameters(Model): """Input values. @@ -226,60 +299,205 @@ def __init__(self, **kwargs): self.properties = kwargs.get('properties', None) -class Resource(Model): - """The common properties of a service. +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: The resource identifier. + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str - :ivar name: The resource name. + :ivar name: The name of the resource :vartype name: str - :ivar type: The resource type. + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. :vartype type: str - :param kind: Required. The kind of the service. Valid values are: fhir, - fhir-Stu3 and fhir-R4. Possible values include: 'fhir', 'fhir-Stu3', - 'fhir-R4' - :type kind: str or ~azure.mgmt.healthcareapis.models.Kind - :param location: Required. The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param etag: An etag associated with the resource, used for optimistic - concurrency when editing it. - :type etag: str + :param private_endpoint: The resource of private end point. + :type private_endpoint: ~azure.mgmt.healthcareapis.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.healthcareapis.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.healthcareapis.models.PrivateEndpointConnectionProvisioningState """ _validation = { 'id': {'readonly': True}, - 'name': {'readonly': True, 'pattern': r'^[a-z0-9][a-z0-9-]{1,21}[a-z0-9]$'}, + 'name': {'readonly': True}, 'type': {'readonly': True}, - 'kind': {'required': True}, - 'location': {'required': 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'}, - 'kind': {'key': 'kind', 'type': 'Kind'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', '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(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.kind = kwargs.get('kind', None) - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) - self.etag = kwargs.get('etag', None) + 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 PrivateLinkResource(Resource): + """A private link resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :ivar group_id: The private link resource group id. + :vartype group_id: str + :ivar required_members: The private link resource required member names. + :vartype required_members: list[str] + :param required_zone_names: The private link resource Private link DNS + zone name. + :type required_zone_names: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'group_id': {'readonly': True}, + 'required_members': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'group_id': {'key': 'properties.groupId', 'type': 'str'}, + 'required_members': {'key': 'properties.requiredMembers', 'type': '[str]'}, + 'required_zone_names': {'key': 'properties.requiredZoneNames', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(PrivateLinkResource, self).__init__(**kwargs) + self.group_id = None + self.required_members = None + self.required_zone_names = kwargs.get('required_zone_names', None) + + +class PrivateLinkResourceListResult(Model): + """A list of private link resources. + + :param value: Array of private link resources + :type value: list[~azure.mgmt.healthcareapis.models.PrivateLinkResource] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, + } + + def __init__(self, **kwargs): + super(PrivateLinkResourceListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', 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.healthcareapis.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): + """The resource model definition for a ARM proxy resource. It will have + everything other than required location and tags. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ProxyResource, self).__init__(**kwargs) class ServiceAccessPolicyEntry(Model): @@ -287,8 +505,8 @@ class ServiceAccessPolicyEntry(Model): All required parameters must be populated in order to send to Azure. - :param object_id: Required. An object ID that is allowed access to the - FHIR service. + :param object_id: Required. An Azure AD object ID (User or Apps) that is + allowed access to the FHIR service. :type object_id: str """ @@ -371,6 +589,9 @@ class ServiceCosmosDbConfigurationInfo(Model): :param offer_throughput: The provisioned throughput for the backing database. :type offer_throughput: int + :param key_vault_key_uri: The URI of the customer-managed key for the + backing database. + :type key_vault_key_uri: str """ _validation = { @@ -379,14 +600,93 @@ class ServiceCosmosDbConfigurationInfo(Model): _attribute_map = { 'offer_throughput': {'key': 'offerThroughput', 'type': 'int'}, + 'key_vault_key_uri': {'key': 'keyVaultKeyUri', 'type': 'str'}, } def __init__(self, **kwargs): super(ServiceCosmosDbConfigurationInfo, self).__init__(**kwargs) self.offer_throughput = kwargs.get('offer_throughput', None) + self.key_vault_key_uri = kwargs.get('key_vault_key_uri', None) + + +class ServiceExportConfigurationInfo(Model): + """Export operation configuration information. + + :param storage_account_name: The name of the default export storage + account. + :type storage_account_name: str + """ + + _attribute_map = { + 'storage_account_name': {'key': 'storageAccountName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceExportConfigurationInfo, self).__init__(**kwargs) + self.storage_account_name = kwargs.get('storage_account_name', None) + + +class ServicesResource(Model): + """The common properties of a service. + + 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: The resource identifier. + :vartype id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :param kind: Required. The kind of the service. Possible values include: + 'fhir', 'fhir-Stu3', 'fhir-R4' + :type kind: str or ~azure.mgmt.healthcareapis.models.Kind + :param location: Required. The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :param etag: An etag associated with the resource, used for optimistic + concurrency when editing it. + :type etag: str + :param identity: Setting indicating whether the service has a managed + identity associated with it. + :type identity: ~azure.mgmt.healthcareapis.models.ServicesResourceIdentity + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True, 'pattern': r'^[a-z0-9][a-z0-9-]{1,21}[a-z0-9]$'}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'Kind'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'ServicesResourceIdentity'}, + } + + def __init__(self, **kwargs): + super(ServicesResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.kind = kwargs.get('kind', None) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + self.etag = kwargs.get('etag', None) + self.identity = kwargs.get('identity', None) -class ServicesDescription(Resource): +class ServicesDescription(ServicesResource): """The description of the service. Variables are only populated by the server, and will be ignored when @@ -400,9 +700,8 @@ class ServicesDescription(Resource): :vartype name: str :ivar type: The resource type. :vartype type: str - :param kind: Required. The kind of the service. Valid values are: fhir, - fhir-Stu3 and fhir-R4. Possible values include: 'fhir', 'fhir-Stu3', - 'fhir-R4' + :param kind: Required. The kind of the service. Possible values include: + 'fhir', 'fhir-Stu3', 'fhir-R4' :type kind: str or ~azure.mgmt.healthcareapis.models.Kind :param location: Required. The resource location. :type location: str @@ -411,6 +710,9 @@ class ServicesDescription(Resource): :param etag: An etag associated with the resource, used for optimistic concurrency when editing it. :type etag: str + :param identity: Setting indicating whether the service has a managed + identity associated with it. + :type identity: ~azure.mgmt.healthcareapis.models.ServicesResourceIdentity :param properties: The common properties of a service. :type properties: ~azure.mgmt.healthcareapis.models.ServicesProperties """ @@ -431,6 +733,7 @@ class ServicesDescription(Resource): 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'etag': {'key': 'etag', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'ServicesResourceIdentity'}, 'properties': {'key': 'properties', 'type': 'ServicesProperties'}, } @@ -479,15 +782,22 @@ class ServicesPatchDescription(Model): :param tags: Instance tags :type tags: dict[str, str] + :param public_network_access: Control permission for data plane traffic + coming from public networks while private endpoint is enabled. Possible + values include: 'Enabled', 'Disabled' + :type public_network_access: str or + ~azure.mgmt.healthcareapis.models.PublicNetworkAccess """ _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, } def __init__(self, **kwargs): super(ServicesPatchDescription, self).__init__(**kwargs) self.tags = kwargs.get('tags', None) + self.public_network_access = kwargs.get('public_network_access', None) class ServicesProperties(Model): @@ -496,15 +806,12 @@ class ServicesProperties(Model): 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 provisioning_state: The provisioning state. Possible values include: 'Deleting', 'Succeeded', 'Creating', 'Accepted', 'Verifying', 'Updating', 'Failed', 'Canceled', 'Deprovisioned' :vartype provisioning_state: str or ~azure.mgmt.healthcareapis.models.ProvisioningState - :param access_policies: Required. The access policies of the service - instance. + :param access_policies: The access policies of the service instance. :type access_policies: list[~azure.mgmt.healthcareapis.models.ServiceAccessPolicyEntry] :param cosmos_db_configuration: The settings for the Cosmos DB database @@ -519,11 +826,23 @@ class ServicesProperties(Model): service instance. :type cors_configuration: ~azure.mgmt.healthcareapis.models.ServiceCorsConfigurationInfo + :param export_configuration: The settings for the export operation of the + service instance. + :type export_configuration: + ~azure.mgmt.healthcareapis.models.ServiceExportConfigurationInfo + :param private_endpoint_connections: The list of private endpoint + connections that are set up for this resource. + :type private_endpoint_connections: + list[~azure.mgmt.healthcareapis.models.PrivateEndpointConnection] + :param public_network_access: Control permission for data plane traffic + coming from public networks while private endpoint is enabled. Possible + values include: 'Enabled', 'Disabled' + :type public_network_access: str or + ~azure.mgmt.healthcareapis.models.PublicNetworkAccess """ _validation = { 'provisioning_state': {'readonly': True}, - 'access_policies': {'required': True}, } _attribute_map = { @@ -532,6 +851,9 @@ class ServicesProperties(Model): 'cosmos_db_configuration': {'key': 'cosmosDbConfiguration', 'type': 'ServiceCosmosDbConfigurationInfo'}, 'authentication_configuration': {'key': 'authenticationConfiguration', 'type': 'ServiceAuthenticationConfigurationInfo'}, 'cors_configuration': {'key': 'corsConfiguration', 'type': 'ServiceCorsConfigurationInfo'}, + 'export_configuration': {'key': 'exportConfiguration', 'type': 'ServiceExportConfigurationInfo'}, + 'private_endpoint_connections': {'key': 'privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, + 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, } def __init__(self, **kwargs): @@ -541,3 +863,84 @@ def __init__(self, **kwargs): self.cosmos_db_configuration = kwargs.get('cosmos_db_configuration', None) self.authentication_configuration = kwargs.get('authentication_configuration', None) self.cors_configuration = kwargs.get('cors_configuration', None) + self.export_configuration = kwargs.get('export_configuration', None) + self.private_endpoint_connections = kwargs.get('private_endpoint_connections', None) + self.public_network_access = kwargs.get('public_network_access', None) + + +class ServicesResourceIdentity(Model): + """Setting indicating whether the service has a managed identity associated + with it. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal ID of the resource identity. + :vartype principal_id: str + :ivar tenant_id: The tenant ID of the resource. + :vartype tenant_id: str + :param type: Type of identity being specified, currently SystemAssigned + and None are allowed. Possible values include: 'SystemAssigned', 'None' + :type type: str or + ~azure.mgmt.healthcareapis.models.ManagedServiceIdentityType + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServicesResourceIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = kwargs.get('type', None) + + +class TrackedResource(Resource): + """The resource model definition for a ARM tracked top level 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 + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TrackedResource, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.location = kwargs.get('location', None) diff --git a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/_models_py3.py b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/_models_py3.py index 8070f9eec9dc..2cbb07d2611e 100644 --- a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/_models_py3.py +++ b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/_models_py3.py @@ -13,6 +13,79 @@ from msrest.exceptions import HttpOperationError +class Resource(Model): + """Resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class AzureEntityResource(Resource): + """The resource model definition for a Azure Resource Manager resource with an + etag. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :ivar etag: Resource Etag. + :vartype etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(AzureEntityResource, self).__init__(**kwargs) + self.etag = None + + class CheckNameAvailabilityParameters(Model): """Input values. @@ -226,60 +299,205 @@ def __init__(self, *, properties=None, **kwargs) -> None: self.properties = properties -class Resource(Model): - """The common properties of a service. +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: The resource identifier. + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str - :ivar name: The resource name. + :ivar name: The name of the resource :vartype name: str - :ivar type: The resource type. + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. :vartype type: str - :param kind: Required. The kind of the service. Valid values are: fhir, - fhir-Stu3 and fhir-R4. Possible values include: 'fhir', 'fhir-Stu3', - 'fhir-R4' - :type kind: str or ~azure.mgmt.healthcareapis.models.Kind - :param location: Required. The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param etag: An etag associated with the resource, used for optimistic - concurrency when editing it. - :type etag: str + :param private_endpoint: The resource of private end point. + :type private_endpoint: ~azure.mgmt.healthcareapis.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.healthcareapis.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.healthcareapis.models.PrivateEndpointConnectionProvisioningState """ _validation = { 'id': {'readonly': True}, - 'name': {'readonly': True, 'pattern': r'^[a-z0-9][a-z0-9-]{1,21}[a-z0-9]$'}, + 'name': {'readonly': True}, 'type': {'readonly': True}, - 'kind': {'required': True}, - 'location': {'required': 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'}, - 'kind': {'key': 'kind', 'type': 'Kind'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', '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, *, kind, location: str, tags=None, etag: str=None, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.kind = kind - self.location = location - self.tags = tags - self.etag = etag + 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 PrivateLinkResource(Resource): + """A private link resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :ivar group_id: The private link resource group id. + :vartype group_id: str + :ivar required_members: The private link resource required member names. + :vartype required_members: list[str] + :param required_zone_names: The private link resource Private link DNS + zone name. + :type required_zone_names: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'group_id': {'readonly': True}, + 'required_members': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'group_id': {'key': 'properties.groupId', 'type': 'str'}, + 'required_members': {'key': 'properties.requiredMembers', 'type': '[str]'}, + 'required_zone_names': {'key': 'properties.requiredZoneNames', 'type': '[str]'}, + } + + def __init__(self, *, required_zone_names=None, **kwargs) -> None: + super(PrivateLinkResource, self).__init__(**kwargs) + self.group_id = None + self.required_members = None + self.required_zone_names = required_zone_names + + +class PrivateLinkResourceListResult(Model): + """A list of private link resources. + + :param value: Array of private link resources + :type value: list[~azure.mgmt.healthcareapis.models.PrivateLinkResource] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(PrivateLinkResourceListResult, self).__init__(**kwargs) + self.value = value + + +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.healthcareapis.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): + """The resource model definition for a ARM proxy resource. It will have + everything other than required location and tags. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ProxyResource, self).__init__(**kwargs) class ServiceAccessPolicyEntry(Model): @@ -287,8 +505,8 @@ class ServiceAccessPolicyEntry(Model): All required parameters must be populated in order to send to Azure. - :param object_id: Required. An object ID that is allowed access to the - FHIR service. + :param object_id: Required. An Azure AD object ID (User or Apps) that is + allowed access to the FHIR service. :type object_id: str """ @@ -371,6 +589,9 @@ class ServiceCosmosDbConfigurationInfo(Model): :param offer_throughput: The provisioned throughput for the backing database. :type offer_throughput: int + :param key_vault_key_uri: The URI of the customer-managed key for the + backing database. + :type key_vault_key_uri: str """ _validation = { @@ -379,14 +600,93 @@ class ServiceCosmosDbConfigurationInfo(Model): _attribute_map = { 'offer_throughput': {'key': 'offerThroughput', 'type': 'int'}, + 'key_vault_key_uri': {'key': 'keyVaultKeyUri', 'type': 'str'}, } - def __init__(self, *, offer_throughput: int=None, **kwargs) -> None: + def __init__(self, *, offer_throughput: int=None, key_vault_key_uri: str=None, **kwargs) -> None: super(ServiceCosmosDbConfigurationInfo, self).__init__(**kwargs) self.offer_throughput = offer_throughput + self.key_vault_key_uri = key_vault_key_uri + + +class ServiceExportConfigurationInfo(Model): + """Export operation configuration information. + + :param storage_account_name: The name of the default export storage + account. + :type storage_account_name: str + """ + + _attribute_map = { + 'storage_account_name': {'key': 'storageAccountName', 'type': 'str'}, + } + + def __init__(self, *, storage_account_name: str=None, **kwargs) -> None: + super(ServiceExportConfigurationInfo, self).__init__(**kwargs) + self.storage_account_name = storage_account_name + + +class ServicesResource(Model): + """The common properties of a service. + + 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: The resource identifier. + :vartype id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :param kind: Required. The kind of the service. Possible values include: + 'fhir', 'fhir-Stu3', 'fhir-R4' + :type kind: str or ~azure.mgmt.healthcareapis.models.Kind + :param location: Required. The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :param etag: An etag associated with the resource, used for optimistic + concurrency when editing it. + :type etag: str + :param identity: Setting indicating whether the service has a managed + identity associated with it. + :type identity: ~azure.mgmt.healthcareapis.models.ServicesResourceIdentity + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True, 'pattern': r'^[a-z0-9][a-z0-9-]{1,21}[a-z0-9]$'}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'Kind'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'ServicesResourceIdentity'}, + } + + def __init__(self, *, kind, location: str, tags=None, etag: str=None, identity=None, **kwargs) -> None: + super(ServicesResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.kind = kind + self.location = location + self.tags = tags + self.etag = etag + self.identity = identity -class ServicesDescription(Resource): +class ServicesDescription(ServicesResource): """The description of the service. Variables are only populated by the server, and will be ignored when @@ -400,9 +700,8 @@ class ServicesDescription(Resource): :vartype name: str :ivar type: The resource type. :vartype type: str - :param kind: Required. The kind of the service. Valid values are: fhir, - fhir-Stu3 and fhir-R4. Possible values include: 'fhir', 'fhir-Stu3', - 'fhir-R4' + :param kind: Required. The kind of the service. Possible values include: + 'fhir', 'fhir-Stu3', 'fhir-R4' :type kind: str or ~azure.mgmt.healthcareapis.models.Kind :param location: Required. The resource location. :type location: str @@ -411,6 +710,9 @@ class ServicesDescription(Resource): :param etag: An etag associated with the resource, used for optimistic concurrency when editing it. :type etag: str + :param identity: Setting indicating whether the service has a managed + identity associated with it. + :type identity: ~azure.mgmt.healthcareapis.models.ServicesResourceIdentity :param properties: The common properties of a service. :type properties: ~azure.mgmt.healthcareapis.models.ServicesProperties """ @@ -431,11 +733,12 @@ class ServicesDescription(Resource): 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'etag': {'key': 'etag', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'ServicesResourceIdentity'}, 'properties': {'key': 'properties', 'type': 'ServicesProperties'}, } - def __init__(self, *, kind, location: str, tags=None, etag: str=None, properties=None, **kwargs) -> None: - super(ServicesDescription, self).__init__(kind=kind, location=location, tags=tags, etag=etag, **kwargs) + def __init__(self, *, kind, location: str, tags=None, etag: str=None, identity=None, properties=None, **kwargs) -> None: + super(ServicesDescription, self).__init__(kind=kind, location=location, tags=tags, etag=etag, identity=identity, **kwargs) self.properties = properties @@ -479,15 +782,22 @@ class ServicesPatchDescription(Model): :param tags: Instance tags :type tags: dict[str, str] + :param public_network_access: Control permission for data plane traffic + coming from public networks while private endpoint is enabled. Possible + values include: 'Enabled', 'Disabled' + :type public_network_access: str or + ~azure.mgmt.healthcareapis.models.PublicNetworkAccess """ _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, } - def __init__(self, *, tags=None, **kwargs) -> None: + def __init__(self, *, tags=None, public_network_access=None, **kwargs) -> None: super(ServicesPatchDescription, self).__init__(**kwargs) self.tags = tags + self.public_network_access = public_network_access class ServicesProperties(Model): @@ -496,15 +806,12 @@ class ServicesProperties(Model): 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 provisioning_state: The provisioning state. Possible values include: 'Deleting', 'Succeeded', 'Creating', 'Accepted', 'Verifying', 'Updating', 'Failed', 'Canceled', 'Deprovisioned' :vartype provisioning_state: str or ~azure.mgmt.healthcareapis.models.ProvisioningState - :param access_policies: Required. The access policies of the service - instance. + :param access_policies: The access policies of the service instance. :type access_policies: list[~azure.mgmt.healthcareapis.models.ServiceAccessPolicyEntry] :param cosmos_db_configuration: The settings for the Cosmos DB database @@ -519,11 +826,23 @@ class ServicesProperties(Model): service instance. :type cors_configuration: ~azure.mgmt.healthcareapis.models.ServiceCorsConfigurationInfo + :param export_configuration: The settings for the export operation of the + service instance. + :type export_configuration: + ~azure.mgmt.healthcareapis.models.ServiceExportConfigurationInfo + :param private_endpoint_connections: The list of private endpoint + connections that are set up for this resource. + :type private_endpoint_connections: + list[~azure.mgmt.healthcareapis.models.PrivateEndpointConnection] + :param public_network_access: Control permission for data plane traffic + coming from public networks while private endpoint is enabled. Possible + values include: 'Enabled', 'Disabled' + :type public_network_access: str or + ~azure.mgmt.healthcareapis.models.PublicNetworkAccess """ _validation = { 'provisioning_state': {'readonly': True}, - 'access_policies': {'required': True}, } _attribute_map = { @@ -532,12 +851,96 @@ class ServicesProperties(Model): 'cosmos_db_configuration': {'key': 'cosmosDbConfiguration', 'type': 'ServiceCosmosDbConfigurationInfo'}, 'authentication_configuration': {'key': 'authenticationConfiguration', 'type': 'ServiceAuthenticationConfigurationInfo'}, 'cors_configuration': {'key': 'corsConfiguration', 'type': 'ServiceCorsConfigurationInfo'}, + 'export_configuration': {'key': 'exportConfiguration', 'type': 'ServiceExportConfigurationInfo'}, + 'private_endpoint_connections': {'key': 'privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, + 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, } - def __init__(self, *, access_policies, cosmos_db_configuration=None, authentication_configuration=None, cors_configuration=None, **kwargs) -> None: + def __init__(self, *, access_policies=None, cosmos_db_configuration=None, authentication_configuration=None, cors_configuration=None, export_configuration=None, private_endpoint_connections=None, public_network_access=None, **kwargs) -> None: super(ServicesProperties, self).__init__(**kwargs) self.provisioning_state = None self.access_policies = access_policies self.cosmos_db_configuration = cosmos_db_configuration self.authentication_configuration = authentication_configuration self.cors_configuration = cors_configuration + self.export_configuration = export_configuration + self.private_endpoint_connections = private_endpoint_connections + self.public_network_access = public_network_access + + +class ServicesResourceIdentity(Model): + """Setting indicating whether the service has a managed identity associated + with it. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal ID of the resource identity. + :vartype principal_id: str + :ivar tenant_id: The tenant ID of the resource. + :vartype tenant_id: str + :param type: Type of identity being specified, currently SystemAssigned + and None are allowed. Possible values include: 'SystemAssigned', 'None' + :type type: str or + ~azure.mgmt.healthcareapis.models.ManagedServiceIdentityType + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, type=None, **kwargs) -> None: + super(ServicesResourceIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = type + + +class TrackedResource(Resource): + """The resource model definition for a ARM tracked top level 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 + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(TrackedResource, self).__init__(**kwargs) + self.tags = tags + self.location = location diff --git a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/_paged_models.py b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/_paged_models.py index 646be2a168cc..d5962601e97d 100644 --- a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/_paged_models.py +++ b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/models/_paged_models.py @@ -38,3 +38,16 @@ class OperationPaged(Paged): def __init__(self, *args, **kwargs): super(OperationPaged, self).__init__(*args, **kwargs) +class PrivateEndpointConnectionPaged(Paged): + """ + A paging container for iterating over a list of :class:`PrivateEndpointConnection ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[PrivateEndpointConnection]'} + } + + def __init__(self, *args, **kwargs): + + super(PrivateEndpointConnectionPaged, self).__init__(*args, **kwargs) diff --git a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/__init__.py b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/__init__.py index 6bca9ee351e6..8d0eb723291e 100644 --- a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/__init__.py +++ b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/__init__.py @@ -12,9 +12,13 @@ from ._services_operations import ServicesOperations from ._operations import Operations from ._operation_results_operations import OperationResultsOperations +from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations +from ._private_link_resources_operations import PrivateLinkResourcesOperations __all__ = [ 'ServicesOperations', 'Operations', 'OperationResultsOperations', + 'PrivateEndpointConnectionsOperations', + 'PrivateLinkResourcesOperations', ] diff --git a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/_operation_results_operations.py b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/_operation_results_operations.py index 7050fa3cc564..d5634ea93687 100644 --- a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/_operation_results_operations.py +++ b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/_operation_results_operations.py @@ -24,7 +24,7 @@ class OperationResultsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The version of the API. Constant value: "2018-08-20-preview". + :ivar api_version: Client Api Version. Constant value: "2020-03-30". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-08-20-preview" + self.api_version = "2020-03-30" self.config = config @@ -67,7 +67,7 @@ def get( # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=10) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') # Construct headers header_parameters = {} diff --git a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/_operations.py b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/_operations.py index e60e1aff1e7d..d5a6c91f93eb 100644 --- a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/_operations.py +++ b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/_operations.py @@ -24,7 +24,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: The version of the API. Constant value: "2018-08-20-preview". + :ivar api_version: Client Api Version. Constant value: "2020-03-30". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-08-20-preview" + self.api_version = "2020-03-30" self.config = config @@ -60,7 +60,7 @@ def prepare_request(next_link=None): # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=10) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link diff --git a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/_private_endpoint_connections_operations.py b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/_private_endpoint_connections_operations.py new file mode 100644 index 000000000000..e813e4d88885 --- /dev/null +++ b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/_private_endpoint_connections_operations.py @@ -0,0 +1,371 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class PrivateEndpointConnectionsOperations(object): + """PrivateEndpointConnectionsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2020-03-30". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-03-30" + + self.config = config + + def list_by_service( + self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + """Lists all private endpoint connections for a service. + + :param resource_group_name: The name of the resource group that + contains the service instance. + :type resource_group_name: str + :param resource_name: The name of the service instance. + :type resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of PrivateEndpointConnection + :rtype: + ~azure.mgmt.healthcareapis.models.PrivateEndpointConnectionPaged[~azure.mgmt.healthcareapis.models.PrivateEndpointConnection] + :raises: + :class:`ErrorDetailsException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_service.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=24, min_length=3) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorDetailsException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.PrivateEndpointConnectionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/services/{resourceName}/privateEndpointConnections'} + + def get( + self, resource_group_name, resource_name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): + """Gets the specified private endpoint connection associated with the + service. + + :param resource_group_name: The name of the resource group that + contains the service instance. + :type resource_group_name: str + :param resource_name: The name of the service instance. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private + endpoint connection associated with the Azure resource + :type private_endpoint_connection_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PrivateEndpointConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.healthcareapis.models.PrivateEndpointConnection or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorDetailsException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=24, min_length=3), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorDetailsException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateEndpointConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/services/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} + + + def _create_or_update_initial( + self, resource_group_name, resource_name, private_endpoint_connection_name, properties, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=24, min_length=3), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(properties, 'PrivateEndpointConnection') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorDetailsException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('PrivateEndpointConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, resource_name, private_endpoint_connection_name, properties, custom_headers=None, raw=False, polling=True, **operation_config): + """Update the state of the specified private endpoint connection + associated with the service. + + :param resource_group_name: The name of the resource group that + contains the service instance. + :type resource_group_name: str + :param resource_name: The name of the service instance. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private + endpoint connection associated with the Azure resource + :type private_endpoint_connection_name: str + :param properties: The private endpoint connection properties. + :type properties: + ~azure.mgmt.healthcareapis.models.PrivateEndpointConnection + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + PrivateEndpointConnection or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.healthcareapis.models.PrivateEndpointConnection] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.healthcareapis.models.PrivateEndpointConnection]] + :raises: + :class:`ErrorDetailsException` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + private_endpoint_connection_name=private_endpoint_connection_name, + properties=properties, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('PrivateEndpointConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/services/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} + + + def _delete_initial( + self, resource_group_name, resource_name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=24, min_length=3), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + raise models.ErrorDetailsException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, resource_name, private_endpoint_connection_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes a private endpoint connection. + + :param resource_group_name: The name of the resource group that + contains the service instance. + :type resource_group_name: str + :param resource_name: The name of the service instance. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private + endpoint connection associated with the Azure resource + :type private_endpoint_connection_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`ErrorDetailsException` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + private_endpoint_connection_name=private_endpoint_connection_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/services/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} diff --git a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/_private_link_resources_operations.py b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/_private_link_resources_operations.py new file mode 100644 index 000000000000..731407758a0c --- /dev/null +++ b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/_private_link_resources_operations.py @@ -0,0 +1,166 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class PrivateLinkResourcesOperations(object): + """PrivateLinkResourcesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2020-03-30". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-03-30" + + self.config = config + + def list_by_service( + self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + """Gets the private link resources that need to be created for a service. + + :param resource_group_name: The name of the resource group that + contains the service instance. + :type resource_group_name: str + :param resource_name: The name of the service instance. + :type resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PrivateLinkResourceListResult or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.healthcareapis.models.PrivateLinkResourceListResult or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorDetailsException` + """ + # Construct URL + url = self.list_by_service.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=24, min_length=3) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorDetailsException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateLinkResourceListResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/services/{resourceName}/privateLinkResources'} + + def get( + self, resource_group_name, resource_name, group_name, custom_headers=None, raw=False, **operation_config): + """Gets a private link resource that need to be created for a service. + + :param resource_group_name: The name of the resource group that + contains the service instance. + :type resource_group_name: str + :param resource_name: The name of the service instance. + :type resource_name: str + :param group_name: The name of the private link resource group. + :type group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PrivateLinkResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.healthcareapis.models.PrivateLinkResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorDetailsException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=24, min_length=3), + 'groupName': self._serialize.url("group_name", group_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorDetailsException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateLinkResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/services/{resourceName}/privateLinkResources/{groupName}'} diff --git a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/_services_operations.py b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/_services_operations.py index 76ee198c35a8..1939600079a3 100644 --- a/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/_services_operations.py +++ b/sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/operations/_services_operations.py @@ -26,7 +26,7 @@ class ServicesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The version of the API. Constant value: "2018-08-20-preview". + :ivar api_version: Client Api Version. Constant value: "2020-03-30". """ models = models @@ -36,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-08-20-preview" + self.api_version = "2020-03-30" self.config = config @@ -71,7 +71,7 @@ def get( # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=10) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') # Construct headers header_parameters = {} @@ -115,7 +115,7 @@ def _create_or_update_initial( # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=10) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') # Construct headers header_parameters = {} @@ -206,8 +206,8 @@ def get_long_running_output(response): def _update_initial( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, **operation_config): - service_patch_description = models.ServicesPatchDescription(tags=tags) + self, resource_group_name, resource_name, tags=None, public_network_access=None, custom_headers=None, raw=False, **operation_config): + service_patch_description = models.ServicesPatchDescription(tags=tags, public_network_access=public_network_access) # Construct URL url = self.update.metadata['url'] @@ -220,7 +220,7 @@ def _update_initial( # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=10) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') # Construct headers header_parameters = {} @@ -255,7 +255,7 @@ def _update_initial( return deserialized def update( - self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): + self, resource_group_name, resource_name, tags=None, public_network_access=None, custom_headers=None, raw=False, polling=True, **operation_config): """Update the metadata of a service instance. :param resource_group_name: The name of the resource group that @@ -265,6 +265,11 @@ def update( :type resource_name: str :param tags: Instance tags :type tags: dict[str, str] + :param public_network_access: Control permission for data plane + traffic coming from public networks while private endpoint is enabled. + Possible values include: 'Enabled', 'Disabled' + :type public_network_access: str or + ~azure.mgmt.healthcareapis.models.PublicNetworkAccess :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the direct response alongside the deserialized response @@ -283,6 +288,7 @@ def update( resource_group_name=resource_group_name, resource_name=resource_name, tags=tags, + public_network_access=public_network_access, custom_headers=custom_headers, raw=True, **operation_config @@ -320,7 +326,7 @@ def _delete_initial( # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=10) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') # Construct headers header_parameters = {} @@ -411,7 +417,7 @@ def prepare_request(next_link=None): # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=10) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link @@ -480,7 +486,7 @@ def prepare_request(next_link=None): # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=10) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link @@ -550,7 +556,7 @@ def check_name_availability( # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=10) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') # Construct headers header_parameters = {} diff --git a/sdk/healthcareapis/azure-mgmt-healthcareapis/setup.py b/sdk/healthcareapis/azure-mgmt-healthcareapis/setup.py index dd69baa72137..61ddf28b3a20 100644 --- a/sdk/healthcareapis/azure-mgmt-healthcareapis/setup.py +++ b/sdk/healthcareapis/azure-mgmt-healthcareapis/setup.py @@ -36,7 +36,9 @@ pass # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd: +with open(os.path.join(package_folder_path, 'version.py') + if os.path.exists(os.path.join(package_folder_path, 'version.py')) + else os.path.join(package_folder_path, '_version.py'), 'r') as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) @@ -67,6 +69,7 @@ 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', 'License :: OSI Approved :: MIT License', ], zip_safe=False,