Exemple #1
0
class SubscriptionClient(object):
    """The subscription client.

    :ivar subscriptions: SubscriptionsOperations operations
    :vartype subscriptions: subscription_client.operations.SubscriptionsOperations
    :ivar tenants: TenantsOperations operations
    :vartype tenants: subscription_client.operations.TenantsOperations
    :ivar subscription: SubscriptionOperations operations
    :vartype subscription: subscription_client.operations.SubscriptionOperations
    :ivar operations: Operations operations
    :vartype operations: subscription_client.operations.Operations
    :ivar alias: AliasOperations operations
    :vartype alias: subscription_client.operations.AliasOperations
    :param credential: Credential needed for the client to connect to Azure.
    :type credential: ~azure.core.credentials.TokenCredential
    :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"
            base_url=None,  # type: Optional[str]
            **kwargs  # type: Any
    ):
        # type: (...) -> None
        if not base_url:
            base_url = 'https://management.azure.com'
        self._config = SubscriptionClientConfiguration(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.subscriptions = SubscriptionsOperations(self._client,
                                                     self._config,
                                                     self._serialize,
                                                     self._deserialize)
        self.tenants = TenantsOperations(self._client, self._config,
                                         self._serialize, self._deserialize)
        self.subscription = SubscriptionOperations(self._client, self._config,
                                                   self._serialize,
                                                   self._deserialize)
        self.operations = Operations(self._client, self._config,
                                     self._serialize, self._deserialize)
        self.alias = AliasOperations(self._client, self._config,
                                     self._serialize, self._deserialize)

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

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

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

    :ivar operations: Operations operations
    :vartype operations: batch_ai.operations.Operations
    :ivar usages: UsagesOperations operations
    :vartype usages: batch_ai.operations.UsagesOperations
    :ivar workspaces: WorkspacesOperations operations
    :vartype workspaces: batch_ai.operations.WorkspacesOperations
    :ivar experiments: ExperimentsOperations operations
    :vartype experiments: batch_ai.operations.ExperimentsOperations
    :ivar jobs: JobsOperations operations
    :vartype jobs: batch_ai.operations.JobsOperations
    :ivar file_servers: FileServersOperations operations
    :vartype file_servers: batch_ai.operations.FileServersOperations
    :ivar clusters: ClustersOperations operations
    :vartype clusters: batch_ai.operations.ClustersOperations
    :param credential: Credential needed for the client to connect to Azure.
    :type credential: ~azure.core.credentials.TokenCredential
    :param subscription_id: The subscriptionID for the Azure user.
    :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 = BatchAIConfiguration(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.usages = UsagesOperations(self._client, self._config,
                                       self._serialize, self._deserialize)
        self.workspaces = WorkspacesOperations(self._client, self._config,
                                               self._serialize,
                                               self._deserialize)
        self.experiments = ExperimentsOperations(self._client, self._config,
                                                 self._serialize,
                                                 self._deserialize)
        self.jobs = JobsOperations(self._client, self._config, self._serialize,
                                   self._deserialize)
        self.file_servers = FileServersOperations(self._client, self._config,
                                                  self._serialize,
                                                  self._deserialize)
        self.clusters = ClustersOperations(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: () -> BatchAI
        self._client.__enter__()
        return self

    def __exit__(self, *exc_details):
        # type: (Any) -> None
        self._client.__exit__(*exc_details)
class AppPlatformManagementClient:  # pylint: disable=too-many-instance-attributes
    """REST API for Azure Spring Cloud.

    :ivar services: ServicesOperations operations
    :vartype services: azure.mgmt.appplatform.v2022_01_01_preview.operations.ServicesOperations
    :ivar config_servers: ConfigServersOperations operations
    :vartype config_servers:
     azure.mgmt.appplatform.v2022_01_01_preview.operations.ConfigServersOperations
    :ivar configuration_services: ConfigurationServicesOperations operations
    :vartype configuration_services:
     azure.mgmt.appplatform.v2022_01_01_preview.operations.ConfigurationServicesOperations
    :ivar service_registries: ServiceRegistriesOperations operations
    :vartype service_registries:
     azure.mgmt.appplatform.v2022_01_01_preview.operations.ServiceRegistriesOperations
    :ivar build_service: BuildServiceOperations operations
    :vartype build_service:
     azure.mgmt.appplatform.v2022_01_01_preview.operations.BuildServiceOperations
    :ivar buildpack_binding: BuildpackBindingOperations operations
    :vartype buildpack_binding:
     azure.mgmt.appplatform.v2022_01_01_preview.operations.BuildpackBindingOperations
    :ivar build_service_builder: BuildServiceBuilderOperations operations
    :vartype build_service_builder:
     azure.mgmt.appplatform.v2022_01_01_preview.operations.BuildServiceBuilderOperations
    :ivar build_service_agent_pool: BuildServiceAgentPoolOperations operations
    :vartype build_service_agent_pool:
     azure.mgmt.appplatform.v2022_01_01_preview.operations.BuildServiceAgentPoolOperations
    :ivar monitoring_settings: MonitoringSettingsOperations operations
    :vartype monitoring_settings:
     azure.mgmt.appplatform.v2022_01_01_preview.operations.MonitoringSettingsOperations
    :ivar apps: AppsOperations operations
    :vartype apps: azure.mgmt.appplatform.v2022_01_01_preview.operations.AppsOperations
    :ivar bindings: BindingsOperations operations
    :vartype bindings: azure.mgmt.appplatform.v2022_01_01_preview.operations.BindingsOperations
    :ivar storages: StoragesOperations operations
    :vartype storages: azure.mgmt.appplatform.v2022_01_01_preview.operations.StoragesOperations
    :ivar certificates: CertificatesOperations operations
    :vartype certificates:
     azure.mgmt.appplatform.v2022_01_01_preview.operations.CertificatesOperations
    :ivar custom_domains: CustomDomainsOperations operations
    :vartype custom_domains:
     azure.mgmt.appplatform.v2022_01_01_preview.operations.CustomDomainsOperations
    :ivar deployments: DeploymentsOperations operations
    :vartype deployments:
     azure.mgmt.appplatform.v2022_01_01_preview.operations.DeploymentsOperations
    :ivar operations: Operations operations
    :vartype operations: azure.mgmt.appplatform.v2022_01_01_preview.operations.Operations
    :ivar runtime_versions: RuntimeVersionsOperations operations
    :vartype runtime_versions:
     azure.mgmt.appplatform.v2022_01_01_preview.operations.RuntimeVersionsOperations
    :ivar skus: SkusOperations operations
    :vartype skus: azure.mgmt.appplatform.v2022_01_01_preview.operations.SkusOperations
    :ivar gateways: GatewaysOperations operations
    :vartype gateways: azure.mgmt.appplatform.v2022_01_01_preview.operations.GatewaysOperations
    :ivar gateway_route_configs: GatewayRouteConfigsOperations operations
    :vartype gateway_route_configs:
     azure.mgmt.appplatform.v2022_01_01_preview.operations.GatewayRouteConfigsOperations
    :ivar gateway_custom_domains: GatewayCustomDomainsOperations operations
    :vartype gateway_custom_domains:
     azure.mgmt.appplatform.v2022_01_01_preview.operations.GatewayCustomDomainsOperations
    :ivar api_portals: ApiPortalsOperations operations
    :vartype api_portals:
     azure.mgmt.appplatform.v2022_01_01_preview.operations.ApiPortalsOperations
    :ivar api_portal_custom_domains: ApiPortalCustomDomainsOperations operations
    :vartype api_portal_custom_domains:
     azure.mgmt.appplatform.v2022_01_01_preview.operations.ApiPortalCustomDomainsOperations
    :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 base_url: Service URL. Default value is "https://management.azure.com".
    :type base_url: str
    :keyword api_version: Api Version. Default value is "2022-01-01-preview". 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 = AppPlatformManagementClientConfiguration(
            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.services = ServicesOperations(self._client, self._config,
                                           self._serialize, self._deserialize)
        self.config_servers = ConfigServersOperations(self._client,
                                                      self._config,
                                                      self._serialize,
                                                      self._deserialize)
        self.configuration_services = ConfigurationServicesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.service_registries = ServiceRegistriesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.build_service = BuildServiceOperations(self._client, self._config,
                                                    self._serialize,
                                                    self._deserialize)
        self.buildpack_binding = BuildpackBindingOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.build_service_builder = BuildServiceBuilderOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.build_service_agent_pool = BuildServiceAgentPoolOperations(
            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.storages = StoragesOperations(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)
        self.gateways = GatewaysOperations(self._client, self._config,
                                           self._serialize, self._deserialize)
        self.gateway_route_configs = GatewayRouteConfigsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.gateway_custom_domains = GatewayCustomDomainsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.api_portals = ApiPortalsOperations(self._client, self._config,
                                                self._serialize,
                                                self._deserialize)
        self.api_portal_custom_domains = ApiPortalCustomDomainsOperations(
            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: () -> AppPlatformManagementClient
        self._client.__enter__()
        return self

    def __exit__(self, *exc_details):
        # type: (Any) -> None
        self._client.__exit__(*exc_details)
Exemple #4
0
class FeatureClient(FeatureClientOperationsMixin):
    """Azure Feature Exposure Control (AFEC) provides a mechanism for the resource providers to control feature exposure to users. Resource providers typically use this mechanism to provide public/private preview for new features prior to making them generally available. Users need to explicitly register for AFEC features to get access to such functionality.

    :ivar features: FeaturesOperations operations
    :vartype features: azure.mgmt.resource.features.v2021_07_01.operations.FeaturesOperations
    :ivar subscription_feature_registrations: SubscriptionFeatureRegistrationsOperations operations
    :vartype subscription_feature_registrations:
     azure.mgmt.resource.features.v2021_07_01.operations.SubscriptionFeatureRegistrationsOperations
    :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 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 = FeatureClientConfiguration(
            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.features = FeaturesOperations(self._client, self._config,
                                           self._serialize, self._deserialize)
        self.subscription_feature_registrations = SubscriptionFeatureRegistrationsOperations(
            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: () -> FeatureClient
        self._client.__enter__()
        return self

    def __exit__(self, *exc_details):
        # type: (Any) -> None
        self._client.__exit__(*exc_details)
class EventHubManagementClient(MultiApiClientMixin, _SDKClient):
    """Azure Event Hubs client for managing Event Hubs Cluster, IPFilter Rules and VirtualNetworkRules resources.

    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: 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 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
    :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
    """

    DEFAULT_API_VERSION = '2021-11-01'
    _PROFILE_TAG = "azure.mgmt.eventhub.EventHubManagementClient"
    LATEST_PROFILE = ProfileDefinition({
        _PROFILE_TAG: {
            None: DEFAULT_API_VERSION,
            'regions': '2017-04-01',
        }},
        _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 = EventHubManagementClientConfiguration(credential, subscription_id, **kwargs)
        self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
        super(EventHubManagementClient, 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-08-01: :mod:`v2015_08_01.models<azure.mgmt.eventhub.v2015_08_01.models>`
           * 2017-04-01: :mod:`v2017_04_01.models<azure.mgmt.eventhub.v2017_04_01.models>`
           * 2018-01-01-preview: :mod:`v2018_01_01_preview.models<azure.mgmt.eventhub.v2018_01_01_preview.models>`
           * 2021-01-01-preview: :mod:`v2021_01_01_preview.models<azure.mgmt.eventhub.v2021_01_01_preview.models>`
           * 2021-06-01-preview: :mod:`v2021_06_01_preview.models<azure.mgmt.eventhub.v2021_06_01_preview.models>`
           * 2021-11-01: :mod:`v2021_11_01.models<azure.mgmt.eventhub.v2021_11_01.models>`
        """
        if api_version == '2015-08-01':
            from .v2015_08_01 import models
            return models
        elif api_version == '2017-04-01':
            from .v2017_04_01 import models
            return models
        elif api_version == '2018-01-01-preview':
            from .v2018_01_01_preview import models
            return models
        elif api_version == '2021-01-01-preview':
            from .v2021_01_01_preview import models
            return models
        elif api_version == '2021-06-01-preview':
            from .v2021_06_01_preview import models
            return models
        elif api_version == '2021-11-01':
            from .v2021_11_01 import models
            return models
        raise ValueError("API version {} is not available".format(api_version))

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

           * 2018-01-01-preview: :class:`ClustersOperations<azure.mgmt.eventhub.v2018_01_01_preview.operations.ClustersOperations>`
           * 2021-06-01-preview: :class:`ClustersOperations<azure.mgmt.eventhub.v2021_06_01_preview.operations.ClustersOperations>`
           * 2021-11-01: :class:`ClustersOperations<azure.mgmt.eventhub.v2021_11_01.operations.ClustersOperations>`
        """
        api_version = self._get_api_version('clusters')
        if api_version == '2018-01-01-preview':
            from .v2018_01_01_preview.operations import ClustersOperations as OperationClass
        elif api_version == '2021-06-01-preview':
            from .v2021_06_01_preview.operations import ClustersOperations as OperationClass
        elif api_version == '2021-11-01':
            from .v2021_11_01.operations import ClustersOperations as OperationClass
        else:
            raise ValueError("API version {} does not have operation group 'clusters'".format(api_version))
        return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

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

           * 2018-01-01-preview: :class:`ConfigurationOperations<azure.mgmt.eventhub.v2018_01_01_preview.operations.ConfigurationOperations>`
           * 2021-06-01-preview: :class:`ConfigurationOperations<azure.mgmt.eventhub.v2021_06_01_preview.operations.ConfigurationOperations>`
           * 2021-11-01: :class:`ConfigurationOperations<azure.mgmt.eventhub.v2021_11_01.operations.ConfigurationOperations>`
        """
        api_version = self._get_api_version('configuration')
        if api_version == '2018-01-01-preview':
            from .v2018_01_01_preview.operations import ConfigurationOperations as OperationClass
        elif api_version == '2021-06-01-preview':
            from .v2021_06_01_preview.operations import ConfigurationOperations as OperationClass
        elif api_version == '2021-11-01':
            from .v2021_11_01.operations import ConfigurationOperations as OperationClass
        else:
            raise ValueError("API version {} does not have operation group 'configuration'".format(api_version))
        return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

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

           * 2015-08-01: :class:`ConsumerGroupsOperations<azure.mgmt.eventhub.v2015_08_01.operations.ConsumerGroupsOperations>`
           * 2017-04-01: :class:`ConsumerGroupsOperations<azure.mgmt.eventhub.v2017_04_01.operations.ConsumerGroupsOperations>`
           * 2018-01-01-preview: :class:`ConsumerGroupsOperations<azure.mgmt.eventhub.v2018_01_01_preview.operations.ConsumerGroupsOperations>`
           * 2021-01-01-preview: :class:`ConsumerGroupsOperations<azure.mgmt.eventhub.v2021_01_01_preview.operations.ConsumerGroupsOperations>`
           * 2021-06-01-preview: :class:`ConsumerGroupsOperations<azure.mgmt.eventhub.v2021_06_01_preview.operations.ConsumerGroupsOperations>`
           * 2021-11-01: :class:`ConsumerGroupsOperations<azure.mgmt.eventhub.v2021_11_01.operations.ConsumerGroupsOperations>`
        """
        api_version = self._get_api_version('consumer_groups')
        if api_version == '2015-08-01':
            from .v2015_08_01.operations import ConsumerGroupsOperations as OperationClass
        elif api_version == '2017-04-01':
            from .v2017_04_01.operations import ConsumerGroupsOperations as OperationClass
        elif api_version == '2018-01-01-preview':
            from .v2018_01_01_preview.operations import ConsumerGroupsOperations as OperationClass
        elif api_version == '2021-01-01-preview':
            from .v2021_01_01_preview.operations import ConsumerGroupsOperations as OperationClass
        elif api_version == '2021-06-01-preview':
            from .v2021_06_01_preview.operations import ConsumerGroupsOperations as OperationClass
        elif api_version == '2021-11-01':
            from .v2021_11_01.operations import ConsumerGroupsOperations as OperationClass
        else:
            raise ValueError("API version {} does not have operation group 'consumer_groups'".format(api_version))
        return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

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

           * 2017-04-01: :class:`DisasterRecoveryConfigsOperations<azure.mgmt.eventhub.v2017_04_01.operations.DisasterRecoveryConfigsOperations>`
           * 2018-01-01-preview: :class:`DisasterRecoveryConfigsOperations<azure.mgmt.eventhub.v2018_01_01_preview.operations.DisasterRecoveryConfigsOperations>`
           * 2021-01-01-preview: :class:`DisasterRecoveryConfigsOperations<azure.mgmt.eventhub.v2021_01_01_preview.operations.DisasterRecoveryConfigsOperations>`
           * 2021-06-01-preview: :class:`DisasterRecoveryConfigsOperations<azure.mgmt.eventhub.v2021_06_01_preview.operations.DisasterRecoveryConfigsOperations>`
           * 2021-11-01: :class:`DisasterRecoveryConfigsOperations<azure.mgmt.eventhub.v2021_11_01.operations.DisasterRecoveryConfigsOperations>`
        """
        api_version = self._get_api_version('disaster_recovery_configs')
        if api_version == '2017-04-01':
            from .v2017_04_01.operations import DisasterRecoveryConfigsOperations as OperationClass
        elif api_version == '2018-01-01-preview':
            from .v2018_01_01_preview.operations import DisasterRecoveryConfigsOperations as OperationClass
        elif api_version == '2021-01-01-preview':
            from .v2021_01_01_preview.operations import DisasterRecoveryConfigsOperations as OperationClass
        elif api_version == '2021-06-01-preview':
            from .v2021_06_01_preview.operations import DisasterRecoveryConfigsOperations as OperationClass
        elif api_version == '2021-11-01':
            from .v2021_11_01.operations import DisasterRecoveryConfigsOperations as OperationClass
        else:
            raise ValueError("API version {} does not have operation group 'disaster_recovery_configs'".format(api_version))
        return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

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

           * 2015-08-01: :class:`EventHubsOperations<azure.mgmt.eventhub.v2015_08_01.operations.EventHubsOperations>`
           * 2017-04-01: :class:`EventHubsOperations<azure.mgmt.eventhub.v2017_04_01.operations.EventHubsOperations>`
           * 2018-01-01-preview: :class:`EventHubsOperations<azure.mgmt.eventhub.v2018_01_01_preview.operations.EventHubsOperations>`
           * 2021-01-01-preview: :class:`EventHubsOperations<azure.mgmt.eventhub.v2021_01_01_preview.operations.EventHubsOperations>`
           * 2021-06-01-preview: :class:`EventHubsOperations<azure.mgmt.eventhub.v2021_06_01_preview.operations.EventHubsOperations>`
           * 2021-11-01: :class:`EventHubsOperations<azure.mgmt.eventhub.v2021_11_01.operations.EventHubsOperations>`
        """
        api_version = self._get_api_version('event_hubs')
        if api_version == '2015-08-01':
            from .v2015_08_01.operations import EventHubsOperations as OperationClass
        elif api_version == '2017-04-01':
            from .v2017_04_01.operations import EventHubsOperations as OperationClass
        elif api_version == '2018-01-01-preview':
            from .v2018_01_01_preview.operations import EventHubsOperations as OperationClass
        elif api_version == '2021-01-01-preview':
            from .v2021_01_01_preview.operations import EventHubsOperations as OperationClass
        elif api_version == '2021-06-01-preview':
            from .v2021_06_01_preview.operations import EventHubsOperations as OperationClass
        elif api_version == '2021-11-01':
            from .v2021_11_01.operations import EventHubsOperations as OperationClass
        else:
            raise ValueError("API version {} does not have operation group 'event_hubs'".format(api_version))
        return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

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

           * 2015-08-01: :class:`NamespacesOperations<azure.mgmt.eventhub.v2015_08_01.operations.NamespacesOperations>`
           * 2017-04-01: :class:`NamespacesOperations<azure.mgmt.eventhub.v2017_04_01.operations.NamespacesOperations>`
           * 2018-01-01-preview: :class:`NamespacesOperations<azure.mgmt.eventhub.v2018_01_01_preview.operations.NamespacesOperations>`
           * 2021-01-01-preview: :class:`NamespacesOperations<azure.mgmt.eventhub.v2021_01_01_preview.operations.NamespacesOperations>`
           * 2021-06-01-preview: :class:`NamespacesOperations<azure.mgmt.eventhub.v2021_06_01_preview.operations.NamespacesOperations>`
           * 2021-11-01: :class:`NamespacesOperations<azure.mgmt.eventhub.v2021_11_01.operations.NamespacesOperations>`
        """
        api_version = self._get_api_version('namespaces')
        if api_version == '2015-08-01':
            from .v2015_08_01.operations import NamespacesOperations as OperationClass
        elif api_version == '2017-04-01':
            from .v2017_04_01.operations import NamespacesOperations as OperationClass
        elif api_version == '2018-01-01-preview':
            from .v2018_01_01_preview.operations import NamespacesOperations as OperationClass
        elif api_version == '2021-01-01-preview':
            from .v2021_01_01_preview.operations import NamespacesOperations as OperationClass
        elif api_version == '2021-06-01-preview':
            from .v2021_06_01_preview.operations import NamespacesOperations as OperationClass
        elif api_version == '2021-11-01':
            from .v2021_11_01.operations import NamespacesOperations as OperationClass
        else:
            raise ValueError("API version {} does not have operation group 'namespaces'".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-08-01: :class:`Operations<azure.mgmt.eventhub.v2015_08_01.operations.Operations>`
           * 2017-04-01: :class:`Operations<azure.mgmt.eventhub.v2017_04_01.operations.Operations>`
           * 2018-01-01-preview: :class:`Operations<azure.mgmt.eventhub.v2018_01_01_preview.operations.Operations>`
           * 2021-01-01-preview: :class:`Operations<azure.mgmt.eventhub.v2021_01_01_preview.operations.Operations>`
           * 2021-06-01-preview: :class:`Operations<azure.mgmt.eventhub.v2021_06_01_preview.operations.Operations>`
           * 2021-11-01: :class:`Operations<azure.mgmt.eventhub.v2021_11_01.operations.Operations>`
        """
        api_version = self._get_api_version('operations')
        if api_version == '2015-08-01':
            from .v2015_08_01.operations import Operations as OperationClass
        elif api_version == '2017-04-01':
            from .v2017_04_01.operations import Operations as OperationClass
        elif api_version == '2018-01-01-preview':
            from .v2018_01_01_preview.operations import Operations as OperationClass
        elif api_version == '2021-01-01-preview':
            from .v2021_01_01_preview.operations import Operations as OperationClass
        elif api_version == '2021-06-01-preview':
            from .v2021_06_01_preview.operations import Operations as OperationClass
        elif api_version == '2021-11-01':
            from .v2021_11_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:

           * 2018-01-01-preview: :class:`PrivateEndpointConnectionsOperations<azure.mgmt.eventhub.v2018_01_01_preview.operations.PrivateEndpointConnectionsOperations>`
           * 2021-01-01-preview: :class:`PrivateEndpointConnectionsOperations<azure.mgmt.eventhub.v2021_01_01_preview.operations.PrivateEndpointConnectionsOperations>`
           * 2021-06-01-preview: :class:`PrivateEndpointConnectionsOperations<azure.mgmt.eventhub.v2021_06_01_preview.operations.PrivateEndpointConnectionsOperations>`
           * 2021-11-01: :class:`PrivateEndpointConnectionsOperations<azure.mgmt.eventhub.v2021_11_01.operations.PrivateEndpointConnectionsOperations>`
        """
        api_version = self._get_api_version('private_endpoint_connections')
        if api_version == '2018-01-01-preview':
            from .v2018_01_01_preview.operations import PrivateEndpointConnectionsOperations as OperationClass
        elif api_version == '2021-01-01-preview':
            from .v2021_01_01_preview.operations import PrivateEndpointConnectionsOperations as OperationClass
        elif api_version == '2021-06-01-preview':
            from .v2021_06_01_preview.operations import PrivateEndpointConnectionsOperations as OperationClass
        elif api_version == '2021-11-01':
            from .v2021_11_01.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:

           * 2018-01-01-preview: :class:`PrivateLinkResourcesOperations<azure.mgmt.eventhub.v2018_01_01_preview.operations.PrivateLinkResourcesOperations>`
           * 2021-01-01-preview: :class:`PrivateLinkResourcesOperations<azure.mgmt.eventhub.v2021_01_01_preview.operations.PrivateLinkResourcesOperations>`
           * 2021-06-01-preview: :class:`PrivateLinkResourcesOperations<azure.mgmt.eventhub.v2021_06_01_preview.operations.PrivateLinkResourcesOperations>`
           * 2021-11-01: :class:`PrivateLinkResourcesOperations<azure.mgmt.eventhub.v2021_11_01.operations.PrivateLinkResourcesOperations>`
        """
        api_version = self._get_api_version('private_link_resources')
        if api_version == '2018-01-01-preview':
            from .v2018_01_01_preview.operations import PrivateLinkResourcesOperations as OperationClass
        elif api_version == '2021-01-01-preview':
            from .v2021_01_01_preview.operations import PrivateLinkResourcesOperations as OperationClass
        elif api_version == '2021-06-01-preview':
            from .v2021_06_01_preview.operations import PrivateLinkResourcesOperations as OperationClass
        elif api_version == '2021-11-01':
            from .v2021_11_01.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 regions(self):
        """Instance depends on the API version:

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

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

           * 2021-11-01: :class:`SchemaRegistryOperations<azure.mgmt.eventhub.v2021_11_01.operations.SchemaRegistryOperations>`
        """
        api_version = self._get_api_version('schema_registry')
        if api_version == '2021-11-01':
            from .v2021_11_01.operations import SchemaRegistryOperations as OperationClass
        else:
            raise ValueError("API version {} does not have operation group 'schema_registry'".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 AzureRedHatOpenShiftClient(object):
    """Rest API for Azure Red Hat OpenShift 4.

    :ivar operations: Operations operations
    :vartype operations: azure.mgmt.redhatopenshift.v2021_09_01_preview.operations.Operations
    :ivar open_shift_clusters: OpenShiftClustersOperations operations
    :vartype open_shift_clusters: azure.mgmt.redhatopenshift.v2021_09_01_preview.operations.OpenShiftClustersOperations
    :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 = AzureRedHatOpenShiftClientConfiguration(
            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.open_shift_clusters = OpenShiftClustersOperations(
            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',
                                min_length=1),
        }
        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: () -> AzureRedHatOpenShiftClient
        self._client.__enter__()
        return self

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

    :ivar user: UserOperations operations
    :vartype user: people.operations.UserOperations
    :ivar user_analytic: UserAnalyticOperations operations
    :vartype user_analytic: people.operations.UserAnalyticOperations
    :ivar user_profile: UserProfileOperations operations
    :vartype user_profile: people.operations.UserProfileOperations
    :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/beta'
        self._config = PeopleConfiguration(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.user = UserOperations(self._client, self._config, self._serialize,
                                   self._deserialize)
        self.user_analytic = UserAnalyticOperations(self._client, self._config,
                                                    self._serialize,
                                                    self._deserialize)
        self.user_profile = UserProfileOperations(self._client, self._config,
                                                  self._serialize,
                                                  self._deserialize)

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

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

    def __exit__(self, *exc_details):
        # type: (Any) -> None
        self._client.__exit__(*exc_details)
class PolicyClient:
    """To manage and control access to your resources, you can define customized policies and assign them at a scope.

    :ivar data_policy_manifests: DataPolicyManifestsOperations operations
    :vartype data_policy_manifests:
     azure.mgmt.resource.policy.v2020_09_01.operations.DataPolicyManifestsOperations
    :ivar policy_assignments: PolicyAssignmentsOperations operations
    :vartype policy_assignments:
     azure.mgmt.resource.policy.v2020_09_01.operations.PolicyAssignmentsOperations
    :ivar policy_definitions: PolicyDefinitionsOperations operations
    :vartype policy_definitions:
     azure.mgmt.resource.policy.v2020_09_01.operations.PolicyDefinitionsOperations
    :ivar policy_set_definitions: PolicySetDefinitionsOperations operations
    :vartype policy_set_definitions:
     azure.mgmt.resource.policy.v2020_09_01.operations.PolicySetDefinitionsOperations
    :ivar policy_exemptions: PolicyExemptionsOperations operations
    :vartype policy_exemptions:
     azure.mgmt.resource.policy.v2020_09_01.operations.PolicyExemptionsOperations
    :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
    """
    def __init__(self,
                 credential: "TokenCredential",
                 subscription_id: str,
                 base_url: str = "https://management.azure.com",
                 **kwargs: Any) -> None:
        self._config = PolicyClientConfiguration(
            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.data_policy_manifests = DataPolicyManifestsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.policy_assignments = PolicyAssignmentsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.policy_definitions = PolicyDefinitionsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.policy_set_definitions = PolicySetDefinitionsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.policy_exemptions = PolicyExemptionsOperations(
            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: () -> PolicyClient
        self._client.__enter__()
        return self

    def __exit__(self, *exc_details):
        # type: (Any) -> None
        self._client.__exit__(*exc_details)
Exemple #9
0
class AzureArcVMwareManagementServiceAPI(object):  # pylint: disable=too-many-instance-attributes
    """Self service experience for VMware.

    :ivar operations: Operations operations
    :vartype operations: azure.mgmt.connectedvmware.operations.Operations
    :ivar resource_pools: ResourcePoolsOperations operations
    :vartype resource_pools: azure.mgmt.connectedvmware.operations.ResourcePoolsOperations
    :ivar clusters: ClustersOperations operations
    :vartype clusters: azure.mgmt.connectedvmware.operations.ClustersOperations
    :ivar hosts: HostsOperations operations
    :vartype hosts: azure.mgmt.connectedvmware.operations.HostsOperations
    :ivar datastores: DatastoresOperations operations
    :vartype datastores: azure.mgmt.connectedvmware.operations.DatastoresOperations
    :ivar vcenters: VCentersOperations operations
    :vartype vcenters: azure.mgmt.connectedvmware.operations.VCentersOperations
    :ivar virtual_machines: VirtualMachinesOperations operations
    :vartype virtual_machines: azure.mgmt.connectedvmware.operations.VirtualMachinesOperations
    :ivar virtual_machine_templates: VirtualMachineTemplatesOperations operations
    :vartype virtual_machine_templates:
     azure.mgmt.connectedvmware.operations.VirtualMachineTemplatesOperations
    :ivar virtual_networks: VirtualNetworksOperations operations
    :vartype virtual_networks: azure.mgmt.connectedvmware.operations.VirtualNetworksOperations
    :ivar inventory_items: InventoryItemsOperations operations
    :vartype inventory_items: azure.mgmt.connectedvmware.operations.InventoryItemsOperations
    :ivar hybrid_identity_metadata: HybridIdentityMetadataOperations operations
    :vartype hybrid_identity_metadata:
     azure.mgmt.connectedvmware.operations.HybridIdentityMetadataOperations
    :ivar machine_extensions: MachineExtensionsOperations operations
    :vartype machine_extensions: azure.mgmt.connectedvmware.operations.MachineExtensionsOperations
    :ivar guest_agents: GuestAgentsOperations operations
    :vartype guest_agents: azure.mgmt.connectedvmware.operations.GuestAgentsOperations
    :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 base_url: Service URL. Default value is 'https://management.azure.com'.
    :type base_url: str
    :keyword api_version: Api Version. The default value is "2020-10-01-preview". 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,  # type: "TokenCredential"
            subscription_id,  # type: str
            base_url="https://management.azure.com",  # type: str
            **kwargs  # type: Any
    ):
        # type: (...) -> None
        self._config = AzureArcVMwareManagementServiceAPIConfiguration(
            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.resource_pools = ResourcePoolsOperations(self._client,
                                                      self._config,
                                                      self._serialize,
                                                      self._deserialize)
        self.clusters = ClustersOperations(self._client, self._config,
                                           self._serialize, self._deserialize)
        self.hosts = HostsOperations(self._client, self._config,
                                     self._serialize, self._deserialize)
        self.datastores = DatastoresOperations(self._client, self._config,
                                               self._serialize,
                                               self._deserialize)
        self.vcenters = VCentersOperations(self._client, self._config,
                                           self._serialize, self._deserialize)
        self.virtual_machines = VirtualMachinesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.virtual_machine_templates = VirtualMachineTemplatesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.virtual_networks = VirtualNetworksOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.inventory_items = InventoryItemsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.hybrid_identity_metadata = HybridIdentityMetadataOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.machine_extensions = MachineExtensionsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.guest_agents = GuestAgentsOperations(self._client, self._config,
                                                  self._serialize,
                                                  self._deserialize)

    def _send_request(
            self,
            request,  # type: HttpRequest
            **kwargs  # type: Any
    ):
        # type: (...) -> 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: () -> AzureArcVMwareManagementServiceAPI
        self._client.__enter__()
        return self

    def __exit__(self, *exc_details):
        # type: (Any) -> None
        self._client.__exit__(*exc_details)
Exemple #10
0
class ContainerRegistryManagementClient:  # pylint: disable=too-many-instance-attributes
    """ContainerRegistryManagementClient.

    :ivar connected_registries: ConnectedRegistriesOperations operations
    :vartype connected_registries:
     azure.mgmt.containerregistry.v2021_06_01_preview.operations.ConnectedRegistriesOperations
    :ivar export_pipelines: ExportPipelinesOperations operations
    :vartype export_pipelines:
     azure.mgmt.containerregistry.v2021_06_01_preview.operations.ExportPipelinesOperations
    :ivar registries: RegistriesOperations operations
    :vartype registries:
     azure.mgmt.containerregistry.v2021_06_01_preview.operations.RegistriesOperations
    :ivar import_pipelines: ImportPipelinesOperations operations
    :vartype import_pipelines:
     azure.mgmt.containerregistry.v2021_06_01_preview.operations.ImportPipelinesOperations
    :ivar operations: Operations operations
    :vartype operations: azure.mgmt.containerregistry.v2021_06_01_preview.operations.Operations
    :ivar pipeline_runs: PipelineRunsOperations operations
    :vartype pipeline_runs:
     azure.mgmt.containerregistry.v2021_06_01_preview.operations.PipelineRunsOperations
    :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations
    :vartype private_endpoint_connections:
     azure.mgmt.containerregistry.v2021_06_01_preview.operations.PrivateEndpointConnectionsOperations
    :ivar replications: ReplicationsOperations operations
    :vartype replications:
     azure.mgmt.containerregistry.v2021_06_01_preview.operations.ReplicationsOperations
    :ivar scope_maps: ScopeMapsOperations operations
    :vartype scope_maps:
     azure.mgmt.containerregistry.v2021_06_01_preview.operations.ScopeMapsOperations
    :ivar tokens: TokensOperations operations
    :vartype tokens: azure.mgmt.containerregistry.v2021_06_01_preview.operations.TokensOperations
    :ivar webhooks: WebhooksOperations operations
    :vartype webhooks:
     azure.mgmt.containerregistry.v2021_06_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 base_url: Service URL. Default value is "https://management.azure.com".
    :type base_url: str
    :keyword api_version: Api Version. Default value is "2021-06-01-preview". 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 = 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.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, 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: () -> ContainerRegistryManagementClient
        self._client.__enter__()
        return self

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

    :ivar management_locks: ManagementLocksOperations operations
    :vartype management_locks: azure.mgmt.resource.locks.v2015_01_01.operations.ManagementLocksOperations
    :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
    """
    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 = ManagementLockClientConfiguration(
            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.management_locks = ManagementLocksOperations(
            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: () -> ManagementLockClient
        self._client.__enter__()
        return self

    def __exit__(self, *exc_details):
        # type: (Any) -> None
        self._client.__exit__(*exc_details)
class ManagementLockClient(MultiApiClientMixin, _SDKClient):
    """Azure resources can be locked to prevent other users in your organization from deleting or modifying resources.

    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 = '2016-09-01'
    _PROFILE_TAG = "azure.mgmt.resource.locks.ManagementLockClient"
    LATEST_PROFILE = ProfileDefinition({
        _PROFILE_TAG: {
            None: DEFAULT_API_VERSION,
        }},
        _PROFILE_TAG + " latest"
    )

    def __init__(
        self,
        credential,  # type: "TokenCredential"
        subscription_id,  # type: str
        api_version=None, # type: Optional[str]
        base_url="https://management.azure.com",  # type: str
        profile=KnownProfiles.default, # type: KnownProfiles
        **kwargs  # type: Any
    ):
        self._config = ManagementLockClientConfiguration(credential, subscription_id, **kwargs)
        self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
        super(ManagementLockClient, 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-01-01: :mod:`v2015_01_01.models<azure.mgmt.resource.locks.v2015_01_01.models>`
           * 2016-09-01: :mod:`v2016_09_01.models<azure.mgmt.resource.locks.v2016_09_01.models>`
        """
        if api_version == '2015-01-01':
            from .v2015_01_01 import models
            return models
        elif api_version == '2016-09-01':
            from .v2016_09_01 import models
            return models
        raise ValueError("API version {} is not available".format(api_version))

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

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

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

           * 2015-01-01: :class:`ManagementLocksOperations<azure.mgmt.resource.locks.v2015_01_01.operations.ManagementLocksOperations>`
           * 2016-09-01: :class:`ManagementLocksOperations<azure.mgmt.resource.locks.v2016_09_01.operations.ManagementLocksOperations>`
        """
        api_version = self._get_api_version('management_locks')
        if api_version == '2015-01-01':
            from .v2015_01_01.operations import ManagementLocksOperations as OperationClass
        elif api_version == '2016-09-01':
            from .v2016_09_01.operations import ManagementLocksOperations as OperationClass
        else:
            raise ValueError("API version {} does not have operation group 'management_locks'".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)
Exemple #13
0
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 = '2021-08-01'
    _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_linked_storage_accounts': '2020-03-01-preview',
                'component_quota_status': '2015-05-01',
                'components': '2015-05-01',
                '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',
                'live_token': '2020-06-02-preview',
                'my_workbooks': '2021-03-08',
                'operations': '2015-05-01',
                'proactive_detection_configurations': '2015-05-01',
                'web_test_locations': '2015-05-01',
                'web_tests': '2015-05-01',
                'work_item_configurations': '2015-05-01',
                'workbook_templates': '2020-11-20',
            }
        }, _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>`
           * 2020-11-20: :mod:`v2020_11_20.models<azure.mgmt.applicationinsights.v2020_11_20.models>`
           * 2021-03-08: :mod:`v2021_03_08.models<azure.mgmt.applicationinsights.v2021_03_08.models>`
           * 2021-08-01: :mod:`v2021_08_01.models<azure.mgmt.applicationinsights.v2021_08_01.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
        elif api_version == '2020-11-20':
            from .v2020_11_20 import models
            return models
        elif api_version == '2021-03-08':
            from .v2021_03_08 import models
            return models
        elif api_version == '2021-08-01':
            from .v2021_08_01 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>`
           * 2021-03-08: :class:`MyWorkbooksOperations<azure.mgmt.applicationinsights.v2021_03_08.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
        elif api_version == '2021-03-08':
            from .v2021_03_08.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>`
           * 2018-05-01-preview: :class:`Operations<azure.mgmt.applicationinsights.v2018_05_01_preview.operations.Operations>`
           * 2018-06-17-preview: :class:`Operations<azure.mgmt.applicationinsights.v2018_06_17_preview.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 == '2018-05-01-preview':
            from .v2018_05_01_preview.operations import Operations as OperationClass
        elif api_version == '2018-06-17-preview':
            from .v2018_06_17_preview.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>`
           * 2020-11-20: :class:`WorkbookTemplatesOperations<azure.mgmt.applicationinsights.v2020_11_20.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
        elif api_version == '2020-11-20':
            from .v2020_11_20.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>`
           * 2021-08-01: :class:`WorkbooksOperations<azure.mgmt.applicationinsights.v2021_08_01.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
        elif api_version == '2021-08-01':
            from .v2021_08_01.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)
Exemple #14
0
class MicrosoftElastic(object):
    """MicrosoftElastic.

    :ivar operations: Operations operations
    :vartype operations: azure.mgmt.elastic.operations.Operations
    :ivar monitors: MonitorsOperations operations
    :vartype monitors: azure.mgmt.elastic.operations.MonitorsOperations
    :ivar monitored_resources: MonitoredResourcesOperations operations
    :vartype monitored_resources: azure.mgmt.elastic.operations.MonitoredResourcesOperations
    :ivar deployment_info: DeploymentInfoOperations operations
    :vartype deployment_info: azure.mgmt.elastic.operations.DeploymentInfoOperations
    :ivar tag_rules: TagRulesOperations operations
    :vartype tag_rules: azure.mgmt.elastic.operations.TagRulesOperations
    :ivar vm_host: VmHostOperations operations
    :vartype vm_host: azure.mgmt.elastic.operations.VmHostOperations
    :ivar vm_ingestion: VmIngestionOperations operations
    :vartype vm_ingestion: azure.mgmt.elastic.operations.VmIngestionOperations
    :ivar vm_collection: VmCollectionOperations operations
    :vartype vm_collection: azure.mgmt.elastic.operations.VmCollectionOperations
    :param credential: Credential needed for the client to connect to Azure.
    :type credential: ~azure.core.credentials.TokenCredential
    :param subscription_id: The 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 = MicrosoftElasticConfiguration(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.monitors = MonitorsOperations(self._client, self._config,
                                           self._serialize, self._deserialize)
        self.monitored_resources = MonitoredResourcesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.deployment_info = DeploymentInfoOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.tag_rules = TagRulesOperations(self._client, self._config,
                                            self._serialize, self._deserialize)
        self.vm_host = VmHostOperations(self._client, self._config,
                                        self._serialize, self._deserialize)
        self.vm_ingestion = VmIngestionOperations(self._client, self._config,
                                                  self._serialize,
                                                  self._deserialize)
        self.vm_collection = VmCollectionOperations(self._client, self._config,
                                                    self._serialize,
                                                    self._deserialize)

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

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

    def __exit__(self, *exc_details):
        # type: (Any) -> None
        self._client.__exit__(*exc_details)
Exemple #15
0
class HealthcareApisManagementClient(object):
    """Azure Healthcare APIs Client.

    :ivar services: ServicesOperations operations
    :vartype services: azure.mgmt.healthcareapis.operations.ServicesOperations
    :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations
    :vartype private_endpoint_connections: azure.mgmt.healthcareapis.operations.PrivateEndpointConnectionsOperations
    :ivar private_link_resources: PrivateLinkResourcesOperations operations
    :vartype private_link_resources: azure.mgmt.healthcareapis.operations.PrivateLinkResourcesOperations
    :ivar workspaces: WorkspacesOperations operations
    :vartype workspaces: azure.mgmt.healthcareapis.operations.WorkspacesOperations
    :ivar dicom_services: DicomServicesOperations operations
    :vartype dicom_services: azure.mgmt.healthcareapis.operations.DicomServicesOperations
    :ivar iot_connectors: IotConnectorsOperations operations
    :vartype iot_connectors: azure.mgmt.healthcareapis.operations.IotConnectorsOperations
    :ivar fhir_destinations: FhirDestinationsOperations operations
    :vartype fhir_destinations: azure.mgmt.healthcareapis.operations.FhirDestinationsOperations
    :ivar iot_connector_fhir_destination: IotConnectorFhirDestinationOperations operations
    :vartype iot_connector_fhir_destination: azure.mgmt.healthcareapis.operations.IotConnectorFhirDestinationOperations
    :ivar fhir_services: FhirServicesOperations operations
    :vartype fhir_services: azure.mgmt.healthcareapis.operations.FhirServicesOperations
    :ivar workspace_private_endpoint_connections: WorkspacePrivateEndpointConnectionsOperations operations
    :vartype workspace_private_endpoint_connections: azure.mgmt.healthcareapis.operations.WorkspacePrivateEndpointConnectionsOperations
    :ivar workspace_private_link_resources: WorkspacePrivateLinkResourcesOperations operations
    :vartype workspace_private_link_resources: azure.mgmt.healthcareapis.operations.WorkspacePrivateLinkResourcesOperations
    :ivar operations: Operations operations
    :vartype operations: azure.mgmt.healthcareapis.operations.Operations
    :ivar operation_results: OperationResultsOperations operations
    :vartype operation_results: azure.mgmt.healthcareapis.operations.OperationResultsOperations
    :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 = HealthcareApisManagementClientConfiguration(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.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.workspaces = WorkspacesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.dicom_services = DicomServicesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.iot_connectors = IotConnectorsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.fhir_destinations = FhirDestinationsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.iot_connector_fhir_destination = IotConnectorFhirDestinationOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.fhir_services = FhirServicesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.workspace_private_endpoint_connections = WorkspacePrivateEndpointConnectionsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.workspace_private_link_resources = WorkspacePrivateLinkResourcesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.operations = Operations(
            self._client, self._config, self._serialize, self._deserialize)
        self.operation_results = OperationResultsOperations(
            self._client, self._config, self._serialize, self._deserialize)

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

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

    def __exit__(self, *exc_details):
        # type: (Any) -> None
        self._client.__exit__(*exc_details)
class AVSClient(object):
    """Azure VMware Solution API.

    :ivar operations: Operations operations
    :vartype operations: avs_client.operations.Operations
    :ivar locations: LocationsOperations operations
    :vartype locations: avs_client.operations.LocationsOperations
    :ivar private_clouds: PrivateCloudsOperations operations
    :vartype private_clouds: avs_client.operations.PrivateCloudsOperations
    :ivar clusters: ClustersOperations operations
    :vartype clusters: avs_client.operations.ClustersOperations
    :ivar datastores: DatastoresOperations operations
    :vartype datastores: avs_client.operations.DatastoresOperations
    :ivar hcx_enterprise_sites: HcxEnterpriseSitesOperations operations
    :vartype hcx_enterprise_sites: avs_client.operations.HcxEnterpriseSitesOperations
    :ivar authorizations: AuthorizationsOperations operations
    :vartype authorizations: avs_client.operations.AuthorizationsOperations
    :ivar global_reach_connections: GlobalReachConnectionsOperations operations
    :vartype global_reach_connections: avs_client.operations.GlobalReachConnectionsOperations
    :ivar workload_networks: WorkloadNetworksOperations operations
    :vartype workload_networks: avs_client.operations.WorkloadNetworksOperations
    :ivar cloud_links: CloudLinksOperations operations
    :vartype cloud_links: avs_client.operations.CloudLinksOperations
    :ivar addons: AddonsOperations operations
    :vartype addons: avs_client.operations.AddonsOperations
    :ivar virtual_machines: VirtualMachinesOperations operations
    :vartype virtual_machines: avs_client.operations.VirtualMachinesOperations
    :ivar placement_policies: PlacementPoliciesOperations operations
    :vartype placement_policies: avs_client.operations.PlacementPoliciesOperations
    :ivar script_packages: ScriptPackagesOperations operations
    :vartype script_packages: avs_client.operations.ScriptPackagesOperations
    :ivar script_cmdlets: ScriptCmdletsOperations operations
    :vartype script_cmdlets: avs_client.operations.ScriptCmdletsOperations
    :ivar script_executions: ScriptExecutionsOperations operations
    :vartype script_executions: avs_client.operations.ScriptExecutionsOperations
    :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 = AVSClientConfiguration(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.locations = LocationsOperations(self._client, self._config,
                                             self._serialize,
                                             self._deserialize)
        self.private_clouds = PrivateCloudsOperations(self._client,
                                                      self._config,
                                                      self._serialize,
                                                      self._deserialize)
        self.clusters = ClustersOperations(self._client, self._config,
                                           self._serialize, self._deserialize)
        self.datastores = DatastoresOperations(self._client, self._config,
                                               self._serialize,
                                               self._deserialize)
        self.hcx_enterprise_sites = HcxEnterpriseSitesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.authorizations = AuthorizationsOperations(self._client,
                                                       self._config,
                                                       self._serialize,
                                                       self._deserialize)
        self.global_reach_connections = GlobalReachConnectionsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.workload_networks = WorkloadNetworksOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.cloud_links = CloudLinksOperations(self._client, self._config,
                                                self._serialize,
                                                self._deserialize)
        self.addons = AddonsOperations(self._client, self._config,
                                       self._serialize, self._deserialize)
        self.virtual_machines = VirtualMachinesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.placement_policies = PlacementPoliciesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.script_packages = ScriptPackagesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.script_cmdlets = ScriptCmdletsOperations(self._client,
                                                      self._config,
                                                      self._serialize,
                                                      self._deserialize)
        self.script_executions = ScriptExecutionsOperations(
            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',
                                min_length=1),
        }
        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: () -> AVSClient
        self._client.__enter__()
        return self

    def __exit__(self, *exc_details):
        # type: (Any) -> None
        self._client.__exit__(*exc_details)
Exemple #17
0
class MixedRealityClient(MixedRealityClientOperationsMixin):
    """Mixed Reality Client.

    :ivar operations: Operations operations
    :vartype operations: azure.mgmt.mixedreality.operations.Operations
    :ivar spatial_anchors_accounts: SpatialAnchorsAccountsOperations operations
    :vartype spatial_anchors_accounts: azure.mgmt.mixedreality.operations.SpatialAnchorsAccountsOperations
    :ivar remote_rendering_accounts: RemoteRenderingAccountsOperations operations
    :vartype remote_rendering_accounts: azure.mgmt.mixedreality.operations.RemoteRenderingAccountsOperations
    :ivar object_anchors_accounts: ObjectAnchorsAccountsOperations operations
    :vartype object_anchors_accounts: azure.mgmt.mixedreality.operations.ObjectAnchorsAccountsOperations
    :param credential: Credential needed for the client to connect to Azure.
    :type credential: ~azure.core.credentials.TokenCredential
    :param subscription_id: The 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
    """
    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 = MixedRealityClientConfiguration(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.spatial_anchors_accounts = SpatialAnchorsAccountsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.remote_rendering_accounts = RemoteRenderingAccountsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.object_anchors_accounts = ObjectAnchorsAccountsOperations(
            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: () -> MixedRealityClient
        self._client.__enter__()
        return self

    def __exit__(self, *exc_details):
        # type: (Any) -> None
        self._client.__exit__(*exc_details)
class AuthorizationManagementClient(object):
    """Role based access control provides you a way to apply granular level policy administration down to individual resources or resource groups. These operations enable you to manage role definitions and role assignments. A role definition describes the set of actions that can be performed on resources. A role assignment grants access to Azure Active Directory users.

    :ivar permissions: PermissionsOperations operations
    :vartype permissions: azure.mgmt.authorization.v2015_07_01.operations.PermissionsOperations
    :ivar role_definitions: RoleDefinitionsOperations operations
    :vartype role_definitions: azure.mgmt.authorization.v2015_07_01.operations.RoleDefinitionsOperations
    :ivar provider_operations_metadata: ProviderOperationsMetadataOperations operations
    :vartype provider_operations_metadata: azure.mgmt.authorization.v2015_07_01.operations.ProviderOperationsMetadataOperations
    :ivar global_administrator: GlobalAdministratorOperations operations
    :vartype global_administrator: azure.mgmt.authorization.v2015_07_01.operations.GlobalAdministratorOperations
    :ivar role_assignments: RoleAssignmentsOperations operations
    :vartype role_assignments: azure.mgmt.authorization.v2015_07_01.operations.RoleAssignmentsOperations
    :ivar classic_administrators: ClassicAdministratorsOperations operations
    :vartype classic_administrators: azure.mgmt.authorization.v2015_07_01.operations.ClassicAdministratorsOperations
    :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
    """

    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 = AuthorizationManagementClientConfiguration(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.permissions = PermissionsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.role_definitions = RoleDefinitionsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.provider_operations_metadata = ProviderOperationsMetadataOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.global_administrator = GlobalAdministratorOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.role_assignments = RoleAssignmentsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.classic_administrators = ClassicAdministratorsOperations(
            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', min_length=1),
        }
        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: () -> AuthorizationManagementClient
        self._client.__enter__()
        return self

    def __exit__(self, *exc_details):
        # type: (Any) -> None
        self._client.__exit__(*exc_details)
Exemple #19
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_activity: SiteListActivityOperations operations
    :vartype site_list_activity: sites.operations.SiteListActivityOperations
    :ivar site_list_activity_list_item: SiteListActivityListItemOperations operations
    :vartype site_list_activity_list_item: sites.operations.SiteListActivityListItemOperations
    :ivar site_list_activity_list_item_version: SiteListActivityListItemVersionOperations operations
    :vartype site_list_activity_list_item_version: sites.operations.SiteListActivityListItemVersionOperations
    :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_activity: SiteListItemActivityOperations operations
    :vartype site_list_item_activity: sites.operations.SiteListItemActivityOperations
    :ivar site_list_item_activity_list_item: SiteListItemActivityListItemOperations operations
    :vartype site_list_item_activity_list_item: sites.operations.SiteListItemActivityListItemOperations
    :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 site_page: SitePageOperations operations
    :vartype site_page: sites.operations.SitePageOperations
    :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/beta'
        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_activity = SiteListActivityOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.site_list_activity_list_item = SiteListActivityListItemOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.site_list_activity_list_item_version = SiteListActivityListItemVersionOperations(
            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_activity = SiteListItemActivityOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.site_list_item_activity_list_item = SiteListItemActivityListItemOperations(
            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.site_page = SitePageOperations(
            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 ManagementLinkClient(object):
    """Azure resources can be linked together to form logical relationships. You can establish links between resources belonging to different resource groups. However, all the linked resources must belong to the same subscription. Each resource can be linked to 50 other resources. If any of the linked resources are deleted or moved, the link owner must clean up the remaining link.

    :ivar operations: Operations operations
    :vartype operations: azure.mgmt.resource.links.v2016_09_01.operations.Operations
    :ivar resource_links: ResourceLinksOperations operations
    :vartype resource_links: azure.mgmt.resource.links.v2016_09_01.operations.ResourceLinksOperations
    :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
    """
    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 = ManagementLinkClientConfiguration(
            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.resource_links = ResourceLinksOperations(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: () -> ManagementLinkClient
        self._client.__enter__()
        return self

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

    :ivar operations: Operations operations
    :vartype operations: azure.mgmt.compute.v2021_04_01.operations.Operations
    :ivar availability_sets: AvailabilitySetsOperations operations
    :vartype availability_sets: azure.mgmt.compute.v2021_04_01.operations.AvailabilitySetsOperations
    :ivar proximity_placement_groups: ProximityPlacementGroupsOperations operations
    :vartype proximity_placement_groups: azure.mgmt.compute.v2021_04_01.operations.ProximityPlacementGroupsOperations
    :ivar dedicated_host_groups: DedicatedHostGroupsOperations operations
    :vartype dedicated_host_groups: azure.mgmt.compute.v2021_04_01.operations.DedicatedHostGroupsOperations
    :ivar dedicated_hosts: DedicatedHostsOperations operations
    :vartype dedicated_hosts: azure.mgmt.compute.v2021_04_01.operations.DedicatedHostsOperations
    :ivar ssh_public_keys: SshPublicKeysOperations operations
    :vartype ssh_public_keys: azure.mgmt.compute.v2021_04_01.operations.SshPublicKeysOperations
    :ivar virtual_machine_extension_images: VirtualMachineExtensionImagesOperations operations
    :vartype virtual_machine_extension_images: azure.mgmt.compute.v2021_04_01.operations.VirtualMachineExtensionImagesOperations
    :ivar virtual_machine_extensions: VirtualMachineExtensionsOperations operations
    :vartype virtual_machine_extensions: azure.mgmt.compute.v2021_04_01.operations.VirtualMachineExtensionsOperations
    :ivar virtual_machine_images: VirtualMachineImagesOperations operations
    :vartype virtual_machine_images: azure.mgmt.compute.v2021_04_01.operations.VirtualMachineImagesOperations
    :ivar virtual_machine_images_edge_zone: VirtualMachineImagesEdgeZoneOperations operations
    :vartype virtual_machine_images_edge_zone: azure.mgmt.compute.v2021_04_01.operations.VirtualMachineImagesEdgeZoneOperations
    :ivar usage: UsageOperations operations
    :vartype usage: azure.mgmt.compute.v2021_04_01.operations.UsageOperations
    :ivar virtual_machines: VirtualMachinesOperations operations
    :vartype virtual_machines: azure.mgmt.compute.v2021_04_01.operations.VirtualMachinesOperations
    :ivar virtual_machine_scale_sets: VirtualMachineScaleSetsOperations operations
    :vartype virtual_machine_scale_sets: azure.mgmt.compute.v2021_04_01.operations.VirtualMachineScaleSetsOperations
    :ivar virtual_machine_sizes: VirtualMachineSizesOperations operations
    :vartype virtual_machine_sizes: azure.mgmt.compute.v2021_04_01.operations.VirtualMachineSizesOperations
    :ivar images: ImagesOperations operations
    :vartype images: azure.mgmt.compute.v2021_04_01.operations.ImagesOperations
    :ivar restore_point_collections: RestorePointCollectionsOperations operations
    :vartype restore_point_collections: azure.mgmt.compute.v2021_04_01.operations.RestorePointCollectionsOperations
    :ivar restore_points: RestorePointsOperations operations
    :vartype restore_points: azure.mgmt.compute.v2021_04_01.operations.RestorePointsOperations
    :ivar capacity_reservation_groups: CapacityReservationGroupsOperations operations
    :vartype capacity_reservation_groups: azure.mgmt.compute.v2021_04_01.operations.CapacityReservationGroupsOperations
    :ivar capacity_reservations: CapacityReservationsOperations operations
    :vartype capacity_reservations: azure.mgmt.compute.v2021_04_01.operations.CapacityReservationsOperations
    :ivar virtual_machine_scale_set_extensions: VirtualMachineScaleSetExtensionsOperations operations
    :vartype virtual_machine_scale_set_extensions: azure.mgmt.compute.v2021_04_01.operations.VirtualMachineScaleSetExtensionsOperations
    :ivar virtual_machine_scale_set_rolling_upgrades: VirtualMachineScaleSetRollingUpgradesOperations operations
    :vartype virtual_machine_scale_set_rolling_upgrades: azure.mgmt.compute.v2021_04_01.operations.VirtualMachineScaleSetRollingUpgradesOperations
    :ivar virtual_machine_scale_set_vm_extensions: VirtualMachineScaleSetVMExtensionsOperations operations
    :vartype virtual_machine_scale_set_vm_extensions: azure.mgmt.compute.v2021_04_01.operations.VirtualMachineScaleSetVMExtensionsOperations
    :ivar virtual_machine_scale_set_vms: VirtualMachineScaleSetVMsOperations operations
    :vartype virtual_machine_scale_set_vms: azure.mgmt.compute.v2021_04_01.operations.VirtualMachineScaleSetVMsOperations
    :ivar log_analytics: LogAnalyticsOperations operations
    :vartype log_analytics: azure.mgmt.compute.v2021_04_01.operations.LogAnalyticsOperations
    :ivar virtual_machine_run_commands: VirtualMachineRunCommandsOperations operations
    :vartype virtual_machine_run_commands: azure.mgmt.compute.v2021_04_01.operations.VirtualMachineRunCommandsOperations
    :ivar virtual_machine_scale_set_vm_run_commands: VirtualMachineScaleSetVMRunCommandsOperations operations
    :vartype virtual_machine_scale_set_vm_run_commands: azure.mgmt.compute.v2021_04_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 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 = ComputeManagementClientConfiguration(
            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.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.restore_point_collections = RestorePointCollectionsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.restore_points = RestorePointsOperations(self._client,
                                                      self._config,
                                                      self._serialize,
                                                      self._deserialize)
        self.capacity_reservation_groups = CapacityReservationGroupsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.capacity_reservations = CapacityReservationsOperations(
            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, 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: () -> ComputeManagementClient
        self._client.__enter__()
        return self

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

    :ivar registries: RegistriesOperations operations
    :vartype registries: azure.mgmt.containerregistry.v2018_02_01_preview.operations.RegistriesOperations
    :ivar operations: Operations operations
    :vartype operations: azure.mgmt.containerregistry.v2018_02_01_preview.operations.Operations
    :ivar replications: ReplicationsOperations operations
    :vartype replications: azure.mgmt.containerregistry.v2018_02_01_preview.operations.ReplicationsOperations
    :ivar webhooks: WebhooksOperations operations
    :vartype webhooks: azure.mgmt.containerregistry.v2018_02_01_preview.operations.WebhooksOperations
    :ivar builds: BuildsOperations operations
    :vartype builds: azure.mgmt.containerregistry.v2018_02_01_preview.operations.BuildsOperations
    :ivar build_steps: BuildStepsOperations operations
    :vartype build_steps: azure.mgmt.containerregistry.v2018_02_01_preview.operations.BuildStepsOperations
    :ivar build_tasks: BuildTasksOperations operations
    :vartype build_tasks: azure.mgmt.containerregistry.v2018_02_01_preview.operations.BuildTasksOperations
    :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.registries = RegistriesOperations(self._client, self._config,
                                               self._serialize,
                                               self._deserialize)
        self.operations = Operations(self._client, self._config,
                                     self._serialize, self._deserialize)
        self.replications = ReplicationsOperations(self._client, self._config,
                                                   self._serialize,
                                                   self._deserialize)
        self.webhooks = WebhooksOperations(self._client, self._config,
                                           self._serialize, self._deserialize)
        self.builds = BuildsOperations(self._client, self._config,
                                       self._serialize, self._deserialize)
        self.build_steps = BuildStepsOperations(self._client, self._config,
                                                self._serialize,
                                                self._deserialize)
        self.build_tasks = BuildTasksOperations(self._client, self._config,
                                                self._serialize,
                                                self._deserialize)

    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 ServiceBusManagementClient(object):
    """Azure Service Bus client.

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

    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)
class RecoveryServicesBackupClient(RecoveryServicesBackupClientOperationsMixin
                                   ):
    """Open API 2.0 Specs for Azure RecoveryServices Backup service.

    :ivar backup_resource_storage_configs_non_crr: BackupResourceStorageConfigsNonCRROperations
     operations
    :vartype backup_resource_storage_configs_non_crr:
     azure.mgmt.recoveryservicesbackup.activestamp.operations.BackupResourceStorageConfigsNonCRROperations
    :ivar protection_intent: ProtectionIntentOperations operations
    :vartype protection_intent:
     azure.mgmt.recoveryservicesbackup.activestamp.operations.ProtectionIntentOperations
    :ivar backup_status: BackupStatusOperations operations
    :vartype backup_status:
     azure.mgmt.recoveryservicesbackup.activestamp.operations.BackupStatusOperations
    :ivar feature_support: FeatureSupportOperations operations
    :vartype feature_support:
     azure.mgmt.recoveryservicesbackup.activestamp.operations.FeatureSupportOperations
    :ivar backup_protection_intent: BackupProtectionIntentOperations operations
    :vartype backup_protection_intent:
     azure.mgmt.recoveryservicesbackup.activestamp.operations.BackupProtectionIntentOperations
    :ivar backup_usage_summaries: BackupUsageSummariesOperations operations
    :vartype backup_usage_summaries:
     azure.mgmt.recoveryservicesbackup.activestamp.operations.BackupUsageSummariesOperations
    :ivar operations: Operations operations
    :vartype operations: azure.mgmt.recoveryservicesbackup.activestamp.operations.Operations
    :ivar backup_resource_vault_configs: BackupResourceVaultConfigsOperations operations
    :vartype backup_resource_vault_configs:
     azure.mgmt.recoveryservicesbackup.activestamp.operations.BackupResourceVaultConfigsOperations
    :ivar backup_resource_encryption_configs: BackupResourceEncryptionConfigsOperations operations
    :vartype backup_resource_encryption_configs:
     azure.mgmt.recoveryservicesbackup.activestamp.operations.BackupResourceEncryptionConfigsOperations
    :ivar private_endpoint_connection: PrivateEndpointConnectionOperations operations
    :vartype private_endpoint_connection:
     azure.mgmt.recoveryservicesbackup.activestamp.operations.PrivateEndpointConnectionOperations
    :ivar private_endpoint: PrivateEndpointOperations operations
    :vartype private_endpoint:
     azure.mgmt.recoveryservicesbackup.activestamp.operations.PrivateEndpointOperations
    :ivar bms_prepare_data_move_operation_result: BMSPrepareDataMoveOperationResultOperations
     operations
    :vartype bms_prepare_data_move_operation_result:
     azure.mgmt.recoveryservicesbackup.activestamp.operations.BMSPrepareDataMoveOperationResultOperations
    :ivar protected_items: ProtectedItemsOperations operations
    :vartype protected_items:
     azure.mgmt.recoveryservicesbackup.activestamp.operations.ProtectedItemsOperations
    :ivar protected_item_operation_results: ProtectedItemOperationResultsOperations operations
    :vartype protected_item_operation_results:
     azure.mgmt.recoveryservicesbackup.activestamp.operations.ProtectedItemOperationResultsOperations
    :ivar recovery_points: RecoveryPointsOperations operations
    :vartype recovery_points:
     azure.mgmt.recoveryservicesbackup.activestamp.operations.RecoveryPointsOperations
    :ivar restores: RestoresOperations operations
    :vartype restores: azure.mgmt.recoveryservicesbackup.activestamp.operations.RestoresOperations
    :ivar backup_policies: BackupPoliciesOperations operations
    :vartype backup_policies:
     azure.mgmt.recoveryservicesbackup.activestamp.operations.BackupPoliciesOperations
    :ivar protection_policies: ProtectionPoliciesOperations operations
    :vartype protection_policies:
     azure.mgmt.recoveryservicesbackup.activestamp.operations.ProtectionPoliciesOperations
    :ivar protection_policy_operation_results: ProtectionPolicyOperationResultsOperations
     operations
    :vartype protection_policy_operation_results:
     azure.mgmt.recoveryservicesbackup.activestamp.operations.ProtectionPolicyOperationResultsOperations
    :ivar backup_jobs: BackupJobsOperations operations
    :vartype backup_jobs:
     azure.mgmt.recoveryservicesbackup.activestamp.operations.BackupJobsOperations
    :ivar job_details: JobDetailsOperations operations
    :vartype job_details:
     azure.mgmt.recoveryservicesbackup.activestamp.operations.JobDetailsOperations
    :ivar job_cancellations: JobCancellationsOperations operations
    :vartype job_cancellations:
     azure.mgmt.recoveryservicesbackup.activestamp.operations.JobCancellationsOperations
    :ivar job_operation_results: JobOperationResultsOperations operations
    :vartype job_operation_results:
     azure.mgmt.recoveryservicesbackup.activestamp.operations.JobOperationResultsOperations
    :ivar export_jobs_operation_results: ExportJobsOperationResultsOperations operations
    :vartype export_jobs_operation_results:
     azure.mgmt.recoveryservicesbackup.activestamp.operations.ExportJobsOperationResultsOperations
    :ivar jobs: JobsOperations operations
    :vartype jobs: azure.mgmt.recoveryservicesbackup.activestamp.operations.JobsOperations
    :ivar backup_protected_items: BackupProtectedItemsOperations operations
    :vartype backup_protected_items:
     azure.mgmt.recoveryservicesbackup.activestamp.operations.BackupProtectedItemsOperations
    :ivar operation: OperationOperations operations
    :vartype operation:
     azure.mgmt.recoveryservicesbackup.activestamp.operations.OperationOperations
    :ivar validate_operation: ValidateOperationOperations operations
    :vartype validate_operation:
     azure.mgmt.recoveryservicesbackup.activestamp.operations.ValidateOperationOperations
    :ivar validate_operation_results: ValidateOperationResultsOperations operations
    :vartype validate_operation_results:
     azure.mgmt.recoveryservicesbackup.activestamp.operations.ValidateOperationResultsOperations
    :ivar validate_operation_statuses: ValidateOperationStatusesOperations operations
    :vartype validate_operation_statuses:
     azure.mgmt.recoveryservicesbackup.activestamp.operations.ValidateOperationStatusesOperations
    :ivar backup_engines: BackupEnginesOperations operations
    :vartype backup_engines:
     azure.mgmt.recoveryservicesbackup.activestamp.operations.BackupEnginesOperations
    :ivar protection_container_refresh_operation_results:
     ProtectionContainerRefreshOperationResultsOperations operations
    :vartype protection_container_refresh_operation_results:
     azure.mgmt.recoveryservicesbackup.activestamp.operations.ProtectionContainerRefreshOperationResultsOperations
    :ivar protectable_containers: ProtectableContainersOperations operations
    :vartype protectable_containers:
     azure.mgmt.recoveryservicesbackup.activestamp.operations.ProtectableContainersOperations
    :ivar protection_containers: ProtectionContainersOperations operations
    :vartype protection_containers:
     azure.mgmt.recoveryservicesbackup.activestamp.operations.ProtectionContainersOperations
    :ivar backup_workload_items: BackupWorkloadItemsOperations operations
    :vartype backup_workload_items:
     azure.mgmt.recoveryservicesbackup.activestamp.operations.BackupWorkloadItemsOperations
    :ivar protection_container_operation_results: ProtectionContainerOperationResultsOperations
     operations
    :vartype protection_container_operation_results:
     azure.mgmt.recoveryservicesbackup.activestamp.operations.ProtectionContainerOperationResultsOperations
    :ivar backups: BackupsOperations operations
    :vartype backups: azure.mgmt.recoveryservicesbackup.activestamp.operations.BackupsOperations
    :ivar protected_item_operation_statuses: ProtectedItemOperationStatusesOperations operations
    :vartype protected_item_operation_statuses:
     azure.mgmt.recoveryservicesbackup.activestamp.operations.ProtectedItemOperationStatusesOperations
    :ivar item_level_recovery_connections: ItemLevelRecoveryConnectionsOperations operations
    :vartype item_level_recovery_connections:
     azure.mgmt.recoveryservicesbackup.activestamp.operations.ItemLevelRecoveryConnectionsOperations
    :ivar backup_operation_results: BackupOperationResultsOperations operations
    :vartype backup_operation_results:
     azure.mgmt.recoveryservicesbackup.activestamp.operations.BackupOperationResultsOperations
    :ivar backup_operation_statuses: BackupOperationStatusesOperations operations
    :vartype backup_operation_statuses:
     azure.mgmt.recoveryservicesbackup.activestamp.operations.BackupOperationStatusesOperations
    :ivar protection_policy_operation_statuses: ProtectionPolicyOperationStatusesOperations
     operations
    :vartype protection_policy_operation_statuses:
     azure.mgmt.recoveryservicesbackup.activestamp.operations.ProtectionPolicyOperationStatusesOperations
    :ivar backup_protectable_items: BackupProtectableItemsOperations operations
    :vartype backup_protectable_items:
     azure.mgmt.recoveryservicesbackup.activestamp.operations.BackupProtectableItemsOperations
    :ivar backup_protection_containers: BackupProtectionContainersOperations operations
    :vartype backup_protection_containers:
     azure.mgmt.recoveryservicesbackup.activestamp.operations.BackupProtectionContainersOperations
    :ivar security_pins: SecurityPINsOperations operations
    :vartype security_pins:
     azure.mgmt.recoveryservicesbackup.activestamp.operations.SecurityPINsOperations
    :ivar recovery_points_recommended_for_move: RecoveryPointsRecommendedForMoveOperations
     operations
    :vartype recovery_points_recommended_for_move:
     azure.mgmt.recoveryservicesbackup.activestamp.operations.RecoveryPointsRecommendedForMoveOperations
    :ivar resource_guard_proxies: ResourceGuardProxiesOperations operations
    :vartype resource_guard_proxies:
     azure.mgmt.recoveryservicesbackup.activestamp.operations.ResourceGuardProxiesOperations
    :ivar resource_guard_proxy: ResourceGuardProxyOperations operations
    :vartype resource_guard_proxy:
     azure.mgmt.recoveryservicesbackup.activestamp.operations.ResourceGuardProxyOperations
    :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 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 = RecoveryServicesBackupClientConfiguration(
            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.backup_resource_storage_configs_non_crr = BackupResourceStorageConfigsNonCRROperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.protection_intent = ProtectionIntentOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.backup_status = BackupStatusOperations(self._client, self._config,
                                                    self._serialize,
                                                    self._deserialize)
        self.feature_support = FeatureSupportOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.backup_protection_intent = BackupProtectionIntentOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.backup_usage_summaries = BackupUsageSummariesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.operations = Operations(self._client, self._config,
                                     self._serialize, self._deserialize)
        self.backup_resource_vault_configs = BackupResourceVaultConfigsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.backup_resource_encryption_configs = BackupResourceEncryptionConfigsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.private_endpoint_connection = PrivateEndpointConnectionOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.private_endpoint = PrivateEndpointOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.bms_prepare_data_move_operation_result = BMSPrepareDataMoveOperationResultOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.protected_items = ProtectedItemsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.protected_item_operation_results = ProtectedItemOperationResultsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.recovery_points = RecoveryPointsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.restores = RestoresOperations(self._client, self._config,
                                           self._serialize, self._deserialize)
        self.backup_policies = BackupPoliciesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.protection_policies = ProtectionPoliciesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.protection_policy_operation_results = ProtectionPolicyOperationResultsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.backup_jobs = BackupJobsOperations(self._client, self._config,
                                                self._serialize,
                                                self._deserialize)
        self.job_details = JobDetailsOperations(self._client, self._config,
                                                self._serialize,
                                                self._deserialize)
        self.job_cancellations = JobCancellationsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.job_operation_results = JobOperationResultsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.export_jobs_operation_results = ExportJobsOperationResultsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.jobs = JobsOperations(self._client, self._config, self._serialize,
                                   self._deserialize)
        self.backup_protected_items = BackupProtectedItemsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.operation = OperationOperations(self._client, self._config,
                                             self._serialize,
                                             self._deserialize)
        self.validate_operation = ValidateOperationOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.validate_operation_results = ValidateOperationResultsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.validate_operation_statuses = ValidateOperationStatusesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.backup_engines = BackupEnginesOperations(self._client,
                                                      self._config,
                                                      self._serialize,
                                                      self._deserialize)
        self.protection_container_refresh_operation_results = ProtectionContainerRefreshOperationResultsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.protectable_containers = ProtectableContainersOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.protection_containers = ProtectionContainersOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.backup_workload_items = BackupWorkloadItemsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.protection_container_operation_results = ProtectionContainerOperationResultsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.backups = BackupsOperations(self._client, self._config,
                                         self._serialize, self._deserialize)
        self.protected_item_operation_statuses = ProtectedItemOperationStatusesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.item_level_recovery_connections = ItemLevelRecoveryConnectionsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.backup_operation_results = BackupOperationResultsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.backup_operation_statuses = BackupOperationStatusesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.protection_policy_operation_statuses = ProtectionPolicyOperationStatusesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.backup_protectable_items = BackupProtectableItemsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.backup_protection_containers = BackupProtectionContainersOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.security_pins = SecurityPINsOperations(self._client, self._config,
                                                    self._serialize,
                                                    self._deserialize)
        self.recovery_points_recommended_for_move = RecoveryPointsRecommendedForMoveOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.resource_guard_proxies = ResourceGuardProxiesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.resource_guard_proxy = ResourceGuardProxyOperations(
            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: () -> RecoveryServicesBackupClient
        self._client.__enter__()
        return self

    def __exit__(self, *exc_details):
        # type: (Any) -> None
        self._client.__exit__(*exc_details)
Exemple #25
0
class SubscriptionClient(SubscriptionClientOperationsMixin):
    """All resource groups and resources exist within subscriptions. These operation enable you get information about your subscriptions and tenants. A tenant is a dedicated instance of Azure Active Directory (Azure AD) for your organization.

    :ivar operations: Operations operations
    :vartype operations: azure.mgmt.resource.subscriptions.v2018_06_01.operations.Operations
    :ivar subscriptions: SubscriptionsOperations operations
    :vartype subscriptions: azure.mgmt.resource.subscriptions.v2018_06_01.operations.SubscriptionsOperations
    :ivar tenants: TenantsOperations operations
    :vartype tenants: azure.mgmt.resource.subscriptions.v2018_06_01.operations.TenantsOperations
    :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 = SubscriptionClientConfiguration(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.operations = Operations(self._client, self._config,
                                     self._serialize, self._deserialize)
        self.subscriptions = SubscriptionsOperations(self._client,
                                                     self._config,
                                                     self._serialize,
                                                     self._deserialize)
        self.tenants = TenantsOperations(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
        """
        http_request.url = self._client.format_url(http_request.url)
        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: () -> SubscriptionClient
        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.v2021_07_01.operations.Operations
    :ivar managed_clusters: ManagedClustersOperations operations
    :vartype managed_clusters:
     azure.mgmt.containerservice.v2021_07_01.operations.ManagedClustersOperations
    :ivar maintenance_configurations: MaintenanceConfigurationsOperations operations
    :vartype maintenance_configurations:
     azure.mgmt.containerservice.v2021_07_01.operations.MaintenanceConfigurationsOperations
    :ivar agent_pools: AgentPoolsOperations operations
    :vartype agent_pools: azure.mgmt.containerservice.v2021_07_01.operations.AgentPoolsOperations
    :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations
    :vartype private_endpoint_connections:
     azure.mgmt.containerservice.v2021_07_01.operations.PrivateEndpointConnectionsOperations
    :ivar private_link_resources: PrivateLinkResourcesOperations operations
    :vartype private_link_resources:
     azure.mgmt.containerservice.v2021_07_01.operations.PrivateLinkResourcesOperations
    :ivar resolve_private_link_service_id: ResolvePrivateLinkServiceIdOperations operations
    :vartype resolve_private_link_service_id:
     azure.mgmt.containerservice.v2021_07_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 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 = 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.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,
        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: () -> ContainerServiceClient
        self._client.__enter__()
        return self

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

    :ivar application_gateways: ApplicationGatewaysOperations operations
    :vartype application_gateways: azure.mgmt.network.v2019_04_01.operations.ApplicationGatewaysOperations
    :ivar application_security_groups: ApplicationSecurityGroupsOperations operations
    :vartype application_security_groups: azure.mgmt.network.v2019_04_01.operations.ApplicationSecurityGroupsOperations
    :ivar available_delegations: AvailableDelegationsOperations operations
    :vartype available_delegations: azure.mgmt.network.v2019_04_01.operations.AvailableDelegationsOperations
    :ivar available_resource_group_delegations: AvailableResourceGroupDelegationsOperations operations
    :vartype available_resource_group_delegations: azure.mgmt.network.v2019_04_01.operations.AvailableResourceGroupDelegationsOperations
    :ivar azure_firewalls: AzureFirewallsOperations operations
    :vartype azure_firewalls: azure.mgmt.network.v2019_04_01.operations.AzureFirewallsOperations
    :ivar azure_firewall_fqdn_tags: AzureFirewallFqdnTagsOperations operations
    :vartype azure_firewall_fqdn_tags: azure.mgmt.network.v2019_04_01.operations.AzureFirewallFqdnTagsOperations
    :ivar bastion_hosts: BastionHostsOperations operations
    :vartype bastion_hosts: azure.mgmt.network.v2019_04_01.operations.BastionHostsOperations
    :ivar ddos_custom_policies: DdosCustomPoliciesOperations operations
    :vartype ddos_custom_policies: azure.mgmt.network.v2019_04_01.operations.DdosCustomPoliciesOperations
    :ivar ddos_protection_plans: DdosProtectionPlansOperations operations
    :vartype ddos_protection_plans: azure.mgmt.network.v2019_04_01.operations.DdosProtectionPlansOperations
    :ivar available_endpoint_services: AvailableEndpointServicesOperations operations
    :vartype available_endpoint_services: azure.mgmt.network.v2019_04_01.operations.AvailableEndpointServicesOperations
    :ivar express_route_circuit_authorizations: ExpressRouteCircuitAuthorizationsOperations operations
    :vartype express_route_circuit_authorizations: azure.mgmt.network.v2019_04_01.operations.ExpressRouteCircuitAuthorizationsOperations
    :ivar express_route_circuit_peerings: ExpressRouteCircuitPeeringsOperations operations
    :vartype express_route_circuit_peerings: azure.mgmt.network.v2019_04_01.operations.ExpressRouteCircuitPeeringsOperations
    :ivar express_route_circuit_connections: ExpressRouteCircuitConnectionsOperations operations
    :vartype express_route_circuit_connections: azure.mgmt.network.v2019_04_01.operations.ExpressRouteCircuitConnectionsOperations
    :ivar peer_express_route_circuit_connections: PeerExpressRouteCircuitConnectionsOperations operations
    :vartype peer_express_route_circuit_connections: azure.mgmt.network.v2019_04_01.operations.PeerExpressRouteCircuitConnectionsOperations
    :ivar express_route_circuits: ExpressRouteCircuitsOperations operations
    :vartype express_route_circuits: azure.mgmt.network.v2019_04_01.operations.ExpressRouteCircuitsOperations
    :ivar express_route_service_providers: ExpressRouteServiceProvidersOperations operations
    :vartype express_route_service_providers: azure.mgmt.network.v2019_04_01.operations.ExpressRouteServiceProvidersOperations
    :ivar express_route_cross_connections: ExpressRouteCrossConnectionsOperations operations
    :vartype express_route_cross_connections: azure.mgmt.network.v2019_04_01.operations.ExpressRouteCrossConnectionsOperations
    :ivar express_route_cross_connection_peerings: ExpressRouteCrossConnectionPeeringsOperations operations
    :vartype express_route_cross_connection_peerings: azure.mgmt.network.v2019_04_01.operations.ExpressRouteCrossConnectionPeeringsOperations
    :ivar express_route_gateways: ExpressRouteGatewaysOperations operations
    :vartype express_route_gateways: azure.mgmt.network.v2019_04_01.operations.ExpressRouteGatewaysOperations
    :ivar express_route_connections: ExpressRouteConnectionsOperations operations
    :vartype express_route_connections: azure.mgmt.network.v2019_04_01.operations.ExpressRouteConnectionsOperations
    :ivar express_route_ports_locations: ExpressRoutePortsLocationsOperations operations
    :vartype express_route_ports_locations: azure.mgmt.network.v2019_04_01.operations.ExpressRoutePortsLocationsOperations
    :ivar express_route_ports: ExpressRoutePortsOperations operations
    :vartype express_route_ports: azure.mgmt.network.v2019_04_01.operations.ExpressRoutePortsOperations
    :ivar express_route_links: ExpressRouteLinksOperations operations
    :vartype express_route_links: azure.mgmt.network.v2019_04_01.operations.ExpressRouteLinksOperations
    :ivar private_endpoints: PrivateEndpointsOperations operations
    :vartype private_endpoints: azure.mgmt.network.v2019_04_01.operations.PrivateEndpointsOperations
    :ivar available_private_endpoint_types: AvailablePrivateEndpointTypesOperations operations
    :vartype available_private_endpoint_types: azure.mgmt.network.v2019_04_01.operations.AvailablePrivateEndpointTypesOperations
    :ivar private_link_services: PrivateLinkServicesOperations operations
    :vartype private_link_services: azure.mgmt.network.v2019_04_01.operations.PrivateLinkServicesOperations
    :ivar load_balancers: LoadBalancersOperations operations
    :vartype load_balancers: azure.mgmt.network.v2019_04_01.operations.LoadBalancersOperations
    :ivar load_balancer_backend_address_pools: LoadBalancerBackendAddressPoolsOperations operations
    :vartype load_balancer_backend_address_pools: azure.mgmt.network.v2019_04_01.operations.LoadBalancerBackendAddressPoolsOperations
    :ivar load_balancer_frontend_ip_configurations: LoadBalancerFrontendIPConfigurationsOperations operations
    :vartype load_balancer_frontend_ip_configurations: azure.mgmt.network.v2019_04_01.operations.LoadBalancerFrontendIPConfigurationsOperations
    :ivar inbound_nat_rules: InboundNatRulesOperations operations
    :vartype inbound_nat_rules: azure.mgmt.network.v2019_04_01.operations.InboundNatRulesOperations
    :ivar load_balancer_load_balancing_rules: LoadBalancerLoadBalancingRulesOperations operations
    :vartype load_balancer_load_balancing_rules: azure.mgmt.network.v2019_04_01.operations.LoadBalancerLoadBalancingRulesOperations
    :ivar load_balancer_outbound_rules: LoadBalancerOutboundRulesOperations operations
    :vartype load_balancer_outbound_rules: azure.mgmt.network.v2019_04_01.operations.LoadBalancerOutboundRulesOperations
    :ivar load_balancer_network_interfaces: LoadBalancerNetworkInterfacesOperations operations
    :vartype load_balancer_network_interfaces: azure.mgmt.network.v2019_04_01.operations.LoadBalancerNetworkInterfacesOperations
    :ivar load_balancer_probes: LoadBalancerProbesOperations operations
    :vartype load_balancer_probes: azure.mgmt.network.v2019_04_01.operations.LoadBalancerProbesOperations
    :ivar nat_gateways: NatGatewaysOperations operations
    :vartype nat_gateways: azure.mgmt.network.v2019_04_01.operations.NatGatewaysOperations
    :ivar network_interfaces: NetworkInterfacesOperations operations
    :vartype network_interfaces: azure.mgmt.network.v2019_04_01.operations.NetworkInterfacesOperations
    :ivar network_interface_ip_configurations: NetworkInterfaceIPConfigurationsOperations operations
    :vartype network_interface_ip_configurations: azure.mgmt.network.v2019_04_01.operations.NetworkInterfaceIPConfigurationsOperations
    :ivar network_interface_load_balancers: NetworkInterfaceLoadBalancersOperations operations
    :vartype network_interface_load_balancers: azure.mgmt.network.v2019_04_01.operations.NetworkInterfaceLoadBalancersOperations
    :ivar network_interface_tap_configurations: NetworkInterfaceTapConfigurationsOperations operations
    :vartype network_interface_tap_configurations: azure.mgmt.network.v2019_04_01.operations.NetworkInterfaceTapConfigurationsOperations
    :ivar network_profiles: NetworkProfilesOperations operations
    :vartype network_profiles: azure.mgmt.network.v2019_04_01.operations.NetworkProfilesOperations
    :ivar network_security_groups: NetworkSecurityGroupsOperations operations
    :vartype network_security_groups: azure.mgmt.network.v2019_04_01.operations.NetworkSecurityGroupsOperations
    :ivar security_rules: SecurityRulesOperations operations
    :vartype security_rules: azure.mgmt.network.v2019_04_01.operations.SecurityRulesOperations
    :ivar default_security_rules: DefaultSecurityRulesOperations operations
    :vartype default_security_rules: azure.mgmt.network.v2019_04_01.operations.DefaultSecurityRulesOperations
    :ivar network_watchers: NetworkWatchersOperations operations
    :vartype network_watchers: azure.mgmt.network.v2019_04_01.operations.NetworkWatchersOperations
    :ivar packet_captures: PacketCapturesOperations operations
    :vartype packet_captures: azure.mgmt.network.v2019_04_01.operations.PacketCapturesOperations
    :ivar connection_monitors: ConnectionMonitorsOperations operations
    :vartype connection_monitors: azure.mgmt.network.v2019_04_01.operations.ConnectionMonitorsOperations
    :ivar operations: Operations operations
    :vartype operations: azure.mgmt.network.v2019_04_01.operations.Operations
    :ivar public_ip_addresses: PublicIPAddressesOperations operations
    :vartype public_ip_addresses: azure.mgmt.network.v2019_04_01.operations.PublicIPAddressesOperations
    :ivar public_ip_prefixes: PublicIPPrefixesOperations operations
    :vartype public_ip_prefixes: azure.mgmt.network.v2019_04_01.operations.PublicIPPrefixesOperations
    :ivar route_filters: RouteFiltersOperations operations
    :vartype route_filters: azure.mgmt.network.v2019_04_01.operations.RouteFiltersOperations
    :ivar route_filter_rules: RouteFilterRulesOperations operations
    :vartype route_filter_rules: azure.mgmt.network.v2019_04_01.operations.RouteFilterRulesOperations
    :ivar route_tables: RouteTablesOperations operations
    :vartype route_tables: azure.mgmt.network.v2019_04_01.operations.RouteTablesOperations
    :ivar routes: RoutesOperations operations
    :vartype routes: azure.mgmt.network.v2019_04_01.operations.RoutesOperations
    :ivar bgp_service_communities: BgpServiceCommunitiesOperations operations
    :vartype bgp_service_communities: azure.mgmt.network.v2019_04_01.operations.BgpServiceCommunitiesOperations
    :ivar service_endpoint_policies: ServiceEndpointPoliciesOperations operations
    :vartype service_endpoint_policies: azure.mgmt.network.v2019_04_01.operations.ServiceEndpointPoliciesOperations
    :ivar service_endpoint_policy_definitions: ServiceEndpointPolicyDefinitionsOperations operations
    :vartype service_endpoint_policy_definitions: azure.mgmt.network.v2019_04_01.operations.ServiceEndpointPolicyDefinitionsOperations
    :ivar service_tags: ServiceTagsOperations operations
    :vartype service_tags: azure.mgmt.network.v2019_04_01.operations.ServiceTagsOperations
    :ivar usages: UsagesOperations operations
    :vartype usages: azure.mgmt.network.v2019_04_01.operations.UsagesOperations
    :ivar virtual_networks: VirtualNetworksOperations operations
    :vartype virtual_networks: azure.mgmt.network.v2019_04_01.operations.VirtualNetworksOperations
    :ivar subnets: SubnetsOperations operations
    :vartype subnets: azure.mgmt.network.v2019_04_01.operations.SubnetsOperations
    :ivar resource_navigation_links: ResourceNavigationLinksOperations operations
    :vartype resource_navigation_links: azure.mgmt.network.v2019_04_01.operations.ResourceNavigationLinksOperations
    :ivar service_association_links: ServiceAssociationLinksOperations operations
    :vartype service_association_links: azure.mgmt.network.v2019_04_01.operations.ServiceAssociationLinksOperations
    :ivar virtual_network_peerings: VirtualNetworkPeeringsOperations operations
    :vartype virtual_network_peerings: azure.mgmt.network.v2019_04_01.operations.VirtualNetworkPeeringsOperations
    :ivar virtual_network_gateways: VirtualNetworkGatewaysOperations operations
    :vartype virtual_network_gateways: azure.mgmt.network.v2019_04_01.operations.VirtualNetworkGatewaysOperations
    :ivar virtual_network_gateway_connections: VirtualNetworkGatewayConnectionsOperations operations
    :vartype virtual_network_gateway_connections: azure.mgmt.network.v2019_04_01.operations.VirtualNetworkGatewayConnectionsOperations
    :ivar local_network_gateways: LocalNetworkGatewaysOperations operations
    :vartype local_network_gateways: azure.mgmt.network.v2019_04_01.operations.LocalNetworkGatewaysOperations
    :ivar virtual_network_taps: VirtualNetworkTapsOperations operations
    :vartype virtual_network_taps: azure.mgmt.network.v2019_04_01.operations.VirtualNetworkTapsOperations
    :ivar virtual_wans: VirtualWansOperations operations
    :vartype virtual_wans: azure.mgmt.network.v2019_04_01.operations.VirtualWansOperations
    :ivar vpn_sites: VpnSitesOperations operations
    :vartype vpn_sites: azure.mgmt.network.v2019_04_01.operations.VpnSitesOperations
    :ivar vpn_sites_configuration: VpnSitesConfigurationOperations operations
    :vartype vpn_sites_configuration: azure.mgmt.network.v2019_04_01.operations.VpnSitesConfigurationOperations
    :ivar virtual_hubs: VirtualHubsOperations operations
    :vartype virtual_hubs: azure.mgmt.network.v2019_04_01.operations.VirtualHubsOperations
    :ivar hub_virtual_network_connections: HubVirtualNetworkConnectionsOperations operations
    :vartype hub_virtual_network_connections: azure.mgmt.network.v2019_04_01.operations.HubVirtualNetworkConnectionsOperations
    :ivar vpn_gateways: VpnGatewaysOperations operations
    :vartype vpn_gateways: azure.mgmt.network.v2019_04_01.operations.VpnGatewaysOperations
    :ivar vpn_connections: VpnConnectionsOperations operations
    :vartype vpn_connections: azure.mgmt.network.v2019_04_01.operations.VpnConnectionsOperations
    :ivar p2_svpn_server_configurations: P2SVpnServerConfigurationsOperations operations
    :vartype p2_svpn_server_configurations: azure.mgmt.network.v2019_04_01.operations.P2SVpnServerConfigurationsOperations
    :ivar p2_svpn_gateways: P2SVpnGatewaysOperations operations
    :vartype p2_svpn_gateways: azure.mgmt.network.v2019_04_01.operations.P2SVpnGatewaysOperations
    :ivar web_application_firewall_policies: WebApplicationFirewallPoliciesOperations operations
    :vartype web_application_firewall_policies: azure.mgmt.network.v2019_04_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_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.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.bastion_hosts = BastionHostsOperations(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.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_gateways = ExpressRouteGatewaysOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.express_route_connections = ExpressRouteConnectionsOperations(
            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.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_link_services = PrivateLinkServicesOperations(
            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_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.operations = Operations(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.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_wans = VirtualWansOperations(self._client, self._config,
                                                  self._serialize,
                                                  self._deserialize)
        self.vpn_sites = VpnSitesOperations(self._client, self._config,
                                            self._serialize, self._deserialize)
        self.vpn_sites_configuration = VpnSitesConfigurationOperations(
            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.p2_svpn_server_configurations = P2SVpnServerConfigurationsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.p2_svpn_gateways = P2SVpnGatewaysOperations(
            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)
Exemple #28
0
class ApplicationInsightsManagementClient:
    """Composite Swagger for Application Insights Management Client.

    :ivar workbook_templates: WorkbookTemplatesOperations operations
    :vartype workbook_templates:
     azure.mgmt.applicationinsights.v2019_10_17_preview.operations.WorkbookTemplatesOperations
    :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 api_version: Api Version. Default value is "2019-10-17-preview". Note that overriding
     this default value may result in unsupported behavior.
    :paramtype api_version: str
    """
    def __init__(self,
                 credential: "TokenCredential",
                 subscription_id: str,
                 base_url: str = "https://management.azure.com",
                 **kwargs: Any) -> None:
        self._config = ApplicationInsightsManagementClientConfiguration(
            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.workbook_templates = WorkbookTemplatesOperations(
            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: () -> ApplicationInsightsManagementClient
        self._client.__enter__()
        return self

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

    :ivar operations: Operations operations
    :vartype operations: azure.mgmt.compute.v2020_06_01.operations.Operations
    :ivar availability_sets: AvailabilitySetsOperations operations
    :vartype availability_sets: azure.mgmt.compute.v2020_06_01.operations.AvailabilitySetsOperations
    :ivar proximity_placement_groups: ProximityPlacementGroupsOperations operations
    :vartype proximity_placement_groups: azure.mgmt.compute.v2020_06_01.operations.ProximityPlacementGroupsOperations
    :ivar dedicated_host_groups: DedicatedHostGroupsOperations operations
    :vartype dedicated_host_groups: azure.mgmt.compute.v2020_06_01.operations.DedicatedHostGroupsOperations
    :ivar dedicated_hosts: DedicatedHostsOperations operations
    :vartype dedicated_hosts: azure.mgmt.compute.v2020_06_01.operations.DedicatedHostsOperations
    :ivar ssh_public_keys: SshPublicKeysOperations operations
    :vartype ssh_public_keys: azure.mgmt.compute.v2020_06_01.operations.SshPublicKeysOperations
    :ivar virtual_machine_extension_images: VirtualMachineExtensionImagesOperations operations
    :vartype virtual_machine_extension_images: azure.mgmt.compute.v2020_06_01.operations.VirtualMachineExtensionImagesOperations
    :ivar virtual_machine_extensions: VirtualMachineExtensionsOperations operations
    :vartype virtual_machine_extensions: azure.mgmt.compute.v2020_06_01.operations.VirtualMachineExtensionsOperations
    :ivar virtual_machine_images: VirtualMachineImagesOperations operations
    :vartype virtual_machine_images: azure.mgmt.compute.v2020_06_01.operations.VirtualMachineImagesOperations
    :ivar usage: UsageOperations operations
    :vartype usage: azure.mgmt.compute.v2020_06_01.operations.UsageOperations
    :ivar virtual_machines: VirtualMachinesOperations operations
    :vartype virtual_machines: azure.mgmt.compute.v2020_06_01.operations.VirtualMachinesOperations
    :ivar virtual_machine_sizes: VirtualMachineSizesOperations operations
    :vartype virtual_machine_sizes: azure.mgmt.compute.v2020_06_01.operations.VirtualMachineSizesOperations
    :ivar images: ImagesOperations operations
    :vartype images: azure.mgmt.compute.v2020_06_01.operations.ImagesOperations
    :ivar virtual_machine_scale_sets: VirtualMachineScaleSetsOperations operations
    :vartype virtual_machine_scale_sets: azure.mgmt.compute.v2020_06_01.operations.VirtualMachineScaleSetsOperations
    :ivar virtual_machine_scale_set_extensions: VirtualMachineScaleSetExtensionsOperations operations
    :vartype virtual_machine_scale_set_extensions: azure.mgmt.compute.v2020_06_01.operations.VirtualMachineScaleSetExtensionsOperations
    :ivar virtual_machine_scale_set_rolling_upgrades: VirtualMachineScaleSetRollingUpgradesOperations operations
    :vartype virtual_machine_scale_set_rolling_upgrades: azure.mgmt.compute.v2020_06_01.operations.VirtualMachineScaleSetRollingUpgradesOperations
    :ivar virtual_machine_scale_set_vm_extensions: VirtualMachineScaleSetVMExtensionsOperations operations
    :vartype virtual_machine_scale_set_vm_extensions: azure.mgmt.compute.v2020_06_01.operations.VirtualMachineScaleSetVMExtensionsOperations
    :ivar virtual_machine_scale_set_vms: VirtualMachineScaleSetVMsOperations operations
    :vartype virtual_machine_scale_set_vms: azure.mgmt.compute.v2020_06_01.operations.VirtualMachineScaleSetVMsOperations
    :ivar log_analytics: LogAnalyticsOperations operations
    :vartype log_analytics: azure.mgmt.compute.v2020_06_01.operations.LogAnalyticsOperations
    :ivar virtual_machine_run_commands: VirtualMachineRunCommandsOperations operations
    :vartype virtual_machine_run_commands: azure.mgmt.compute.v2020_06_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_06_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 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 = ComputeManagementClientConfiguration(
            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.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.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_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_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 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)
Exemple #30
0
class MonitorManagementClient:
    """Monitor Management Client.

    :ivar service_diagnostic_settings: ServiceDiagnosticSettingsOperations operations
    :vartype service_diagnostic_settings:
     $(python-base-namespace).v2015_07_01.operations.ServiceDiagnosticSettingsOperations
    :ivar metric_definitions: MetricDefinitionsOperations operations
    :vartype metric_definitions:
     $(python-base-namespace).v2015_07_01.operations.MetricDefinitionsOperations
    :ivar alert_rules: AlertRulesOperations operations
    :vartype alert_rules: $(python-base-namespace).v2015_07_01.operations.AlertRulesOperations
    :ivar operations: Operations operations
    :vartype operations: $(python-base-namespace).v2015_07_01.operations.Operations
    :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
    """
    def __init__(self,
                 credential: "TokenCredential",
                 subscription_id: str,
                 base_url: str = "https://management.azure.com",
                 **kwargs: Any) -> None:
        self._config = MonitorManagementClientConfiguration(
            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.service_diagnostic_settings = ServiceDiagnosticSettingsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.metric_definitions = MetricDefinitionsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.alert_rules = AlertRulesOperations(self._client, self._config,
                                                self._serialize,
                                                self._deserialize)
        self.operations = Operations(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: () -> MonitorManagementClient
        self._client.__enter__()
        return self

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