Skip to content
Merged
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
3 changes: 3 additions & 0 deletions azure-mgmt-adhybridhealthservice/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,6 @@ 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>`__
section of the project.


.. image:: https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-adhybridhealthservice%2FREADME.png
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
from .connector_py3 import Connector
from .connector_connection_error_py3 import ConnectorConnectionError
from .connector_connection_errors_py3 import ConnectorConnectionErrors
from .connector_metadata_details_py3 import ConnectorMetadataDetails
from .connector_metadata_py3 import ConnectorMetadata
from .connector_object_error_py3 import ConnectorObjectError
from .connector_object_errors_py3 import ConnectorObjectErrors
from .credential_py3 import Credential
Expand Down Expand Up @@ -100,6 +102,8 @@
from .connector import Connector
from .connector_connection_error import ConnectorConnectionError
from .connector_connection_errors import ConnectorConnectionErrors
from .connector_metadata_details import ConnectorMetadataDetails
from .connector_metadata import ConnectorMetadata
from .connector_object_error import ConnectorObjectError
from .connector_object_errors import ConnectorObjectErrors
from .credential import Credential
Expand Down Expand Up @@ -199,6 +203,8 @@
'Connector',
'ConnectorConnectionError',
'ConnectorConnectionErrors',
'ConnectorMetadataDetails',
'ConnectorMetadata',
'ConnectorObjectError',
'ConnectorObjectErrors',
'Credential',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# 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.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class ConnectorMetadata(Model):
"""Gets the list of connectors and run profile names.

:param connectors: The list of connectors.
:type connectors:
list[~azure.mgmt.adhybridhealthservice.models.ConnectorMetadataDetails]
:param run_profile_names: The list of run profile names.
:type run_profile_names: list[str]
"""

_attribute_map = {
'connectors': {'key': 'connectors', 'type': '[ConnectorMetadataDetails]'},
'run_profile_names': {'key': 'runProfileNames', 'type': '[str]'},
}

def __init__(self, **kwargs):
super(ConnectorMetadata, self).__init__(**kwargs)
self.connectors = kwargs.get('connectors', None)
self.run_profile_names = kwargs.get('run_profile_names', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# 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.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class ConnectorMetadataDetails(Model):
"""Details of the connector.

:param connector_id: The Connector Id.
:type connector_id: str
:param connector_display_name: The Connector Display Name
:type connector_display_name: str
"""

_attribute_map = {
'connector_id': {'key': 'connectorId', 'type': 'str'},
'connector_display_name': {'key': 'connectorDisplayName', 'type': 'str'},
}

def __init__(self, **kwargs):
super(ConnectorMetadataDetails, self).__init__(**kwargs)
self.connector_id = kwargs.get('connector_id', None)
self.connector_display_name = kwargs.get('connector_display_name', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# 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.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class ConnectorMetadataDetails(Model):
"""Details of the connector.

:param connector_id: The Connector Id.
:type connector_id: str
:param connector_display_name: The Connector Display Name
:type connector_display_name: str
"""

_attribute_map = {
'connector_id': {'key': 'connectorId', 'type': 'str'},
'connector_display_name': {'key': 'connectorDisplayName', 'type': 'str'},
}

def __init__(self, *, connector_id: str=None, connector_display_name: str=None, **kwargs) -> None:
super(ConnectorMetadataDetails, self).__init__(**kwargs)
self.connector_id = connector_id
self.connector_display_name = connector_display_name
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# 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.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class ConnectorMetadata(Model):
"""Gets the list of connectors and run profile names.

:param connectors: The list of connectors.
:type connectors:
list[~azure.mgmt.adhybridhealthservice.models.ConnectorMetadataDetails]
:param run_profile_names: The list of run profile names.
:type run_profile_names: list[str]
"""

_attribute_map = {
'connectors': {'key': 'connectors', 'type': '[ConnectorMetadataDetails]'},
'run_profile_names': {'key': 'runProfileNames', 'type': '[str]'},
}

def __init__(self, *, connectors=None, run_profile_names=None, **kwargs) -> None:
super(ConnectorMetadata, self).__init__(**kwargs)
self.connectors = connectors
self.run_profile_names = run_profile_names
Original file line number Diff line number Diff line change
Expand Up @@ -936,3 +936,67 @@ def get_service_configuration(

return deserialized
get_service_configuration.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/services/{serviceName}/servicemembers/{serviceMemberId}/serviceconfiguration'}

def get_connector_metadata(
self, service_name, service_member_id, metric_name, custom_headers=None, raw=False, **operation_config):
"""Gets the list of connectors and run profile names.

:param service_name: The name of the service.
:type service_name: str
:param service_member_id: The service member id.
:type service_member_id: str
:param metric_name: The name of the metric.
:type metric_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<msrest:optionsforoperations>`.
:return: ConnectorMetadata or ClientRawResponse if raw=true
:rtype: ~azure.mgmt.adhybridhealthservice.models.ConnectorMetadata or
~msrest.pipeline.ClientRawResponse
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
"""
# Construct URL
url = self.get_connector_metadata.metadata['url']
path_format_arguments = {
'serviceName': self._serialize.url("service_name", service_name, 'str'),
'serviceMemberId': self._serialize.url("service_member_id", service_member_id, 'str'),
'metricName': self._serialize.url("metric_name", metric_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]:
exp = CloudError(response)
exp.request_id = response.headers.get('x-ms-request-id')
raise exp

deserialized = None

if response.status_code == 200:
deserialized = self._deserialize('ConnectorMetadata', response)

if raw:
client_raw_response = ClientRawResponse(deserialized, response)
return client_raw_response

return deserialized
get_connector_metadata.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/services/{serviceName}/servicemembers/{serviceMemberId}/metrics/{metricName}'}