Exemplo n.º 1
0
class MonitorClient(object):
    """Monitor Management Client.

    :ivar activity_logs: ActivityLogsOperations operations
    :vartype activity_logs: $(python-base-namespace).v2015_04_01.operations.ActivityLogsOperations
    :ivar autoscale_settings: AutoscaleSettingsOperations operations
    :vartype autoscale_settings: $(python-base-namespace).v2015_04_01.operations.AutoscaleSettingsOperations
    :ivar event_categories: EventCategoriesOperations operations
    :vartype event_categories: $(python-base-namespace).v2015_04_01.operations.EventCategoriesOperations
    :ivar operations: Operations operations
    :vartype operations: $(python-base-namespace).v2015_04_01.operations.Operations
    :ivar tenant_activity_logs: TenantActivityLogsOperations operations
    :vartype tenant_activity_logs: $(python-base-namespace).v2015_04_01.operations.TenantActivityLogsOperations
    :param credential: Credential needed for the client to connect to Azure.
    :type credential: ~azure.core.credentials.TokenCredential
    :param subscription_id: The Azure subscription Id.
    :type subscription_id: str
    :param str base_url: Service URL
    :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
    """
    def __init__(
            self,
            credential,  # type: "TokenCredential"
            subscription_id,  # type: str
            base_url=None,  # type: Optional[str]
            **kwargs  # type: Any
    ):
        # type: (...) -> None
        if not base_url:
            base_url = 'https://management.azure.com'
        self._config = MonitorClientConfiguration(credential, subscription_id,
                                                  **kwargs)
        self._client = ARMPipelineClient(base_url=base_url,
                                         config=self._config,
                                         **kwargs)

        client_models = {
            k: v
            for k, v in models.__dict__.items() if isinstance(v, type)
        }
        self._serialize = Serializer(client_models)
        self._deserialize = Deserializer(client_models)

        self.activity_logs = ActivityLogsOperations(self._client, self._config,
                                                    self._serialize,
                                                    self._deserialize)
        self.autoscale_settings = AutoscaleSettingsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.event_categories = EventCategoriesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.operations = Operations(self._client, self._config,
                                     self._serialize, self._deserialize)
        self.tenant_activity_logs = TenantActivityLogsOperations(
            self._client, self._config, self._serialize, self._deserialize)

    def close(self):
        # type: () -> None
        self._client.close()

    def __enter__(self):
        # type: () -> MonitorClient
        self._client.__enter__()
        return self

    def __exit__(self, *exc_details):
        # type: (Any) -> None
        self._client.__exit__(*exc_details)
class ContainerServiceClient:
    """The Container Service Client.

    :ivar operations: Operations operations
    :vartype operations: azure.mgmt.containerservice.v2019_06_01.operations.Operations
    :ivar managed_clusters: ManagedClustersOperations operations
    :vartype managed_clusters:
     azure.mgmt.containerservice.v2019_06_01.operations.ManagedClustersOperations
    :ivar agent_pools: AgentPoolsOperations operations
    :vartype agent_pools: azure.mgmt.containerservice.v2019_06_01.operations.AgentPoolsOperations
    :param credential: Credential needed for the client to connect to Azure.
    :type credential: ~azure.core.credentials.TokenCredential
    :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure
     subscription. The subscription ID forms part of the URI for every service call.
    :type subscription_id: str
    :param base_url: Service URL. Default value is "https://management.azure.com".
    :type base_url: str
    :keyword api_version: Api Version. Default value is "2019-06-01". Note that overriding this
     default value may result in unsupported behavior.
    :paramtype api_version: str
    :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
     Retry-After header is present.
    """
    def __init__(self,
                 credential: "TokenCredential",
                 subscription_id: str,
                 base_url: str = "https://management.azure.com",
                 **kwargs: Any) -> None:
        self._config = ContainerServiceClientConfiguration(
            credential=credential, subscription_id=subscription_id, **kwargs)
        self._client = ARMPipelineClient(base_url=base_url,
                                         config=self._config,
                                         **kwargs)

        client_models = {
            k: v
            for k, v in models.__dict__.items() if isinstance(v, type)
        }
        self._serialize = Serializer(client_models)
        self._deserialize = Deserializer(client_models)
        self._serialize.client_side_validation = False
        self.operations = Operations(self._client, self._config,
                                     self._serialize, self._deserialize)
        self.managed_clusters = ManagedClustersOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.agent_pools = AgentPoolsOperations(self._client, self._config,
                                                self._serialize,
                                                self._deserialize)

    def _send_request(self, request: HttpRequest,
                      **kwargs: Any) -> HttpResponse:
        """Runs the network request through the client's chained policies.

        >>> from azure.core.rest import HttpRequest
        >>> request = HttpRequest("GET", "https://www.example.org/")
        <HttpRequest [GET], url: 'https://www.example.org/'>
        >>> response = client._send_request(request)
        <HttpResponse: 200 OK>

        For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart

        :param request: The network request you want to make. Required.
        :type request: ~azure.core.rest.HttpRequest
        :keyword bool stream: Whether the response payload will be streamed. Defaults to False.
        :return: The response of your network call. Does not do error handling on your response.
        :rtype: ~azure.core.rest.HttpResponse
        """

        request_copy = deepcopy(request)
        request_copy.url = self._client.format_url(request_copy.url)
        return self._client.send_request(request_copy, **kwargs)

    def close(self):
        # type: () -> None
        self._client.close()

    def __enter__(self):
        # type: () -> ContainerServiceClient
        self._client.__enter__()
        return self

    def __exit__(self, *exc_details):
        # type: (Any) -> None
        self._client.__exit__(*exc_details)
Exemplo n.º 3
0
class MaintenanceManagementClient(object):
    """Azure Maintenance Management Client.

    :ivar public_maintenance_configurations: PublicMaintenanceConfigurationsOperations operations
    :vartype public_maintenance_configurations: azure.mgmt.maintenance.operations.PublicMaintenanceConfigurationsOperations
    :ivar apply_updates: ApplyUpdatesOperations operations
    :vartype apply_updates: azure.mgmt.maintenance.operations.ApplyUpdatesOperations
    :ivar configuration_assignments: ConfigurationAssignmentsOperations operations
    :vartype configuration_assignments: azure.mgmt.maintenance.operations.ConfigurationAssignmentsOperations
    :ivar maintenance_configurations: MaintenanceConfigurationsOperations operations
    :vartype maintenance_configurations: azure.mgmt.maintenance.operations.MaintenanceConfigurationsOperations
    :ivar maintenance_configurations_for_resource_group: MaintenanceConfigurationsForResourceGroupOperations operations
    :vartype maintenance_configurations_for_resource_group: azure.mgmt.maintenance.operations.MaintenanceConfigurationsForResourceGroupOperations
    :ivar apply_update_for_resource_group: ApplyUpdateForResourceGroupOperations operations
    :vartype apply_update_for_resource_group: azure.mgmt.maintenance.operations.ApplyUpdateForResourceGroupOperations
    :ivar operations: Operations operations
    :vartype operations: azure.mgmt.maintenance.operations.Operations
    :ivar updates: UpdatesOperations operations
    :vartype updates: azure.mgmt.maintenance.operations.UpdatesOperations
    :param credential: Credential needed for the client to connect to Azure.
    :type credential: ~azure.core.credentials.TokenCredential
    :param subscription_id: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
    :type subscription_id: str
    :param str base_url: Service URL
    """
    def __init__(
            self,
            credential,  # type: "TokenCredential"
            subscription_id,  # type: str
            base_url=None,  # type: Optional[str]
            **kwargs  # type: Any
    ):
        # type: (...) -> None
        if not base_url:
            base_url = 'https://management.azure.com'
        self._config = MaintenanceManagementClientConfiguration(
            credential, subscription_id, **kwargs)
        self._client = ARMPipelineClient(base_url=base_url,
                                         config=self._config,
                                         **kwargs)

        client_models = {
            k: v
            for k, v in models.__dict__.items() if isinstance(v, type)
        }
        self._serialize = Serializer(client_models)
        self._serialize.client_side_validation = False
        self._deserialize = Deserializer(client_models)

        self.public_maintenance_configurations = PublicMaintenanceConfigurationsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.apply_updates = ApplyUpdatesOperations(self._client, self._config,
                                                    self._serialize,
                                                    self._deserialize)
        self.configuration_assignments = ConfigurationAssignmentsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.maintenance_configurations = MaintenanceConfigurationsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.maintenance_configurations_for_resource_group = MaintenanceConfigurationsForResourceGroupOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.apply_update_for_resource_group = ApplyUpdateForResourceGroupOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.operations = Operations(self._client, self._config,
                                     self._serialize, self._deserialize)
        self.updates = UpdatesOperations(self._client, self._config,
                                         self._serialize, self._deserialize)

    def _send_request(self, http_request, **kwargs):
        # type: (HttpRequest, Any) -> HttpResponse
        """Runs the network request through the client's chained policies.

        :param http_request: The network request you want to make. Required.
        :type http_request: ~azure.core.pipeline.transport.HttpRequest
        :keyword bool stream: Whether the response payload will be streamed. Defaults to True.
        :return: The response of your network call. Does not do error handling on your response.
        :rtype: ~azure.core.pipeline.transport.HttpResponse
        """
        path_format_arguments = {
            'subscriptionId':
            self._serialize.url("self._config.subscription_id",
                                self._config.subscription_id, 'str'),
        }
        http_request.url = self._client.format_url(http_request.url,
                                                   **path_format_arguments)
        stream = kwargs.pop("stream", True)
        pipeline_response = self._client._pipeline.run(http_request,
                                                       stream=stream,
                                                       **kwargs)
        return pipeline_response.http_response

    def close(self):
        # type: () -> None
        self._client.close()

    def __enter__(self):
        # type: () -> MaintenanceManagementClient
        self._client.__enter__()
        return self

    def __exit__(self, *exc_details):
        # type: (Any) -> None
        self._client.__exit__(*exc_details)
class ContainerServiceClient(object):
    """The Container Service Client.

    :ivar operations: Operations operations
    :vartype operations: azure.mgmt.containerservice.v2020_11_01.operations.Operations
    :ivar managed_clusters: ManagedClustersOperations operations
    :vartype managed_clusters: azure.mgmt.containerservice.v2020_11_01.operations.ManagedClustersOperations
    :ivar agent_pools: AgentPoolsOperations operations
    :vartype agent_pools: azure.mgmt.containerservice.v2020_11_01.operations.AgentPoolsOperations
    :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations
    :vartype private_endpoint_connections: azure.mgmt.containerservice.v2020_11_01.operations.PrivateEndpointConnectionsOperations
    :ivar private_link_resources: PrivateLinkResourcesOperations operations
    :vartype private_link_resources: azure.mgmt.containerservice.v2020_11_01.operations.PrivateLinkResourcesOperations
    :ivar resolve_private_link_service_id: ResolvePrivateLinkServiceIdOperations operations
    :vartype resolve_private_link_service_id: azure.mgmt.containerservice.v2020_11_01.operations.ResolvePrivateLinkServiceIdOperations
    :param credential: Credential needed for the client to connect to Azure.
    :type credential: ~azure.core.credentials.TokenCredential
    :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
    :type subscription_id: str
    :param str base_url: Service URL
    :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
    """
    def __init__(
            self,
            credential,  # type: "TokenCredential"
            subscription_id,  # type: str
            base_url=None,  # type: Optional[str]
            **kwargs  # type: Any
    ):
        # type: (...) -> None
        if not base_url:
            base_url = 'https://management.azure.com'
        self._config = ContainerServiceClientConfiguration(
            credential, subscription_id, **kwargs)
        self._client = ARMPipelineClient(base_url=base_url,
                                         config=self._config,
                                         **kwargs)

        client_models = {
            k: v
            for k, v in models.__dict__.items() if isinstance(v, type)
        }
        self._serialize = Serializer(client_models)
        self._serialize.client_side_validation = False
        self._deserialize = Deserializer(client_models)

        self.operations = Operations(self._client, self._config,
                                     self._serialize, self._deserialize)
        self.managed_clusters = ManagedClustersOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.agent_pools = AgentPoolsOperations(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)
        self.resolve_private_link_service_id = ResolvePrivateLinkServiceIdOperations(
            self._client, self._config, self._serialize, self._deserialize)

    def close(self):
        # type: () -> None
        self._client.close()

    def __enter__(self):
        # type: () -> ContainerServiceClient
        self._client.__enter__()
        return self

    def __exit__(self, *exc_details):
        # type: (Any) -> None
        self._client.__exit__(*exc_details)
Exemplo n.º 5
0
class WebSiteManagementClient:
    """WebSite Management Client.

    :ivar certificates: CertificatesOperations operations
    :vartype certificates: azure.mgmt.web.v2018_11_01.operations.CertificatesOperations
    :param credential: Credential needed for the client to connect to Azure.
    :type credential: ~azure.core.credentials.TokenCredential
    :param subscription_id: Your Azure subscription ID. This is a GUID-formatted string (e.g.
     00000000-0000-0000-0000-000000000000).
    :type subscription_id: str
    :param base_url: Service URL. Default value is 'https://management.azure.com'.
    :type base_url: str
    """
    def __init__(self,
                 credential: "TokenCredential",
                 subscription_id: str,
                 base_url: str = "https://management.azure.com",
                 **kwargs: Any) -> None:
        self._config = WebSiteManagementClientConfiguration(
            credential=credential, subscription_id=subscription_id, **kwargs)
        self._client = ARMPipelineClient(base_url=base_url,
                                         config=self._config,
                                         **kwargs)

        client_models = {
            k: v
            for k, v in models.__dict__.items() if isinstance(v, type)
        }
        self._serialize = Serializer(client_models)
        self._deserialize = Deserializer(client_models)
        self._serialize.client_side_validation = False
        self.certificates = CertificatesOperations(self._client, self._config,
                                                   self._serialize,
                                                   self._deserialize)

    def _send_request(
            self,
            request,  # type: HttpRequest
            **kwargs: Any) -> HttpResponse:
        """Runs the network request through the client's chained policies.

        >>> from azure.core.rest import HttpRequest
        >>> request = HttpRequest("GET", "https://www.example.org/")
        <HttpRequest [GET], url: 'https://www.example.org/'>
        >>> response = client._send_request(request)
        <HttpResponse: 200 OK>

        For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart

        :param request: The network request you want to make. Required.
        :type request: ~azure.core.rest.HttpRequest
        :keyword bool stream: Whether the response payload will be streamed. Defaults to False.
        :return: The response of your network call. Does not do error handling on your response.
        :rtype: ~azure.core.rest.HttpResponse
        """

        request_copy = deepcopy(request)
        request_copy.url = self._client.format_url(request_copy.url)
        return self._client.send_request(request_copy, **kwargs)

    def close(self):
        # type: () -> None
        self._client.close()

    def __enter__(self):
        # type: () -> WebSiteManagementClient
        self._client.__enter__()
        return self

    def __exit__(self, *exc_details):
        # type: (Any) -> None
        self._client.__exit__(*exc_details)
class StreamAnalyticsManagementClient(object):
    """Stream Analytics Client.

    :ivar operations: Operations operations
    :vartype operations: stream_analytics_management_client.operations.Operations
    :ivar streaming_jobs: StreamingJobsOperations operations
    :vartype streaming_jobs: stream_analytics_management_client.operations.StreamingJobsOperations
    :ivar inputs: InputsOperations operations
    :vartype inputs: stream_analytics_management_client.operations.InputsOperations
    :ivar outputs: OutputsOperations operations
    :vartype outputs: stream_analytics_management_client.operations.OutputsOperations
    :ivar transformations: TransformationsOperations operations
    :vartype transformations: stream_analytics_management_client.operations.TransformationsOperations
    :ivar functions: FunctionsOperations operations
    :vartype functions: stream_analytics_management_client.operations.FunctionsOperations
    :ivar subscriptions: SubscriptionsOperations operations
    :vartype subscriptions: stream_analytics_management_client.operations.SubscriptionsOperations
    :ivar clusters: ClustersOperations operations
    :vartype clusters: stream_analytics_management_client.operations.ClustersOperations
    :ivar private_endpoints: PrivateEndpointsOperations operations
    :vartype private_endpoints: stream_analytics_management_client.operations.PrivateEndpointsOperations
    :param credential: Credential needed for the client to connect to Azure.
    :type credential: ~azure.core.credentials.TokenCredential
    :param subscription_id: The ID of the target subscription.
    :type subscription_id: str
    :param str base_url: Service URL
    :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
    """
    def __init__(
            self,
            credential,  # type: "TokenCredential"
            subscription_id,  # type: str
            base_url=None,  # type: Optional[str]
            **kwargs  # type: Any
    ):
        # type: (...) -> None
        if not base_url:
            base_url = 'https://management.azure.com'
        self._config = StreamAnalyticsManagementClientConfiguration(
            credential, subscription_id, **kwargs)
        self._client = ARMPipelineClient(base_url=base_url,
                                         config=self._config,
                                         **kwargs)

        client_models = {
            k: v
            for k, v in models.__dict__.items() if isinstance(v, type)
        }
        self._serialize = Serializer(client_models)
        self._serialize.client_side_validation = False
        self._deserialize = Deserializer(client_models)

        self.operations = Operations(self._client, self._config,
                                     self._serialize, self._deserialize)
        self.streaming_jobs = StreamingJobsOperations(self._client,
                                                      self._config,
                                                      self._serialize,
                                                      self._deserialize)
        self.inputs = InputsOperations(self._client, self._config,
                                       self._serialize, self._deserialize)
        self.outputs = OutputsOperations(self._client, self._config,
                                         self._serialize, self._deserialize)
        self.transformations = TransformationsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.functions = FunctionsOperations(self._client, self._config,
                                             self._serialize,
                                             self._deserialize)
        self.subscriptions = SubscriptionsOperations(self._client,
                                                     self._config,
                                                     self._serialize,
                                                     self._deserialize)
        self.clusters = ClustersOperations(self._client, self._config,
                                           self._serialize, self._deserialize)
        self.private_endpoints = PrivateEndpointsOperations(
            self._client, self._config, self._serialize, self._deserialize)

    def close(self):
        # type: () -> None
        self._client.close()

    def __enter__(self):
        # type: () -> StreamAnalyticsManagementClient
        self._client.__enter__()
        return self

    def __exit__(self, *exc_details):
        # type: (Any) -> None
        self._client.__exit__(*exc_details)
class DataFactoryManagementClient(object):
    """The Azure Data Factory V2 management API provides a RESTful set of web services that interact with Azure Data Factory V2 services.

    :ivar operation: OperationOperations operations
    :vartype operation: data_factory_management_client.operations.OperationOperations
    :ivar factory: FactoryOperations operations
    :vartype factory: data_factory_management_client.operations.FactoryOperations
    :ivar exposure_control: ExposureControlOperations operations
    :vartype exposure_control: data_factory_management_client.operations.ExposureControlOperations
    :ivar integration_runtime: IntegrationRuntimeOperations operations
    :vartype integration_runtime: data_factory_management_client.operations.IntegrationRuntimeOperations
    :ivar integration_runtime_object_metadata: IntegrationRuntimeObjectMetadataOperations operations
    :vartype integration_runtime_object_metadata: data_factory_management_client.operations.IntegrationRuntimeObjectMetadataOperations
    :ivar integration_runtime_node: IntegrationRuntimeNodeOperations operations
    :vartype integration_runtime_node: data_factory_management_client.operations.IntegrationRuntimeNodeOperations
    :ivar linked_service: LinkedServiceOperations operations
    :vartype linked_service: data_factory_management_client.operations.LinkedServiceOperations
    :ivar dataset: DatasetOperations operations
    :vartype dataset: data_factory_management_client.operations.DatasetOperations
    :ivar pipeline: PipelineOperations operations
    :vartype pipeline: data_factory_management_client.operations.PipelineOperations
    :ivar pipeline_run: PipelineRunOperations operations
    :vartype pipeline_run: data_factory_management_client.operations.PipelineRunOperations
    :ivar activity_run: ActivityRunOperations operations
    :vartype activity_run: data_factory_management_client.operations.ActivityRunOperations
    :ivar trigger: TriggerOperations operations
    :vartype trigger: data_factory_management_client.operations.TriggerOperations
    :ivar trigger_run: TriggerRunOperations operations
    :vartype trigger_run: data_factory_management_client.operations.TriggerRunOperations
    :ivar data_flow: DataFlowOperations operations
    :vartype data_flow: data_factory_management_client.operations.DataFlowOperations
    :ivar data_flow_debug_session: DataFlowDebugSessionOperations operations
    :vartype data_flow_debug_session: data_factory_management_client.operations.DataFlowDebugSessionOperations
    :ivar managed_virtual_network: ManagedVirtualNetworkOperations operations
    :vartype managed_virtual_network: data_factory_management_client.operations.ManagedVirtualNetworkOperations
    :ivar managed_private_endpoint: ManagedPrivateEndpointOperations operations
    :vartype managed_private_endpoint: data_factory_management_client.operations.ManagedPrivateEndpointOperations
    :param credential: Credential needed for the client to connect to Azure.
    :type credential: ~azure.core.credentials.TokenCredential
    :param subscription_id: The subscription identifier.
    :type subscription_id: str
    :param str base_url: Service URL
    :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
    """
    def __init__(
            self,
            credential,  # type: "TokenCredential"
            subscription_id,  # type: str
            base_url=None,  # type: Optional[str]
            **kwargs  # type: Any
    ):
        # type: (...) -> None
        if not base_url:
            base_url = 'https://management.azure.com'
        self._config = DataFactoryManagementClientConfiguration(
            credential, subscription_id, **kwargs)
        self._client = ARMPipelineClient(base_url=base_url,
                                         config=self._config,
                                         **kwargs)

        client_models = {
            k: v
            for k, v in models.__dict__.items() if isinstance(v, type)
        }
        self._serialize = Serializer(client_models)
        self._deserialize = Deserializer(client_models)

        self.operation = OperationOperations(self._client, self._config,
                                             self._serialize,
                                             self._deserialize)
        self.factory = FactoryOperations(self._client, self._config,
                                         self._serialize, self._deserialize)
        self.exposure_control = ExposureControlOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.integration_runtime = IntegrationRuntimeOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.integration_runtime_object_metadata = IntegrationRuntimeObjectMetadataOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.integration_runtime_node = IntegrationRuntimeNodeOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.linked_service = LinkedServiceOperations(self._client,
                                                      self._config,
                                                      self._serialize,
                                                      self._deserialize)
        self.dataset = DatasetOperations(self._client, self._config,
                                         self._serialize, self._deserialize)
        self.pipeline = PipelineOperations(self._client, self._config,
                                           self._serialize, self._deserialize)
        self.pipeline_run = PipelineRunOperations(self._client, self._config,
                                                  self._serialize,
                                                  self._deserialize)
        self.activity_run = ActivityRunOperations(self._client, self._config,
                                                  self._serialize,
                                                  self._deserialize)
        self.trigger = TriggerOperations(self._client, self._config,
                                         self._serialize, self._deserialize)
        self.trigger_run = TriggerRunOperations(self._client, self._config,
                                                self._serialize,
                                                self._deserialize)
        self.data_flow = DataFlowOperations(self._client, self._config,
                                            self._serialize, self._deserialize)
        self.data_flow_debug_session = DataFlowDebugSessionOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.managed_virtual_network = ManagedVirtualNetworkOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.managed_private_endpoint = ManagedPrivateEndpointOperations(
            self._client, self._config, self._serialize, self._deserialize)

    def close(self):
        # type: () -> None
        self._client.close()

    def __enter__(self):
        # type: () -> DataFactoryManagementClient
        self._client.__enter__()
        return self

    def __exit__(self, *exc_details):
        # type: (Any) -> None
        self._client.__exit__(*exc_details)
class DnsResolverManagementClient:
    """The DNS Resolver Management Client.

    :ivar dns_resolvers: DnsResolversOperations operations
    :vartype dns_resolvers: dns_resolver_management_client.operations.DnsResolversOperations
    :ivar inbound_endpoints: InboundEndpointsOperations operations
    :vartype inbound_endpoints:
     dns_resolver_management_client.operations.InboundEndpointsOperations
    :ivar outbound_endpoints: OutboundEndpointsOperations operations
    :vartype outbound_endpoints:
     dns_resolver_management_client.operations.OutboundEndpointsOperations
    :ivar dns_forwarding_rulesets: DnsForwardingRulesetsOperations operations
    :vartype dns_forwarding_rulesets:
     dns_resolver_management_client.operations.DnsForwardingRulesetsOperations
    :ivar forwarding_rules: ForwardingRulesOperations operations
    :vartype forwarding_rules: dns_resolver_management_client.operations.ForwardingRulesOperations
    :ivar virtual_network_links: VirtualNetworkLinksOperations operations
    :vartype virtual_network_links:
     dns_resolver_management_client.operations.VirtualNetworkLinksOperations
    :param credential: Credential needed for the client to connect to Azure.
    :type credential: ~azure.core.credentials.TokenCredential
    :param subscription_id: The ID of the target subscription.
    :type subscription_id: str
    :param base_url: Service URL. Default value is 'https://management.azure.com'.
    :type base_url: str
    :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
     Retry-After header is present.
    """

    def __init__(
        self,
        credential: "TokenCredential",
        subscription_id: str,
        base_url: str = "https://management.azure.com",
        **kwargs: Any
    ) -> None:
        self._config = DnsResolverManagementClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs)
        self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)

        client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
        self._serialize = Serializer(client_models)
        self._deserialize = Deserializer(client_models)
        self._serialize.client_side_validation = False
        self.dns_resolvers = DnsResolversOperations(self._client, self._config, self._serialize, self._deserialize)
        self.inbound_endpoints = InboundEndpointsOperations(self._client, self._config, self._serialize, self._deserialize)
        self.outbound_endpoints = OutboundEndpointsOperations(self._client, self._config, self._serialize, self._deserialize)
        self.dns_forwarding_rulesets = DnsForwardingRulesetsOperations(self._client, self._config, self._serialize, self._deserialize)
        self.forwarding_rules = ForwardingRulesOperations(self._client, self._config, self._serialize, self._deserialize)
        self.virtual_network_links = VirtualNetworkLinksOperations(self._client, self._config, self._serialize, self._deserialize)


    def _send_request(
        self,
        request,  # type: HttpRequest
        **kwargs: Any
    ) -> HttpResponse:
        """Runs the network request through the client's chained policies.

        >>> from azure.core.rest import HttpRequest
        >>> request = HttpRequest("GET", "https://www.example.org/")
        <HttpRequest [GET], url: 'https://www.example.org/'>
        >>> response = client._send_request(request)
        <HttpResponse: 200 OK>

        For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart

        :param request: The network request you want to make. Required.
        :type request: ~azure.core.rest.HttpRequest
        :keyword bool stream: Whether the response payload will be streamed. Defaults to False.
        :return: The response of your network call. Does not do error handling on your response.
        :rtype: ~azure.core.rest.HttpResponse
        """

        request_copy = deepcopy(request)
        request_copy.url = self._client.format_url(request_copy.url)
        return self._client.send_request(request_copy, **kwargs)

    def close(self):
        # type: () -> None
        self._client.close()

    def __enter__(self):
        # type: () -> DnsResolverManagementClient
        self._client.__enter__()
        return self

    def __exit__(self, *exc_details):
        # type: (Any) -> None
        self._client.__exit__(*exc_details)
class AppPlatformManagementClient(object):
    """REST API for Azure Spring Cloud.

    :ivar services: ServicesOperations operations
    :vartype services: azure.mgmt.appplatform.v2020_07_01.operations.ServicesOperations
    :ivar config_servers: ConfigServersOperations operations
    :vartype config_servers: azure.mgmt.appplatform.v2020_07_01.operations.ConfigServersOperations
    :ivar monitoring_settings: MonitoringSettingsOperations operations
    :vartype monitoring_settings: azure.mgmt.appplatform.v2020_07_01.operations.MonitoringSettingsOperations
    :ivar apps: AppsOperations operations
    :vartype apps: azure.mgmt.appplatform.v2020_07_01.operations.AppsOperations
    :ivar bindings: BindingsOperations operations
    :vartype bindings: azure.mgmt.appplatform.v2020_07_01.operations.BindingsOperations
    :ivar certificates: CertificatesOperations operations
    :vartype certificates: azure.mgmt.appplatform.v2020_07_01.operations.CertificatesOperations
    :ivar custom_domains: CustomDomainsOperations operations
    :vartype custom_domains: azure.mgmt.appplatform.v2020_07_01.operations.CustomDomainsOperations
    :ivar deployments: DeploymentsOperations operations
    :vartype deployments: azure.mgmt.appplatform.v2020_07_01.operations.DeploymentsOperations
    :ivar operations: Operations operations
    :vartype operations: azure.mgmt.appplatform.v2020_07_01.operations.Operations
    :ivar runtime_versions: RuntimeVersionsOperations operations
    :vartype runtime_versions: azure.mgmt.appplatform.v2020_07_01.operations.RuntimeVersionsOperations
    :ivar skus: SkusOperations operations
    :vartype skus: azure.mgmt.appplatform.v2020_07_01.operations.SkusOperations
    :param credential: Credential needed for the client to connect to Azure.
    :type credential: ~azure.core.credentials.TokenCredential
    :param subscription_id: Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
    :type subscription_id: str
    :param str base_url: Service URL
    :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
    """
    def __init__(
            self,
            credential,  # type: "TokenCredential"
            subscription_id,  # type: str
            base_url=None,  # type: Optional[str]
            **kwargs  # type: Any
    ):
        # type: (...) -> None
        if not base_url:
            base_url = 'https://management.azure.com'
        self._config = AppPlatformManagementClientConfiguration(
            credential, subscription_id, **kwargs)
        self._client = ARMPipelineClient(base_url=base_url,
                                         config=self._config,
                                         **kwargs)

        client_models = {
            k: v
            for k, v in models.__dict__.items() if isinstance(v, type)
        }
        self._serialize = Serializer(client_models)
        self._serialize.client_side_validation = False
        self._deserialize = Deserializer(client_models)

        self.services = ServicesOperations(self._client, self._config,
                                           self._serialize, self._deserialize)
        self.config_servers = ConfigServersOperations(self._client,
                                                      self._config,
                                                      self._serialize,
                                                      self._deserialize)
        self.monitoring_settings = MonitoringSettingsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.apps = AppsOperations(self._client, self._config, self._serialize,
                                   self._deserialize)
        self.bindings = BindingsOperations(self._client, self._config,
                                           self._serialize, self._deserialize)
        self.certificates = CertificatesOperations(self._client, self._config,
                                                   self._serialize,
                                                   self._deserialize)
        self.custom_domains = CustomDomainsOperations(self._client,
                                                      self._config,
                                                      self._serialize,
                                                      self._deserialize)
        self.deployments = DeploymentsOperations(self._client, self._config,
                                                 self._serialize,
                                                 self._deserialize)
        self.operations = Operations(self._client, self._config,
                                     self._serialize, self._deserialize)
        self.runtime_versions = RuntimeVersionsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.skus = SkusOperations(self._client, self._config, self._serialize,
                                   self._deserialize)

    def _send_request(self, http_request, **kwargs):
        # type: (HttpRequest, Any) -> HttpResponse
        """Runs the network request through the client's chained policies.

        :param http_request: The network request you want to make. Required.
        :type http_request: ~azure.core.pipeline.transport.HttpRequest
        :keyword bool stream: Whether the response payload will be streamed. Defaults to True.
        :return: The response of your network call. Does not do error handling on your response.
        :rtype: ~azure.core.pipeline.transport.HttpResponse
        """
        path_format_arguments = {
            'subscriptionId':
            self._serialize.url("self._config.subscription_id",
                                self._config.subscription_id, 'str'),
        }
        http_request.url = self._client.format_url(http_request.url,
                                                   **path_format_arguments)
        stream = kwargs.pop("stream", True)
        pipeline_response = self._client._pipeline.run(http_request,
                                                       stream=stream,
                                                       **kwargs)
        return pipeline_response.http_response

    def close(self):
        # type: () -> None
        self._client.close()

    def __enter__(self):
        # type: () -> AppPlatformManagementClient
        self._client.__enter__()
        return self

    def __exit__(self, *exc_details):
        # type: (Any) -> None
        self._client.__exit__(*exc_details)
Exemplo n.º 10
0
class MonitorClient(object):
    """Monitor Management Client.

    :ivar alert_rule_incidents: AlertRuleIncidentsOperations operations
    :vartype alert_rule_incidents: $(python-base-namespace).v2016_03_01.operations.AlertRuleIncidentsOperations
    :ivar alert_rules: AlertRulesOperations operations
    :vartype alert_rules: $(python-base-namespace).v2016_03_01.operations.AlertRulesOperations
    :ivar log_profiles: LogProfilesOperations operations
    :vartype log_profiles: $(python-base-namespace).v2016_03_01.operations.LogProfilesOperations
    :ivar metric_definitions: MetricDefinitionsOperations operations
    :vartype metric_definitions: $(python-base-namespace).v2016_03_01.operations.MetricDefinitionsOperations
    :param credential: Credential needed for the client to connect to Azure.
    :type credential: ~azure.core.credentials.TokenCredential
    :param subscription_id: The Azure subscription Id.
    :type subscription_id: str
    :param str base_url: Service URL
    """
    def __init__(
            self,
            credential,  # type: "TokenCredential"
            subscription_id,  # type: str
            base_url=None,  # type: Optional[str]
            **kwargs  # type: Any
    ):
        # type: (...) -> None
        if not base_url:
            base_url = 'https://management.azure.com'
        self._config = MonitorClientConfiguration(credential, subscription_id,
                                                  **kwargs)
        self._client = ARMPipelineClient(base_url=base_url,
                                         config=self._config,
                                         **kwargs)

        client_models = {
            k: v
            for k, v in models.__dict__.items() if isinstance(v, type)
        }
        self._serialize = Serializer(client_models)
        self._serialize.client_side_validation = False
        self._deserialize = Deserializer(client_models)

        self.alert_rule_incidents = AlertRuleIncidentsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.alert_rules = AlertRulesOperations(self._client, self._config,
                                                self._serialize,
                                                self._deserialize)
        self.log_profiles = LogProfilesOperations(self._client, self._config,
                                                  self._serialize,
                                                  self._deserialize)
        self.metric_definitions = MetricDefinitionsOperations(
            self._client, self._config, self._serialize, self._deserialize)

    def close(self):
        # type: () -> None
        self._client.close()

    def __enter__(self):
        # type: () -> MonitorClient
        self._client.__enter__()
        return self

    def __exit__(self, *exc_details):
        # type: (Any) -> None
        self._client.__exit__(*exc_details)
Exemplo n.º 11
0
class ContainerServiceClient(object):
    """The Container Service Client.

    :ivar operations: Operations operations
    :vartype operations: azure.mgmt.containerservice.v2020_12_01.operations.Operations
    :ivar managed_clusters: ManagedClustersOperations operations
    :vartype managed_clusters: azure.mgmt.containerservice.v2020_12_01.operations.ManagedClustersOperations
    :ivar maintenance_configurations: MaintenanceConfigurationsOperations operations
    :vartype maintenance_configurations: azure.mgmt.containerservice.v2020_12_01.operations.MaintenanceConfigurationsOperations
    :ivar agent_pools: AgentPoolsOperations operations
    :vartype agent_pools: azure.mgmt.containerservice.v2020_12_01.operations.AgentPoolsOperations
    :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations
    :vartype private_endpoint_connections: azure.mgmt.containerservice.v2020_12_01.operations.PrivateEndpointConnectionsOperations
    :ivar private_link_resources: PrivateLinkResourcesOperations operations
    :vartype private_link_resources: azure.mgmt.containerservice.v2020_12_01.operations.PrivateLinkResourcesOperations
    :ivar resolve_private_link_service_id: ResolvePrivateLinkServiceIdOperations operations
    :vartype resolve_private_link_service_id: azure.mgmt.containerservice.v2020_12_01.operations.ResolvePrivateLinkServiceIdOperations
    :param credential: Credential needed for the client to connect to Azure.
    :type credential: ~azure.core.credentials.TokenCredential
    :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
    :type subscription_id: str
    :param str base_url: Service URL
    :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
    """

    def __init__(
        self,
        credential,  # type: "TokenCredential"
        subscription_id,  # type: str
        base_url=None,  # type: Optional[str]
        **kwargs  # type: Any
    ):
        # type: (...) -> None
        if not base_url:
            base_url = 'https://management.azure.com'
        self._config = ContainerServiceClientConfiguration(credential, subscription_id, **kwargs)
        self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)

        client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
        self._serialize = Serializer(client_models)
        self._serialize.client_side_validation = False
        self._deserialize = Deserializer(client_models)

        self.operations = Operations(
            self._client, self._config, self._serialize, self._deserialize)
        self.managed_clusters = ManagedClustersOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.maintenance_configurations = MaintenanceConfigurationsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.agent_pools = AgentPoolsOperations(
            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)
        self.resolve_private_link_service_id = ResolvePrivateLinkServiceIdOperations(
            self._client, self._config, self._serialize, self._deserialize)

    def _send_request(self, http_request, **kwargs):
        # type: (HttpRequest, Any) -> HttpResponse
        """Runs the network request through the client's chained policies.

        :param http_request: The network request you want to make. Required.
        :type http_request: ~azure.core.pipeline.transport.HttpRequest
        :keyword bool stream: Whether the response payload will be streamed. Defaults to True.
        :return: The response of your network call. Does not do error handling on your response.
        :rtype: ~azure.core.pipeline.transport.HttpResponse
        """
        path_format_arguments = {
            'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
        }
        http_request.url = self._client.format_url(http_request.url, **path_format_arguments)
        stream = kwargs.pop("stream", True)
        pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs)
        return pipeline_response.http_response

    def close(self):
        # type: () -> None
        self._client.close()

    def __enter__(self):
        # type: () -> ContainerServiceClient
        self._client.__enter__()
        return self

    def __exit__(self, *exc_details):
        # type: (Any) -> None
        self._client.__exit__(*exc_details)
class StorageManagementClient:
    """The Azure Storage Management API.

    :ivar operations: Operations operations
    :vartype operations: azure.mgmt.storage.v2021_09_01.operations.Operations
    :ivar skus: SkusOperations operations
    :vartype skus: azure.mgmt.storage.v2021_09_01.operations.SkusOperations
    :ivar storage_accounts: StorageAccountsOperations operations
    :vartype storage_accounts: azure.mgmt.storage.v2021_09_01.operations.StorageAccountsOperations
    :ivar deleted_accounts: DeletedAccountsOperations operations
    :vartype deleted_accounts: azure.mgmt.storage.v2021_09_01.operations.DeletedAccountsOperations
    :ivar usages: UsagesOperations operations
    :vartype usages: azure.mgmt.storage.v2021_09_01.operations.UsagesOperations
    :ivar management_policies: ManagementPoliciesOperations operations
    :vartype management_policies:
     azure.mgmt.storage.v2021_09_01.operations.ManagementPoliciesOperations
    :ivar blob_inventory_policies: BlobInventoryPoliciesOperations operations
    :vartype blob_inventory_policies:
     azure.mgmt.storage.v2021_09_01.operations.BlobInventoryPoliciesOperations
    :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations
    :vartype private_endpoint_connections:
     azure.mgmt.storage.v2021_09_01.operations.PrivateEndpointConnectionsOperations
    :ivar private_link_resources: PrivateLinkResourcesOperations operations
    :vartype private_link_resources:
     azure.mgmt.storage.v2021_09_01.operations.PrivateLinkResourcesOperations
    :ivar object_replication_policies: ObjectReplicationPoliciesOperations operations
    :vartype object_replication_policies:
     azure.mgmt.storage.v2021_09_01.operations.ObjectReplicationPoliciesOperations
    :ivar local_users: LocalUsersOperations operations
    :vartype local_users: azure.mgmt.storage.v2021_09_01.operations.LocalUsersOperations
    :ivar encryption_scopes: EncryptionScopesOperations operations
    :vartype encryption_scopes:
     azure.mgmt.storage.v2021_09_01.operations.EncryptionScopesOperations
    :ivar blob_services: BlobServicesOperations operations
    :vartype blob_services: azure.mgmt.storage.v2021_09_01.operations.BlobServicesOperations
    :ivar blob_containers: BlobContainersOperations operations
    :vartype blob_containers: azure.mgmt.storage.v2021_09_01.operations.BlobContainersOperations
    :ivar file_services: FileServicesOperations operations
    :vartype file_services: azure.mgmt.storage.v2021_09_01.operations.FileServicesOperations
    :ivar file_shares: FileSharesOperations operations
    :vartype file_shares: azure.mgmt.storage.v2021_09_01.operations.FileSharesOperations
    :ivar queue_services: QueueServicesOperations operations
    :vartype queue_services: azure.mgmt.storage.v2021_09_01.operations.QueueServicesOperations
    :ivar queue: QueueOperations operations
    :vartype queue: azure.mgmt.storage.v2021_09_01.operations.QueueOperations
    :ivar table_services: TableServicesOperations operations
    :vartype table_services: azure.mgmt.storage.v2021_09_01.operations.TableServicesOperations
    :ivar table: TableOperations operations
    :vartype table: azure.mgmt.storage.v2021_09_01.operations.TableOperations
    :param credential: Credential needed for the client to connect to Azure.
    :type credential: ~azure.core.credentials.TokenCredential
    :param subscription_id: The ID of the target subscription.
    :type subscription_id: str
    :param base_url: Service URL. Default value is 'https://management.azure.com'.
    :type base_url: str
    :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
     Retry-After header is present.
    """
    def __init__(self,
                 credential: "TokenCredential",
                 subscription_id: str,
                 base_url: str = "https://management.azure.com",
                 **kwargs: Any) -> None:
        self._config = StorageManagementClientConfiguration(
            credential=credential, subscription_id=subscription_id, **kwargs)
        self._client = ARMPipelineClient(base_url=base_url,
                                         config=self._config,
                                         **kwargs)

        client_models = {
            k: v
            for k, v in models.__dict__.items() if isinstance(v, type)
        }
        self._serialize = Serializer(client_models)
        self._deserialize = Deserializer(client_models)
        self._serialize.client_side_validation = False
        self.operations = Operations(self._client, self._config,
                                     self._serialize, self._deserialize)
        self.skus = SkusOperations(self._client, self._config, self._serialize,
                                   self._deserialize)
        self.storage_accounts = StorageAccountsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.deleted_accounts = DeletedAccountsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.usages = UsagesOperations(self._client, self._config,
                                       self._serialize, self._deserialize)
        self.management_policies = ManagementPoliciesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.blob_inventory_policies = BlobInventoryPoliciesOperations(
            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)
        self.object_replication_policies = ObjectReplicationPoliciesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.local_users = LocalUsersOperations(self._client, self._config,
                                                self._serialize,
                                                self._deserialize)
        self.encryption_scopes = EncryptionScopesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.blob_services = BlobServicesOperations(self._client, self._config,
                                                    self._serialize,
                                                    self._deserialize)
        self.blob_containers = BlobContainersOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.file_services = FileServicesOperations(self._client, self._config,
                                                    self._serialize,
                                                    self._deserialize)
        self.file_shares = FileSharesOperations(self._client, self._config,
                                                self._serialize,
                                                self._deserialize)
        self.queue_services = QueueServicesOperations(self._client,
                                                      self._config,
                                                      self._serialize,
                                                      self._deserialize)
        self.queue = QueueOperations(self._client, self._config,
                                     self._serialize, self._deserialize)
        self.table_services = TableServicesOperations(self._client,
                                                      self._config,
                                                      self._serialize,
                                                      self._deserialize)
        self.table = TableOperations(self._client, self._config,
                                     self._serialize, self._deserialize)

    def _send_request(
            self,
            request,  # type: HttpRequest
            **kwargs: Any) -> HttpResponse:
        """Runs the network request through the client's chained policies.

        >>> from azure.core.rest import HttpRequest
        >>> request = HttpRequest("GET", "https://www.example.org/")
        <HttpRequest [GET], url: 'https://www.example.org/'>
        >>> response = client._send_request(request)
        <HttpResponse: 200 OK>

        For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart

        :param request: The network request you want to make. Required.
        :type request: ~azure.core.rest.HttpRequest
        :keyword bool stream: Whether the response payload will be streamed. Defaults to False.
        :return: The response of your network call. Does not do error handling on your response.
        :rtype: ~azure.core.rest.HttpResponse
        """

        request_copy = deepcopy(request)
        request_copy.url = self._client.format_url(request_copy.url)
        return self._client.send_request(request_copy, **kwargs)

    def close(self):
        # type: () -> None
        self._client.close()

    def __enter__(self):
        # type: () -> StorageManagementClient
        self._client.__enter__()
        return self

    def __exit__(self, *exc_details):
        # type: (Any) -> None
        self._client.__exit__(*exc_details)
Exemplo n.º 13
0
class ComputeManagementClient:  # pylint: disable=too-many-instance-attributes
    """Compute Client.

    :ivar operations: Operations operations
    :vartype operations: azure.mgmt.compute.v2017_12_01.operations.Operations
    :ivar availability_sets: AvailabilitySetsOperations operations
    :vartype availability_sets:
     azure.mgmt.compute.v2017_12_01.operations.AvailabilitySetsOperations
    :ivar virtual_machine_extension_images: VirtualMachineExtensionImagesOperations operations
    :vartype virtual_machine_extension_images:
     azure.mgmt.compute.v2017_12_01.operations.VirtualMachineExtensionImagesOperations
    :ivar virtual_machine_extensions: VirtualMachineExtensionsOperations operations
    :vartype virtual_machine_extensions:
     azure.mgmt.compute.v2017_12_01.operations.VirtualMachineExtensionsOperations
    :ivar virtual_machines: VirtualMachinesOperations operations
    :vartype virtual_machines: azure.mgmt.compute.v2017_12_01.operations.VirtualMachinesOperations
    :ivar virtual_machine_images: VirtualMachineImagesOperations operations
    :vartype virtual_machine_images:
     azure.mgmt.compute.v2017_12_01.operations.VirtualMachineImagesOperations
    :ivar usage: UsageOperations operations
    :vartype usage: azure.mgmt.compute.v2017_12_01.operations.UsageOperations
    :ivar virtual_machine_sizes: VirtualMachineSizesOperations operations
    :vartype virtual_machine_sizes:
     azure.mgmt.compute.v2017_12_01.operations.VirtualMachineSizesOperations
    :ivar images: ImagesOperations operations
    :vartype images: azure.mgmt.compute.v2017_12_01.operations.ImagesOperations
    :ivar virtual_machine_scale_sets: VirtualMachineScaleSetsOperations operations
    :vartype virtual_machine_scale_sets:
     azure.mgmt.compute.v2017_12_01.operations.VirtualMachineScaleSetsOperations
    :ivar virtual_machine_scale_set_extensions: VirtualMachineScaleSetExtensionsOperations
     operations
    :vartype virtual_machine_scale_set_extensions:
     azure.mgmt.compute.v2017_12_01.operations.VirtualMachineScaleSetExtensionsOperations
    :ivar virtual_machine_scale_set_rolling_upgrades:
     VirtualMachineScaleSetRollingUpgradesOperations operations
    :vartype virtual_machine_scale_set_rolling_upgrades:
     azure.mgmt.compute.v2017_12_01.operations.VirtualMachineScaleSetRollingUpgradesOperations
    :ivar virtual_machine_scale_set_vms: VirtualMachineScaleSetVMsOperations operations
    :vartype virtual_machine_scale_set_vms:
     azure.mgmt.compute.v2017_12_01.operations.VirtualMachineScaleSetVMsOperations
    :ivar log_analytics: LogAnalyticsOperations operations
    :vartype log_analytics: azure.mgmt.compute.v2017_12_01.operations.LogAnalyticsOperations
    :ivar virtual_machine_run_commands: VirtualMachineRunCommandsOperations operations
    :vartype virtual_machine_run_commands:
     azure.mgmt.compute.v2017_12_01.operations.VirtualMachineRunCommandsOperations
    :param credential: Credential needed for the client to connect to Azure.
    :type credential: ~azure.core.credentials.TokenCredential
    :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure
     subscription. The subscription ID forms part of the URI for every service call.
    :type subscription_id: str
    :param base_url: Service URL. Default value is "https://management.azure.com".
    :type base_url: str
    :keyword api_version: Api Version. Default value is "2017-12-01". Note that overriding this
     default value may result in unsupported behavior.
    :paramtype api_version: str
    :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
     Retry-After header is present.
    """
    def __init__(self,
                 credential: "TokenCredential",
                 subscription_id: str,
                 base_url: str = "https://management.azure.com",
                 **kwargs: Any) -> None:
        self._config = ComputeManagementClientConfiguration(
            credential=credential, subscription_id=subscription_id, **kwargs)
        self._client = ARMPipelineClient(base_url=base_url,
                                         config=self._config,
                                         **kwargs)

        client_models = {
            k: v
            for k, v in models.__dict__.items() if isinstance(v, type)
        }
        self._serialize = Serializer(client_models)
        self._deserialize = Deserializer(client_models)
        self._serialize.client_side_validation = False
        self.operations = Operations(self._client, self._config,
                                     self._serialize, self._deserialize)
        self.availability_sets = AvailabilitySetsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.virtual_machine_extension_images = VirtualMachineExtensionImagesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.virtual_machine_extensions = VirtualMachineExtensionsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.virtual_machines = VirtualMachinesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.virtual_machine_images = VirtualMachineImagesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.usage = UsageOperations(self._client, self._config,
                                     self._serialize, self._deserialize)
        self.virtual_machine_sizes = VirtualMachineSizesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.images = ImagesOperations(self._client, self._config,
                                       self._serialize, self._deserialize)
        self.virtual_machine_scale_sets = VirtualMachineScaleSetsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.virtual_machine_scale_set_extensions = VirtualMachineScaleSetExtensionsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.virtual_machine_scale_set_rolling_upgrades = VirtualMachineScaleSetRollingUpgradesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.virtual_machine_scale_set_vms = VirtualMachineScaleSetVMsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.log_analytics = LogAnalyticsOperations(self._client, self._config,
                                                    self._serialize,
                                                    self._deserialize)
        self.virtual_machine_run_commands = VirtualMachineRunCommandsOperations(
            self._client, self._config, self._serialize, self._deserialize)

    def _send_request(self, request: HttpRequest,
                      **kwargs: Any) -> HttpResponse:
        """Runs the network request through the client's chained policies.

        >>> from azure.core.rest import HttpRequest
        >>> request = HttpRequest("GET", "https://www.example.org/")
        <HttpRequest [GET], url: 'https://www.example.org/'>
        >>> response = client._send_request(request)
        <HttpResponse: 200 OK>

        For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart

        :param request: The network request you want to make. Required.
        :type request: ~azure.core.rest.HttpRequest
        :keyword bool stream: Whether the response payload will be streamed. Defaults to False.
        :return: The response of your network call. Does not do error handling on your response.
        :rtype: ~azure.core.rest.HttpResponse
        """

        request_copy = deepcopy(request)
        request_copy.url = self._client.format_url(request_copy.url)
        return self._client.send_request(request_copy, **kwargs)

    def close(self):
        # type: () -> None
        self._client.close()

    def __enter__(self):
        # type: () -> ComputeManagementClient
        self._client.__enter__()
        return self

    def __exit__(self, *exc_details):
        # type: (Any) -> None
        self._client.__exit__(*exc_details)
class AppPlatformManagementClient(object):
    """REST API for Azure Spring Cloud.

    :ivar services: ServicesOperations operations
    :vartype services: azure.mgmt.appplatform.v2020_07_01.operations.ServicesOperations
    :ivar config_servers: ConfigServersOperations operations
    :vartype config_servers: azure.mgmt.appplatform.v2020_07_01.operations.ConfigServersOperations
    :ivar monitoring_settings: MonitoringSettingsOperations operations
    :vartype monitoring_settings: azure.mgmt.appplatform.v2020_07_01.operations.MonitoringSettingsOperations
    :ivar apps: AppsOperations operations
    :vartype apps: azure.mgmt.appplatform.v2020_07_01.operations.AppsOperations
    :ivar bindings: BindingsOperations operations
    :vartype bindings: azure.mgmt.appplatform.v2020_07_01.operations.BindingsOperations
    :ivar certificates: CertificatesOperations operations
    :vartype certificates: azure.mgmt.appplatform.v2020_07_01.operations.CertificatesOperations
    :ivar custom_domains: CustomDomainsOperations operations
    :vartype custom_domains: azure.mgmt.appplatform.v2020_07_01.operations.CustomDomainsOperations
    :ivar deployments: DeploymentsOperations operations
    :vartype deployments: azure.mgmt.appplatform.v2020_07_01.operations.DeploymentsOperations
    :ivar operations: Operations operations
    :vartype operations: azure.mgmt.appplatform.v2020_07_01.operations.Operations
    :ivar runtime_versions: RuntimeVersionsOperations operations
    :vartype runtime_versions: azure.mgmt.appplatform.v2020_07_01.operations.RuntimeVersionsOperations
    :ivar skus: SkusOperations operations
    :vartype skus: azure.mgmt.appplatform.v2020_07_01.operations.SkusOperations
    :param credential: Credential needed for the client to connect to Azure.
    :type credential: ~azure.core.credentials.TokenCredential
    :param subscription_id: Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
    :type subscription_id: str
    :param str base_url: Service URL
    :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
    """
    def __init__(
            self,
            credential,  # type: "TokenCredential"
            subscription_id,  # type: str
            base_url=None,  # type: Optional[str]
            **kwargs  # type: Any
    ):
        # type: (...) -> None
        if not base_url:
            base_url = 'https://management.azure.com'
        self._config = AppPlatformManagementClientConfiguration(
            credential, subscription_id, **kwargs)
        self._client = ARMPipelineClient(base_url=base_url,
                                         config=self._config,
                                         **kwargs)

        client_models = {
            k: v
            for k, v in models.__dict__.items() if isinstance(v, type)
        }
        self._serialize = Serializer(client_models)
        self._serialize.client_side_validation = False
        self._deserialize = Deserializer(client_models)

        self.services = ServicesOperations(self._client, self._config,
                                           self._serialize, self._deserialize)
        self.config_servers = ConfigServersOperations(self._client,
                                                      self._config,
                                                      self._serialize,
                                                      self._deserialize)
        self.monitoring_settings = MonitoringSettingsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.apps = AppsOperations(self._client, self._config, self._serialize,
                                   self._deserialize)
        self.bindings = BindingsOperations(self._client, self._config,
                                           self._serialize, self._deserialize)
        self.certificates = CertificatesOperations(self._client, self._config,
                                                   self._serialize,
                                                   self._deserialize)
        self.custom_domains = CustomDomainsOperations(self._client,
                                                      self._config,
                                                      self._serialize,
                                                      self._deserialize)
        self.deployments = DeploymentsOperations(self._client, self._config,
                                                 self._serialize,
                                                 self._deserialize)
        self.operations = Operations(self._client, self._config,
                                     self._serialize, self._deserialize)
        self.runtime_versions = RuntimeVersionsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.skus = SkusOperations(self._client, self._config, self._serialize,
                                   self._deserialize)

    def close(self):
        # type: () -> None
        self._client.close()

    def __enter__(self):
        # type: () -> AppPlatformManagementClient
        self._client.__enter__()
        return self

    def __exit__(self, *exc_details):
        # type: (Any) -> None
        self._client.__exit__(*exc_details)
class ComputeManagementClient:
    """Compute Client.

    :ivar disks: DisksOperations operations
    :vartype disks: azure.mgmt.compute.v2020_12_01.operations.DisksOperations
    :ivar snapshots: SnapshotsOperations operations
    :vartype snapshots: azure.mgmt.compute.v2020_12_01.operations.SnapshotsOperations
    :ivar disk_encryption_sets: DiskEncryptionSetsOperations operations
    :vartype disk_encryption_sets:
     azure.mgmt.compute.v2020_12_01.operations.DiskEncryptionSetsOperations
    :ivar disk_accesses: DiskAccessesOperations operations
    :vartype disk_accesses: azure.mgmt.compute.v2020_12_01.operations.DiskAccessesOperations
    :ivar disk_restore_point: DiskRestorePointOperations operations
    :vartype disk_restore_point:
     azure.mgmt.compute.v2020_12_01.operations.DiskRestorePointOperations
    :ivar operations: Operations operations
    :vartype operations: azure.mgmt.compute.v2020_12_01.operations.Operations
    :ivar availability_sets: AvailabilitySetsOperations operations
    :vartype availability_sets:
     azure.mgmt.compute.v2020_12_01.operations.AvailabilitySetsOperations
    :ivar proximity_placement_groups: ProximityPlacementGroupsOperations operations
    :vartype proximity_placement_groups:
     azure.mgmt.compute.v2020_12_01.operations.ProximityPlacementGroupsOperations
    :ivar dedicated_host_groups: DedicatedHostGroupsOperations operations
    :vartype dedicated_host_groups:
     azure.mgmt.compute.v2020_12_01.operations.DedicatedHostGroupsOperations
    :ivar dedicated_hosts: DedicatedHostsOperations operations
    :vartype dedicated_hosts: azure.mgmt.compute.v2020_12_01.operations.DedicatedHostsOperations
    :ivar ssh_public_keys: SshPublicKeysOperations operations
    :vartype ssh_public_keys: azure.mgmt.compute.v2020_12_01.operations.SshPublicKeysOperations
    :ivar virtual_machine_extension_images: VirtualMachineExtensionImagesOperations operations
    :vartype virtual_machine_extension_images:
     azure.mgmt.compute.v2020_12_01.operations.VirtualMachineExtensionImagesOperations
    :ivar virtual_machine_extensions: VirtualMachineExtensionsOperations operations
    :vartype virtual_machine_extensions:
     azure.mgmt.compute.v2020_12_01.operations.VirtualMachineExtensionsOperations
    :ivar virtual_machine_images: VirtualMachineImagesOperations operations
    :vartype virtual_machine_images:
     azure.mgmt.compute.v2020_12_01.operations.VirtualMachineImagesOperations
    :ivar virtual_machine_images_edge_zone: VirtualMachineImagesEdgeZoneOperations operations
    :vartype virtual_machine_images_edge_zone:
     azure.mgmt.compute.v2020_12_01.operations.VirtualMachineImagesEdgeZoneOperations
    :ivar usage: UsageOperations operations
    :vartype usage: azure.mgmt.compute.v2020_12_01.operations.UsageOperations
    :ivar virtual_machines: VirtualMachinesOperations operations
    :vartype virtual_machines: azure.mgmt.compute.v2020_12_01.operations.VirtualMachinesOperations
    :ivar virtual_machine_scale_sets: VirtualMachineScaleSetsOperations operations
    :vartype virtual_machine_scale_sets:
     azure.mgmt.compute.v2020_12_01.operations.VirtualMachineScaleSetsOperations
    :ivar virtual_machine_sizes: VirtualMachineSizesOperations operations
    :vartype virtual_machine_sizes:
     azure.mgmt.compute.v2020_12_01.operations.VirtualMachineSizesOperations
    :ivar images: ImagesOperations operations
    :vartype images: azure.mgmt.compute.v2020_12_01.operations.ImagesOperations
    :ivar virtual_machine_scale_set_extensions: VirtualMachineScaleSetExtensionsOperations
     operations
    :vartype virtual_machine_scale_set_extensions:
     azure.mgmt.compute.v2020_12_01.operations.VirtualMachineScaleSetExtensionsOperations
    :ivar virtual_machine_scale_set_rolling_upgrades:
     VirtualMachineScaleSetRollingUpgradesOperations operations
    :vartype virtual_machine_scale_set_rolling_upgrades:
     azure.mgmt.compute.v2020_12_01.operations.VirtualMachineScaleSetRollingUpgradesOperations
    :ivar virtual_machine_scale_set_vm_extensions: VirtualMachineScaleSetVMExtensionsOperations
     operations
    :vartype virtual_machine_scale_set_vm_extensions:
     azure.mgmt.compute.v2020_12_01.operations.VirtualMachineScaleSetVMExtensionsOperations
    :ivar virtual_machine_scale_set_vms: VirtualMachineScaleSetVMsOperations operations
    :vartype virtual_machine_scale_set_vms:
     azure.mgmt.compute.v2020_12_01.operations.VirtualMachineScaleSetVMsOperations
    :ivar log_analytics: LogAnalyticsOperations operations
    :vartype log_analytics: azure.mgmt.compute.v2020_12_01.operations.LogAnalyticsOperations
    :ivar virtual_machine_run_commands: VirtualMachineRunCommandsOperations operations
    :vartype virtual_machine_run_commands:
     azure.mgmt.compute.v2020_12_01.operations.VirtualMachineRunCommandsOperations
    :ivar virtual_machine_scale_set_vm_run_commands: VirtualMachineScaleSetVMRunCommandsOperations
     operations
    :vartype virtual_machine_scale_set_vm_run_commands:
     azure.mgmt.compute.v2020_12_01.operations.VirtualMachineScaleSetVMRunCommandsOperations
    :param credential: Credential needed for the client to connect to Azure.
    :type credential: ~azure.core.credentials.TokenCredential
    :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure
     subscription. The subscription ID forms part of the URI for every service call.
    :type subscription_id: str
    :param base_url: Service URL. Default value is 'https://management.azure.com'.
    :type base_url: str
    :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
     Retry-After header is present.
    """
    def __init__(self,
                 credential: "TokenCredential",
                 subscription_id: str,
                 base_url: str = "https://management.azure.com",
                 **kwargs: Any) -> None:
        self._config = ComputeManagementClientConfiguration(
            credential=credential, subscription_id=subscription_id, **kwargs)
        self._client = ARMPipelineClient(base_url=base_url,
                                         config=self._config,
                                         **kwargs)

        client_models = {
            k: v
            for k, v in models.__dict__.items() if isinstance(v, type)
        }
        self._serialize = Serializer(client_models)
        self._deserialize = Deserializer(client_models)
        self._serialize.client_side_validation = False
        self.disks = DisksOperations(self._client, self._config,
                                     self._serialize, self._deserialize)
        self.snapshots = SnapshotsOperations(self._client, self._config,
                                             self._serialize,
                                             self._deserialize)
        self.disk_encryption_sets = DiskEncryptionSetsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.disk_accesses = DiskAccessesOperations(self._client, self._config,
                                                    self._serialize,
                                                    self._deserialize)
        self.disk_restore_point = DiskRestorePointOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.operations = Operations(self._client, self._config,
                                     self._serialize, self._deserialize)
        self.availability_sets = AvailabilitySetsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.proximity_placement_groups = ProximityPlacementGroupsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.dedicated_host_groups = DedicatedHostGroupsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.dedicated_hosts = DedicatedHostsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.ssh_public_keys = SshPublicKeysOperations(self._client,
                                                       self._config,
                                                       self._serialize,
                                                       self._deserialize)
        self.virtual_machine_extension_images = VirtualMachineExtensionImagesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.virtual_machine_extensions = VirtualMachineExtensionsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.virtual_machine_images = VirtualMachineImagesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.virtual_machine_images_edge_zone = VirtualMachineImagesEdgeZoneOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.usage = UsageOperations(self._client, self._config,
                                     self._serialize, self._deserialize)
        self.virtual_machines = VirtualMachinesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.virtual_machine_scale_sets = VirtualMachineScaleSetsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.virtual_machine_sizes = VirtualMachineSizesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.images = ImagesOperations(self._client, self._config,
                                       self._serialize, self._deserialize)
        self.virtual_machine_scale_set_extensions = VirtualMachineScaleSetExtensionsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.virtual_machine_scale_set_rolling_upgrades = VirtualMachineScaleSetRollingUpgradesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.virtual_machine_scale_set_vm_extensions = VirtualMachineScaleSetVMExtensionsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.virtual_machine_scale_set_vms = VirtualMachineScaleSetVMsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.log_analytics = LogAnalyticsOperations(self._client, self._config,
                                                    self._serialize,
                                                    self._deserialize)
        self.virtual_machine_run_commands = VirtualMachineRunCommandsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.virtual_machine_scale_set_vm_run_commands = VirtualMachineScaleSetVMRunCommandsOperations(
            self._client, self._config, self._serialize, self._deserialize)

    def _send_request(
            self,
            request,  # type: HttpRequest
            **kwargs: Any) -> HttpResponse:
        """Runs the network request through the client's chained policies.

        >>> from azure.core.rest import HttpRequest
        >>> request = HttpRequest("GET", "https://www.example.org/")
        <HttpRequest [GET], url: 'https://www.example.org/'>
        >>> response = client._send_request(request)
        <HttpResponse: 200 OK>

        For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart

        :param request: The network request you want to make. Required.
        :type request: ~azure.core.rest.HttpRequest
        :keyword bool stream: Whether the response payload will be streamed. Defaults to False.
        :return: The response of your network call. Does not do error handling on your response.
        :rtype: ~azure.core.rest.HttpResponse
        """

        request_copy = deepcopy(request)
        request_copy.url = self._client.format_url(request_copy.url)
        return self._client.send_request(request_copy, **kwargs)

    def close(self):
        # type: () -> None
        self._client.close()

    def __enter__(self):
        # type: () -> ComputeManagementClient
        self._client.__enter__()
        return self

    def __exit__(self, *exc_details):
        # type: (Any) -> None
        self._client.__exit__(*exc_details)
Exemplo n.º 16
0
class WebSiteManagementClient(WebSiteManagementClientOperationsMixin):
    """WebSite Management Client.

    :ivar app_service_certificate_orders: AppServiceCertificateOrdersOperations operations
    :vartype app_service_certificate_orders: azure.mgmt.web.v2021_02_01.operations.AppServiceCertificateOrdersOperations
    :ivar certificate_orders_diagnostics: CertificateOrdersDiagnosticsOperations operations
    :vartype certificate_orders_diagnostics: azure.mgmt.web.v2021_02_01.operations.CertificateOrdersDiagnosticsOperations
    :ivar certificate_registration_provider: CertificateRegistrationProviderOperations operations
    :vartype certificate_registration_provider: azure.mgmt.web.v2021_02_01.operations.CertificateRegistrationProviderOperations
    :ivar domains: DomainsOperations operations
    :vartype domains: azure.mgmt.web.v2021_02_01.operations.DomainsOperations
    :ivar top_level_domains: TopLevelDomainsOperations operations
    :vartype top_level_domains: azure.mgmt.web.v2021_02_01.operations.TopLevelDomainsOperations
    :ivar domain_registration_provider: DomainRegistrationProviderOperations operations
    :vartype domain_registration_provider: azure.mgmt.web.v2021_02_01.operations.DomainRegistrationProviderOperations
    :ivar app_service_environments: AppServiceEnvironmentsOperations operations
    :vartype app_service_environments: azure.mgmt.web.v2021_02_01.operations.AppServiceEnvironmentsOperations
    :ivar app_service_plans: AppServicePlansOperations operations
    :vartype app_service_plans: azure.mgmt.web.v2021_02_01.operations.AppServicePlansOperations
    :ivar certificates: CertificatesOperations operations
    :vartype certificates: azure.mgmt.web.v2021_02_01.operations.CertificatesOperations
    :ivar deleted_web_apps: DeletedWebAppsOperations operations
    :vartype deleted_web_apps: azure.mgmt.web.v2021_02_01.operations.DeletedWebAppsOperations
    :ivar diagnostics: DiagnosticsOperations operations
    :vartype diagnostics: azure.mgmt.web.v2021_02_01.operations.DiagnosticsOperations
    :ivar global_model: GlobalOperations operations
    :vartype global_model: azure.mgmt.web.v2021_02_01.operations.GlobalOperations
    :ivar kube_environments: KubeEnvironmentsOperations operations
    :vartype kube_environments: azure.mgmt.web.v2021_02_01.operations.KubeEnvironmentsOperations
    :ivar provider: ProviderOperations operations
    :vartype provider: azure.mgmt.web.v2021_02_01.operations.ProviderOperations
    :ivar recommendations: RecommendationsOperations operations
    :vartype recommendations: azure.mgmt.web.v2021_02_01.operations.RecommendationsOperations
    :ivar resource_health_metadata: ResourceHealthMetadataOperations operations
    :vartype resource_health_metadata: azure.mgmt.web.v2021_02_01.operations.ResourceHealthMetadataOperations
    :ivar static_sites: StaticSitesOperations operations
    :vartype static_sites: azure.mgmt.web.v2021_02_01.operations.StaticSitesOperations
    :ivar web_apps: WebAppsOperations operations
    :vartype web_apps: azure.mgmt.web.v2021_02_01.operations.WebAppsOperations
    :param credential: Credential needed for the client to connect to Azure.
    :type credential: ~azure.core.credentials.TokenCredential
    :param subscription_id: Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).
    :type subscription_id: str
    :param str base_url: Service URL
    :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
    """
    def __init__(
            self,
            credential,  # type: "TokenCredential"
            subscription_id,  # type: str
            base_url=None,  # type: Optional[str]
            **kwargs  # type: Any
    ):
        # type: (...) -> None
        if not base_url:
            base_url = 'https://management.azure.com'
        self._config = WebSiteManagementClientConfiguration(
            credential, subscription_id, **kwargs)
        self._client = ARMPipelineClient(base_url=base_url,
                                         config=self._config,
                                         **kwargs)

        client_models = {
            k: v
            for k, v in models.__dict__.items() if isinstance(v, type)
        }
        self._serialize = Serializer(client_models)
        self._serialize.client_side_validation = False
        self._deserialize = Deserializer(client_models)

        self.app_service_certificate_orders = AppServiceCertificateOrdersOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.certificate_orders_diagnostics = CertificateOrdersDiagnosticsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.certificate_registration_provider = CertificateRegistrationProviderOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.domains = DomainsOperations(self._client, self._config,
                                         self._serialize, self._deserialize)
        self.top_level_domains = TopLevelDomainsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.domain_registration_provider = DomainRegistrationProviderOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.app_service_environments = AppServiceEnvironmentsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.app_service_plans = AppServicePlansOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.certificates = CertificatesOperations(self._client, self._config,
                                                   self._serialize,
                                                   self._deserialize)
        self.deleted_web_apps = DeletedWebAppsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.diagnostics = DiagnosticsOperations(self._client, self._config,
                                                 self._serialize,
                                                 self._deserialize)
        self.global_model = GlobalOperations(self._client, self._config,
                                             self._serialize,
                                             self._deserialize)
        self.kube_environments = KubeEnvironmentsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.provider = ProviderOperations(self._client, self._config,
                                           self._serialize, self._deserialize)
        self.recommendations = RecommendationsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.resource_health_metadata = ResourceHealthMetadataOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.static_sites = StaticSitesOperations(self._client, self._config,
                                                  self._serialize,
                                                  self._deserialize)
        self.web_apps = WebAppsOperations(self._client, self._config,
                                          self._serialize, self._deserialize)

    def _send_request(self, http_request, **kwargs):
        # type: (HttpRequest, Any) -> HttpResponse
        """Runs the network request through the client's chained policies.

        :param http_request: The network request you want to make. Required.
        :type http_request: ~azure.core.pipeline.transport.HttpRequest
        :keyword bool stream: Whether the response payload will be streamed. Defaults to True.
        :return: The response of your network call. Does not do error handling on your response.
        :rtype: ~azure.core.pipeline.transport.HttpResponse
        """
        path_format_arguments = {
            'subscriptionId':
            self._serialize.url("self._config.subscription_id",
                                self._config.subscription_id, 'str'),
        }
        http_request.url = self._client.format_url(http_request.url,
                                                   **path_format_arguments)
        stream = kwargs.pop("stream", True)
        pipeline_response = self._client._pipeline.run(http_request,
                                                       stream=stream,
                                                       **kwargs)
        return pipeline_response.http_response

    def close(self):
        # type: () -> None
        self._client.close()

    def __enter__(self):
        # type: () -> WebSiteManagementClient
        self._client.__enter__()
        return self

    def __exit__(self, *exc_details):
        # type: (Any) -> None
        self._client.__exit__(*exc_details)
class DeploymentScriptsClient(object):
    """The APIs listed in this specification can be used to manage Deployment Scripts resource through the Azure Resource Manager.

    :ivar deployment_scripts: DeploymentScriptsOperations operations
    :vartype deployment_scripts: azure.mgmt.resource.deploymentscripts.v2019_10_01_preview.operations.DeploymentScriptsOperations
    :param credential: Credential needed for the client to connect to Azure.
    :type credential: ~azure.core.credentials.TokenCredential
    :param subscription_id: Subscription Id which forms part of the URI for every service call.
    :type subscription_id: str
    :param str base_url: Service URL
    :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
    """
    def __init__(
            self,
            credential,  # type: "TokenCredential"
            subscription_id,  # type: str
            base_url=None,  # type: Optional[str]
            **kwargs  # type: Any
    ):
        # type: (...) -> None
        if not base_url:
            base_url = 'https://management.azure.com'
        self._config = DeploymentScriptsClientConfiguration(
            credential, subscription_id, **kwargs)
        self._client = ARMPipelineClient(base_url=base_url,
                                         config=self._config,
                                         **kwargs)

        client_models = {
            k: v
            for k, v in models.__dict__.items() if isinstance(v, type)
        }
        self._serialize = Serializer(client_models)
        self._serialize.client_side_validation = False
        self._deserialize = Deserializer(client_models)

        self.deployment_scripts = DeploymentScriptsOperations(
            self._client, self._config, self._serialize, self._deserialize)

    def _send_request(self, http_request, **kwargs):
        # type: (HttpRequest, Any) -> HttpResponse
        """Runs the network request through the client's chained policies.

        :param http_request: The network request you want to make. Required.
        :type http_request: ~azure.core.pipeline.transport.HttpRequest
        :keyword bool stream: Whether the response payload will be streamed. Defaults to True.
        :return: The response of your network call. Does not do error handling on your response.
        :rtype: ~azure.core.pipeline.transport.HttpResponse
        """
        path_format_arguments = {
            'subscriptionId':
            self._serialize.url("self._config.subscription_id",
                                self._config.subscription_id, 'str'),
        }
        http_request.url = self._client.format_url(http_request.url,
                                                   **path_format_arguments)
        stream = kwargs.pop("stream", True)
        pipeline_response = self._client._pipeline.run(http_request,
                                                       stream=stream,
                                                       **kwargs)
        return pipeline_response.http_response

    def close(self):
        # type: () -> None
        self._client.close()

    def __enter__(self):
        # type: () -> DeploymentScriptsClient
        self._client.__enter__()
        return self

    def __exit__(self, *exc_details):
        # type: (Any) -> None
        self._client.__exit__(*exc_details)
class ContainerRegistryManagementClient(object):
    """ContainerRegistryManagementClient.

    :ivar connected_registries: ConnectedRegistriesOperations operations
    :vartype connected_registries: azure.mgmt.containerregistry.v2021_08_01_preview.operations.ConnectedRegistriesOperations
    :ivar export_pipelines: ExportPipelinesOperations operations
    :vartype export_pipelines: azure.mgmt.containerregistry.v2021_08_01_preview.operations.ExportPipelinesOperations
    :ivar registries: RegistriesOperations operations
    :vartype registries: azure.mgmt.containerregistry.v2021_08_01_preview.operations.RegistriesOperations
    :ivar import_pipelines: ImportPipelinesOperations operations
    :vartype import_pipelines: azure.mgmt.containerregistry.v2021_08_01_preview.operations.ImportPipelinesOperations
    :ivar operations: Operations operations
    :vartype operations: azure.mgmt.containerregistry.v2021_08_01_preview.operations.Operations
    :ivar pipeline_runs: PipelineRunsOperations operations
    :vartype pipeline_runs: azure.mgmt.containerregistry.v2021_08_01_preview.operations.PipelineRunsOperations
    :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations
    :vartype private_endpoint_connections: azure.mgmt.containerregistry.v2021_08_01_preview.operations.PrivateEndpointConnectionsOperations
    :ivar replications: ReplicationsOperations operations
    :vartype replications: azure.mgmt.containerregistry.v2021_08_01_preview.operations.ReplicationsOperations
    :ivar scope_maps: ScopeMapsOperations operations
    :vartype scope_maps: azure.mgmt.containerregistry.v2021_08_01_preview.operations.ScopeMapsOperations
    :ivar tokens: TokensOperations operations
    :vartype tokens: azure.mgmt.containerregistry.v2021_08_01_preview.operations.TokensOperations
    :ivar webhooks: WebhooksOperations operations
    :vartype webhooks: azure.mgmt.containerregistry.v2021_08_01_preview.operations.WebhooksOperations
    :param credential: Credential needed for the client to connect to Azure.
    :type credential: ~azure.core.credentials.TokenCredential
    :param subscription_id: The Microsoft Azure subscription ID.
    :type subscription_id: str
    :param str base_url: Service URL
    :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
    """
    def __init__(
            self,
            credential,  # type: "TokenCredential"
            subscription_id,  # type: str
            base_url=None,  # type: Optional[str]
            **kwargs  # type: Any
    ):
        # type: (...) -> None
        if not base_url:
            base_url = 'https://management.azure.com'
        self._config = ContainerRegistryManagementClientConfiguration(
            credential, subscription_id, **kwargs)
        self._client = ARMPipelineClient(base_url=base_url,
                                         config=self._config,
                                         **kwargs)

        client_models = {
            k: v
            for k, v in models.__dict__.items() if isinstance(v, type)
        }
        self._serialize = Serializer(client_models)
        self._serialize.client_side_validation = False
        self._deserialize = Deserializer(client_models)

        self.connected_registries = ConnectedRegistriesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.export_pipelines = ExportPipelinesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.registries = RegistriesOperations(self._client, self._config,
                                               self._serialize,
                                               self._deserialize)
        self.import_pipelines = ImportPipelinesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.operations = Operations(self._client, self._config,
                                     self._serialize, self._deserialize)
        self.pipeline_runs = PipelineRunsOperations(self._client, self._config,
                                                    self._serialize,
                                                    self._deserialize)
        self.private_endpoint_connections = PrivateEndpointConnectionsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.replications = ReplicationsOperations(self._client, self._config,
                                                   self._serialize,
                                                   self._deserialize)
        self.scope_maps = ScopeMapsOperations(self._client, self._config,
                                              self._serialize,
                                              self._deserialize)
        self.tokens = TokensOperations(self._client, self._config,
                                       self._serialize, self._deserialize)
        self.webhooks = WebhooksOperations(self._client, self._config,
                                           self._serialize, self._deserialize)

    def _send_request(self, http_request, **kwargs):
        # type: (HttpRequest, Any) -> HttpResponse
        """Runs the network request through the client's chained policies.

        :param http_request: The network request you want to make. Required.
        :type http_request: ~azure.core.pipeline.transport.HttpRequest
        :keyword bool stream: Whether the response payload will be streamed. Defaults to True.
        :return: The response of your network call. Does not do error handling on your response.
        :rtype: ~azure.core.pipeline.transport.HttpResponse
        """
        path_format_arguments = {
            'subscriptionId':
            self._serialize.url("self._config.subscription_id",
                                self._config.subscription_id, 'str'),
        }
        http_request.url = self._client.format_url(http_request.url,
                                                   **path_format_arguments)
        stream = kwargs.pop("stream", True)
        pipeline_response = self._client._pipeline.run(http_request,
                                                       stream=stream,
                                                       **kwargs)
        return pipeline_response.http_response

    def close(self):
        # type: () -> None
        self._client.close()

    def __enter__(self):
        # type: () -> ContainerRegistryManagementClient
        self._client.__enter__()
        return self

    def __exit__(self, *exc_details):
        # type: (Any) -> None
        self._client.__exit__(*exc_details)
Exemplo n.º 19
0
class IotHubClient(object):
    """Use this API to manage the IoT hubs in your Azure subscription.

    :ivar operations: Operations operations
    :vartype operations: azure.mgmt.iothub.v2019_07_01_preview.operations.Operations
    :ivar iot_hub_resource: IotHubResourceOperations operations
    :vartype iot_hub_resource: azure.mgmt.iothub.v2019_07_01_preview.operations.IotHubResourceOperations
    :ivar resource_provider_common: ResourceProviderCommonOperations operations
    :vartype resource_provider_common: azure.mgmt.iothub.v2019_07_01_preview.operations.ResourceProviderCommonOperations
    :ivar certificates: CertificatesOperations operations
    :vartype certificates: azure.mgmt.iothub.v2019_07_01_preview.operations.CertificatesOperations
    :ivar iot_hub: IotHubOperations operations
    :vartype iot_hub: azure.mgmt.iothub.v2019_07_01_preview.operations.IotHubOperations
    :param credential: Credential needed for the client to connect to Azure.
    :type credential: ~azure.core.credentials.TokenCredential
    :param subscription_id: The subscription identifier.
    :type subscription_id: str
    :param str base_url: Service URL
    :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
    """
    def __init__(
            self,
            credential,  # type: "TokenCredential"
            subscription_id,  # type: str
            base_url=None,  # type: Optional[str]
            **kwargs  # type: Any
    ):
        # type: (...) -> None
        if not base_url:
            base_url = 'https://management.azure.com'
        self._config = IotHubClientConfiguration(credential, subscription_id,
                                                 **kwargs)
        self._client = ARMPipelineClient(base_url=base_url,
                                         config=self._config,
                                         **kwargs)

        client_models = {
            k: v
            for k, v in models.__dict__.items() if isinstance(v, type)
        }
        self._serialize = Serializer(client_models)
        self._serialize.client_side_validation = False
        self._deserialize = Deserializer(client_models)

        self.operations = Operations(self._client, self._config,
                                     self._serialize, self._deserialize)
        self.iot_hub_resource = IotHubResourceOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.resource_provider_common = ResourceProviderCommonOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.certificates = CertificatesOperations(self._client, self._config,
                                                   self._serialize,
                                                   self._deserialize)
        self.iot_hub = IotHubOperations(self._client, self._config,
                                        self._serialize, self._deserialize)

    def _send_request(self, http_request, **kwargs):
        # type: (HttpRequest, Any) -> HttpResponse
        """Runs the network request through the client's chained policies.

        :param http_request: The network request you want to make. Required.
        :type http_request: ~azure.core.pipeline.transport.HttpRequest
        :keyword bool stream: Whether the response payload will be streamed. Defaults to True.
        :return: The response of your network call. Does not do error handling on your response.
        :rtype: ~azure.core.pipeline.transport.HttpResponse
        """
        path_format_arguments = {
            'subscriptionId':
            self._serialize.url("self._config.subscription_id",
                                self._config.subscription_id, 'str'),
        }
        http_request.url = self._client.format_url(http_request.url,
                                                   **path_format_arguments)
        stream = kwargs.pop("stream", True)
        pipeline_response = self._client._pipeline.run(http_request,
                                                       stream=stream,
                                                       **kwargs)
        return pipeline_response.http_response

    def close(self):
        # type: () -> None
        self._client.close()

    def __enter__(self):
        # type: () -> IotHubClient
        self._client.__enter__()
        return self

    def __exit__(self, *exc_details):
        # type: (Any) -> None
        self._client.__exit__(*exc_details)
class LabServicesClient:
    """REST API for managing Azure Lab Services images.

    :ivar images: ImagesOperations operations
    :vartype images: azure.mgmt.labservices.operations.ImagesOperations
    :ivar lab_plans: LabPlansOperations operations
    :vartype lab_plans: azure.mgmt.labservices.operations.LabPlansOperations
    :ivar operations: Operations operations
    :vartype operations: azure.mgmt.labservices.operations.Operations
    :ivar labs: LabsOperations operations
    :vartype labs: azure.mgmt.labservices.operations.LabsOperations
    :ivar operation_results: OperationResultsOperations operations
    :vartype operation_results: azure.mgmt.labservices.operations.OperationResultsOperations
    :ivar schedules: SchedulesOperations operations
    :vartype schedules: azure.mgmt.labservices.operations.SchedulesOperations
    :ivar users: UsersOperations operations
    :vartype users: azure.mgmt.labservices.operations.UsersOperations
    :ivar virtual_machines: VirtualMachinesOperations operations
    :vartype virtual_machines: azure.mgmt.labservices.operations.VirtualMachinesOperations
    :ivar usages: UsagesOperations operations
    :vartype usages: azure.mgmt.labservices.operations.UsagesOperations
    :ivar skus: SkusOperations operations
    :vartype skus: azure.mgmt.labservices.operations.SkusOperations
    :param credential: Credential needed for the client to connect to Azure.
    :type credential: ~azure.core.credentials.TokenCredential
    :param subscription_id: The ID of the target subscription.
    :type subscription_id: str
    :param base_url: Service URL. Default value is 'https://management.azure.com'.
    :type base_url: str
    :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
     Retry-After header is present.
    """
    def __init__(self,
                 credential: "TokenCredential",
                 subscription_id: str,
                 base_url: str = "https://management.azure.com",
                 **kwargs: Any) -> None:
        self._config = LabServicesClientConfiguration(
            credential=credential, subscription_id=subscription_id, **kwargs)
        self._client = ARMPipelineClient(base_url=base_url,
                                         config=self._config,
                                         **kwargs)

        client_models = {
            k: v
            for k, v in models.__dict__.items() if isinstance(v, type)
        }
        self._serialize = Serializer(client_models)
        self._deserialize = Deserializer(client_models)
        self._serialize.client_side_validation = False
        self.images = ImagesOperations(self._client, self._config,
                                       self._serialize, self._deserialize)
        self.lab_plans = LabPlansOperations(self._client, self._config,
                                            self._serialize, self._deserialize)
        self.operations = Operations(self._client, self._config,
                                     self._serialize, self._deserialize)
        self.labs = LabsOperations(self._client, self._config, self._serialize,
                                   self._deserialize)
        self.operation_results = OperationResultsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.schedules = SchedulesOperations(self._client, self._config,
                                             self._serialize,
                                             self._deserialize)
        self.users = UsersOperations(self._client, self._config,
                                     self._serialize, self._deserialize)
        self.virtual_machines = VirtualMachinesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.usages = UsagesOperations(self._client, self._config,
                                       self._serialize, self._deserialize)
        self.skus = SkusOperations(self._client, self._config, self._serialize,
                                   self._deserialize)

    def _send_request(
            self,
            request,  # type: HttpRequest
            **kwargs: Any) -> HttpResponse:
        """Runs the network request through the client's chained policies.

        >>> from azure.core.rest import HttpRequest
        >>> request = HttpRequest("GET", "https://www.example.org/")
        <HttpRequest [GET], url: 'https://www.example.org/'>
        >>> response = client._send_request(request)
        <HttpResponse: 200 OK>

        For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart

        :param request: The network request you want to make. Required.
        :type request: ~azure.core.rest.HttpRequest
        :keyword bool stream: Whether the response payload will be streamed. Defaults to False.
        :return: The response of your network call. Does not do error handling on your response.
        :rtype: ~azure.core.rest.HttpResponse
        """

        request_copy = deepcopy(request)
        request_copy.url = self._client.format_url(request_copy.url)
        return self._client.send_request(request_copy, **kwargs)

    def close(self):
        # type: () -> None
        self._client.close()

    def __enter__(self):
        # type: () -> LabServicesClient
        self._client.__enter__()
        return self

    def __exit__(self, *exc_details):
        # type: (Any) -> None
        self._client.__exit__(*exc_details)
class ApplicationInsightsManagementClient(MultiApiClientMixin, _SDKClient):
    """Composite Swagger for Application Insights Management Client.

    This ready contains multiple API versions, to help you deal with all of the Azure clouds
    (Azure Stack, Azure Government, Azure China, etc.).
    By default, it uses the latest API version available on public Azure.
    For production, you should stick to a particular api-version and/or profile.
    The profile sets a mapping between an operation group and its API version.
    The api-version parameter sets the default API version if the operation
    group is not described in the profile.

    :param credential: Credential needed for the client to connect to Azure.
    :type credential: ~azure.core.credentials.TokenCredential
    :param subscription_id: The ID of the target subscription.
    :type subscription_id: str
    :param api_version: API version to use if no profile is provided, or if missing in profile.
    :type api_version: str
    :param base_url: Service URL
    :type base_url: str
    :param profile: A profile definition, from KnownProfiles to dict.
    :type profile: azure.profiles.KnownProfiles
    """

    DEFAULT_API_VERSION = '2020-03-01-preview'
    _PROFILE_TAG = "azure.mgmt.applicationinsights.ApplicationInsightsManagementClient"
    LATEST_PROFILE = ProfileDefinition(
        {
            _PROFILE_TAG: {
                None: DEFAULT_API_VERSION,
                'analytics_items': '2015-05-01',
                'annotations': '2015-05-01',
                'api_keys': '2015-05-01',
                'component_available_features': '2015-05-01',
                'component_current_billing_features': '2015-05-01',
                'component_current_pricing_plan': '2017-10-01',
                'component_feature_capabilities': '2015-05-01',
                'component_quota_status': '2015-05-01',
                'components': '2020-02-02-preview',
                'ea_subscription_list_migration_date': '2017-10-01',
                'ea_subscription_migrate_to_new_pricing_model': '2017-10-01',
                'ea_subscription_rollback_to_legacy_pricing_model':
                '2017-10-01',
                'export_configurations': '2015-05-01',
                'favorites': '2015-05-01',
                'operations': '2015-05-01',
                'proactive_detection_configurations': '2018-05-01-preview',
                'queries': '2019-09-01-preview',
                'query_packs': '2019-09-01-preview',
                'web_test_locations': '2015-05-01',
                'web_tests': '2015-05-01',
                'work_item_configurations': '2015-05-01',
                'workbook_templates': '2019-10-17-preview',
                'workbooks': '2018-06-17-preview',
            }
        }, _PROFILE_TAG + " latest")

    def __init__(
            self,
            credential,  # type: "TokenCredential"
            subscription_id,  # type: str
            api_version=None,  # type: Optional[str]
            base_url=None,  # type: Optional[str]
            profile=KnownProfiles.default,  # type: KnownProfiles
            **kwargs  # type: Any
    ):
        if not base_url:
            base_url = 'https://management.azure.com'
        self._config = ApplicationInsightsManagementClientConfiguration(
            credential, subscription_id, **kwargs)
        self._client = ARMPipelineClient(base_url=base_url,
                                         config=self._config,
                                         **kwargs)
        super(ApplicationInsightsManagementClient,
              self).__init__(api_version=api_version, profile=profile)

    @classmethod
    def _models_dict(cls, api_version):
        return {
            k: v
            for k, v in cls.models(api_version).__dict__.items()
            if isinstance(v, type)
        }

    @classmethod
    def models(cls, api_version=DEFAULT_API_VERSION):
        """Module depends on the API version:

           * 2015-05-01: :mod:`v2015_05_01.models<azure.mgmt.applicationinsights.v2015_05_01.models>`
           * 2017-10-01: :mod:`v2017_10_01.models<azure.mgmt.applicationinsights.v2017_10_01.models>`
           * 2018-05-01-preview: :mod:`v2018_05_01_preview.models<azure.mgmt.applicationinsights.v2018_05_01_preview.models>`
           * 2018-06-17-preview: :mod:`v2018_06_17_preview.models<azure.mgmt.applicationinsights.v2018_06_17_preview.models>`
           * 2019-10-17-preview: :mod:`v2019_10_17_preview.models<azure.mgmt.applicationinsights.v2019_10_17_preview.models>`
           * 2020-02-02-preview: :mod:`v2020_02_02_preview.models<azure.mgmt.applicationinsights.v2020_02_02_preview.models>`
           * 2020-03-01-preview: :mod:`v2020_03_01_preview.models<azure.mgmt.applicationinsights.v2020_03_01_preview.models>`
           * 2020-06-02-preview: :mod:`v2020_06_02_preview.models<azure.mgmt.applicationinsights.v2020_06_02_preview.models>`
        """
        if api_version == '2015-05-01':
            from .v2015_05_01 import models
            return models
        elif api_version == '2017-10-01':
            from .v2017_10_01 import models
            return models
        elif api_version == '2018-05-01-preview':
            from .v2018_05_01_preview import models
            return models
        elif api_version == '2018-06-17-preview':
            from .v2018_06_17_preview import models
            return models
        elif api_version == '2019-10-17-preview':
            from .v2019_10_17_preview import models
            return models
        elif api_version == '2020-02-02-preview':
            from .v2020_02_02_preview import models
            return models
        elif api_version == '2020-03-01-preview':
            from .v2020_03_01_preview import models
            return models
        elif api_version == '2020-06-02-preview':
            from .v2020_06_02_preview import models
            return models
        raise ValueError("API version {} is not available".format(api_version))

    @property
    def analytics_items(self):
        """Instance depends on the API version:

           * 2015-05-01: :class:`AnalyticsItemsOperations<azure.mgmt.applicationinsights.v2015_05_01.operations.AnalyticsItemsOperations>`
        """
        api_version = self._get_api_version('analytics_items')
        if api_version == '2015-05-01':
            from .v2015_05_01.operations import AnalyticsItemsOperations as OperationClass
        else:
            raise ValueError(
                "API version {} does not have operation group 'analytics_items'"
                .format(api_version))
        return OperationClass(self._client, self._config,
                              Serializer(self._models_dict(api_version)),
                              Deserializer(self._models_dict(api_version)))

    @property
    def annotations(self):
        """Instance depends on the API version:

           * 2015-05-01: :class:`AnnotationsOperations<azure.mgmt.applicationinsights.v2015_05_01.operations.AnnotationsOperations>`
        """
        api_version = self._get_api_version('annotations')
        if api_version == '2015-05-01':
            from .v2015_05_01.operations import AnnotationsOperations as OperationClass
        else:
            raise ValueError(
                "API version {} does not have operation group 'annotations'".
                format(api_version))
        return OperationClass(self._client, self._config,
                              Serializer(self._models_dict(api_version)),
                              Deserializer(self._models_dict(api_version)))

    @property
    def api_keys(self):
        """Instance depends on the API version:

           * 2015-05-01: :class:`APIKeysOperations<azure.mgmt.applicationinsights.v2015_05_01.operations.APIKeysOperations>`
        """
        api_version = self._get_api_version('api_keys')
        if api_version == '2015-05-01':
            from .v2015_05_01.operations import APIKeysOperations as OperationClass
        else:
            raise ValueError(
                "API version {} does not have operation group 'api_keys'".
                format(api_version))
        return OperationClass(self._client, self._config,
                              Serializer(self._models_dict(api_version)),
                              Deserializer(self._models_dict(api_version)))

    @property
    def component_available_features(self):
        """Instance depends on the API version:

           * 2015-05-01: :class:`ComponentAvailableFeaturesOperations<azure.mgmt.applicationinsights.v2015_05_01.operations.ComponentAvailableFeaturesOperations>`
        """
        api_version = self._get_api_version('component_available_features')
        if api_version == '2015-05-01':
            from .v2015_05_01.operations import ComponentAvailableFeaturesOperations as OperationClass
        else:
            raise ValueError(
                "API version {} does not have operation group 'component_available_features'"
                .format(api_version))
        return OperationClass(self._client, self._config,
                              Serializer(self._models_dict(api_version)),
                              Deserializer(self._models_dict(api_version)))

    @property
    def component_current_billing_features(self):
        """Instance depends on the API version:

           * 2015-05-01: :class:`ComponentCurrentBillingFeaturesOperations<azure.mgmt.applicationinsights.v2015_05_01.operations.ComponentCurrentBillingFeaturesOperations>`
        """
        api_version = self._get_api_version(
            'component_current_billing_features')
        if api_version == '2015-05-01':
            from .v2015_05_01.operations import ComponentCurrentBillingFeaturesOperations as OperationClass
        else:
            raise ValueError(
                "API version {} does not have operation group 'component_current_billing_features'"
                .format(api_version))
        return OperationClass(self._client, self._config,
                              Serializer(self._models_dict(api_version)),
                              Deserializer(self._models_dict(api_version)))

    @property
    def component_current_pricing_plan(self):
        """Instance depends on the API version:

           * 2017-10-01: :class:`ComponentCurrentPricingPlanOperations<azure.mgmt.applicationinsights.v2017_10_01.operations.ComponentCurrentPricingPlanOperations>`
        """
        api_version = self._get_api_version('component_current_pricing_plan')
        if api_version == '2017-10-01':
            from .v2017_10_01.operations import ComponentCurrentPricingPlanOperations as OperationClass
        else:
            raise ValueError(
                "API version {} does not have operation group 'component_current_pricing_plan'"
                .format(api_version))
        return OperationClass(self._client, self._config,
                              Serializer(self._models_dict(api_version)),
                              Deserializer(self._models_dict(api_version)))

    @property
    def component_feature_capabilities(self):
        """Instance depends on the API version:

           * 2015-05-01: :class:`ComponentFeatureCapabilitiesOperations<azure.mgmt.applicationinsights.v2015_05_01.operations.ComponentFeatureCapabilitiesOperations>`
        """
        api_version = self._get_api_version('component_feature_capabilities')
        if api_version == '2015-05-01':
            from .v2015_05_01.operations import ComponentFeatureCapabilitiesOperations as OperationClass
        else:
            raise ValueError(
                "API version {} does not have operation group 'component_feature_capabilities'"
                .format(api_version))
        return OperationClass(self._client, self._config,
                              Serializer(self._models_dict(api_version)),
                              Deserializer(self._models_dict(api_version)))

    @property
    def component_linked_storage_accounts(self):
        """Instance depends on the API version:

           * 2020-03-01-preview: :class:`ComponentLinkedStorageAccountsOperations<azure.mgmt.applicationinsights.v2020_03_01_preview.operations.ComponentLinkedStorageAccountsOperations>`
        """
        api_version = self._get_api_version(
            'component_linked_storage_accounts')
        if api_version == '2020-03-01-preview':
            from .v2020_03_01_preview.operations import ComponentLinkedStorageAccountsOperations as OperationClass
        else:
            raise ValueError(
                "API version {} does not have operation group 'component_linked_storage_accounts'"
                .format(api_version))
        return OperationClass(self._client, self._config,
                              Serializer(self._models_dict(api_version)),
                              Deserializer(self._models_dict(api_version)))

    @property
    def component_quota_status(self):
        """Instance depends on the API version:

           * 2015-05-01: :class:`ComponentQuotaStatusOperations<azure.mgmt.applicationinsights.v2015_05_01.operations.ComponentQuotaStatusOperations>`
        """
        api_version = self._get_api_version('component_quota_status')
        if api_version == '2015-05-01':
            from .v2015_05_01.operations import ComponentQuotaStatusOperations as OperationClass
        else:
            raise ValueError(
                "API version {} does not have operation group 'component_quota_status'"
                .format(api_version))
        return OperationClass(self._client, self._config,
                              Serializer(self._models_dict(api_version)),
                              Deserializer(self._models_dict(api_version)))

    @property
    def components(self):
        """Instance depends on the API version:

           * 2015-05-01: :class:`ComponentsOperations<azure.mgmt.applicationinsights.v2015_05_01.operations.ComponentsOperations>`
           * 2018-05-01-preview: :class:`ComponentsOperations<azure.mgmt.applicationinsights.v2018_05_01_preview.operations.ComponentsOperations>`
           * 2020-02-02-preview: :class:`ComponentsOperations<azure.mgmt.applicationinsights.v2020_02_02_preview.operations.ComponentsOperations>`
        """
        api_version = self._get_api_version('components')
        if api_version == '2015-05-01':
            from .v2015_05_01.operations import ComponentsOperations as OperationClass
        elif api_version == '2018-05-01-preview':
            from .v2018_05_01_preview.operations import ComponentsOperations as OperationClass
        elif api_version == '2020-02-02-preview':
            from .v2020_02_02_preview.operations import ComponentsOperations as OperationClass
        else:
            raise ValueError(
                "API version {} does not have operation group 'components'".
                format(api_version))
        return OperationClass(self._client, self._config,
                              Serializer(self._models_dict(api_version)),
                              Deserializer(self._models_dict(api_version)))

    @property
    def ea_subscription_list_migration_date(self):
        """Instance depends on the API version:

           * 2017-10-01: :class:`EASubscriptionListMigrationDateOperations<azure.mgmt.applicationinsights.v2017_10_01.operations.EASubscriptionListMigrationDateOperations>`
        """
        api_version = self._get_api_version(
            'ea_subscription_list_migration_date')
        if api_version == '2017-10-01':
            from .v2017_10_01.operations import EASubscriptionListMigrationDateOperations as OperationClass
        else:
            raise ValueError(
                "API version {} does not have operation group 'ea_subscription_list_migration_date'"
                .format(api_version))
        return OperationClass(self._client, self._config,
                              Serializer(self._models_dict(api_version)),
                              Deserializer(self._models_dict(api_version)))

    @property
    def ea_subscription_migrate_to_new_pricing_model(self):
        """Instance depends on the API version:

           * 2017-10-01: :class:`EASubscriptionMigrateToNewPricingModelOperations<azure.mgmt.applicationinsights.v2017_10_01.operations.EASubscriptionMigrateToNewPricingModelOperations>`
        """
        api_version = self._get_api_version(
            'ea_subscription_migrate_to_new_pricing_model')
        if api_version == '2017-10-01':
            from .v2017_10_01.operations import EASubscriptionMigrateToNewPricingModelOperations as OperationClass
        else:
            raise ValueError(
                "API version {} does not have operation group 'ea_subscription_migrate_to_new_pricing_model'"
                .format(api_version))
        return OperationClass(self._client, self._config,
                              Serializer(self._models_dict(api_version)),
                              Deserializer(self._models_dict(api_version)))

    @property
    def ea_subscription_rollback_to_legacy_pricing_model(self):
        """Instance depends on the API version:

           * 2017-10-01: :class:`EASubscriptionRollbackToLegacyPricingModelOperations<azure.mgmt.applicationinsights.v2017_10_01.operations.EASubscriptionRollbackToLegacyPricingModelOperations>`
        """
        api_version = self._get_api_version(
            'ea_subscription_rollback_to_legacy_pricing_model')
        if api_version == '2017-10-01':
            from .v2017_10_01.operations import EASubscriptionRollbackToLegacyPricingModelOperations as OperationClass
        else:
            raise ValueError(
                "API version {} does not have operation group 'ea_subscription_rollback_to_legacy_pricing_model'"
                .format(api_version))
        return OperationClass(self._client, self._config,
                              Serializer(self._models_dict(api_version)),
                              Deserializer(self._models_dict(api_version)))

    @property
    def export_configurations(self):
        """Instance depends on the API version:

           * 2015-05-01: :class:`ExportConfigurationsOperations<azure.mgmt.applicationinsights.v2015_05_01.operations.ExportConfigurationsOperations>`
        """
        api_version = self._get_api_version('export_configurations')
        if api_version == '2015-05-01':
            from .v2015_05_01.operations import ExportConfigurationsOperations as OperationClass
        else:
            raise ValueError(
                "API version {} does not have operation group 'export_configurations'"
                .format(api_version))
        return OperationClass(self._client, self._config,
                              Serializer(self._models_dict(api_version)),
                              Deserializer(self._models_dict(api_version)))

    @property
    def favorites(self):
        """Instance depends on the API version:

           * 2015-05-01: :class:`FavoritesOperations<azure.mgmt.applicationinsights.v2015_05_01.operations.FavoritesOperations>`
        """
        api_version = self._get_api_version('favorites')
        if api_version == '2015-05-01':
            from .v2015_05_01.operations import FavoritesOperations as OperationClass
        else:
            raise ValueError(
                "API version {} does not have operation group 'favorites'".
                format(api_version))
        return OperationClass(self._client, self._config,
                              Serializer(self._models_dict(api_version)),
                              Deserializer(self._models_dict(api_version)))

    @property
    def live_token(self):
        """Instance depends on the API version:

           * 2020-06-02-preview: :class:`LiveTokenOperations<azure.mgmt.applicationinsights.v2020_06_02_preview.operations.LiveTokenOperations>`
        """
        api_version = self._get_api_version('live_token')
        if api_version == '2020-06-02-preview':
            from .v2020_06_02_preview.operations import LiveTokenOperations as OperationClass
        else:
            raise ValueError(
                "API version {} does not have operation group 'live_token'".
                format(api_version))
        return OperationClass(self._client, self._config,
                              Serializer(self._models_dict(api_version)),
                              Deserializer(self._models_dict(api_version)))

    @property
    def my_workbooks(self):
        """Instance depends on the API version:

           * 2015-05-01: :class:`MyWorkbooksOperations<azure.mgmt.applicationinsights.v2015_05_01.operations.MyWorkbooksOperations>`
        """
        api_version = self._get_api_version('my_workbooks')
        if api_version == '2015-05-01':
            from .v2015_05_01.operations import MyWorkbooksOperations as OperationClass
        else:
            raise ValueError(
                "API version {} does not have operation group 'my_workbooks'".
                format(api_version))
        return OperationClass(self._client, self._config,
                              Serializer(self._models_dict(api_version)),
                              Deserializer(self._models_dict(api_version)))

    @property
    def operations(self):
        """Instance depends on the API version:

           * 2015-05-01: :class:`Operations<azure.mgmt.applicationinsights.v2015_05_01.operations.Operations>`
           * 2020-06-02-preview: :class:`Operations<azure.mgmt.applicationinsights.v2020_06_02_preview.operations.Operations>`
        """
        api_version = self._get_api_version('operations')
        if api_version == '2015-05-01':
            from .v2015_05_01.operations import Operations as OperationClass
        elif api_version == '2020-06-02-preview':
            from .v2020_06_02_preview.operations import Operations as OperationClass
        else:
            raise ValueError(
                "API version {} does not have operation group 'operations'".
                format(api_version))
        return OperationClass(self._client, self._config,
                              Serializer(self._models_dict(api_version)),
                              Deserializer(self._models_dict(api_version)))

    @property
    def proactive_detection_configurations(self):
        """Instance depends on the API version:

           * 2015-05-01: :class:`ProactiveDetectionConfigurationsOperations<azure.mgmt.applicationinsights.v2015_05_01.operations.ProactiveDetectionConfigurationsOperations>`
           * 2018-05-01-preview: :class:`ProactiveDetectionConfigurationsOperations<azure.mgmt.applicationinsights.v2018_05_01_preview.operations.ProactiveDetectionConfigurationsOperations>`
        """
        api_version = self._get_api_version(
            'proactive_detection_configurations')
        if api_version == '2015-05-01':
            from .v2015_05_01.operations import ProactiveDetectionConfigurationsOperations as OperationClass
        elif api_version == '2018-05-01-preview':
            from .v2018_05_01_preview.operations import ProactiveDetectionConfigurationsOperations as OperationClass
        else:
            raise ValueError(
                "API version {} does not have operation group 'proactive_detection_configurations'"
                .format(api_version))
        return OperationClass(self._client, self._config,
                              Serializer(self._models_dict(api_version)),
                              Deserializer(self._models_dict(api_version)))

    @property
    def web_test_locations(self):
        """Instance depends on the API version:

           * 2015-05-01: :class:`WebTestLocationsOperations<azure.mgmt.applicationinsights.v2015_05_01.operations.WebTestLocationsOperations>`
        """
        api_version = self._get_api_version('web_test_locations')
        if api_version == '2015-05-01':
            from .v2015_05_01.operations import WebTestLocationsOperations as OperationClass
        else:
            raise ValueError(
                "API version {} does not have operation group 'web_test_locations'"
                .format(api_version))
        return OperationClass(self._client, self._config,
                              Serializer(self._models_dict(api_version)),
                              Deserializer(self._models_dict(api_version)))

    @property
    def web_tests(self):
        """Instance depends on the API version:

           * 2015-05-01: :class:`WebTestsOperations<azure.mgmt.applicationinsights.v2015_05_01.operations.WebTestsOperations>`
           * 2018-05-01-preview: :class:`WebTestsOperations<azure.mgmt.applicationinsights.v2018_05_01_preview.operations.WebTestsOperations>`
        """
        api_version = self._get_api_version('web_tests')
        if api_version == '2015-05-01':
            from .v2015_05_01.operations import WebTestsOperations as OperationClass
        elif api_version == '2018-05-01-preview':
            from .v2018_05_01_preview.operations import WebTestsOperations as OperationClass
        else:
            raise ValueError(
                "API version {} does not have operation group 'web_tests'".
                format(api_version))
        return OperationClass(self._client, self._config,
                              Serializer(self._models_dict(api_version)),
                              Deserializer(self._models_dict(api_version)))

    @property
    def work_item_configurations(self):
        """Instance depends on the API version:

           * 2015-05-01: :class:`WorkItemConfigurationsOperations<azure.mgmt.applicationinsights.v2015_05_01.operations.WorkItemConfigurationsOperations>`
        """
        api_version = self._get_api_version('work_item_configurations')
        if api_version == '2015-05-01':
            from .v2015_05_01.operations import WorkItemConfigurationsOperations as OperationClass
        else:
            raise ValueError(
                "API version {} does not have operation group 'work_item_configurations'"
                .format(api_version))
        return OperationClass(self._client, self._config,
                              Serializer(self._models_dict(api_version)),
                              Deserializer(self._models_dict(api_version)))

    @property
    def workbook_templates(self):
        """Instance depends on the API version:

           * 2019-10-17-preview: :class:`WorkbookTemplatesOperations<azure.mgmt.applicationinsights.v2019_10_17_preview.operations.WorkbookTemplatesOperations>`
        """
        api_version = self._get_api_version('workbook_templates')
        if api_version == '2019-10-17-preview':
            from .v2019_10_17_preview.operations import WorkbookTemplatesOperations as OperationClass
        else:
            raise ValueError(
                "API version {} does not have operation group 'workbook_templates'"
                .format(api_version))
        return OperationClass(self._client, self._config,
                              Serializer(self._models_dict(api_version)),
                              Deserializer(self._models_dict(api_version)))

    @property
    def workbooks(self):
        """Instance depends on the API version:

           * 2015-05-01: :class:`WorkbooksOperations<azure.mgmt.applicationinsights.v2015_05_01.operations.WorkbooksOperations>`
           * 2018-06-17-preview: :class:`WorkbooksOperations<azure.mgmt.applicationinsights.v2018_06_17_preview.operations.WorkbooksOperations>`
        """
        api_version = self._get_api_version('workbooks')
        if api_version == '2015-05-01':
            from .v2015_05_01.operations import WorkbooksOperations as OperationClass
        elif api_version == '2018-06-17-preview':
            from .v2018_06_17_preview.operations import WorkbooksOperations as OperationClass
        else:
            raise ValueError(
                "API version {} does not have operation group 'workbooks'".
                format(api_version))
        return OperationClass(self._client, self._config,
                              Serializer(self._models_dict(api_version)),
                              Deserializer(self._models_dict(api_version)))

    def close(self):
        self._client.close()

    def __enter__(self):
        self._client.__enter__()
        return self

    def __exit__(self, *exc_details):
        self._client.__exit__(*exc_details)
class DataBoxEdgeManagementClient(object):
    """The DataBoxEdge Client.

    :ivar operations: Operations operations
    :vartype operations: azure.mgmt.databoxedge.operations.Operations
    :ivar devices: DevicesOperations operations
    :vartype devices: azure.mgmt.databoxedge.operations.DevicesOperations
    :ivar alerts: AlertsOperations operations
    :vartype alerts: azure.mgmt.databoxedge.operations.AlertsOperations
    :ivar bandwidth_schedules: BandwidthSchedulesOperations operations
    :vartype bandwidth_schedules: azure.mgmt.databoxedge.operations.BandwidthSchedulesOperations
    :ivar jobs: JobsOperations operations
    :vartype jobs: azure.mgmt.databoxedge.operations.JobsOperations
    :ivar operations_status: OperationsStatusOperations operations
    :vartype operations_status: azure.mgmt.databoxedge.operations.OperationsStatusOperations
    :ivar orders: OrdersOperations operations
    :vartype orders: azure.mgmt.databoxedge.operations.OrdersOperations
    :ivar roles: RolesOperations operations
    :vartype roles: azure.mgmt.databoxedge.operations.RolesOperations
    :ivar shares: SharesOperations operations
    :vartype shares: azure.mgmt.databoxedge.operations.SharesOperations
    :ivar storage_account_credentials: StorageAccountCredentialsOperations operations
    :vartype storage_account_credentials: azure.mgmt.databoxedge.operations.StorageAccountCredentialsOperations
    :ivar triggers: TriggersOperations operations
    :vartype triggers: azure.mgmt.databoxedge.operations.TriggersOperations
    :ivar users: UsersOperations operations
    :vartype users: azure.mgmt.databoxedge.operations.UsersOperations
    :param credential: Credential needed for the client to connect to Azure.
    :type credential: ~azure.core.credentials.TokenCredential
    :param subscription_id: The subscription ID.
    :type subscription_id: str
    :param str base_url: Service URL
    :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
    """
    def __init__(
            self,
            credential,  # type: "TokenCredential"
            subscription_id,  # type: str
            base_url=None,  # type: Optional[str]
            **kwargs  # type: Any
    ):
        # type: (...) -> None
        if not base_url:
            base_url = 'https://management.azure.com'
        self._config = DataBoxEdgeManagementClientConfiguration(
            credential, subscription_id, **kwargs)
        self._client = ARMPipelineClient(base_url=base_url,
                                         config=self._config,
                                         **kwargs)

        client_models = {
            k: v
            for k, v in models.__dict__.items() if isinstance(v, type)
        }
        self._serialize = Serializer(client_models)
        self._serialize.client_side_validation = False
        self._deserialize = Deserializer(client_models)

        self.operations = Operations(self._client, self._config,
                                     self._serialize, self._deserialize)
        self.devices = DevicesOperations(self._client, self._config,
                                         self._serialize, self._deserialize)
        self.alerts = AlertsOperations(self._client, self._config,
                                       self._serialize, self._deserialize)
        self.bandwidth_schedules = BandwidthSchedulesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.jobs = JobsOperations(self._client, self._config, self._serialize,
                                   self._deserialize)
        self.operations_status = OperationsStatusOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.orders = OrdersOperations(self._client, self._config,
                                       self._serialize, self._deserialize)
        self.roles = RolesOperations(self._client, self._config,
                                     self._serialize, self._deserialize)
        self.shares = SharesOperations(self._client, self._config,
                                       self._serialize, self._deserialize)
        self.storage_account_credentials = StorageAccountCredentialsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.triggers = TriggersOperations(self._client, self._config,
                                           self._serialize, self._deserialize)
        self.users = UsersOperations(self._client, self._config,
                                     self._serialize, self._deserialize)

    def close(self):
        # type: () -> None
        self._client.close()

    def __enter__(self):
        # type: () -> DataBoxEdgeManagementClient
        self._client.__enter__()
        return self

    def __exit__(self, *exc_details):
        # type: (Any) -> None
        self._client.__exit__(*exc_details)
class NetworkManagementClient(NetworkManagementClientOperationsMixin):
    """Network Client.

    :ivar application_gateways: ApplicationGatewaysOperations operations
    :vartype application_gateways: azure.mgmt.network.v2020_08_01.operations.ApplicationGatewaysOperations
    :ivar application_gateway_private_link_resources: ApplicationGatewayPrivateLinkResourcesOperations operations
    :vartype application_gateway_private_link_resources: azure.mgmt.network.v2020_08_01.operations.ApplicationGatewayPrivateLinkResourcesOperations
    :ivar application_gateway_private_endpoint_connections: ApplicationGatewayPrivateEndpointConnectionsOperations operations
    :vartype application_gateway_private_endpoint_connections: azure.mgmt.network.v2020_08_01.operations.ApplicationGatewayPrivateEndpointConnectionsOperations
    :ivar application_security_groups: ApplicationSecurityGroupsOperations operations
    :vartype application_security_groups: azure.mgmt.network.v2020_08_01.operations.ApplicationSecurityGroupsOperations
    :ivar available_delegations: AvailableDelegationsOperations operations
    :vartype available_delegations: azure.mgmt.network.v2020_08_01.operations.AvailableDelegationsOperations
    :ivar available_resource_group_delegations: AvailableResourceGroupDelegationsOperations operations
    :vartype available_resource_group_delegations: azure.mgmt.network.v2020_08_01.operations.AvailableResourceGroupDelegationsOperations
    :ivar available_service_aliases: AvailableServiceAliasesOperations operations
    :vartype available_service_aliases: azure.mgmt.network.v2020_08_01.operations.AvailableServiceAliasesOperations
    :ivar azure_firewalls: AzureFirewallsOperations operations
    :vartype azure_firewalls: azure.mgmt.network.v2020_08_01.operations.AzureFirewallsOperations
    :ivar azure_firewall_fqdn_tags: AzureFirewallFqdnTagsOperations operations
    :vartype azure_firewall_fqdn_tags: azure.mgmt.network.v2020_08_01.operations.AzureFirewallFqdnTagsOperations
    :ivar web_categories: WebCategoriesOperations operations
    :vartype web_categories: azure.mgmt.network.v2020_08_01.operations.WebCategoriesOperations
    :ivar bastion_hosts: BastionHostsOperations operations
    :vartype bastion_hosts: azure.mgmt.network.v2020_08_01.operations.BastionHostsOperations
    :ivar custom_ip_prefixes: CustomIPPrefixesOperations operations
    :vartype custom_ip_prefixes: azure.mgmt.network.v2020_08_01.operations.CustomIPPrefixesOperations
    :ivar ddos_custom_policies: DdosCustomPoliciesOperations operations
    :vartype ddos_custom_policies: azure.mgmt.network.v2020_08_01.operations.DdosCustomPoliciesOperations
    :ivar ddos_protection_plans: DdosProtectionPlansOperations operations
    :vartype ddos_protection_plans: azure.mgmt.network.v2020_08_01.operations.DdosProtectionPlansOperations
    :ivar dscp_configuration: DscpConfigurationOperations operations
    :vartype dscp_configuration: azure.mgmt.network.v2020_08_01.operations.DscpConfigurationOperations
    :ivar available_endpoint_services: AvailableEndpointServicesOperations operations
    :vartype available_endpoint_services: azure.mgmt.network.v2020_08_01.operations.AvailableEndpointServicesOperations
    :ivar express_route_circuit_authorizations: ExpressRouteCircuitAuthorizationsOperations operations
    :vartype express_route_circuit_authorizations: azure.mgmt.network.v2020_08_01.operations.ExpressRouteCircuitAuthorizationsOperations
    :ivar express_route_circuit_peerings: ExpressRouteCircuitPeeringsOperations operations
    :vartype express_route_circuit_peerings: azure.mgmt.network.v2020_08_01.operations.ExpressRouteCircuitPeeringsOperations
    :ivar express_route_circuit_connections: ExpressRouteCircuitConnectionsOperations operations
    :vartype express_route_circuit_connections: azure.mgmt.network.v2020_08_01.operations.ExpressRouteCircuitConnectionsOperations
    :ivar peer_express_route_circuit_connections: PeerExpressRouteCircuitConnectionsOperations operations
    :vartype peer_express_route_circuit_connections: azure.mgmt.network.v2020_08_01.operations.PeerExpressRouteCircuitConnectionsOperations
    :ivar express_route_circuits: ExpressRouteCircuitsOperations operations
    :vartype express_route_circuits: azure.mgmt.network.v2020_08_01.operations.ExpressRouteCircuitsOperations
    :ivar express_route_service_providers: ExpressRouteServiceProvidersOperations operations
    :vartype express_route_service_providers: azure.mgmt.network.v2020_08_01.operations.ExpressRouteServiceProvidersOperations
    :ivar express_route_cross_connections: ExpressRouteCrossConnectionsOperations operations
    :vartype express_route_cross_connections: azure.mgmt.network.v2020_08_01.operations.ExpressRouteCrossConnectionsOperations
    :ivar express_route_cross_connection_peerings: ExpressRouteCrossConnectionPeeringsOperations operations
    :vartype express_route_cross_connection_peerings: azure.mgmt.network.v2020_08_01.operations.ExpressRouteCrossConnectionPeeringsOperations
    :ivar express_route_ports_locations: ExpressRoutePortsLocationsOperations operations
    :vartype express_route_ports_locations: azure.mgmt.network.v2020_08_01.operations.ExpressRoutePortsLocationsOperations
    :ivar express_route_ports: ExpressRoutePortsOperations operations
    :vartype express_route_ports: azure.mgmt.network.v2020_08_01.operations.ExpressRoutePortsOperations
    :ivar express_route_links: ExpressRouteLinksOperations operations
    :vartype express_route_links: azure.mgmt.network.v2020_08_01.operations.ExpressRouteLinksOperations
    :ivar firewall_policies: FirewallPoliciesOperations operations
    :vartype firewall_policies: azure.mgmt.network.v2020_08_01.operations.FirewallPoliciesOperations
    :ivar firewall_policy_rule_collection_groups: FirewallPolicyRuleCollectionGroupsOperations operations
    :vartype firewall_policy_rule_collection_groups: azure.mgmt.network.v2020_08_01.operations.FirewallPolicyRuleCollectionGroupsOperations
    :ivar ip_allocations: IpAllocationsOperations operations
    :vartype ip_allocations: azure.mgmt.network.v2020_08_01.operations.IpAllocationsOperations
    :ivar ip_groups: IpGroupsOperations operations
    :vartype ip_groups: azure.mgmt.network.v2020_08_01.operations.IpGroupsOperations
    :ivar load_balancers: LoadBalancersOperations operations
    :vartype load_balancers: azure.mgmt.network.v2020_08_01.operations.LoadBalancersOperations
    :ivar load_balancer_backend_address_pools: LoadBalancerBackendAddressPoolsOperations operations
    :vartype load_balancer_backend_address_pools: azure.mgmt.network.v2020_08_01.operations.LoadBalancerBackendAddressPoolsOperations
    :ivar load_balancer_frontend_ip_configurations: LoadBalancerFrontendIPConfigurationsOperations operations
    :vartype load_balancer_frontend_ip_configurations: azure.mgmt.network.v2020_08_01.operations.LoadBalancerFrontendIPConfigurationsOperations
    :ivar inbound_nat_rules: InboundNatRulesOperations operations
    :vartype inbound_nat_rules: azure.mgmt.network.v2020_08_01.operations.InboundNatRulesOperations
    :ivar load_balancer_load_balancing_rules: LoadBalancerLoadBalancingRulesOperations operations
    :vartype load_balancer_load_balancing_rules: azure.mgmt.network.v2020_08_01.operations.LoadBalancerLoadBalancingRulesOperations
    :ivar load_balancer_outbound_rules: LoadBalancerOutboundRulesOperations operations
    :vartype load_balancer_outbound_rules: azure.mgmt.network.v2020_08_01.operations.LoadBalancerOutboundRulesOperations
    :ivar load_balancer_network_interfaces: LoadBalancerNetworkInterfacesOperations operations
    :vartype load_balancer_network_interfaces: azure.mgmt.network.v2020_08_01.operations.LoadBalancerNetworkInterfacesOperations
    :ivar load_balancer_probes: LoadBalancerProbesOperations operations
    :vartype load_balancer_probes: azure.mgmt.network.v2020_08_01.operations.LoadBalancerProbesOperations
    :ivar nat_gateways: NatGatewaysOperations operations
    :vartype nat_gateways: azure.mgmt.network.v2020_08_01.operations.NatGatewaysOperations
    :ivar network_interfaces: NetworkInterfacesOperations operations
    :vartype network_interfaces: azure.mgmt.network.v2020_08_01.operations.NetworkInterfacesOperations
    :ivar network_interface_ip_configurations: NetworkInterfaceIPConfigurationsOperations operations
    :vartype network_interface_ip_configurations: azure.mgmt.network.v2020_08_01.operations.NetworkInterfaceIPConfigurationsOperations
    :ivar network_interface_load_balancers: NetworkInterfaceLoadBalancersOperations operations
    :vartype network_interface_load_balancers: azure.mgmt.network.v2020_08_01.operations.NetworkInterfaceLoadBalancersOperations
    :ivar network_interface_tap_configurations: NetworkInterfaceTapConfigurationsOperations operations
    :vartype network_interface_tap_configurations: azure.mgmt.network.v2020_08_01.operations.NetworkInterfaceTapConfigurationsOperations
    :ivar network_profiles: NetworkProfilesOperations operations
    :vartype network_profiles: azure.mgmt.network.v2020_08_01.operations.NetworkProfilesOperations
    :ivar network_security_groups: NetworkSecurityGroupsOperations operations
    :vartype network_security_groups: azure.mgmt.network.v2020_08_01.operations.NetworkSecurityGroupsOperations
    :ivar security_rules: SecurityRulesOperations operations
    :vartype security_rules: azure.mgmt.network.v2020_08_01.operations.SecurityRulesOperations
    :ivar default_security_rules: DefaultSecurityRulesOperations operations
    :vartype default_security_rules: azure.mgmt.network.v2020_08_01.operations.DefaultSecurityRulesOperations
    :ivar network_virtual_appliances: NetworkVirtualAppliancesOperations operations
    :vartype network_virtual_appliances: azure.mgmt.network.v2020_08_01.operations.NetworkVirtualAppliancesOperations
    :ivar virtual_appliance_sites: VirtualApplianceSitesOperations operations
    :vartype virtual_appliance_sites: azure.mgmt.network.v2020_08_01.operations.VirtualApplianceSitesOperations
    :ivar virtual_appliance_skus: VirtualApplianceSkusOperations operations
    :vartype virtual_appliance_skus: azure.mgmt.network.v2020_08_01.operations.VirtualApplianceSkusOperations
    :ivar inbound_security_rule: InboundSecurityRuleOperations operations
    :vartype inbound_security_rule: azure.mgmt.network.v2020_08_01.operations.InboundSecurityRuleOperations
    :ivar network_watchers: NetworkWatchersOperations operations
    :vartype network_watchers: azure.mgmt.network.v2020_08_01.operations.NetworkWatchersOperations
    :ivar packet_captures: PacketCapturesOperations operations
    :vartype packet_captures: azure.mgmt.network.v2020_08_01.operations.PacketCapturesOperations
    :ivar connection_monitors: ConnectionMonitorsOperations operations
    :vartype connection_monitors: azure.mgmt.network.v2020_08_01.operations.ConnectionMonitorsOperations
    :ivar flow_logs: FlowLogsOperations operations
    :vartype flow_logs: azure.mgmt.network.v2020_08_01.operations.FlowLogsOperations
    :ivar operations: Operations operations
    :vartype operations: azure.mgmt.network.v2020_08_01.operations.Operations
    :ivar private_endpoints: PrivateEndpointsOperations operations
    :vartype private_endpoints: azure.mgmt.network.v2020_08_01.operations.PrivateEndpointsOperations
    :ivar available_private_endpoint_types: AvailablePrivateEndpointTypesOperations operations
    :vartype available_private_endpoint_types: azure.mgmt.network.v2020_08_01.operations.AvailablePrivateEndpointTypesOperations
    :ivar private_dns_zone_groups: PrivateDnsZoneGroupsOperations operations
    :vartype private_dns_zone_groups: azure.mgmt.network.v2020_08_01.operations.PrivateDnsZoneGroupsOperations
    :ivar private_link_services: PrivateLinkServicesOperations operations
    :vartype private_link_services: azure.mgmt.network.v2020_08_01.operations.PrivateLinkServicesOperations
    :ivar public_ip_addresses: PublicIPAddressesOperations operations
    :vartype public_ip_addresses: azure.mgmt.network.v2020_08_01.operations.PublicIPAddressesOperations
    :ivar public_ip_prefixes: PublicIPPrefixesOperations operations
    :vartype public_ip_prefixes: azure.mgmt.network.v2020_08_01.operations.PublicIPPrefixesOperations
    :ivar route_filters: RouteFiltersOperations operations
    :vartype route_filters: azure.mgmt.network.v2020_08_01.operations.RouteFiltersOperations
    :ivar route_filter_rules: RouteFilterRulesOperations operations
    :vartype route_filter_rules: azure.mgmt.network.v2020_08_01.operations.RouteFilterRulesOperations
    :ivar route_tables: RouteTablesOperations operations
    :vartype route_tables: azure.mgmt.network.v2020_08_01.operations.RouteTablesOperations
    :ivar routes: RoutesOperations operations
    :vartype routes: azure.mgmt.network.v2020_08_01.operations.RoutesOperations
    :ivar security_partner_providers: SecurityPartnerProvidersOperations operations
    :vartype security_partner_providers: azure.mgmt.network.v2020_08_01.operations.SecurityPartnerProvidersOperations
    :ivar bgp_service_communities: BgpServiceCommunitiesOperations operations
    :vartype bgp_service_communities: azure.mgmt.network.v2020_08_01.operations.BgpServiceCommunitiesOperations
    :ivar service_endpoint_policies: ServiceEndpointPoliciesOperations operations
    :vartype service_endpoint_policies: azure.mgmt.network.v2020_08_01.operations.ServiceEndpointPoliciesOperations
    :ivar service_endpoint_policy_definitions: ServiceEndpointPolicyDefinitionsOperations operations
    :vartype service_endpoint_policy_definitions: azure.mgmt.network.v2020_08_01.operations.ServiceEndpointPolicyDefinitionsOperations
    :ivar service_tags: ServiceTagsOperations operations
    :vartype service_tags: azure.mgmt.network.v2020_08_01.operations.ServiceTagsOperations
    :ivar usages: UsagesOperations operations
    :vartype usages: azure.mgmt.network.v2020_08_01.operations.UsagesOperations
    :ivar virtual_networks: VirtualNetworksOperations operations
    :vartype virtual_networks: azure.mgmt.network.v2020_08_01.operations.VirtualNetworksOperations
    :ivar subnets: SubnetsOperations operations
    :vartype subnets: azure.mgmt.network.v2020_08_01.operations.SubnetsOperations
    :ivar resource_navigation_links: ResourceNavigationLinksOperations operations
    :vartype resource_navigation_links: azure.mgmt.network.v2020_08_01.operations.ResourceNavigationLinksOperations
    :ivar service_association_links: ServiceAssociationLinksOperations operations
    :vartype service_association_links: azure.mgmt.network.v2020_08_01.operations.ServiceAssociationLinksOperations
    :ivar virtual_network_peerings: VirtualNetworkPeeringsOperations operations
    :vartype virtual_network_peerings: azure.mgmt.network.v2020_08_01.operations.VirtualNetworkPeeringsOperations
    :ivar virtual_network_gateways: VirtualNetworkGatewaysOperations operations
    :vartype virtual_network_gateways: azure.mgmt.network.v2020_08_01.operations.VirtualNetworkGatewaysOperations
    :ivar virtual_network_gateway_connections: VirtualNetworkGatewayConnectionsOperations operations
    :vartype virtual_network_gateway_connections: azure.mgmt.network.v2020_08_01.operations.VirtualNetworkGatewayConnectionsOperations
    :ivar local_network_gateways: LocalNetworkGatewaysOperations operations
    :vartype local_network_gateways: azure.mgmt.network.v2020_08_01.operations.LocalNetworkGatewaysOperations
    :ivar virtual_network_taps: VirtualNetworkTapsOperations operations
    :vartype virtual_network_taps: azure.mgmt.network.v2020_08_01.operations.VirtualNetworkTapsOperations
    :ivar virtual_routers: VirtualRoutersOperations operations
    :vartype virtual_routers: azure.mgmt.network.v2020_08_01.operations.VirtualRoutersOperations
    :ivar virtual_router_peerings: VirtualRouterPeeringsOperations operations
    :vartype virtual_router_peerings: azure.mgmt.network.v2020_08_01.operations.VirtualRouterPeeringsOperations
    :ivar virtual_wans: VirtualWansOperations operations
    :vartype virtual_wans: azure.mgmt.network.v2020_08_01.operations.VirtualWansOperations
    :ivar vpn_sites: VpnSitesOperations operations
    :vartype vpn_sites: azure.mgmt.network.v2020_08_01.operations.VpnSitesOperations
    :ivar vpn_site_links: VpnSiteLinksOperations operations
    :vartype vpn_site_links: azure.mgmt.network.v2020_08_01.operations.VpnSiteLinksOperations
    :ivar vpn_sites_configuration: VpnSitesConfigurationOperations operations
    :vartype vpn_sites_configuration: azure.mgmt.network.v2020_08_01.operations.VpnSitesConfigurationOperations
    :ivar vpn_server_configurations: VpnServerConfigurationsOperations operations
    :vartype vpn_server_configurations: azure.mgmt.network.v2020_08_01.operations.VpnServerConfigurationsOperations
    :ivar virtual_hubs: VirtualHubsOperations operations
    :vartype virtual_hubs: azure.mgmt.network.v2020_08_01.operations.VirtualHubsOperations
    :ivar hub_virtual_network_connections: HubVirtualNetworkConnectionsOperations operations
    :vartype hub_virtual_network_connections: azure.mgmt.network.v2020_08_01.operations.HubVirtualNetworkConnectionsOperations
    :ivar vpn_gateways: VpnGatewaysOperations operations
    :vartype vpn_gateways: azure.mgmt.network.v2020_08_01.operations.VpnGatewaysOperations
    :ivar vpn_connections: VpnConnectionsOperations operations
    :vartype vpn_connections: azure.mgmt.network.v2020_08_01.operations.VpnConnectionsOperations
    :ivar vpn_site_link_connections: VpnSiteLinkConnectionsOperations operations
    :vartype vpn_site_link_connections: azure.mgmt.network.v2020_08_01.operations.VpnSiteLinkConnectionsOperations
    :ivar vpn_link_connections: VpnLinkConnectionsOperations operations
    :vartype vpn_link_connections: azure.mgmt.network.v2020_08_01.operations.VpnLinkConnectionsOperations
    :ivar nat_rules: NatRulesOperations operations
    :vartype nat_rules: azure.mgmt.network.v2020_08_01.operations.NatRulesOperations
    :ivar p2_svpn_gateways: P2SVpnGatewaysOperations operations
    :vartype p2_svpn_gateways: azure.mgmt.network.v2020_08_01.operations.P2SVpnGatewaysOperations
    :ivar vpn_server_configurations_associated_with_virtual_wan: VpnServerConfigurationsAssociatedWithVirtualWanOperations operations
    :vartype vpn_server_configurations_associated_with_virtual_wan: azure.mgmt.network.v2020_08_01.operations.VpnServerConfigurationsAssociatedWithVirtualWanOperations
    :ivar virtual_hub_route_table_v2_s: VirtualHubRouteTableV2SOperations operations
    :vartype virtual_hub_route_table_v2_s: azure.mgmt.network.v2020_08_01.operations.VirtualHubRouteTableV2SOperations
    :ivar express_route_gateways: ExpressRouteGatewaysOperations operations
    :vartype express_route_gateways: azure.mgmt.network.v2020_08_01.operations.ExpressRouteGatewaysOperations
    :ivar express_route_connections: ExpressRouteConnectionsOperations operations
    :vartype express_route_connections: azure.mgmt.network.v2020_08_01.operations.ExpressRouteConnectionsOperations
    :ivar virtual_hub_bgp_connection: VirtualHubBgpConnectionOperations operations
    :vartype virtual_hub_bgp_connection: azure.mgmt.network.v2020_08_01.operations.VirtualHubBgpConnectionOperations
    :ivar virtual_hub_bgp_connections: VirtualHubBgpConnectionsOperations operations
    :vartype virtual_hub_bgp_connections: azure.mgmt.network.v2020_08_01.operations.VirtualHubBgpConnectionsOperations
    :ivar virtual_hub_ip_configuration: VirtualHubIpConfigurationOperations operations
    :vartype virtual_hub_ip_configuration: azure.mgmt.network.v2020_08_01.operations.VirtualHubIpConfigurationOperations
    :ivar hub_route_tables: HubRouteTablesOperations operations
    :vartype hub_route_tables: azure.mgmt.network.v2020_08_01.operations.HubRouteTablesOperations
    :ivar web_application_firewall_policies: WebApplicationFirewallPoliciesOperations operations
    :vartype web_application_firewall_policies: azure.mgmt.network.v2020_08_01.operations.WebApplicationFirewallPoliciesOperations
    :param credential: Credential needed for the client to connect to Azure.
    :type credential: ~azure.core.credentials.TokenCredential
    :param subscription_id: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
    :type subscription_id: str
    :param str base_url: Service URL
    :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
    """

    def __init__(
        self,
        credential,  # type: "TokenCredential"
        subscription_id,  # type: str
        base_url=None,  # type: Optional[str]
        **kwargs  # type: Any
    ):
        # type: (...) -> None
        if not base_url:
            base_url = 'https://management.azure.com'
        self._config = NetworkManagementClientConfiguration(credential, subscription_id, **kwargs)
        self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)

        client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
        self._serialize = Serializer(client_models)
        self._deserialize = Deserializer(client_models)

        self.application_gateways = ApplicationGatewaysOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.application_gateway_private_link_resources = ApplicationGatewayPrivateLinkResourcesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.application_gateway_private_endpoint_connections = ApplicationGatewayPrivateEndpointConnectionsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.application_security_groups = ApplicationSecurityGroupsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.available_delegations = AvailableDelegationsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.available_resource_group_delegations = AvailableResourceGroupDelegationsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.available_service_aliases = AvailableServiceAliasesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.azure_firewalls = AzureFirewallsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.azure_firewall_fqdn_tags = AzureFirewallFqdnTagsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.web_categories = WebCategoriesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.bastion_hosts = BastionHostsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.custom_ip_prefixes = CustomIPPrefixesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.ddos_custom_policies = DdosCustomPoliciesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.ddos_protection_plans = DdosProtectionPlansOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.dscp_configuration = DscpConfigurationOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.available_endpoint_services = AvailableEndpointServicesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.express_route_circuit_authorizations = ExpressRouteCircuitAuthorizationsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.express_route_circuit_peerings = ExpressRouteCircuitPeeringsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.express_route_circuit_connections = ExpressRouteCircuitConnectionsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.peer_express_route_circuit_connections = PeerExpressRouteCircuitConnectionsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.express_route_circuits = ExpressRouteCircuitsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.express_route_service_providers = ExpressRouteServiceProvidersOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.express_route_cross_connections = ExpressRouteCrossConnectionsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.express_route_cross_connection_peerings = ExpressRouteCrossConnectionPeeringsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.express_route_ports_locations = ExpressRoutePortsLocationsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.express_route_ports = ExpressRoutePortsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.express_route_links = ExpressRouteLinksOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.firewall_policies = FirewallPoliciesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.firewall_policy_rule_collection_groups = FirewallPolicyRuleCollectionGroupsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.ip_allocations = IpAllocationsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.ip_groups = IpGroupsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.load_balancers = LoadBalancersOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.load_balancer_backend_address_pools = LoadBalancerBackendAddressPoolsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.load_balancer_frontend_ip_configurations = LoadBalancerFrontendIPConfigurationsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.inbound_nat_rules = InboundNatRulesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.load_balancer_load_balancing_rules = LoadBalancerLoadBalancingRulesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.load_balancer_outbound_rules = LoadBalancerOutboundRulesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.load_balancer_network_interfaces = LoadBalancerNetworkInterfacesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.load_balancer_probes = LoadBalancerProbesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.nat_gateways = NatGatewaysOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.network_interfaces = NetworkInterfacesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.network_interface_ip_configurations = NetworkInterfaceIPConfigurationsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.network_interface_load_balancers = NetworkInterfaceLoadBalancersOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.network_interface_tap_configurations = NetworkInterfaceTapConfigurationsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.network_profiles = NetworkProfilesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.network_security_groups = NetworkSecurityGroupsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.security_rules = SecurityRulesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.default_security_rules = DefaultSecurityRulesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.network_virtual_appliances = NetworkVirtualAppliancesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.virtual_appliance_sites = VirtualApplianceSitesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.virtual_appliance_skus = VirtualApplianceSkusOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.inbound_security_rule = InboundSecurityRuleOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.network_watchers = NetworkWatchersOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.packet_captures = PacketCapturesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.connection_monitors = ConnectionMonitorsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.flow_logs = FlowLogsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.operations = Operations(
            self._client, self._config, self._serialize, self._deserialize)
        self.private_endpoints = PrivateEndpointsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.available_private_endpoint_types = AvailablePrivateEndpointTypesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.private_dns_zone_groups = PrivateDnsZoneGroupsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.private_link_services = PrivateLinkServicesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.public_ip_addresses = PublicIPAddressesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.public_ip_prefixes = PublicIPPrefixesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.route_filters = RouteFiltersOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.route_filter_rules = RouteFilterRulesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.route_tables = RouteTablesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.routes = RoutesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.security_partner_providers = SecurityPartnerProvidersOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.bgp_service_communities = BgpServiceCommunitiesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.service_endpoint_policies = ServiceEndpointPoliciesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.service_endpoint_policy_definitions = ServiceEndpointPolicyDefinitionsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.service_tags = ServiceTagsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.usages = UsagesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.virtual_networks = VirtualNetworksOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.subnets = SubnetsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.resource_navigation_links = ResourceNavigationLinksOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.service_association_links = ServiceAssociationLinksOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.virtual_network_peerings = VirtualNetworkPeeringsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.virtual_network_gateways = VirtualNetworkGatewaysOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.virtual_network_gateway_connections = VirtualNetworkGatewayConnectionsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.local_network_gateways = LocalNetworkGatewaysOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.virtual_network_taps = VirtualNetworkTapsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.virtual_routers = VirtualRoutersOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.virtual_router_peerings = VirtualRouterPeeringsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.virtual_wans = VirtualWansOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.vpn_sites = VpnSitesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.vpn_site_links = VpnSiteLinksOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.vpn_sites_configuration = VpnSitesConfigurationOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.vpn_server_configurations = VpnServerConfigurationsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.virtual_hubs = VirtualHubsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.hub_virtual_network_connections = HubVirtualNetworkConnectionsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.vpn_gateways = VpnGatewaysOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.vpn_connections = VpnConnectionsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.vpn_site_link_connections = VpnSiteLinkConnectionsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.vpn_link_connections = VpnLinkConnectionsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.nat_rules = NatRulesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.p2_svpn_gateways = P2SVpnGatewaysOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.vpn_server_configurations_associated_with_virtual_wan = VpnServerConfigurationsAssociatedWithVirtualWanOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.virtual_hub_route_table_v2_s = VirtualHubRouteTableV2SOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.express_route_gateways = ExpressRouteGatewaysOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.express_route_connections = ExpressRouteConnectionsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.virtual_hub_bgp_connection = VirtualHubBgpConnectionOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.virtual_hub_bgp_connections = VirtualHubBgpConnectionsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.virtual_hub_ip_configuration = VirtualHubIpConfigurationOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.hub_route_tables = HubRouteTablesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.web_application_firewall_policies = WebApplicationFirewallPoliciesOperations(
            self._client, self._config, self._serialize, self._deserialize)

    def close(self):
        # type: () -> None
        self._client.close()

    def __enter__(self):
        # type: () -> NetworkManagementClient
        self._client.__enter__()
        return self

    def __exit__(self, *exc_details):
        # type: (Any) -> None
        self._client.__exit__(*exc_details)
class CostManagementClient(object):
    """CostManagementClient.

    :ivar views: ViewsOperations operations
    :vartype views: azure.mgmt.costmanagement.operations.ViewsOperations
    :ivar alerts: AlertsOperations operations
    :vartype alerts: azure.mgmt.costmanagement.operations.AlertsOperations
    :ivar forecast: ForecastOperations operations
    :vartype forecast: azure.mgmt.costmanagement.operations.ForecastOperations
    :ivar dimensions: DimensionsOperations operations
    :vartype dimensions: azure.mgmt.costmanagement.operations.DimensionsOperations
    :ivar query: QueryOperations operations
    :vartype query: azure.mgmt.costmanagement.operations.QueryOperations
    :ivar operations: Operations operations
    :vartype operations: azure.mgmt.costmanagement.operations.Operations
    :ivar exports: ExportsOperations operations
    :vartype exports: azure.mgmt.costmanagement.operations.ExportsOperations
    :param credential: Credential needed for the client to connect to Azure.
    :type credential: ~azure.core.credentials.TokenCredential
    :param str base_url: Service URL
    """
    def __init__(
            self,
            credential,  # type: "TokenCredential"
            base_url=None,  # type: Optional[str]
            **kwargs  # type: Any
    ):
        # type: (...) -> None
        if not base_url:
            base_url = 'https://management.azure.com'
        self._config = CostManagementClientConfiguration(credential, **kwargs)
        self._client = ARMPipelineClient(base_url=base_url,
                                         config=self._config,
                                         **kwargs)

        client_models = {
            k: v
            for k, v in models.__dict__.items() if isinstance(v, type)
        }
        self._serialize = Serializer(client_models)
        self._serialize.client_side_validation = False
        self._deserialize = Deserializer(client_models)

        self.views = ViewsOperations(self._client, self._config,
                                     self._serialize, self._deserialize)
        self.alerts = AlertsOperations(self._client, self._config,
                                       self._serialize, self._deserialize)
        self.forecast = ForecastOperations(self._client, self._config,
                                           self._serialize, self._deserialize)
        self.dimensions = DimensionsOperations(self._client, self._config,
                                               self._serialize,
                                               self._deserialize)
        self.query = QueryOperations(self._client, self._config,
                                     self._serialize, self._deserialize)
        self.operations = Operations(self._client, self._config,
                                     self._serialize, self._deserialize)
        self.exports = ExportsOperations(self._client, self._config,
                                         self._serialize, self._deserialize)

    def close(self):
        # type: () -> None
        self._client.close()

    def __enter__(self):
        # type: () -> CostManagementClient
        self._client.__enter__()
        return self

    def __exit__(self, *exc_details):
        # type: (Any) -> None
        self._client.__exit__(*exc_details)
Exemplo n.º 25
0
class Sites(object):
    """Sites.

    :ivar group: GroupOperations operations
    :vartype group: sites.operations.GroupOperations
    :ivar site_site: SiteSiteOperations operations
    :vartype site_site: sites.operations.SiteSiteOperations
    :ivar site: SiteOperations operations
    :vartype site: sites.operations.SiteOperations
    :ivar site_content_type: SiteContentTypeOperations operations
    :vartype site_content_type: sites.operations.SiteContentTypeOperations
    :ivar site_list: SiteListOperations operations
    :vartype site_list: sites.operations.SiteListOperations
    :ivar site_list_content_type: SiteListContentTypeOperations operations
    :vartype site_list_content_type: sites.operations.SiteListContentTypeOperations
    :ivar site_list_item: SiteListItemOperations operations
    :vartype site_list_item: sites.operations.SiteListItemOperations
    :ivar site_list_item_version: SiteListItemVersionOperations operations
    :vartype site_list_item_version: sites.operations.SiteListItemVersionOperations
    :ivar site_onenote_notebook: SiteOnenoteNotebookOperations operations
    :vartype site_onenote_notebook: sites.operations.SiteOnenoteNotebookOperations
    :ivar site_onenote_notebook_section_group_parent_notebook: SiteOnenoteNotebookSectionGroupParentNotebookOperations operations
    :vartype site_onenote_notebook_section_group_parent_notebook: sites.operations.SiteOnenoteNotebookSectionGroupParentNotebookOperations
    :ivar site_onenote_notebook_section_group_section: SiteOnenoteNotebookSectionGroupSectionOperations operations
    :vartype site_onenote_notebook_section_group_section: sites.operations.SiteOnenoteNotebookSectionGroupSectionOperations
    :ivar site_onenote_notebook_section_group_section_page: SiteOnenoteNotebookSectionGroupSectionPageOperations operations
    :vartype site_onenote_notebook_section_group_section_page: sites.operations.SiteOnenoteNotebookSectionGroupSectionPageOperations
    :ivar site_onenote_notebook_section_group_section_page_parent_notebook: SiteOnenoteNotebookSectionGroupSectionPageParentNotebookOperations operations
    :vartype site_onenote_notebook_section_group_section_page_parent_notebook: sites.operations.SiteOnenoteNotebookSectionGroupSectionPageParentNotebookOperations
    :ivar site_onenote_notebook_section_group_section_page_parent_section: SiteOnenoteNotebookSectionGroupSectionPageParentSectionOperations operations
    :vartype site_onenote_notebook_section_group_section_page_parent_section: sites.operations.SiteOnenoteNotebookSectionGroupSectionPageParentSectionOperations
    :ivar site_onenote_notebook_section_group_section_parent_notebook: SiteOnenoteNotebookSectionGroupSectionParentNotebookOperations operations
    :vartype site_onenote_notebook_section_group_section_parent_notebook: sites.operations.SiteOnenoteNotebookSectionGroupSectionParentNotebookOperations
    :ivar site_onenote_notebook_section: SiteOnenoteNotebookSectionOperations operations
    :vartype site_onenote_notebook_section: sites.operations.SiteOnenoteNotebookSectionOperations
    :ivar site_onenote_notebook_section_page: SiteOnenoteNotebookSectionPageOperations operations
    :vartype site_onenote_notebook_section_page: sites.operations.SiteOnenoteNotebookSectionPageOperations
    :ivar site_onenote_notebook_section_page_parent_notebook: SiteOnenoteNotebookSectionPageParentNotebookOperations operations
    :vartype site_onenote_notebook_section_page_parent_notebook: sites.operations.SiteOnenoteNotebookSectionPageParentNotebookOperations
    :ivar site_onenote_notebook_section_page_parent_section: SiteOnenoteNotebookSectionPageParentSectionOperations operations
    :vartype site_onenote_notebook_section_page_parent_section: sites.operations.SiteOnenoteNotebookSectionPageParentSectionOperations
    :ivar site_onenote_notebook_section_parent_notebook: SiteOnenoteNotebookSectionParentNotebookOperations operations
    :vartype site_onenote_notebook_section_parent_notebook: sites.operations.SiteOnenoteNotebookSectionParentNotebookOperations
    :ivar site_onenote_notebook_section_parent_section_group_parent_notebook: SiteOnenoteNotebookSectionParentSectionGroupParentNotebookOperations operations
    :vartype site_onenote_notebook_section_parent_section_group_parent_notebook: sites.operations.SiteOnenoteNotebookSectionParentSectionGroupParentNotebookOperations
    :ivar site_onenote_notebook_section_parent_section_group_section: SiteOnenoteNotebookSectionParentSectionGroupSectionOperations operations
    :vartype site_onenote_notebook_section_parent_section_group_section: sites.operations.SiteOnenoteNotebookSectionParentSectionGroupSectionOperations
    :ivar site_onenote_page: SiteOnenotePageOperations operations
    :vartype site_onenote_page: sites.operations.SiteOnenotePageOperations
    :ivar site_onenote_page_parent_notebook: SiteOnenotePageParentNotebookOperations operations
    :vartype site_onenote_page_parent_notebook: sites.operations.SiteOnenotePageParentNotebookOperations
    :ivar site_onenote_page_parent_notebook_section_group_parent_notebook: SiteOnenotePageParentNotebookSectionGroupParentNotebookOperations operations
    :vartype site_onenote_page_parent_notebook_section_group_parent_notebook: sites.operations.SiteOnenotePageParentNotebookSectionGroupParentNotebookOperations
    :ivar site_onenote_page_parent_notebook_section_group_section: SiteOnenotePageParentNotebookSectionGroupSectionOperations operations
    :vartype site_onenote_page_parent_notebook_section_group_section: sites.operations.SiteOnenotePageParentNotebookSectionGroupSectionOperations
    :ivar site_onenote_page_parent_notebook_section_group_section_page: SiteOnenotePageParentNotebookSectionGroupSectionPageOperations operations
    :vartype site_onenote_page_parent_notebook_section_group_section_page: sites.operations.SiteOnenotePageParentNotebookSectionGroupSectionPageOperations
    :ivar site_onenote_page_parent_notebook_section_group_section_parent_notebook: SiteOnenotePageParentNotebookSectionGroupSectionParentNotebookOperations operations
    :vartype site_onenote_page_parent_notebook_section_group_section_parent_notebook: sites.operations.SiteOnenotePageParentNotebookSectionGroupSectionParentNotebookOperations
    :ivar site_onenote_page_parent_notebook_section: SiteOnenotePageParentNotebookSectionOperations operations
    :vartype site_onenote_page_parent_notebook_section: sites.operations.SiteOnenotePageParentNotebookSectionOperations
    :ivar site_onenote_page_parent_notebook_section_page: SiteOnenotePageParentNotebookSectionPageOperations operations
    :vartype site_onenote_page_parent_notebook_section_page: sites.operations.SiteOnenotePageParentNotebookSectionPageOperations
    :ivar site_onenote_page_parent_notebook_section_parent_notebook: SiteOnenotePageParentNotebookSectionParentNotebookOperations operations
    :vartype site_onenote_page_parent_notebook_section_parent_notebook: sites.operations.SiteOnenotePageParentNotebookSectionParentNotebookOperations
    :ivar site_onenote_page_parent_notebook_section_parent_section_group_parent_notebook: SiteOnenotePageParentNotebookSectionParentSectionGroupParentNotebookOperations operations
    :vartype site_onenote_page_parent_notebook_section_parent_section_group_parent_notebook: sites.operations.SiteOnenotePageParentNotebookSectionParentSectionGroupParentNotebookOperations
    :ivar site_onenote_page_parent_notebook_section_parent_section_group_section: SiteOnenotePageParentNotebookSectionParentSectionGroupSectionOperations operations
    :vartype site_onenote_page_parent_notebook_section_parent_section_group_section: sites.operations.SiteOnenotePageParentNotebookSectionParentSectionGroupSectionOperations
    :ivar site_onenote_page_parent_section: SiteOnenotePageParentSectionOperations operations
    :vartype site_onenote_page_parent_section: sites.operations.SiteOnenotePageParentSectionOperations
    :ivar site_onenote_page_parent_section_page: SiteOnenotePageParentSectionPageOperations operations
    :vartype site_onenote_page_parent_section_page: sites.operations.SiteOnenotePageParentSectionPageOperations
    :ivar site_onenote_page_parent_section_parent_notebook: SiteOnenotePageParentSectionParentNotebookOperations operations
    :vartype site_onenote_page_parent_section_parent_notebook: sites.operations.SiteOnenotePageParentSectionParentNotebookOperations
    :ivar site_onenote_page_parent_section_parent_notebook_section_group_parent_notebook: SiteOnenotePageParentSectionParentNotebookSectionGroupParentNotebookOperations operations
    :vartype site_onenote_page_parent_section_parent_notebook_section_group_parent_notebook: sites.operations.SiteOnenotePageParentSectionParentNotebookSectionGroupParentNotebookOperations
    :ivar site_onenote_page_parent_section_parent_notebook_section_group_section: SiteOnenotePageParentSectionParentNotebookSectionGroupSectionOperations operations
    :vartype site_onenote_page_parent_section_parent_notebook_section_group_section: sites.operations.SiteOnenotePageParentSectionParentNotebookSectionGroupSectionOperations
    :ivar site_onenote_page_parent_section_parent_notebook_section: SiteOnenotePageParentSectionParentNotebookSectionOperations operations
    :vartype site_onenote_page_parent_section_parent_notebook_section: sites.operations.SiteOnenotePageParentSectionParentNotebookSectionOperations
    :ivar site_onenote_page_parent_section_parent_section_group_parent_notebook: SiteOnenotePageParentSectionParentSectionGroupParentNotebookOperations operations
    :vartype site_onenote_page_parent_section_parent_section_group_parent_notebook: sites.operations.SiteOnenotePageParentSectionParentSectionGroupParentNotebookOperations
    :ivar site_onenote_page_parent_section_parent_section_group_parent_notebook_section: SiteOnenotePageParentSectionParentSectionGroupParentNotebookSectionOperations operations
    :vartype site_onenote_page_parent_section_parent_section_group_parent_notebook_section: sites.operations.SiteOnenotePageParentSectionParentSectionGroupParentNotebookSectionOperations
    :ivar site_onenote_page_parent_section_parent_section_group_section: SiteOnenotePageParentSectionParentSectionGroupSectionOperations operations
    :vartype site_onenote_page_parent_section_parent_section_group_section: sites.operations.SiteOnenotePageParentSectionParentSectionGroupSectionOperations
    :ivar site_onenote_section_group_parent_notebook: SiteOnenoteSectionGroupParentNotebookOperations operations
    :vartype site_onenote_section_group_parent_notebook: sites.operations.SiteOnenoteSectionGroupParentNotebookOperations
    :ivar site_onenote_section_group_parent_notebook_section: SiteOnenoteSectionGroupParentNotebookSectionOperations operations
    :vartype site_onenote_section_group_parent_notebook_section: sites.operations.SiteOnenoteSectionGroupParentNotebookSectionOperations
    :ivar site_onenote_section_group_parent_notebook_section_page: SiteOnenoteSectionGroupParentNotebookSectionPageOperations operations
    :vartype site_onenote_section_group_parent_notebook_section_page: sites.operations.SiteOnenoteSectionGroupParentNotebookSectionPageOperations
    :ivar site_onenote_section_group_parent_notebook_section_page_parent_notebook: SiteOnenoteSectionGroupParentNotebookSectionPageParentNotebookOperations operations
    :vartype site_onenote_section_group_parent_notebook_section_page_parent_notebook: sites.operations.SiteOnenoteSectionGroupParentNotebookSectionPageParentNotebookOperations
    :ivar site_onenote_section_group_parent_notebook_section_page_parent_section: SiteOnenoteSectionGroupParentNotebookSectionPageParentSectionOperations operations
    :vartype site_onenote_section_group_parent_notebook_section_page_parent_section: sites.operations.SiteOnenoteSectionGroupParentNotebookSectionPageParentSectionOperations
    :ivar site_onenote_section_group_parent_notebook_section_parent_notebook: SiteOnenoteSectionGroupParentNotebookSectionParentNotebookOperations operations
    :vartype site_onenote_section_group_parent_notebook_section_parent_notebook: sites.operations.SiteOnenoteSectionGroupParentNotebookSectionParentNotebookOperations
    :ivar site_onenote_section_group_section: SiteOnenoteSectionGroupSectionOperations operations
    :vartype site_onenote_section_group_section: sites.operations.SiteOnenoteSectionGroupSectionOperations
    :ivar site_onenote_section_group_section_page: SiteOnenoteSectionGroupSectionPageOperations operations
    :vartype site_onenote_section_group_section_page: sites.operations.SiteOnenoteSectionGroupSectionPageOperations
    :ivar site_onenote_section_group_section_page_parent_notebook: SiteOnenoteSectionGroupSectionPageParentNotebookOperations operations
    :vartype site_onenote_section_group_section_page_parent_notebook: sites.operations.SiteOnenoteSectionGroupSectionPageParentNotebookOperations
    :ivar site_onenote_section_group_section_page_parent_notebook_section: SiteOnenoteSectionGroupSectionPageParentNotebookSectionOperations operations
    :vartype site_onenote_section_group_section_page_parent_notebook_section: sites.operations.SiteOnenoteSectionGroupSectionPageParentNotebookSectionOperations
    :ivar site_onenote_section_group_section_page_parent_section: SiteOnenoteSectionGroupSectionPageParentSectionOperations operations
    :vartype site_onenote_section_group_section_page_parent_section: sites.operations.SiteOnenoteSectionGroupSectionPageParentSectionOperations
    :ivar site_onenote_section_group_section_parent_notebook: SiteOnenoteSectionGroupSectionParentNotebookOperations operations
    :vartype site_onenote_section_group_section_parent_notebook: sites.operations.SiteOnenoteSectionGroupSectionParentNotebookOperations
    :ivar site_onenote_section_group_section_parent_notebook_section: SiteOnenoteSectionGroupSectionParentNotebookSectionOperations operations
    :vartype site_onenote_section_group_section_parent_notebook_section: sites.operations.SiteOnenoteSectionGroupSectionParentNotebookSectionOperations
    :ivar site_onenote_section: SiteOnenoteSectionOperations operations
    :vartype site_onenote_section: sites.operations.SiteOnenoteSectionOperations
    :ivar site_onenote_section_page: SiteOnenoteSectionPageOperations operations
    :vartype site_onenote_section_page: sites.operations.SiteOnenoteSectionPageOperations
    :ivar site_onenote_section_page_parent_notebook: SiteOnenoteSectionPageParentNotebookOperations operations
    :vartype site_onenote_section_page_parent_notebook: sites.operations.SiteOnenoteSectionPageParentNotebookOperations
    :ivar site_onenote_section_page_parent_notebook_section_group_parent_notebook: SiteOnenoteSectionPageParentNotebookSectionGroupParentNotebookOperations operations
    :vartype site_onenote_section_page_parent_notebook_section_group_parent_notebook: sites.operations.SiteOnenoteSectionPageParentNotebookSectionGroupParentNotebookOperations
    :ivar site_onenote_section_page_parent_notebook_section_group_section: SiteOnenoteSectionPageParentNotebookSectionGroupSectionOperations operations
    :vartype site_onenote_section_page_parent_notebook_section_group_section: sites.operations.SiteOnenoteSectionPageParentNotebookSectionGroupSectionOperations
    :ivar site_onenote_section_page_parent_notebook_section: SiteOnenoteSectionPageParentNotebookSectionOperations operations
    :vartype site_onenote_section_page_parent_notebook_section: sites.operations.SiteOnenoteSectionPageParentNotebookSectionOperations
    :ivar site_onenote_section_page_parent_section: SiteOnenoteSectionPageParentSectionOperations operations
    :vartype site_onenote_section_page_parent_section: sites.operations.SiteOnenoteSectionPageParentSectionOperations
    :ivar site_onenote_section_parent_notebook: SiteOnenoteSectionParentNotebookOperations operations
    :vartype site_onenote_section_parent_notebook: sites.operations.SiteOnenoteSectionParentNotebookOperations
    :ivar site_onenote_section_parent_notebook_section_group_parent_notebook: SiteOnenoteSectionParentNotebookSectionGroupParentNotebookOperations operations
    :vartype site_onenote_section_parent_notebook_section_group_parent_notebook: sites.operations.SiteOnenoteSectionParentNotebookSectionGroupParentNotebookOperations
    :ivar site_onenote_section_parent_notebook_section_group_section: SiteOnenoteSectionParentNotebookSectionGroupSectionOperations operations
    :vartype site_onenote_section_parent_notebook_section_group_section: sites.operations.SiteOnenoteSectionParentNotebookSectionGroupSectionOperations
    :ivar site_onenote_section_parent_notebook_section: SiteOnenoteSectionParentNotebookSectionOperations operations
    :vartype site_onenote_section_parent_notebook_section: sites.operations.SiteOnenoteSectionParentNotebookSectionOperations
    :ivar site_onenote_section_parent_section_group_parent_notebook: SiteOnenoteSectionParentSectionGroupParentNotebookOperations operations
    :vartype site_onenote_section_parent_section_group_parent_notebook: sites.operations.SiteOnenoteSectionParentSectionGroupParentNotebookOperations
    :ivar site_onenote_section_parent_section_group_parent_notebook_section: SiteOnenoteSectionParentSectionGroupParentNotebookSectionOperations operations
    :vartype site_onenote_section_parent_section_group_parent_notebook_section: sites.operations.SiteOnenoteSectionParentSectionGroupParentNotebookSectionOperations
    :ivar site_onenote_section_parent_section_group_section: SiteOnenoteSectionParentSectionGroupSectionOperations operations
    :vartype site_onenote_section_parent_section_group_section: sites.operations.SiteOnenoteSectionParentSectionGroupSectionOperations
    :ivar user: UserOperations operations
    :vartype user: sites.operations.UserOperations
    :param credential: Credential needed for the client to connect to Azure.
    :type credential: ~azure.core.credentials.TokenCredential
    :param top: Show only the first n items.
    :type top: int
    :param skip: Skip the first n items.
    :type skip: int
    :param search: Search items by search phrases.
    :type search: str
    :param filter: Filter items by property values.
    :type filter: str
    :param count: Include count of items.
    :type count: bool
    :param str base_url: Service URL
    :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
    """
    def __init__(
            self,
            credential,  # type: "TokenCredential"
            top=None,  # type: Optional[int]
            skip=None,  # type: Optional[int]
            search=None,  # type: Optional[str]
            filter=None,  # type: Optional[str]
            count=None,  # type: Optional[bool]
            base_url=None,  # type: Optional[str]
            **kwargs  # type: Any
    ):
        # type: (...) -> None
        if not base_url:
            base_url = 'https://graph.microsoft.com/v1.0'
        self._config = SitesConfiguration(credential, top, skip, search,
                                          filter, count, **kwargs)
        self._client = ARMPipelineClient(base_url=base_url,
                                         config=self._config,
                                         **kwargs)

        client_models = {
            k: v
            for k, v in models.__dict__.items() if isinstance(v, type)
        }
        self._serialize = Serializer(client_models)
        self._deserialize = Deserializer(client_models)

        self.group = GroupOperations(self._client, self._config,
                                     self._serialize, self._deserialize)
        self.site_site = SiteSiteOperations(self._client, self._config,
                                            self._serialize, self._deserialize)
        self.site = SiteOperations(self._client, self._config, self._serialize,
                                   self._deserialize)
        self.site_content_type = SiteContentTypeOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.site_list = SiteListOperations(self._client, self._config,
                                            self._serialize, self._deserialize)
        self.site_list_content_type = SiteListContentTypeOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.site_list_item = SiteListItemOperations(self._client,
                                                     self._config,
                                                     self._serialize,
                                                     self._deserialize)
        self.site_list_item_version = SiteListItemVersionOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.site_onenote_notebook = SiteOnenoteNotebookOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.site_onenote_notebook_section_group_parent_notebook = SiteOnenoteNotebookSectionGroupParentNotebookOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.site_onenote_notebook_section_group_section = SiteOnenoteNotebookSectionGroupSectionOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.site_onenote_notebook_section_group_section_page = SiteOnenoteNotebookSectionGroupSectionPageOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.site_onenote_notebook_section_group_section_page_parent_notebook = SiteOnenoteNotebookSectionGroupSectionPageParentNotebookOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.site_onenote_notebook_section_group_section_page_parent_section = SiteOnenoteNotebookSectionGroupSectionPageParentSectionOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.site_onenote_notebook_section_group_section_parent_notebook = SiteOnenoteNotebookSectionGroupSectionParentNotebookOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.site_onenote_notebook_section = SiteOnenoteNotebookSectionOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.site_onenote_notebook_section_page = SiteOnenoteNotebookSectionPageOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.site_onenote_notebook_section_page_parent_notebook = SiteOnenoteNotebookSectionPageParentNotebookOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.site_onenote_notebook_section_page_parent_section = SiteOnenoteNotebookSectionPageParentSectionOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.site_onenote_notebook_section_parent_notebook = SiteOnenoteNotebookSectionParentNotebookOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.site_onenote_notebook_section_parent_section_group_parent_notebook = SiteOnenoteNotebookSectionParentSectionGroupParentNotebookOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.site_onenote_notebook_section_parent_section_group_section = SiteOnenoteNotebookSectionParentSectionGroupSectionOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.site_onenote_page = SiteOnenotePageOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.site_onenote_page_parent_notebook = SiteOnenotePageParentNotebookOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.site_onenote_page_parent_notebook_section_group_parent_notebook = SiteOnenotePageParentNotebookSectionGroupParentNotebookOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.site_onenote_page_parent_notebook_section_group_section = SiteOnenotePageParentNotebookSectionGroupSectionOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.site_onenote_page_parent_notebook_section_group_section_page = SiteOnenotePageParentNotebookSectionGroupSectionPageOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.site_onenote_page_parent_notebook_section_group_section_parent_notebook = SiteOnenotePageParentNotebookSectionGroupSectionParentNotebookOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.site_onenote_page_parent_notebook_section = SiteOnenotePageParentNotebookSectionOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.site_onenote_page_parent_notebook_section_page = SiteOnenotePageParentNotebookSectionPageOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.site_onenote_page_parent_notebook_section_parent_notebook = SiteOnenotePageParentNotebookSectionParentNotebookOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.site_onenote_page_parent_notebook_section_parent_section_group_parent_notebook = SiteOnenotePageParentNotebookSectionParentSectionGroupParentNotebookOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.site_onenote_page_parent_notebook_section_parent_section_group_section = SiteOnenotePageParentNotebookSectionParentSectionGroupSectionOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.site_onenote_page_parent_section = SiteOnenotePageParentSectionOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.site_onenote_page_parent_section_page = SiteOnenotePageParentSectionPageOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.site_onenote_page_parent_section_parent_notebook = SiteOnenotePageParentSectionParentNotebookOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.site_onenote_page_parent_section_parent_notebook_section_group_parent_notebook = SiteOnenotePageParentSectionParentNotebookSectionGroupParentNotebookOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.site_onenote_page_parent_section_parent_notebook_section_group_section = SiteOnenotePageParentSectionParentNotebookSectionGroupSectionOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.site_onenote_page_parent_section_parent_notebook_section = SiteOnenotePageParentSectionParentNotebookSectionOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.site_onenote_page_parent_section_parent_section_group_parent_notebook = SiteOnenotePageParentSectionParentSectionGroupParentNotebookOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.site_onenote_page_parent_section_parent_section_group_parent_notebook_section = SiteOnenotePageParentSectionParentSectionGroupParentNotebookSectionOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.site_onenote_page_parent_section_parent_section_group_section = SiteOnenotePageParentSectionParentSectionGroupSectionOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.site_onenote_section_group_parent_notebook = SiteOnenoteSectionGroupParentNotebookOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.site_onenote_section_group_parent_notebook_section = SiteOnenoteSectionGroupParentNotebookSectionOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.site_onenote_section_group_parent_notebook_section_page = SiteOnenoteSectionGroupParentNotebookSectionPageOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.site_onenote_section_group_parent_notebook_section_page_parent_notebook = SiteOnenoteSectionGroupParentNotebookSectionPageParentNotebookOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.site_onenote_section_group_parent_notebook_section_page_parent_section = SiteOnenoteSectionGroupParentNotebookSectionPageParentSectionOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.site_onenote_section_group_parent_notebook_section_parent_notebook = SiteOnenoteSectionGroupParentNotebookSectionParentNotebookOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.site_onenote_section_group_section = SiteOnenoteSectionGroupSectionOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.site_onenote_section_group_section_page = SiteOnenoteSectionGroupSectionPageOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.site_onenote_section_group_section_page_parent_notebook = SiteOnenoteSectionGroupSectionPageParentNotebookOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.site_onenote_section_group_section_page_parent_notebook_section = SiteOnenoteSectionGroupSectionPageParentNotebookSectionOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.site_onenote_section_group_section_page_parent_section = SiteOnenoteSectionGroupSectionPageParentSectionOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.site_onenote_section_group_section_parent_notebook = SiteOnenoteSectionGroupSectionParentNotebookOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.site_onenote_section_group_section_parent_notebook_section = SiteOnenoteSectionGroupSectionParentNotebookSectionOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.site_onenote_section = SiteOnenoteSectionOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.site_onenote_section_page = SiteOnenoteSectionPageOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.site_onenote_section_page_parent_notebook = SiteOnenoteSectionPageParentNotebookOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.site_onenote_section_page_parent_notebook_section_group_parent_notebook = SiteOnenoteSectionPageParentNotebookSectionGroupParentNotebookOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.site_onenote_section_page_parent_notebook_section_group_section = SiteOnenoteSectionPageParentNotebookSectionGroupSectionOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.site_onenote_section_page_parent_notebook_section = SiteOnenoteSectionPageParentNotebookSectionOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.site_onenote_section_page_parent_section = SiteOnenoteSectionPageParentSectionOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.site_onenote_section_parent_notebook = SiteOnenoteSectionParentNotebookOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.site_onenote_section_parent_notebook_section_group_parent_notebook = SiteOnenoteSectionParentNotebookSectionGroupParentNotebookOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.site_onenote_section_parent_notebook_section_group_section = SiteOnenoteSectionParentNotebookSectionGroupSectionOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.site_onenote_section_parent_notebook_section = SiteOnenoteSectionParentNotebookSectionOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.site_onenote_section_parent_section_group_parent_notebook = SiteOnenoteSectionParentSectionGroupParentNotebookOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.site_onenote_section_parent_section_group_parent_notebook_section = SiteOnenoteSectionParentSectionGroupParentNotebookSectionOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.site_onenote_section_parent_section_group_section = SiteOnenoteSectionParentSectionGroupSectionOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.user = UserOperations(self._client, self._config, self._serialize,
                                   self._deserialize)

    def close(self):
        # type: () -> None
        self._client.close()

    def __enter__(self):
        # type: () -> Sites
        self._client.__enter__()
        return self

    def __exit__(self, *exc_details):
        # type: (Any) -> None
        self._client.__exit__(*exc_details)
class ServiceBusManagementClient(object):
    """Azure Service Bus client for managing Namespace, IPFilter Rules, VirtualNetworkRules and Zone Redundant.

    :ivar namespaces: NamespacesOperations operations
    :vartype namespaces: azure.mgmt.servicebus.v2018_01_01_preview.operations.NamespacesOperations
    :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations
    :vartype private_endpoint_connections: azure.mgmt.servicebus.v2018_01_01_preview.operations.PrivateEndpointConnectionsOperations
    :ivar private_link_resources: PrivateLinkResourcesOperations operations
    :vartype private_link_resources: azure.mgmt.servicebus.v2018_01_01_preview.operations.PrivateLinkResourcesOperations
    :ivar disaster_recovery_configs: DisasterRecoveryConfigsOperations operations
    :vartype disaster_recovery_configs: azure.mgmt.servicebus.v2018_01_01_preview.operations.DisasterRecoveryConfigsOperations
    :ivar queues: QueuesOperations operations
    :vartype queues: azure.mgmt.servicebus.v2018_01_01_preview.operations.QueuesOperations
    :ivar topics: TopicsOperations operations
    :vartype topics: azure.mgmt.servicebus.v2018_01_01_preview.operations.TopicsOperations
    :ivar event_hubs: EventHubsOperations operations
    :vartype event_hubs: azure.mgmt.servicebus.v2018_01_01_preview.operations.EventHubsOperations
    :ivar migration_configs: MigrationConfigsOperations operations
    :vartype migration_configs: azure.mgmt.servicebus.v2018_01_01_preview.operations.MigrationConfigsOperations
    :ivar premium_messaging_regions: PremiumMessagingRegionsOperations operations
    :vartype premium_messaging_regions: azure.mgmt.servicebus.v2018_01_01_preview.operations.PremiumMessagingRegionsOperations
    :ivar regions: RegionsOperations operations
    :vartype regions: azure.mgmt.servicebus.v2018_01_01_preview.operations.RegionsOperations
    :ivar subscriptions: SubscriptionsOperations operations
    :vartype subscriptions: azure.mgmt.servicebus.v2018_01_01_preview.operations.SubscriptionsOperations
    :ivar rules: RulesOperations operations
    :vartype rules: azure.mgmt.servicebus.v2018_01_01_preview.operations.RulesOperations
    :ivar operations: Operations operations
    :vartype operations: azure.mgmt.servicebus.v2018_01_01_preview.operations.Operations
    :param credential: Credential needed for the client to connect to Azure.
    :type credential: ~azure.core.credentials.TokenCredential
    :param subscription_id: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
    :type subscription_id: str
    :param str base_url: Service URL
    :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
    """
    def __init__(
            self,
            credential,  # type: "TokenCredential"
            subscription_id,  # type: str
            base_url=None,  # type: Optional[str]
            **kwargs  # type: Any
    ):
        # type: (...) -> None
        if not base_url:
            base_url = 'https://management.azure.com'
        self._config = ServiceBusManagementClientConfiguration(
            credential, subscription_id, **kwargs)
        self._client = ARMPipelineClient(base_url=base_url,
                                         config=self._config,
                                         **kwargs)

        client_models = {
            k: v
            for k, v in models.__dict__.items() if isinstance(v, type)
        }
        self._serialize = Serializer(client_models)
        self._serialize.client_side_validation = False
        self._deserialize = Deserializer(client_models)

        self.namespaces = NamespacesOperations(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)
        self.disaster_recovery_configs = DisasterRecoveryConfigsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.queues = QueuesOperations(self._client, self._config,
                                       self._serialize, self._deserialize)
        self.topics = TopicsOperations(self._client, self._config,
                                       self._serialize, self._deserialize)
        self.event_hubs = EventHubsOperations(self._client, self._config,
                                              self._serialize,
                                              self._deserialize)
        self.migration_configs = MigrationConfigsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.premium_messaging_regions = PremiumMessagingRegionsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.regions = RegionsOperations(self._client, self._config,
                                         self._serialize, self._deserialize)
        self.subscriptions = SubscriptionsOperations(self._client,
                                                     self._config,
                                                     self._serialize,
                                                     self._deserialize)
        self.rules = RulesOperations(self._client, self._config,
                                     self._serialize, self._deserialize)
        self.operations = Operations(self._client, self._config,
                                     self._serialize, self._deserialize)

    def _send_request(self, http_request, **kwargs):
        # type: (HttpRequest, Any) -> HttpResponse
        """Runs the network request through the client's chained policies.

        :param http_request: The network request you want to make. Required.
        :type http_request: ~azure.core.pipeline.transport.HttpRequest
        :keyword bool stream: Whether the response payload will be streamed. Defaults to True.
        :return: The response of your network call. Does not do error handling on your response.
        :rtype: ~azure.core.pipeline.transport.HttpResponse
        """
        path_format_arguments = {
            'subscriptionId':
            self._serialize.url("self._config.subscription_id",
                                self._config.subscription_id, 'str'),
        }
        http_request.url = self._client.format_url(http_request.url,
                                                   **path_format_arguments)
        stream = kwargs.pop("stream", True)
        pipeline_response = self._client._pipeline.run(http_request,
                                                       stream=stream,
                                                       **kwargs)
        return pipeline_response.http_response

    def close(self):
        # type: () -> None
        self._client.close()

    def __enter__(self):
        # type: () -> ServiceBusManagementClient
        self._client.__enter__()
        return self

    def __exit__(self, *exc_details):
        # type: (Any) -> None
        self._client.__exit__(*exc_details)
Exemplo n.º 27
0
class KustoManagementClient(object):
    """The Azure Kusto management API provides a RESTful set of web services that interact with Azure Kusto services to manage your clusters and databases. The API enables you to create, update, and delete clusters and databases.

    :ivar clusters: ClustersOperations operations
    :vartype clusters: azure.mgmt.kusto.operations.ClustersOperations
    :ivar cluster_principal_assignments: ClusterPrincipalAssignmentsOperations operations
    :vartype cluster_principal_assignments: azure.mgmt.kusto.operations.ClusterPrincipalAssignmentsOperations
    :ivar databases: DatabasesOperations operations
    :vartype databases: azure.mgmt.kusto.operations.DatabasesOperations
    :ivar database_principal_assignments: DatabasePrincipalAssignmentsOperations operations
    :vartype database_principal_assignments: azure.mgmt.kusto.operations.DatabasePrincipalAssignmentsOperations
    :ivar attached_database_configurations: AttachedDatabaseConfigurationsOperations operations
    :vartype attached_database_configurations: azure.mgmt.kusto.operations.AttachedDatabaseConfigurationsOperations
    :ivar data_connections: DataConnectionsOperations operations
    :vartype data_connections: azure.mgmt.kusto.operations.DataConnectionsOperations
    :ivar operations: Operations operations
    :vartype operations: azure.mgmt.kusto.operations.Operations
    :param credential: Credential needed for the client to connect to Azure.
    :type credential: ~azure.core.credentials.TokenCredential
    :param subscription_id: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
    :type subscription_id: str
    :param str base_url: Service URL
    :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
    """
    def __init__(
            self,
            credential,  # type: "TokenCredential"
            subscription_id,  # type: str
            base_url=None,  # type: Optional[str]
            **kwargs  # type: Any
    ):
        # type: (...) -> None
        if not base_url:
            base_url = 'https://management.azure.com'
        self._config = KustoManagementClientConfiguration(
            credential, subscription_id, **kwargs)
        self._client = ARMPipelineClient(base_url=base_url,
                                         config=self._config,
                                         **kwargs)

        client_models = {
            k: v
            for k, v in models.__dict__.items() if isinstance(v, type)
        }
        self._serialize = Serializer(client_models)
        self._serialize.client_side_validation = False
        self._deserialize = Deserializer(client_models)

        self.clusters = ClustersOperations(self._client, self._config,
                                           self._serialize, self._deserialize)
        self.cluster_principal_assignments = ClusterPrincipalAssignmentsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.databases = DatabasesOperations(self._client, self._config,
                                             self._serialize,
                                             self._deserialize)
        self.database_principal_assignments = DatabasePrincipalAssignmentsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.attached_database_configurations = AttachedDatabaseConfigurationsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.data_connections = DataConnectionsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.operations = Operations(self._client, self._config,
                                     self._serialize, self._deserialize)

    def close(self):
        # type: () -> None
        self._client.close()

    def __enter__(self):
        # type: () -> KustoManagementClient
        self._client.__enter__()
        return self

    def __exit__(self, *exc_details):
        # type: (Any) -> None
        self._client.__exit__(*exc_details)
class MonitorManagementClient(MultiApiClientMixin, _SDKClient):
    """Monitor Management Client.

    This ready contains multiple API versions, to help you deal with all of the Azure clouds
    (Azure Stack, Azure Government, Azure China, etc.).
    By default, it uses the latest API version available on public Azure.
    For production, you should stick to a particular api-version and/or profile.
    The profile sets a mapping between an operation group and its API version.
    The api-version parameter sets the default API version if the operation
    group is not described in the profile.

    :param credential: Credential needed for the client to connect to Azure.
    :type credential: ~azure.core.credentials.TokenCredential
    :param subscription_id: The Azure subscription Id.
    :type subscription_id: str
    :param str api_version: API version to use if no profile is provided, or if
     missing in profile.
    :param str base_url: Service URL
    :param profile: A profile definition, from KnownProfiles to dict.
    :type profile: azure.profiles.KnownProfiles
    :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
    """

    DEFAULT_API_VERSION = '2019-10-17-preview'
    _PROFILE_TAG = "azure.mgmt.monitor.MonitorManagementClient"
    LATEST_PROFILE = ProfileDefinition(
        {
            _PROFILE_TAG: {
                None: DEFAULT_API_VERSION,
                'action_groups': '2019-06-01',
                'activity_log_alerts': '2017-04-01',
                'activity_logs': '2015-04-01',
                'alert_rule_incidents': '2016-03-01',
                'alert_rules': '2016-03-01',
                'autoscale_settings': '2015-04-01',
                'baseline': '2018-09-01',
                'baselines': '2019-03-01',
                'diagnostic_settings': '2017-05-01-preview',
                'diagnostic_settings_category': '2017-05-01-preview',
                'event_categories': '2015-04-01',
                'guest_diagnostics_settings': '2018-06-01-preview',
                'guest_diagnostics_settings_association': '2018-06-01-preview',
                'log_profiles': '2016-03-01',
                'metric_alerts': '2018-03-01',
                'metric_alerts_status': '2018-03-01',
                'metric_baseline': '2018-09-01',
                'metric_definitions': '2018-01-01',
                'metric_namespaces': '2017-12-01-preview',
                'metrics': '2018-01-01',
                'operations': '2015-04-01',
                'scheduled_query_rules': '2018-04-16',
                'service_diagnostic_settings': '2016-09-01',
                'subscription_diagnostic_settings': '2017-05-01-preview',
                'tenant_activity_logs': '2015-04-01',
                'vm_insights': '2018-11-27-preview',
            }
        }, _PROFILE_TAG + " latest")

    def __init__(
            self,
            credential,  # type: "TokenCredential"
            subscription_id,  # type: str
            api_version=None,
            base_url=None,
            profile=KnownProfiles.default,
            **kwargs  # type: Any
    ):
        if not base_url:
            base_url = 'https://management.azure.com'
        self._config = MonitorManagementClientConfiguration(
            credential, subscription_id, **kwargs)
        self._client = ARMPipelineClient(base_url=base_url,
                                         config=self._config,
                                         **kwargs)
        super(MonitorManagementClient, self).__init__(api_version=api_version,
                                                      profile=profile)

    @classmethod
    def _models_dict(cls, api_version):
        return {
            k: v
            for k, v in cls.models(api_version).__dict__.items()
            if isinstance(v, type)
        }

    @classmethod
    def models(cls, api_version=DEFAULT_API_VERSION):
        """Module depends on the API version:

           * 2015-04-01: :mod:`v2015_04_01.models<azure.mgmt.monitor.v2015_04_01.models>`
           * 2015-07-01: :mod:`v2015_07_01.models<azure.mgmt.monitor.v2015_07_01.models>`
           * 2016-03-01: :mod:`v2016_03_01.models<azure.mgmt.monitor.v2016_03_01.models>`
           * 2016-09-01: :mod:`v2016_09_01.models<azure.mgmt.monitor.v2016_09_01.models>`
           * 2017-03-01-preview: :mod:`v2017_03_01_preview.models<azure.mgmt.monitor.v2017_03_01_preview.models>`
           * 2017-04-01: :mod:`v2017_04_01.models<azure.mgmt.monitor.v2017_04_01.models>`
           * 2017-05-01-preview: :mod:`v2017_05_01_preview.models<azure.mgmt.monitor.v2017_05_01_preview.models>`
           * 2017-11-01-preview: :mod:`v2017_11_01_preview.models<azure.mgmt.monitor.v2017_11_01_preview.models>`
           * 2017-12-01-preview: :mod:`v2017_12_01_preview.models<azure.mgmt.monitor.v2017_12_01_preview.models>`
           * 2018-01-01: :mod:`v2018_01_01.models<azure.mgmt.monitor.v2018_01_01.models>`
           * 2018-03-01: :mod:`v2018_03_01.models<azure.mgmt.monitor.v2018_03_01.models>`
           * 2018-04-16: :mod:`v2018_04_16.models<azure.mgmt.monitor.v2018_04_16.models>`
           * 2018-06-01-preview: :mod:`v2018_06_01_preview.models<azure.mgmt.monitor.v2018_06_01_preview.models>`
           * 2018-09-01: :mod:`v2018_09_01.models<azure.mgmt.monitor.v2018_09_01.models>`
           * 2018-11-27-preview: :mod:`v2018_11_27_preview.models<azure.mgmt.monitor.v2018_11_27_preview.models>`
           * 2019-03-01: :mod:`v2019_03_01.models<azure.mgmt.monitor.v2019_03_01.models>`
           * 2019-06-01: :mod:`v2019_06_01.models<azure.mgmt.monitor.v2019_06_01.models>`
           * 2019-10-17-preview: :mod:`v2019_10_17.models<azure.mgmt.monitor.v2019_10_17.models>`
           * 2019-11-01-preview: :mod:`v2019_11_01_preview.models<azure.mgmt.monitor.v2019_11_01_preview.models>`
           * 2020-01-01-preview: :mod:`v2020_01_01_preview.models<azure.mgmt.monitor.v2020_01_01_preview.models>`
           * 2020-05-01-preview: :mod:`v2020_05_01_preview.models<azure.mgmt.monitor.v2020_05_01_preview.models>`
        """
        if api_version == '2015-04-01':
            from .v2015_04_01 import models
            return models
        elif api_version == '2015-07-01':
            from .v2015_07_01 import models
            return models
        elif api_version == '2016-03-01':
            from .v2016_03_01 import models
            return models
        elif api_version == '2016-09-01':
            from .v2016_09_01 import models
            return models
        elif api_version == '2017-03-01-preview':
            from .v2017_03_01_preview import models
            return models
        elif api_version == '2017-04-01':
            from .v2017_04_01 import models
            return models
        elif api_version == '2017-05-01-preview':
            from .v2017_05_01_preview import models
            return models
        elif api_version == '2017-11-01-preview':
            from .v2017_11_01_preview import models
            return models
        elif api_version == '2017-12-01-preview':
            from .v2017_12_01_preview import models
            return models
        elif api_version == '2018-01-01':
            from .v2018_01_01 import models
            return models
        elif api_version == '2018-03-01':
            from .v2018_03_01 import models
            return models
        elif api_version == '2018-04-16':
            from .v2018_04_16 import models
            return models
        elif api_version == '2018-06-01-preview':
            from .v2018_06_01_preview import models
            return models
        elif api_version == '2018-09-01':
            from .v2018_09_01 import models
            return models
        elif api_version == '2018-11-27-preview':
            from .v2018_11_27_preview import models
            return models
        elif api_version == '2019-03-01':
            from .v2019_03_01 import models
            return models
        elif api_version == '2019-06-01':
            from .v2019_06_01 import models
            return models
        elif api_version == '2019-10-17-preview':
            from .v2019_10_17 import models
            return models
        elif api_version == '2019-11-01-preview':
            from .v2019_11_01_preview import models
            return models
        elif api_version == '2020-01-01-preview':
            from .v2020_01_01_preview import models
            return models
        elif api_version == '2020-05-01-preview':
            from .v2020_05_01_preview import models
            return models
        raise ValueError("API version {} is not available".format(api_version))

    @property
    def action_groups(self):
        """Instance depends on the API version:

           * 2017-04-01: :class:`ActionGroupsOperations<azure.mgmt.monitor.v2017_04_01.operations.ActionGroupsOperations>`
           * 2018-03-01: :class:`ActionGroupsOperations<azure.mgmt.monitor.v2018_03_01.operations.ActionGroupsOperations>`
           * 2018-09-01: :class:`ActionGroupsOperations<azure.mgmt.monitor.v2018_09_01.operations.ActionGroupsOperations>`
           * 2019-03-01: :class:`ActionGroupsOperations<azure.mgmt.monitor.v2019_03_01.operations.ActionGroupsOperations>`
           * 2019-06-01: :class:`ActionGroupsOperations<azure.mgmt.monitor.v2019_06_01.operations.ActionGroupsOperations>`
        """
        api_version = self._get_api_version('action_groups')
        if api_version == '2017-04-01':
            from .v2017_04_01.operations import ActionGroupsOperations as OperationClass
        elif api_version == '2018-03-01':
            from .v2018_03_01.operations import ActionGroupsOperations as OperationClass
        elif api_version == '2018-09-01':
            from .v2018_09_01.operations import ActionGroupsOperations as OperationClass
        elif api_version == '2019-03-01':
            from .v2019_03_01.operations import ActionGroupsOperations as OperationClass
        elif api_version == '2019-06-01':
            from .v2019_06_01.operations import ActionGroupsOperations as OperationClass
        else:
            raise ValueError(
                "API version {} does not have operation group 'action_groups'".
                format(api_version))
        return OperationClass(self._client, self._config,
                              Serializer(self._models_dict(api_version)),
                              Deserializer(self._models_dict(api_version)))

    @property
    def activity_log_alerts(self):
        """Instance depends on the API version:

           * 2017-03-01-preview: :class:`ActivityLogAlertsOperations<azure.mgmt.monitor.v2017_03_01_preview.operations.ActivityLogAlertsOperations>`
           * 2017-04-01: :class:`ActivityLogAlertsOperations<azure.mgmt.monitor.v2017_04_01.operations.ActivityLogAlertsOperations>`
        """
        api_version = self._get_api_version('activity_log_alerts')
        if api_version == '2017-03-01-preview':
            from .v2017_03_01_preview.operations import ActivityLogAlertsOperations as OperationClass
        elif api_version == '2017-04-01':
            from .v2017_04_01.operations import ActivityLogAlertsOperations as OperationClass
        else:
            raise ValueError(
                "API version {} does not have operation group 'activity_log_alerts'"
                .format(api_version))
        return OperationClass(self._client, self._config,
                              Serializer(self._models_dict(api_version)),
                              Deserializer(self._models_dict(api_version)))

    @property
    def activity_logs(self):
        """Instance depends on the API version:

           * 2015-04-01: :class:`ActivityLogsOperations<azure.mgmt.monitor.v2015_04_01.operations.ActivityLogsOperations>`
        """
        api_version = self._get_api_version('activity_logs')
        if api_version == '2015-04-01':
            from .v2015_04_01.operations import ActivityLogsOperations as OperationClass
        else:
            raise ValueError(
                "API version {} does not have operation group 'activity_logs'".
                format(api_version))
        return OperationClass(self._client, self._config,
                              Serializer(self._models_dict(api_version)),
                              Deserializer(self._models_dict(api_version)))

    @property
    def alert_rule_incidents(self):
        """Instance depends on the API version:

           * 2016-03-01: :class:`AlertRuleIncidentsOperations<azure.mgmt.monitor.v2016_03_01.operations.AlertRuleIncidentsOperations>`
        """
        api_version = self._get_api_version('alert_rule_incidents')
        if api_version == '2016-03-01':
            from .v2016_03_01.operations import AlertRuleIncidentsOperations as OperationClass
        else:
            raise ValueError(
                "API version {} does not have operation group 'alert_rule_incidents'"
                .format(api_version))
        return OperationClass(self._client, self._config,
                              Serializer(self._models_dict(api_version)),
                              Deserializer(self._models_dict(api_version)))

    @property
    def alert_rules(self):
        """Instance depends on the API version:

           * 2016-03-01: :class:`AlertRulesOperations<azure.mgmt.monitor.v2016_03_01.operations.AlertRulesOperations>`
        """
        api_version = self._get_api_version('alert_rules')
        if api_version == '2016-03-01':
            from .v2016_03_01.operations import AlertRulesOperations as OperationClass
        else:
            raise ValueError(
                "API version {} does not have operation group 'alert_rules'".
                format(api_version))
        return OperationClass(self._client, self._config,
                              Serializer(self._models_dict(api_version)),
                              Deserializer(self._models_dict(api_version)))

    @property
    def autoscale_settings(self):
        """Instance depends on the API version:

           * 2015-04-01: :class:`AutoscaleSettingsOperations<azure.mgmt.monitor.v2015_04_01.operations.AutoscaleSettingsOperations>`
        """
        api_version = self._get_api_version('autoscale_settings')
        if api_version == '2015-04-01':
            from .v2015_04_01.operations import AutoscaleSettingsOperations as OperationClass
        else:
            raise ValueError(
                "API version {} does not have operation group 'autoscale_settings'"
                .format(api_version))
        return OperationClass(self._client, self._config,
                              Serializer(self._models_dict(api_version)),
                              Deserializer(self._models_dict(api_version)))

    @property
    def baseline(self):
        """Instance depends on the API version:

           * 2018-09-01: :class:`BaselineOperations<azure.mgmt.monitor.v2018_09_01.operations.BaselineOperations>`
        """
        api_version = self._get_api_version('baseline')
        if api_version == '2018-09-01':
            from .v2018_09_01.operations import BaselineOperations as OperationClass
        else:
            raise ValueError(
                "API version {} does not have operation group 'baseline'".
                format(api_version))
        return OperationClass(self._client, self._config,
                              Serializer(self._models_dict(api_version)),
                              Deserializer(self._models_dict(api_version)))

    @property
    def baselines(self):
        """Instance depends on the API version:

           * 2019-03-01: :class:`BaselinesOperations<azure.mgmt.monitor.v2019_03_01.operations.BaselinesOperations>`
        """
        api_version = self._get_api_version('baselines')
        if api_version == '2019-03-01':
            from .v2019_03_01.operations import BaselinesOperations as OperationClass
        else:
            raise ValueError(
                "API version {} does not have operation group 'baselines'".
                format(api_version))
        return OperationClass(self._client, self._config,
                              Serializer(self._models_dict(api_version)),
                              Deserializer(self._models_dict(api_version)))

    @property
    def data_collection_rule_associations(self):
        """Instance depends on the API version:

           * 2019-11-01-preview: :class:`DataCollectionRuleAssociationsOperations<azure.mgmt.monitor.v2019_11_01_preview.operations.DataCollectionRuleAssociationsOperations>`
        """
        api_version = self._get_api_version(
            'data_collection_rule_associations')
        if api_version == '2019-11-01-preview':
            from .v2019_11_01_preview.operations import DataCollectionRuleAssociationsOperations as OperationClass
        else:
            raise ValueError(
                "API version {} does not have operation group 'data_collection_rule_associations'"
                .format(api_version))
        return OperationClass(self._client, self._config,
                              Serializer(self._models_dict(api_version)),
                              Deserializer(self._models_dict(api_version)))

    @property
    def data_collection_rules(self):
        """Instance depends on the API version:

           * 2019-11-01-preview: :class:`DataCollectionRulesOperations<azure.mgmt.monitor.v2019_11_01_preview.operations.DataCollectionRulesOperations>`
        """
        api_version = self._get_api_version('data_collection_rules')
        if api_version == '2019-11-01-preview':
            from .v2019_11_01_preview.operations import DataCollectionRulesOperations as OperationClass
        else:
            raise ValueError(
                "API version {} does not have operation group 'data_collection_rules'"
                .format(api_version))
        return OperationClass(self._client, self._config,
                              Serializer(self._models_dict(api_version)),
                              Deserializer(self._models_dict(api_version)))

    @property
    def diagnostic_settings(self):
        """Instance depends on the API version:

           * 2017-05-01-preview: :class:`DiagnosticSettingsOperations<azure.mgmt.monitor.v2017_05_01_preview.operations.DiagnosticSettingsOperations>`
        """
        api_version = self._get_api_version('diagnostic_settings')
        if api_version == '2017-05-01-preview':
            from .v2017_05_01_preview.operations import DiagnosticSettingsOperations as OperationClass
        else:
            raise ValueError(
                "API version {} does not have operation group 'diagnostic_settings'"
                .format(api_version))
        return OperationClass(self._client, self._config,
                              Serializer(self._models_dict(api_version)),
                              Deserializer(self._models_dict(api_version)))

    @property
    def diagnostic_settings_category(self):
        """Instance depends on the API version:

           * 2017-05-01-preview: :class:`DiagnosticSettingsCategoryOperations<azure.mgmt.monitor.v2017_05_01_preview.operations.DiagnosticSettingsCategoryOperations>`
        """
        api_version = self._get_api_version('diagnostic_settings_category')
        if api_version == '2017-05-01-preview':
            from .v2017_05_01_preview.operations import DiagnosticSettingsCategoryOperations as OperationClass
        else:
            raise ValueError(
                "API version {} does not have operation group 'diagnostic_settings_category'"
                .format(api_version))
        return OperationClass(self._client, self._config,
                              Serializer(self._models_dict(api_version)),
                              Deserializer(self._models_dict(api_version)))

    @property
    def event_categories(self):
        """Instance depends on the API version:

           * 2015-04-01: :class:`EventCategoriesOperations<azure.mgmt.monitor.v2015_04_01.operations.EventCategoriesOperations>`
        """
        api_version = self._get_api_version('event_categories')
        if api_version == '2015-04-01':
            from .v2015_04_01.operations import EventCategoriesOperations as OperationClass
        else:
            raise ValueError(
                "API version {} does not have operation group 'event_categories'"
                .format(api_version))
        return OperationClass(self._client, self._config,
                              Serializer(self._models_dict(api_version)),
                              Deserializer(self._models_dict(api_version)))

    @property
    def guest_diagnostics_settings(self):
        """Instance depends on the API version:

           * 2018-06-01-preview: :class:`GuestDiagnosticsSettingsOperations<azure.mgmt.monitor.v2018_06_01_preview.operations.GuestDiagnosticsSettingsOperations>`
        """
        api_version = self._get_api_version('guest_diagnostics_settings')
        if api_version == '2018-06-01-preview':
            from .v2018_06_01_preview.operations import GuestDiagnosticsSettingsOperations as OperationClass
        else:
            raise ValueError(
                "API version {} does not have operation group 'guest_diagnostics_settings'"
                .format(api_version))
        return OperationClass(self._client, self._config,
                              Serializer(self._models_dict(api_version)),
                              Deserializer(self._models_dict(api_version)))

    @property
    def guest_diagnostics_settings_association(self):
        """Instance depends on the API version:

           * 2018-06-01-preview: :class:`GuestDiagnosticsSettingsAssociationOperations<azure.mgmt.monitor.v2018_06_01_preview.operations.GuestDiagnosticsSettingsAssociationOperations>`
        """
        api_version = self._get_api_version(
            'guest_diagnostics_settings_association')
        if api_version == '2018-06-01-preview':
            from .v2018_06_01_preview.operations import GuestDiagnosticsSettingsAssociationOperations as OperationClass
        else:
            raise ValueError(
                "API version {} does not have operation group 'guest_diagnostics_settings_association'"
                .format(api_version))
        return OperationClass(self._client, self._config,
                              Serializer(self._models_dict(api_version)),
                              Deserializer(self._models_dict(api_version)))

    @property
    def log_profiles(self):
        """Instance depends on the API version:

           * 2016-03-01: :class:`LogProfilesOperations<azure.mgmt.monitor.v2016_03_01.operations.LogProfilesOperations>`
        """
        api_version = self._get_api_version('log_profiles')
        if api_version == '2016-03-01':
            from .v2016_03_01.operations import LogProfilesOperations as OperationClass
        else:
            raise ValueError(
                "API version {} does not have operation group 'log_profiles'".
                format(api_version))
        return OperationClass(self._client, self._config,
                              Serializer(self._models_dict(api_version)),
                              Deserializer(self._models_dict(api_version)))

    @property
    def management_group_diagnostic_settings(self):
        """Instance depends on the API version:

           * 2020-01-01-preview: :class:`ManagementGroupDiagnosticSettingsOperations<azure.mgmt.monitor.v2020_01_01_preview.operations.ManagementGroupDiagnosticSettingsOperations>`
        """
        api_version = self._get_api_version(
            'management_group_diagnostic_settings')
        if api_version == '2020-01-01-preview':
            from .v2020_01_01_preview.operations import ManagementGroupDiagnosticSettingsOperations as OperationClass
        else:
            raise ValueError(
                "API version {} does not have operation group 'management_group_diagnostic_settings'"
                .format(api_version))
        return OperationClass(self._client, self._config,
                              Serializer(self._models_dict(api_version)),
                              Deserializer(self._models_dict(api_version)))

    @property
    def metric_alerts(self):
        """Instance depends on the API version:

           * 2018-03-01: :class:`MetricAlertsOperations<azure.mgmt.monitor.v2018_03_01.operations.MetricAlertsOperations>`
        """
        api_version = self._get_api_version('metric_alerts')
        if api_version == '2018-03-01':
            from .v2018_03_01.operations import MetricAlertsOperations as OperationClass
        else:
            raise ValueError(
                "API version {} does not have operation group 'metric_alerts'".
                format(api_version))
        return OperationClass(self._client, self._config,
                              Serializer(self._models_dict(api_version)),
                              Deserializer(self._models_dict(api_version)))

    @property
    def metric_alerts_status(self):
        """Instance depends on the API version:

           * 2018-03-01: :class:`MetricAlertsStatusOperations<azure.mgmt.monitor.v2018_03_01.operations.MetricAlertsStatusOperations>`
        """
        api_version = self._get_api_version('metric_alerts_status')
        if api_version == '2018-03-01':
            from .v2018_03_01.operations import MetricAlertsStatusOperations as OperationClass
        else:
            raise ValueError(
                "API version {} does not have operation group 'metric_alerts_status'"
                .format(api_version))
        return OperationClass(self._client, self._config,
                              Serializer(self._models_dict(api_version)),
                              Deserializer(self._models_dict(api_version)))

    @property
    def metric_baseline(self):
        """Instance depends on the API version:

           * 2017-11-01-preview: :class:`MetricBaselineOperations<azure.mgmt.monitor.v2017_11_01_preview.operations.MetricBaselineOperations>`
           * 2018-09-01: :class:`MetricBaselineOperations<azure.mgmt.monitor.v2018_09_01.operations.MetricBaselineOperations>`
        """
        api_version = self._get_api_version('metric_baseline')
        if api_version == '2017-11-01-preview':
            from .v2017_11_01_preview.operations import MetricBaselineOperations as OperationClass
        elif api_version == '2018-09-01':
            from .v2018_09_01.operations import MetricBaselineOperations as OperationClass
        else:
            raise ValueError(
                "API version {} does not have operation group 'metric_baseline'"
                .format(api_version))
        return OperationClass(self._client, self._config,
                              Serializer(self._models_dict(api_version)),
                              Deserializer(self._models_dict(api_version)))

    @property
    def metric_definitions(self):
        """Instance depends on the API version:

           * 2016-03-01: :class:`MetricDefinitionsOperations<azure.mgmt.monitor.v2016_03_01.operations.MetricDefinitionsOperations>`
           * 2017-05-01-preview: :class:`MetricDefinitionsOperations<azure.mgmt.monitor.v2017_05_01_preview.operations.MetricDefinitionsOperations>`
           * 2018-01-01: :class:`MetricDefinitionsOperations<azure.mgmt.monitor.v2018_01_01.operations.MetricDefinitionsOperations>`
        """
        api_version = self._get_api_version('metric_definitions')
        if api_version == '2016-03-01':
            from .v2016_03_01.operations import MetricDefinitionsOperations as OperationClass
        elif api_version == '2017-05-01-preview':
            from .v2017_05_01_preview.operations import MetricDefinitionsOperations as OperationClass
        elif api_version == '2018-01-01':
            from .v2018_01_01.operations import MetricDefinitionsOperations as OperationClass
        else:
            raise ValueError(
                "API version {} does not have operation group 'metric_definitions'"
                .format(api_version))
        return OperationClass(self._client, self._config,
                              Serializer(self._models_dict(api_version)),
                              Deserializer(self._models_dict(api_version)))

    @property
    def metric_namespaces(self):
        """Instance depends on the API version:

           * 2017-12-01-preview: :class:`MetricNamespacesOperations<azure.mgmt.monitor.v2017_12_01_preview.operations.MetricNamespacesOperations>`
        """
        api_version = self._get_api_version('metric_namespaces')
        if api_version == '2017-12-01-preview':
            from .v2017_12_01_preview.operations import MetricNamespacesOperations as OperationClass
        else:
            raise ValueError(
                "API version {} does not have operation group 'metric_namespaces'"
                .format(api_version))
        return OperationClass(self._client, self._config,
                              Serializer(self._models_dict(api_version)),
                              Deserializer(self._models_dict(api_version)))

    @property
    def metrics(self):
        """Instance depends on the API version:

           * 2016-09-01: :class:`MetricsOperations<azure.mgmt.monitor.v2016_09_01.operations.MetricsOperations>`
           * 2017-05-01-preview: :class:`MetricsOperations<azure.mgmt.monitor.v2017_05_01_preview.operations.MetricsOperations>`
           * 2018-01-01: :class:`MetricsOperations<azure.mgmt.monitor.v2018_01_01.operations.MetricsOperations>`
        """
        api_version = self._get_api_version('metrics')
        if api_version == '2016-09-01':
            from .v2016_09_01.operations import MetricsOperations as OperationClass
        elif api_version == '2017-05-01-preview':
            from .v2017_05_01_preview.operations import MetricsOperations as OperationClass
        elif api_version == '2018-01-01':
            from .v2018_01_01.operations import MetricsOperations as OperationClass
        else:
            raise ValueError(
                "API version {} does not have operation group 'metrics'".
                format(api_version))
        return OperationClass(self._client, self._config,
                              Serializer(self._models_dict(api_version)),
                              Deserializer(self._models_dict(api_version)))

    @property
    def operations(self):
        """Instance depends on the API version:

           * 2015-04-01: :class:`Operations<azure.mgmt.monitor.v2015_04_01.operations.Operations>`
        """
        api_version = self._get_api_version('operations')
        if api_version == '2015-04-01':
            from .v2015_04_01.operations import Operations as OperationClass
        else:
            raise ValueError(
                "API version {} does not have operation group 'operations'".
                format(api_version))
        return OperationClass(self._client, self._config,
                              Serializer(self._models_dict(api_version)),
                              Deserializer(self._models_dict(api_version)))

    @property
    def private_endpoint_connections(self):
        """Instance depends on the API version:

           * 2019-10-17-preview: :class:`PrivateEndpointConnectionsOperations<azure.mgmt.monitor.v2019_10_17.operations.PrivateEndpointConnectionsOperations>`
        """
        api_version = self._get_api_version('private_endpoint_connections')
        if api_version == '2019-10-17-preview':
            from .v2019_10_17.operations import PrivateEndpointConnectionsOperations as OperationClass
        else:
            raise ValueError(
                "API version {} does not have operation group 'private_endpoint_connections'"
                .format(api_version))
        return OperationClass(self._client, self._config,
                              Serializer(self._models_dict(api_version)),
                              Deserializer(self._models_dict(api_version)))

    @property
    def private_link_resources(self):
        """Instance depends on the API version:

           * 2019-10-17-preview: :class:`PrivateLinkResourcesOperations<azure.mgmt.monitor.v2019_10_17.operations.PrivateLinkResourcesOperations>`
        """
        api_version = self._get_api_version('private_link_resources')
        if api_version == '2019-10-17-preview':
            from .v2019_10_17.operations import PrivateLinkResourcesOperations as OperationClass
        else:
            raise ValueError(
                "API version {} does not have operation group 'private_link_resources'"
                .format(api_version))
        return OperationClass(self._client, self._config,
                              Serializer(self._models_dict(api_version)),
                              Deserializer(self._models_dict(api_version)))

    @property
    def private_link_scope_operation_status(self):
        """Instance depends on the API version:

           * 2019-10-17-preview: :class:`PrivateLinkScopeOperationStatusOperations<azure.mgmt.monitor.v2019_10_17.operations.PrivateLinkScopeOperationStatusOperations>`
        """
        api_version = self._get_api_version(
            'private_link_scope_operation_status')
        if api_version == '2019-10-17-preview':
            from .v2019_10_17.operations import PrivateLinkScopeOperationStatusOperations as OperationClass
        else:
            raise ValueError(
                "API version {} does not have operation group 'private_link_scope_operation_status'"
                .format(api_version))
        return OperationClass(self._client, self._config,
                              Serializer(self._models_dict(api_version)),
                              Deserializer(self._models_dict(api_version)))

    @property
    def private_link_scoped_resources(self):
        """Instance depends on the API version:

           * 2019-10-17-preview: :class:`PrivateLinkScopedResourcesOperations<azure.mgmt.monitor.v2019_10_17.operations.PrivateLinkScopedResourcesOperations>`
        """
        api_version = self._get_api_version('private_link_scoped_resources')
        if api_version == '2019-10-17-preview':
            from .v2019_10_17.operations import PrivateLinkScopedResourcesOperations as OperationClass
        else:
            raise ValueError(
                "API version {} does not have operation group 'private_link_scoped_resources'"
                .format(api_version))
        return OperationClass(self._client, self._config,
                              Serializer(self._models_dict(api_version)),
                              Deserializer(self._models_dict(api_version)))

    @property
    def private_link_scopes(self):
        """Instance depends on the API version:

           * 2019-10-17-preview: :class:`PrivateLinkScopesOperations<azure.mgmt.monitor.v2019_10_17.operations.PrivateLinkScopesOperations>`
        """
        api_version = self._get_api_version('private_link_scopes')
        if api_version == '2019-10-17-preview':
            from .v2019_10_17.operations import PrivateLinkScopesOperations as OperationClass
        else:
            raise ValueError(
                "API version {} does not have operation group 'private_link_scopes'"
                .format(api_version))
        return OperationClass(self._client, self._config,
                              Serializer(self._models_dict(api_version)),
                              Deserializer(self._models_dict(api_version)))

    @property
    def scheduled_query_rules(self):
        """Instance depends on the API version:

           * 2018-04-16: :class:`ScheduledQueryRulesOperations<azure.mgmt.monitor.v2018_04_16.operations.ScheduledQueryRulesOperations>`
           * 2020-05-01-preview: :class:`ScheduledQueryRulesOperations<azure.mgmt.monitor.v2020_05_01_preview.operations.ScheduledQueryRulesOperations>`
        """
        api_version = self._get_api_version('scheduled_query_rules')
        if api_version == '2018-04-16':
            from .v2018_04_16.operations import ScheduledQueryRulesOperations as OperationClass
        elif api_version == '2020-05-01-preview':
            from .v2020_05_01_preview.operations import ScheduledQueryRulesOperations as OperationClass
        else:
            raise ValueError(
                "API version {} does not have operation group 'scheduled_query_rules'"
                .format(api_version))
        return OperationClass(self._client, self._config,
                              Serializer(self._models_dict(api_version)),
                              Deserializer(self._models_dict(api_version)))

    @property
    def service_diagnostic_settings(self):
        """Instance depends on the API version:

           * 2015-07-01: :class:`ServiceDiagnosticSettingsOperations<azure.mgmt.monitor.v2015_07_01.operations.ServiceDiagnosticSettingsOperations>`
           * 2016-09-01: :class:`ServiceDiagnosticSettingsOperations<azure.mgmt.monitor.v2016_09_01.operations.ServiceDiagnosticSettingsOperations>`
        """
        api_version = self._get_api_version('service_diagnostic_settings')
        if api_version == '2015-07-01':
            from .v2015_07_01.operations import ServiceDiagnosticSettingsOperations as OperationClass
        elif api_version == '2016-09-01':
            from .v2016_09_01.operations import ServiceDiagnosticSettingsOperations as OperationClass
        else:
            raise ValueError(
                "API version {} does not have operation group 'service_diagnostic_settings'"
                .format(api_version))
        return OperationClass(self._client, self._config,
                              Serializer(self._models_dict(api_version)),
                              Deserializer(self._models_dict(api_version)))

    @property
    def subscription_diagnostic_settings(self):
        """Instance depends on the API version:

           * 2017-05-01-preview: :class:`SubscriptionDiagnosticSettingsOperations<azure.mgmt.monitor.v2017_05_01_preview.operations.SubscriptionDiagnosticSettingsOperations>`
        """
        api_version = self._get_api_version('subscription_diagnostic_settings')
        if api_version == '2017-05-01-preview':
            from .v2017_05_01_preview.operations import SubscriptionDiagnosticSettingsOperations as OperationClass
        else:
            raise ValueError(
                "API version {} does not have operation group 'subscription_diagnostic_settings'"
                .format(api_version))
        return OperationClass(self._client, self._config,
                              Serializer(self._models_dict(api_version)),
                              Deserializer(self._models_dict(api_version)))

    @property
    def tenant_activity_logs(self):
        """Instance depends on the API version:

           * 2015-04-01: :class:`TenantActivityLogsOperations<azure.mgmt.monitor.v2015_04_01.operations.TenantActivityLogsOperations>`
        """
        api_version = self._get_api_version('tenant_activity_logs')
        if api_version == '2015-04-01':
            from .v2015_04_01.operations import TenantActivityLogsOperations as OperationClass
        else:
            raise ValueError(
                "API version {} does not have operation group 'tenant_activity_logs'"
                .format(api_version))
        return OperationClass(self._client, self._config,
                              Serializer(self._models_dict(api_version)),
                              Deserializer(self._models_dict(api_version)))

    @property
    def vm_insights(self):
        """Instance depends on the API version:

           * 2018-11-27-preview: :class:`VMInsightsOperations<azure.mgmt.monitor.v2018_11_27_preview.operations.VMInsightsOperations>`
        """
        api_version = self._get_api_version('vm_insights')
        if api_version == '2018-11-27-preview':
            from .v2018_11_27_preview.operations import VMInsightsOperations as OperationClass
        else:
            raise ValueError(
                "API version {} does not have operation group 'vm_insights'".
                format(api_version))
        return OperationClass(self._client, self._config,
                              Serializer(self._models_dict(api_version)),
                              Deserializer(self._models_dict(api_version)))

    def close(self):
        self._client.close()

    def __enter__(self):
        self._client.__enter__()
        return self

    def __exit__(self, *exc_details):
        self._client.__exit__(*exc_details)
Exemplo n.º 29
0
class ContainerRegistryManagementClient:
    """ContainerRegistryManagementClient.

    :ivar registries: RegistriesOperations operations
    :vartype registries: azure.mgmt.containerregistry.v2019_04_01.operations.RegistriesOperations
    :ivar runs: RunsOperations operations
    :vartype runs: azure.mgmt.containerregistry.v2019_04_01.operations.RunsOperations
    :ivar tasks: TasksOperations operations
    :vartype tasks: azure.mgmt.containerregistry.v2019_04_01.operations.TasksOperations
    :param credential: Credential needed for the client to connect to Azure.
    :type credential: ~azure.core.credentials.TokenCredential
    :param subscription_id: The Microsoft Azure subscription ID.
    :type subscription_id: str
    :param base_url: Service URL. Default value is 'https://management.azure.com'.
    :type base_url: str
    :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
     Retry-After header is present.
    """
    def __init__(self,
                 credential: "TokenCredential",
                 subscription_id: str,
                 base_url: str = "https://management.azure.com",
                 **kwargs: Any) -> None:
        self._config = ContainerRegistryManagementClientConfiguration(
            credential=credential, subscription_id=subscription_id, **kwargs)
        self._client = ARMPipelineClient(base_url=base_url,
                                         config=self._config,
                                         **kwargs)

        client_models = {
            k: v
            for k, v in models.__dict__.items() if isinstance(v, type)
        }
        self._serialize = Serializer(client_models)
        self._deserialize = Deserializer(client_models)
        self._serialize.client_side_validation = False
        self.registries = RegistriesOperations(self._client, self._config,
                                               self._serialize,
                                               self._deserialize)
        self.runs = RunsOperations(self._client, self._config, self._serialize,
                                   self._deserialize)
        self.tasks = TasksOperations(self._client, self._config,
                                     self._serialize, self._deserialize)

    def _send_request(
            self,
            request,  # type: HttpRequest
            **kwargs: Any) -> HttpResponse:
        """Runs the network request through the client's chained policies.

        >>> from azure.core.rest import HttpRequest
        >>> request = HttpRequest("GET", "https://www.example.org/")
        <HttpRequest [GET], url: 'https://www.example.org/'>
        >>> response = client._send_request(request)
        <HttpResponse: 200 OK>

        For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart

        :param request: The network request you want to make. Required.
        :type request: ~azure.core.rest.HttpRequest
        :keyword bool stream: Whether the response payload will be streamed. Defaults to False.
        :return: The response of your network call. Does not do error handling on your response.
        :rtype: ~azure.core.rest.HttpResponse
        """

        request_copy = deepcopy(request)
        request_copy.url = self._client.format_url(request_copy.url)
        return self._client.send_request(request_copy, **kwargs)

    def close(self):
        # type: () -> None
        self._client.close()

    def __enter__(self):
        # type: () -> ContainerRegistryManagementClient
        self._client.__enter__()
        return self

    def __exit__(self, *exc_details):
        # type: (Any) -> None
        self._client.__exit__(*exc_details)
class AzureBotService(object):
    """Azure Bot Service is a platform for creating smart conversational agents.

    :ivar bots: BotsOperations operations
    :vartype bots: azure.mgmt.botservice.operations.BotsOperations
    :ivar channels: ChannelsOperations operations
    :vartype channels: azure.mgmt.botservice.operations.ChannelsOperations
    :ivar direct_line: DirectLineOperations operations
    :vartype direct_line: azure.mgmt.botservice.operations.DirectLineOperations
    :ivar operations: Operations operations
    :vartype operations: azure.mgmt.botservice.operations.Operations
    :ivar bot_connection: BotConnectionOperations operations
    :vartype bot_connection: azure.mgmt.botservice.operations.BotConnectionOperations
    :ivar host_settings: HostSettingsOperations operations
    :vartype host_settings: azure.mgmt.botservice.operations.HostSettingsOperations
    :param credential: Credential needed for the client to connect to Azure.
    :type credential: ~azure.core.credentials.TokenCredential
    :param subscription_id: Azure Subscription ID.
    :type subscription_id: str
    :param str base_url: Service URL
    """
    def __init__(
            self,
            credential,  # type: "TokenCredential"
            subscription_id,  # type: str
            base_url=None,  # type: Optional[str]
            **kwargs  # type: Any
    ):
        # type: (...) -> None
        if not base_url:
            base_url = 'https://management.azure.com'
        self._config = AzureBotServiceConfiguration(credential,
                                                    subscription_id, **kwargs)
        self._client = ARMPipelineClient(base_url=base_url,
                                         config=self._config,
                                         **kwargs)

        client_models = {
            k: v
            for k, v in models.__dict__.items() if isinstance(v, type)
        }
        self._serialize = Serializer(client_models)
        self._serialize.client_side_validation = False
        self._deserialize = Deserializer(client_models)

        self.bots = BotsOperations(self._client, self._config, self._serialize,
                                   self._deserialize)
        self.channels = ChannelsOperations(self._client, self._config,
                                           self._serialize, self._deserialize)
        self.direct_line = DirectLineOperations(self._client, self._config,
                                                self._serialize,
                                                self._deserialize)
        self.operations = Operations(self._client, self._config,
                                     self._serialize, self._deserialize)
        self.bot_connection = BotConnectionOperations(self._client,
                                                      self._config,
                                                      self._serialize,
                                                      self._deserialize)
        self.host_settings = HostSettingsOperations(self._client, self._config,
                                                    self._serialize,
                                                    self._deserialize)

    def _send_request(self, http_request, **kwargs):
        # type: (HttpRequest, Any) -> HttpResponse
        """Runs the network request through the client's chained policies.

        :param http_request: The network request you want to make. Required.
        :type http_request: ~azure.core.pipeline.transport.HttpRequest
        :keyword bool stream: Whether the response payload will be streamed. Defaults to True.
        :return: The response of your network call. Does not do error handling on your response.
        :rtype: ~azure.core.pipeline.transport.HttpResponse
        """
        path_format_arguments = {
            'subscriptionId':
            self._serialize.url("self._config.subscription_id",
                                self._config.subscription_id, 'str'),
        }
        http_request.url = self._client.format_url(http_request.url,
                                                   **path_format_arguments)
        stream = kwargs.pop("stream", True)
        pipeline_response = self._client._pipeline.run(http_request,
                                                       stream=stream,
                                                       **kwargs)
        return pipeline_response.http_response

    def close(self):
        # type: () -> None
        self._client.close()

    def __enter__(self):
        # type: () -> AzureBotService
        self._client.__enter__()
        return self

    def __exit__(self, *exc_details):
        # type: (Any) -> None
        self._client.__exit__(*exc_details)