class SynapseManagementClient:
    """Azure Synapse Analytics Management Client.

    :ivar azure_ad_only_authentications: AzureADOnlyAuthenticationsOperations operations
    :vartype azure_ad_only_authentications:
     azure.mgmt.synapse.operations.AzureADOnlyAuthenticationsOperations
    :ivar operations: Operations operations
    :vartype operations: azure.mgmt.synapse.operations.Operations
    :ivar ip_firewall_rules: IpFirewallRulesOperations operations
    :vartype ip_firewall_rules: azure.mgmt.synapse.operations.IpFirewallRulesOperations
    :ivar keys: KeysOperations operations
    :vartype keys: azure.mgmt.synapse.operations.KeysOperations
    :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations
    :vartype private_endpoint_connections:
     azure.mgmt.synapse.operations.PrivateEndpointConnectionsOperations
    :ivar private_link_resources: PrivateLinkResourcesOperations operations
    :vartype private_link_resources: azure.mgmt.synapse.operations.PrivateLinkResourcesOperations
    :ivar private_link_hub_private_link_resources: PrivateLinkHubPrivateLinkResourcesOperations
     operations
    :vartype private_link_hub_private_link_resources:
     azure.mgmt.synapse.operations.PrivateLinkHubPrivateLinkResourcesOperations
    :ivar private_link_hubs: PrivateLinkHubsOperations operations
    :vartype private_link_hubs: azure.mgmt.synapse.operations.PrivateLinkHubsOperations
    :ivar private_endpoint_connections_private_link_hub:
     PrivateEndpointConnectionsPrivateLinkHubOperations operations
    :vartype private_endpoint_connections_private_link_hub:
     azure.mgmt.synapse.operations.PrivateEndpointConnectionsPrivateLinkHubOperations
    :ivar sql_pools: SqlPoolsOperations operations
    :vartype sql_pools: azure.mgmt.synapse.operations.SqlPoolsOperations
    :ivar sql_pool_metadata_sync_configs: SqlPoolMetadataSyncConfigsOperations operations
    :vartype sql_pool_metadata_sync_configs:
     azure.mgmt.synapse.operations.SqlPoolMetadataSyncConfigsOperations
    :ivar sql_pool_operation_results: SqlPoolOperationResultsOperations operations
    :vartype sql_pool_operation_results:
     azure.mgmt.synapse.operations.SqlPoolOperationResultsOperations
    :ivar sql_pool_geo_backup_policies: SqlPoolGeoBackupPoliciesOperations operations
    :vartype sql_pool_geo_backup_policies:
     azure.mgmt.synapse.operations.SqlPoolGeoBackupPoliciesOperations
    :ivar sql_pool_data_warehouse_user_activities: SqlPoolDataWarehouseUserActivitiesOperations
     operations
    :vartype sql_pool_data_warehouse_user_activities:
     azure.mgmt.synapse.operations.SqlPoolDataWarehouseUserActivitiesOperations
    :ivar sql_pool_restore_points: SqlPoolRestorePointsOperations operations
    :vartype sql_pool_restore_points: azure.mgmt.synapse.operations.SqlPoolRestorePointsOperations
    :ivar sql_pool_replication_links: SqlPoolReplicationLinksOperations operations
    :vartype sql_pool_replication_links:
     azure.mgmt.synapse.operations.SqlPoolReplicationLinksOperations
    :ivar sql_pool_maintenance_windows: SqlPoolMaintenanceWindowsOperations operations
    :vartype sql_pool_maintenance_windows:
     azure.mgmt.synapse.operations.SqlPoolMaintenanceWindowsOperations
    :ivar sql_pool_maintenance_window_options: SqlPoolMaintenanceWindowOptionsOperations operations
    :vartype sql_pool_maintenance_window_options:
     azure.mgmt.synapse.operations.SqlPoolMaintenanceWindowOptionsOperations
    :ivar sql_pool_transparent_data_encryptions: SqlPoolTransparentDataEncryptionsOperations
     operations
    :vartype sql_pool_transparent_data_encryptions:
     azure.mgmt.synapse.operations.SqlPoolTransparentDataEncryptionsOperations
    :ivar sql_pool_blob_auditing_policies: SqlPoolBlobAuditingPoliciesOperations operations
    :vartype sql_pool_blob_auditing_policies:
     azure.mgmt.synapse.operations.SqlPoolBlobAuditingPoliciesOperations
    :ivar sql_pool_operations: SqlPoolOperationsOperations operations
    :vartype sql_pool_operations: azure.mgmt.synapse.operations.SqlPoolOperationsOperations
    :ivar sql_pool_usages: SqlPoolUsagesOperations operations
    :vartype sql_pool_usages: azure.mgmt.synapse.operations.SqlPoolUsagesOperations
    :ivar sql_pool_sensitivity_labels: SqlPoolSensitivityLabelsOperations operations
    :vartype sql_pool_sensitivity_labels:
     azure.mgmt.synapse.operations.SqlPoolSensitivityLabelsOperations
    :ivar sql_pool_recommended_sensitivity_labels: SqlPoolRecommendedSensitivityLabelsOperations
     operations
    :vartype sql_pool_recommended_sensitivity_labels:
     azure.mgmt.synapse.operations.SqlPoolRecommendedSensitivityLabelsOperations
    :ivar sql_pool_schemas: SqlPoolSchemasOperations operations
    :vartype sql_pool_schemas: azure.mgmt.synapse.operations.SqlPoolSchemasOperations
    :ivar sql_pool_tables: SqlPoolTablesOperations operations
    :vartype sql_pool_tables: azure.mgmt.synapse.operations.SqlPoolTablesOperations
    :ivar sql_pool_table_columns: SqlPoolTableColumnsOperations operations
    :vartype sql_pool_table_columns: azure.mgmt.synapse.operations.SqlPoolTableColumnsOperations
    :ivar sql_pool_connection_policies: SqlPoolConnectionPoliciesOperations operations
    :vartype sql_pool_connection_policies:
     azure.mgmt.synapse.operations.SqlPoolConnectionPoliciesOperations
    :ivar sql_pool_vulnerability_assessments: SqlPoolVulnerabilityAssessmentsOperations operations
    :vartype sql_pool_vulnerability_assessments:
     azure.mgmt.synapse.operations.SqlPoolVulnerabilityAssessmentsOperations
    :ivar sql_pool_vulnerability_assessment_scans: SqlPoolVulnerabilityAssessmentScansOperations
     operations
    :vartype sql_pool_vulnerability_assessment_scans:
     azure.mgmt.synapse.operations.SqlPoolVulnerabilityAssessmentScansOperations
    :ivar sql_pool_security_alert_policies: SqlPoolSecurityAlertPoliciesOperations operations
    :vartype sql_pool_security_alert_policies:
     azure.mgmt.synapse.operations.SqlPoolSecurityAlertPoliciesOperations
    :ivar sql_pool_vulnerability_assessment_rule_baselines:
     SqlPoolVulnerabilityAssessmentRuleBaselinesOperations operations
    :vartype sql_pool_vulnerability_assessment_rule_baselines:
     azure.mgmt.synapse.operations.SqlPoolVulnerabilityAssessmentRuleBaselinesOperations
    :ivar extended_sql_pool_blob_auditing_policies: ExtendedSqlPoolBlobAuditingPoliciesOperations
     operations
    :vartype extended_sql_pool_blob_auditing_policies:
     azure.mgmt.synapse.operations.ExtendedSqlPoolBlobAuditingPoliciesOperations
    :ivar data_masking_policies: DataMaskingPoliciesOperations operations
    :vartype data_masking_policies: azure.mgmt.synapse.operations.DataMaskingPoliciesOperations
    :ivar data_masking_rules: DataMaskingRulesOperations operations
    :vartype data_masking_rules: azure.mgmt.synapse.operations.DataMaskingRulesOperations
    :ivar sql_pool_columns: SqlPoolColumnsOperations operations
    :vartype sql_pool_columns: azure.mgmt.synapse.operations.SqlPoolColumnsOperations
    :ivar sql_pool_workload_group: SqlPoolWorkloadGroupOperations operations
    :vartype sql_pool_workload_group: azure.mgmt.synapse.operations.SqlPoolWorkloadGroupOperations
    :ivar sql_pool_workload_classifier: SqlPoolWorkloadClassifierOperations operations
    :vartype sql_pool_workload_classifier:
     azure.mgmt.synapse.operations.SqlPoolWorkloadClassifierOperations
    :ivar workspace_managed_sql_server_blob_auditing_policies:
     WorkspaceManagedSqlServerBlobAuditingPoliciesOperations operations
    :vartype workspace_managed_sql_server_blob_auditing_policies:
     azure.mgmt.synapse.operations.WorkspaceManagedSqlServerBlobAuditingPoliciesOperations
    :ivar workspace_managed_sql_server_extended_blob_auditing_policies:
     WorkspaceManagedSqlServerExtendedBlobAuditingPoliciesOperations operations
    :vartype workspace_managed_sql_server_extended_blob_auditing_policies:
     azure.mgmt.synapse.operations.WorkspaceManagedSqlServerExtendedBlobAuditingPoliciesOperations
    :ivar workspace_managed_sql_server_security_alert_policy:
     WorkspaceManagedSqlServerSecurityAlertPolicyOperations operations
    :vartype workspace_managed_sql_server_security_alert_policy:
     azure.mgmt.synapse.operations.WorkspaceManagedSqlServerSecurityAlertPolicyOperations
    :ivar workspace_managed_sql_server_vulnerability_assessments:
     WorkspaceManagedSqlServerVulnerabilityAssessmentsOperations operations
    :vartype workspace_managed_sql_server_vulnerability_assessments:
     azure.mgmt.synapse.operations.WorkspaceManagedSqlServerVulnerabilityAssessmentsOperations
    :ivar workspace_managed_sql_server_encryption_protector:
     WorkspaceManagedSqlServerEncryptionProtectorOperations operations
    :vartype workspace_managed_sql_server_encryption_protector:
     azure.mgmt.synapse.operations.WorkspaceManagedSqlServerEncryptionProtectorOperations
    :ivar workspace_managed_sql_server_usages: WorkspaceManagedSqlServerUsagesOperations operations
    :vartype workspace_managed_sql_server_usages:
     azure.mgmt.synapse.operations.WorkspaceManagedSqlServerUsagesOperations
    :ivar workspace_managed_sql_server_recoverable_sql_pools:
     WorkspaceManagedSqlServerRecoverableSqlPoolsOperations operations
    :vartype workspace_managed_sql_server_recoverable_sql_pools:
     azure.mgmt.synapse.operations.WorkspaceManagedSqlServerRecoverableSqlPoolsOperations
    :ivar workspaces: WorkspacesOperations operations
    :vartype workspaces: azure.mgmt.synapse.operations.WorkspacesOperations
    :ivar workspace_aad_admins: WorkspaceAadAdminsOperations operations
    :vartype workspace_aad_admins: azure.mgmt.synapse.operations.WorkspaceAadAdminsOperations
    :ivar workspace_sql_aad_admins: WorkspaceSqlAadAdminsOperations operations
    :vartype workspace_sql_aad_admins:
     azure.mgmt.synapse.operations.WorkspaceSqlAadAdminsOperations
    :ivar workspace_managed_identity_sql_control_settings:
     WorkspaceManagedIdentitySqlControlSettingsOperations operations
    :vartype workspace_managed_identity_sql_control_settings:
     azure.mgmt.synapse.operations.WorkspaceManagedIdentitySqlControlSettingsOperations
    :ivar restorable_dropped_sql_pools: RestorableDroppedSqlPoolsOperations operations
    :vartype restorable_dropped_sql_pools:
     azure.mgmt.synapse.operations.RestorableDroppedSqlPoolsOperations
    :ivar big_data_pools: BigDataPoolsOperations operations
    :vartype big_data_pools: azure.mgmt.synapse.operations.BigDataPoolsOperations
    :ivar library: LibraryOperations operations
    :vartype library: azure.mgmt.synapse.operations.LibraryOperations
    :ivar libraries: LibrariesOperations operations
    :vartype libraries: azure.mgmt.synapse.operations.LibrariesOperations
    :ivar integration_runtimes: IntegrationRuntimesOperations operations
    :vartype integration_runtimes: azure.mgmt.synapse.operations.IntegrationRuntimesOperations
    :ivar integration_runtime_node_ip_address: IntegrationRuntimeNodeIpAddressOperations operations
    :vartype integration_runtime_node_ip_address:
     azure.mgmt.synapse.operations.IntegrationRuntimeNodeIpAddressOperations
    :ivar integration_runtime_object_metadata: IntegrationRuntimeObjectMetadataOperations
     operations
    :vartype integration_runtime_object_metadata:
     azure.mgmt.synapse.operations.IntegrationRuntimeObjectMetadataOperations
    :ivar integration_runtime_nodes: IntegrationRuntimeNodesOperations operations
    :vartype integration_runtime_nodes:
     azure.mgmt.synapse.operations.IntegrationRuntimeNodesOperations
    :ivar integration_runtime_credentials: IntegrationRuntimeCredentialsOperations operations
    :vartype integration_runtime_credentials:
     azure.mgmt.synapse.operations.IntegrationRuntimeCredentialsOperations
    :ivar integration_runtime_connection_infos: IntegrationRuntimeConnectionInfosOperations
     operations
    :vartype integration_runtime_connection_infos:
     azure.mgmt.synapse.operations.IntegrationRuntimeConnectionInfosOperations
    :ivar integration_runtime_auth_keys: IntegrationRuntimeAuthKeysOperations operations
    :vartype integration_runtime_auth_keys:
     azure.mgmt.synapse.operations.IntegrationRuntimeAuthKeysOperations
    :ivar integration_runtime_monitoring_data: IntegrationRuntimeMonitoringDataOperations
     operations
    :vartype integration_runtime_monitoring_data:
     azure.mgmt.synapse.operations.IntegrationRuntimeMonitoringDataOperations
    :ivar integration_runtime_status: IntegrationRuntimeStatusOperations operations
    :vartype integration_runtime_status:
     azure.mgmt.synapse.operations.IntegrationRuntimeStatusOperations
    :ivar spark_configuration: SparkConfigurationOperations operations
    :vartype spark_configuration: azure.mgmt.synapse.operations.SparkConfigurationOperations
    :ivar spark_configurations: SparkConfigurationsOperations operations
    :vartype spark_configurations: azure.mgmt.synapse.operations.SparkConfigurationsOperations
    :ivar kusto_operations: KustoOperationsOperations operations
    :vartype kusto_operations: azure.mgmt.synapse.operations.KustoOperationsOperations
    :ivar kusto_pools: KustoPoolsOperations operations
    :vartype kusto_pools: azure.mgmt.synapse.operations.KustoPoolsOperations
    :ivar kusto_pool_child_resource: KustoPoolChildResourceOperations operations
    :vartype kusto_pool_child_resource:
     azure.mgmt.synapse.operations.KustoPoolChildResourceOperations
    :ivar kusto_pool_attached_database_configurations:
     KustoPoolAttachedDatabaseConfigurationsOperations operations
    :vartype kusto_pool_attached_database_configurations:
     azure.mgmt.synapse.operations.KustoPoolAttachedDatabaseConfigurationsOperations
    :ivar kusto_pool_databases: KustoPoolDatabasesOperations operations
    :vartype kusto_pool_databases: azure.mgmt.synapse.operations.KustoPoolDatabasesOperations
    :ivar kusto_pool_data_connections: KustoPoolDataConnectionsOperations operations
    :vartype kusto_pool_data_connections:
     azure.mgmt.synapse.operations.KustoPoolDataConnectionsOperations
    :ivar kusto_pool_principal_assignments: KustoPoolPrincipalAssignmentsOperations operations
    :vartype kusto_pool_principal_assignments:
     azure.mgmt.synapse.operations.KustoPoolPrincipalAssignmentsOperations
    :ivar kusto_pool_database_principal_assignments:
     KustoPoolDatabasePrincipalAssignmentsOperations operations
    :vartype kusto_pool_database_principal_assignments:
     azure.mgmt.synapse.operations.KustoPoolDatabasePrincipalAssignmentsOperations
    :param credential: Credential needed for the client to connect to Azure.
    :type credential: ~azure.core.credentials.TokenCredential
    :param subscription_id: The ID of the target subscription.
    :type subscription_id: str
    :param base_url: Service URL. Default value is 'https://management.azure.com'.
    :type base_url: str
    :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
     Retry-After header is present.
    """
    def __init__(self,
                 credential: "TokenCredential",
                 subscription_id: str,
                 base_url: str = "https://management.azure.com",
                 **kwargs: Any) -> None:
        self._config = SynapseManagementClientConfiguration(
            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.azure_ad_only_authentications = AzureADOnlyAuthenticationsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.operations = Operations(self._client, self._config,
                                     self._serialize, self._deserialize)
        self.ip_firewall_rules = IpFirewallRulesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.keys = KeysOperations(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.private_link_hub_private_link_resources = PrivateLinkHubPrivateLinkResourcesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.private_link_hubs = PrivateLinkHubsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.private_endpoint_connections_private_link_hub = PrivateEndpointConnectionsPrivateLinkHubOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.sql_pools = SqlPoolsOperations(self._client, self._config,
                                            self._serialize, self._deserialize)
        self.sql_pool_metadata_sync_configs = SqlPoolMetadataSyncConfigsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.sql_pool_operation_results = SqlPoolOperationResultsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.sql_pool_geo_backup_policies = SqlPoolGeoBackupPoliciesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.sql_pool_data_warehouse_user_activities = SqlPoolDataWarehouseUserActivitiesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.sql_pool_restore_points = SqlPoolRestorePointsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.sql_pool_replication_links = SqlPoolReplicationLinksOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.sql_pool_maintenance_windows = SqlPoolMaintenanceWindowsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.sql_pool_maintenance_window_options = SqlPoolMaintenanceWindowOptionsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.sql_pool_transparent_data_encryptions = SqlPoolTransparentDataEncryptionsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.sql_pool_blob_auditing_policies = SqlPoolBlobAuditingPoliciesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.sql_pool_operations = SqlPoolOperationsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.sql_pool_usages = SqlPoolUsagesOperations(self._client,
                                                       self._config,
                                                       self._serialize,
                                                       self._deserialize)
        self.sql_pool_sensitivity_labels = SqlPoolSensitivityLabelsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.sql_pool_recommended_sensitivity_labels = SqlPoolRecommendedSensitivityLabelsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.sql_pool_schemas = SqlPoolSchemasOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.sql_pool_tables = SqlPoolTablesOperations(self._client,
                                                       self._config,
                                                       self._serialize,
                                                       self._deserialize)
        self.sql_pool_table_columns = SqlPoolTableColumnsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.sql_pool_connection_policies = SqlPoolConnectionPoliciesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.sql_pool_vulnerability_assessments = SqlPoolVulnerabilityAssessmentsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.sql_pool_vulnerability_assessment_scans = SqlPoolVulnerabilityAssessmentScansOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.sql_pool_security_alert_policies = SqlPoolSecurityAlertPoliciesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.sql_pool_vulnerability_assessment_rule_baselines = SqlPoolVulnerabilityAssessmentRuleBaselinesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.extended_sql_pool_blob_auditing_policies = ExtendedSqlPoolBlobAuditingPoliciesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.data_masking_policies = DataMaskingPoliciesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.data_masking_rules = DataMaskingRulesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.sql_pool_columns = SqlPoolColumnsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.sql_pool_workload_group = SqlPoolWorkloadGroupOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.sql_pool_workload_classifier = SqlPoolWorkloadClassifierOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.workspace_managed_sql_server_blob_auditing_policies = WorkspaceManagedSqlServerBlobAuditingPoliciesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.workspace_managed_sql_server_extended_blob_auditing_policies = WorkspaceManagedSqlServerExtendedBlobAuditingPoliciesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.workspace_managed_sql_server_security_alert_policy = WorkspaceManagedSqlServerSecurityAlertPolicyOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.workspace_managed_sql_server_vulnerability_assessments = WorkspaceManagedSqlServerVulnerabilityAssessmentsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.workspace_managed_sql_server_encryption_protector = WorkspaceManagedSqlServerEncryptionProtectorOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.workspace_managed_sql_server_usages = WorkspaceManagedSqlServerUsagesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.workspace_managed_sql_server_recoverable_sql_pools = WorkspaceManagedSqlServerRecoverableSqlPoolsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.workspaces = WorkspacesOperations(self._client, self._config,
                                               self._serialize,
                                               self._deserialize)
        self.workspace_aad_admins = WorkspaceAadAdminsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.workspace_sql_aad_admins = WorkspaceSqlAadAdminsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.workspace_managed_identity_sql_control_settings = WorkspaceManagedIdentitySqlControlSettingsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.restorable_dropped_sql_pools = RestorableDroppedSqlPoolsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.big_data_pools = BigDataPoolsOperations(self._client,
                                                     self._config,
                                                     self._serialize,
                                                     self._deserialize)
        self.library = LibraryOperations(self._client, self._config,
                                         self._serialize, self._deserialize)
        self.libraries = LibrariesOperations(self._client, self._config,
                                             self._serialize,
                                             self._deserialize)
        self.integration_runtimes = IntegrationRuntimesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.integration_runtime_node_ip_address = IntegrationRuntimeNodeIpAddressOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.integration_runtime_object_metadata = IntegrationRuntimeObjectMetadataOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.integration_runtime_nodes = IntegrationRuntimeNodesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.integration_runtime_credentials = IntegrationRuntimeCredentialsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.integration_runtime_connection_infos = IntegrationRuntimeConnectionInfosOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.integration_runtime_auth_keys = IntegrationRuntimeAuthKeysOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.integration_runtime_monitoring_data = IntegrationRuntimeMonitoringDataOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.integration_runtime_status = IntegrationRuntimeStatusOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.spark_configuration = SparkConfigurationOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.spark_configurations = SparkConfigurationsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.kusto_operations = KustoOperationsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.kusto_pools = KustoPoolsOperations(self._client, self._config,
                                                self._serialize,
                                                self._deserialize)
        self.kusto_pool_child_resource = KustoPoolChildResourceOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.kusto_pool_attached_database_configurations = KustoPoolAttachedDatabaseConfigurationsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.kusto_pool_databases = KustoPoolDatabasesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.kusto_pool_data_connections = KustoPoolDataConnectionsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.kusto_pool_principal_assignments = KustoPoolPrincipalAssignmentsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.kusto_pool_database_principal_assignments = KustoPoolDatabasePrincipalAssignmentsOperations(
            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: () -> SynapseManagementClient
        self._client.__enter__()
        return self

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

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

        client_models = {
            k: v
            for k, v in models.__dict__.items() if isinstance(v, type)
        }
        self._serialize = Serializer(client_models)
        self._deserialize = Deserializer(client_models)
        self._serialize.client_side_validation = False
        self.operations = Operations(self._client, self._config,
                                     self._serialize, self._deserialize)
        self.availability_sets = AvailabilitySetsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.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.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.disks = DisksOperations(self._client, self._config,
                                     self._serialize, self._deserialize)
        self.snapshots = SnapshotsOperations(self._client, self._config,
                                             self._serialize,
                                             self._deserialize)
        self.disk_encryption_sets = DiskEncryptionSetsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.galleries = GalleriesOperations(self._client, self._config,
                                             self._serialize,
                                             self._deserialize)
        self.gallery_images = GalleryImagesOperations(self._client,
                                                      self._config,
                                                      self._serialize,
                                                      self._deserialize)
        self.gallery_image_versions = GalleryImageVersionsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.gallery_applications = GalleryApplicationsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.gallery_application_versions = GalleryApplicationVersionsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.virtual_machine_run_commands = VirtualMachineRunCommandsOperations(
            self._client, self._config, self._serialize, self._deserialize)

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

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

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

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

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

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

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

    def __exit__(self, *exc_details):
        # type: (Any) -> None
        self._client.__exit__(*exc_details)
示例#3
0
class SourceControlConfigurationClient:
    """KubernetesConfiguration Client.

    :ivar extensions: ExtensionsOperations operations
    :vartype extensions:
     azure.mgmt.kubernetesconfiguration.v2021_05_01_preview.operations.ExtensionsOperations
    :ivar operation_status: OperationStatusOperations operations
    :vartype operation_status:
     azure.mgmt.kubernetesconfiguration.v2021_05_01_preview.operations.OperationStatusOperations
    :ivar cluster_extension_type: ClusterExtensionTypeOperations operations
    :vartype cluster_extension_type:
     azure.mgmt.kubernetesconfiguration.v2021_05_01_preview.operations.ClusterExtensionTypeOperations
    :ivar cluster_extension_types: ClusterExtensionTypesOperations operations
    :vartype cluster_extension_types:
     azure.mgmt.kubernetesconfiguration.v2021_05_01_preview.operations.ClusterExtensionTypesOperations
    :ivar extension_type_versions: ExtensionTypeVersionsOperations operations
    :vartype extension_type_versions:
     azure.mgmt.kubernetesconfiguration.v2021_05_01_preview.operations.ExtensionTypeVersionsOperations
    :ivar location_extension_types: LocationExtensionTypesOperations operations
    :vartype location_extension_types:
     azure.mgmt.kubernetesconfiguration.v2021_05_01_preview.operations.LocationExtensionTypesOperations
    :ivar source_control_configurations: SourceControlConfigurationsOperations operations
    :vartype source_control_configurations:
     azure.mgmt.kubernetesconfiguration.v2021_05_01_preview.operations.SourceControlConfigurationsOperations
    :ivar operations: Operations operations
    :vartype operations:
     azure.mgmt.kubernetesconfiguration.v2021_05_01_preview.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
    :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 = SourceControlConfigurationClientConfiguration(
            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.extensions = ExtensionsOperations(self._client, self._config,
                                               self._serialize,
                                               self._deserialize)
        self.operation_status = OperationStatusOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.cluster_extension_type = ClusterExtensionTypeOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.cluster_extension_types = ClusterExtensionTypesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.extension_type_versions = ExtensionTypeVersionsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.location_extension_types = LocationExtensionTypesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.source_control_configurations = SourceControlConfigurationsOperations(
            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: () -> SourceControlConfigurationClient
        self._client.__enter__()
        return self

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

    :ivar services: ServicesOperations operations
    :vartype services: azure.mgmt.appplatform.v2021_06_01_preview.operations.ServicesOperations
    :ivar config_servers: ConfigServersOperations operations
    :vartype config_servers:
     azure.mgmt.appplatform.v2021_06_01_preview.operations.ConfigServersOperations
    :ivar monitoring_settings: MonitoringSettingsOperations operations
    :vartype monitoring_settings:
     azure.mgmt.appplatform.v2021_06_01_preview.operations.MonitoringSettingsOperations
    :ivar apps: AppsOperations operations
    :vartype apps: azure.mgmt.appplatform.v2021_06_01_preview.operations.AppsOperations
    :ivar bindings: BindingsOperations operations
    :vartype bindings: azure.mgmt.appplatform.v2021_06_01_preview.operations.BindingsOperations
    :ivar certificates: CertificatesOperations operations
    :vartype certificates:
     azure.mgmt.appplatform.v2021_06_01_preview.operations.CertificatesOperations
    :ivar custom_domains: CustomDomainsOperations operations
    :vartype custom_domains:
     azure.mgmt.appplatform.v2021_06_01_preview.operations.CustomDomainsOperations
    :ivar deployments: DeploymentsOperations operations
    :vartype deployments:
     azure.mgmt.appplatform.v2021_06_01_preview.operations.DeploymentsOperations
    :ivar operations: Operations operations
    :vartype operations: azure.mgmt.appplatform.v2021_06_01_preview.operations.Operations
    :ivar runtime_versions: RuntimeVersionsOperations operations
    :vartype runtime_versions:
     azure.mgmt.appplatform.v2021_06_01_preview.operations.RuntimeVersionsOperations
    :ivar skus: SkusOperations operations
    :vartype skus: azure.mgmt.appplatform.v2021_06_01_preview.operations.SkusOperations
    :param credential: Credential needed for the client to connect to Azure.
    :type credential: ~azure.core.credentials.TokenCredential
    :param subscription_id: Gets subscription ID which uniquely identify the Microsoft Azure
     subscription. The subscription ID forms part of the URI for every service call.
    :type subscription_id: str
    :param 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 = 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.monitoring_settings = MonitoringSettingsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.apps = AppsOperations(self._client, self._config, self._serialize,
                                   self._deserialize)
        self.bindings = BindingsOperations(self._client, self._config,
                                           self._serialize, self._deserialize)
        self.certificates = CertificatesOperations(self._client, self._config,
                                                   self._serialize,
                                                   self._deserialize)
        self.custom_domains = CustomDomainsOperations(self._client,
                                                      self._config,
                                                      self._serialize,
                                                      self._deserialize)
        self.deployments = DeploymentsOperations(self._client, self._config,
                                                 self._serialize,
                                                 self._deserialize)
        self.operations = Operations(self._client, self._config,
                                     self._serialize, self._deserialize)
        self.runtime_versions = RuntimeVersionsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.skus = SkusOperations(self._client, self._config, self._serialize,
                                   self._deserialize)

    def _send_request(
            self,
            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: () -> AppPlatformManagementClient
        self._client.__enter__()
        return self

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

    :ivar app_service_environments: AppServiceEnvironmentsOperations operations
    :vartype app_service_environments:
     azure.mgmt.web.v2016_09_01.operations.AppServiceEnvironmentsOperations
    :ivar app_service_plans: AppServicePlansOperations operations
    :vartype app_service_plans: azure.mgmt.web.v2016_09_01.operations.AppServicePlansOperations
    :param credential: Credential needed for the client to connect to Azure.
    :type credential: ~azure.core.credentials.TokenCredential
    :param subscription_id: Your Azure subscription ID. This is a GUID-formatted string (e.g.
     00000000-0000-0000-0000-000000000000).
    :type subscription_id: str
    :param base_url: Service URL. Default value is 'https://management.azure.com'.
    :type base_url: str
    :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 = WebSiteManagementClientConfiguration(
            credential=credential, subscription_id=subscription_id, **kwargs)
        self._client = ARMPipelineClient(base_url=base_url,
                                         config=self._config,
                                         **kwargs)

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

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

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

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

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

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

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

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

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

    :ivar component_linked_storage_accounts: ComponentLinkedStorageAccountsOperations operations
    :vartype component_linked_storage_accounts:
     azure.mgmt.applicationinsights.v2020_03_01_preview.operations.ComponentLinkedStorageAccountsOperations
    :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 = 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.component_linked_storage_accounts = ComponentLinkedStorageAccountsOperations(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: () -> ApplicationInsightsManagementClient
        self._client.__enter__()
        return self

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

    :ivar connected_registries: ConnectedRegistriesOperations operations
    :vartype connected_registries:
     azure.mgmt.containerregistry.v2021_08_01_preview.operations.ConnectedRegistriesOperations
    :ivar export_pipelines: ExportPipelinesOperations operations
    :vartype export_pipelines:
     azure.mgmt.containerregistry.v2021_08_01_preview.operations.ExportPipelinesOperations
    :ivar registries: RegistriesOperations operations
    :vartype registries:
     azure.mgmt.containerregistry.v2021_08_01_preview.operations.RegistriesOperations
    :ivar import_pipelines: ImportPipelinesOperations operations
    :vartype import_pipelines:
     azure.mgmt.containerregistry.v2021_08_01_preview.operations.ImportPipelinesOperations
    :ivar operations: Operations operations
    :vartype operations: azure.mgmt.containerregistry.v2021_08_01_preview.operations.Operations
    :ivar pipeline_runs: PipelineRunsOperations operations
    :vartype pipeline_runs:
     azure.mgmt.containerregistry.v2021_08_01_preview.operations.PipelineRunsOperations
    :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations
    :vartype private_endpoint_connections:
     azure.mgmt.containerregistry.v2021_08_01_preview.operations.PrivateEndpointConnectionsOperations
    :ivar replications: ReplicationsOperations operations
    :vartype replications:
     azure.mgmt.containerregistry.v2021_08_01_preview.operations.ReplicationsOperations
    :ivar scope_maps: ScopeMapsOperations operations
    :vartype scope_maps:
     azure.mgmt.containerregistry.v2021_08_01_preview.operations.ScopeMapsOperations
    :ivar tokens: TokensOperations operations
    :vartype tokens: azure.mgmt.containerregistry.v2021_08_01_preview.operations.TokensOperations
    :ivar webhooks: WebhooksOperations operations
    :vartype webhooks:
     azure.mgmt.containerregistry.v2021_08_01_preview.operations.WebhooksOperations
    :param credential: Credential needed for the client to connect to Azure.
    :type credential: ~azure.core.credentials.TokenCredential
    :param subscription_id: The Microsoft Azure subscription ID.
    :type subscription_id: str
    :param base_url: Service URL. Default value is "https://management.azure.com".
    :type base_url: str
    :keyword api_version: Api Version. Default value is "2021-08-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 CognitiveServicesManagementClient(
        CognitiveServicesManagementClientOperationsMixin):
    """Cognitive Services Management Client.

    :ivar accounts: AccountsOperations operations
    :vartype accounts: azure.mgmt.cognitiveservices.operations.AccountsOperations
    :ivar deleted_accounts: DeletedAccountsOperations operations
    :vartype deleted_accounts: azure.mgmt.cognitiveservices.operations.DeletedAccountsOperations
    :ivar resource_skus: ResourceSkusOperations operations
    :vartype resource_skus: azure.mgmt.cognitiveservices.operations.ResourceSkusOperations
    :ivar operations: Operations operations
    :vartype operations: azure.mgmt.cognitiveservices.operations.Operations
    :ivar commitment_tiers: CommitmentTiersOperations operations
    :vartype commitment_tiers: azure.mgmt.cognitiveservices.operations.CommitmentTiersOperations
    :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations
    :vartype private_endpoint_connections:
     azure.mgmt.cognitiveservices.operations.PrivateEndpointConnectionsOperations
    :ivar private_link_resources: PrivateLinkResourcesOperations operations
    :vartype private_link_resources:
     azure.mgmt.cognitiveservices.operations.PrivateLinkResourcesOperations
    :ivar deployments: DeploymentsOperations operations
    :vartype deployments: azure.mgmt.cognitiveservices.operations.DeploymentsOperations
    :ivar commitment_plans: CommitmentPlansOperations operations
    :vartype commitment_plans: azure.mgmt.cognitiveservices.operations.CommitmentPlansOperations
    :param credential: Credential needed for the client to connect to Azure.
    :type credential: ~azure.core.credentials.TokenCredential
    :param subscription_id: The ID of the target subscription.
    :type subscription_id: str
    :param base_url: Service URL. Default value is 'https://management.azure.com'.
    :type base_url: str
    :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
     Retry-After header is present.
    """
    def __init__(self,
                 credential: "TokenCredential",
                 subscription_id: str,
                 base_url: str = "https://management.azure.com",
                 **kwargs: Any) -> None:
        self._config = CognitiveServicesManagementClientConfiguration(
            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.accounts = AccountsOperations(self._client, self._config,
                                           self._serialize, self._deserialize)
        self.deleted_accounts = DeletedAccountsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.resource_skus = ResourceSkusOperations(self._client, self._config,
                                                    self._serialize,
                                                    self._deserialize)
        self.operations = Operations(self._client, self._config,
                                     self._serialize, self._deserialize)
        self.commitment_tiers = CommitmentTiersOperations(
            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.deployments = DeploymentsOperations(self._client, self._config,
                                                 self._serialize,
                                                 self._deserialize)
        self.commitment_plans = CommitmentPlansOperations(
            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: () -> CognitiveServicesManagementClient
        self._client.__enter__()
        return self

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

    :ivar operations: Operations operations
    :vartype operations: stream_analytics_management_client.operations.Operations
    :ivar streaming_jobs: StreamingJobsOperations operations
    :vartype streaming_jobs: stream_analytics_management_client.operations.StreamingJobsOperations
    :ivar inputs: InputsOperations operations
    :vartype inputs: stream_analytics_management_client.operations.InputsOperations
    :ivar outputs: OutputsOperations operations
    :vartype outputs: stream_analytics_management_client.operations.OutputsOperations
    :ivar transformations: TransformationsOperations operations
    :vartype transformations:
     stream_analytics_management_client.operations.TransformationsOperations
    :ivar functions: FunctionsOperations operations
    :vartype functions: stream_analytics_management_client.operations.FunctionsOperations
    :ivar subscriptions: SubscriptionsOperations operations
    :vartype subscriptions: stream_analytics_management_client.operations.SubscriptionsOperations
    :ivar clusters: ClustersOperations operations
    :vartype clusters: stream_analytics_management_client.operations.ClustersOperations
    :ivar private_endpoints: PrivateEndpointsOperations operations
    :vartype private_endpoints:
     stream_analytics_management_client.operations.PrivateEndpointsOperations
    :param credential: Credential needed for the client to connect to Azure.
    :type credential: ~azure.core.credentials.TokenCredential
    :param subscription_id: The ID of the target subscription.
    :type subscription_id: str
    :param 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 = StreamAnalyticsManagementClientConfiguration(
            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.streaming_jobs = StreamingJobsOperations(self._client,
                                                      self._config,
                                                      self._serialize,
                                                      self._deserialize)
        self.inputs = InputsOperations(self._client, self._config,
                                       self._serialize, self._deserialize)
        self.outputs = OutputsOperations(self._client, self._config,
                                         self._serialize, self._deserialize)
        self.transformations = TransformationsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.functions = FunctionsOperations(self._client, self._config,
                                             self._serialize,
                                             self._deserialize)
        self.subscriptions = SubscriptionsOperations(self._client,
                                                     self._config,
                                                     self._serialize,
                                                     self._deserialize)
        self.clusters = ClustersOperations(self._client, self._config,
                                           self._serialize, self._deserialize)
        self.private_endpoints = PrivateEndpointsOperations(
            self._client, self._config, self._serialize, self._deserialize)

    def _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: () -> StreamAnalyticsManagementClient
        self._client.__enter__()
        return self

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

    :ivar resource_skus: ResourceSkusOperations operations
    :vartype resource_skus: azure.mgmt.compute.v2019_04_01.operations.ResourceSkusOperations
    :param credential: Credential needed for the client to connect to Azure.
    :type credential: ~azure.core.credentials.TokenCredential
    :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure
     subscription. The subscription ID forms part of the URI for every service call.
    :type subscription_id: str
    :param base_url: Service URL. Default value is "https://management.azure.com".
    :type base_url: str
    :keyword api_version: Api Version. Default value is "2019-04-01". 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 = ComputeManagementClientConfiguration(
            credential=credential, subscription_id=subscription_id, **kwargs)
        self._client = ARMPipelineClient(base_url=base_url,
                                         config=self._config,
                                         **kwargs)

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

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

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

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

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

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

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

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

    def __exit__(self, *exc_details):
        # type: (Any) -> None
        self._client.__exit__(*exc_details)
class NetworkManagementClient(NetworkManagementClientOperationsMixin):  # pylint: disable=too-many-instance-attributes
    """Network Client.

    :ivar network_managers: NetworkManagersOperations operations
    :vartype network_managers:
     azure.mgmt.network.v2022_02_01_preview.operations.NetworkManagersOperations
    :ivar network_manager_commits: NetworkManagerCommitsOperations operations
    :vartype network_manager_commits:
     azure.mgmt.network.v2022_02_01_preview.operations.NetworkManagerCommitsOperations
    :ivar network_manager_deployment_status: NetworkManagerDeploymentStatusOperations operations
    :vartype network_manager_deployment_status:
     azure.mgmt.network.v2022_02_01_preview.operations.NetworkManagerDeploymentStatusOperations
    :ivar effective_virtual_networks: EffectiveVirtualNetworksOperations operations
    :vartype effective_virtual_networks:
     azure.mgmt.network.v2022_02_01_preview.operations.EffectiveVirtualNetworksOperations
    :ivar connectivity_configurations: ConnectivityConfigurationsOperations operations
    :vartype connectivity_configurations:
     azure.mgmt.network.v2022_02_01_preview.operations.ConnectivityConfigurationsOperations
    :ivar network_groups: NetworkGroupsOperations operations
    :vartype network_groups:
     azure.mgmt.network.v2022_02_01_preview.operations.NetworkGroupsOperations
    :ivar list_effective_virtual_networks: ListEffectiveVirtualNetworksOperations operations
    :vartype list_effective_virtual_networks:
     azure.mgmt.network.v2022_02_01_preview.operations.ListEffectiveVirtualNetworksOperations
    :ivar static_members: StaticMembersOperations operations
    :vartype static_members:
     azure.mgmt.network.v2022_02_01_preview.operations.StaticMembersOperations
    :ivar security_user_configurations: SecurityUserConfigurationsOperations operations
    :vartype security_user_configurations:
     azure.mgmt.network.v2022_02_01_preview.operations.SecurityUserConfigurationsOperations
    :ivar user_rule_collections: UserRuleCollectionsOperations operations
    :vartype user_rule_collections:
     azure.mgmt.network.v2022_02_01_preview.operations.UserRuleCollectionsOperations
    :ivar user_rules: UserRulesOperations operations
    :vartype user_rules: azure.mgmt.network.v2022_02_01_preview.operations.UserRulesOperations
    :ivar security_admin_configurations: SecurityAdminConfigurationsOperations operations
    :vartype security_admin_configurations:
     azure.mgmt.network.v2022_02_01_preview.operations.SecurityAdminConfigurationsOperations
    :ivar admin_rule_collections: AdminRuleCollectionsOperations operations
    :vartype admin_rule_collections:
     azure.mgmt.network.v2022_02_01_preview.operations.AdminRuleCollectionsOperations
    :ivar admin_rules: AdminRulesOperations operations
    :vartype admin_rules: azure.mgmt.network.v2022_02_01_preview.operations.AdminRulesOperations
    :ivar subscription_network_manager_connections: SubscriptionNetworkManagerConnectionsOperations
     operations
    :vartype subscription_network_manager_connections:
     azure.mgmt.network.v2022_02_01_preview.operations.SubscriptionNetworkManagerConnectionsOperations
    :ivar management_group_network_manager_connections:
     ManagementGroupNetworkManagerConnectionsOperations operations
    :vartype management_group_network_manager_connections:
     azure.mgmt.network.v2022_02_01_preview.operations.ManagementGroupNetworkManagerConnectionsOperations
    :ivar scope_connections: ScopeConnectionsOperations operations
    :vartype scope_connections:
     azure.mgmt.network.v2022_02_01_preview.operations.ScopeConnectionsOperations
    :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 base_url: Service URL. Default value is "https://management.azure.com".
    :type base_url: str
    :keyword api_version: Api Version. Default value is "2022-02-01-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 = NetworkManagementClientConfiguration(
            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.network_managers = NetworkManagersOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.network_manager_commits = NetworkManagerCommitsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.network_manager_deployment_status = NetworkManagerDeploymentStatusOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.effective_virtual_networks = EffectiveVirtualNetworksOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.connectivity_configurations = ConnectivityConfigurationsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.network_groups = NetworkGroupsOperations(self._client,
                                                      self._config,
                                                      self._serialize,
                                                      self._deserialize)
        self.list_effective_virtual_networks = ListEffectiveVirtualNetworksOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.static_members = StaticMembersOperations(self._client,
                                                      self._config,
                                                      self._serialize,
                                                      self._deserialize)
        self.security_user_configurations = SecurityUserConfigurationsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.user_rule_collections = UserRuleCollectionsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.user_rules = UserRulesOperations(self._client, self._config,
                                              self._serialize,
                                              self._deserialize)
        self.security_admin_configurations = SecurityAdminConfigurationsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.admin_rule_collections = AdminRuleCollectionsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.admin_rules = AdminRulesOperations(self._client, self._config,
                                                self._serialize,
                                                self._deserialize)
        self.subscription_network_manager_connections = SubscriptionNetworkManagerConnectionsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.management_group_network_manager_connections = ManagementGroupNetworkManagerConnectionsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.scope_connections = ScopeConnectionsOperations(
            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: () -> NetworkManagementClient
        self._client.__enter__()
        return self

    def __exit__(self, *exc_details):
        # type: (Any) -> None
        self._client.__exit__(*exc_details)
示例#12
0
class ApiManagementClient(ApiManagementClientOperationsMixin):
    """ApiManagement Client.

    :ivar api: ApiOperations operations
    :vartype api: api_management_client.operations.ApiOperations
    :ivar api_revision: ApiRevisionOperations operations
    :vartype api_revision: api_management_client.operations.ApiRevisionOperations
    :ivar api_release: ApiReleaseOperations operations
    :vartype api_release: api_management_client.operations.ApiReleaseOperations
    :ivar api_operation: ApiOperationOperations operations
    :vartype api_operation: api_management_client.operations.ApiOperationOperations
    :ivar api_operation_policy: ApiOperationPolicyOperations operations
    :vartype api_operation_policy: api_management_client.operations.ApiOperationPolicyOperations
    :ivar tag: TagOperations operations
    :vartype tag: api_management_client.operations.TagOperations
    :ivar api_product: ApiProductOperations operations
    :vartype api_product: api_management_client.operations.ApiProductOperations
    :ivar api_policy: ApiPolicyOperations operations
    :vartype api_policy: api_management_client.operations.ApiPolicyOperations
    :ivar api_schema: ApiSchemaOperations operations
    :vartype api_schema: api_management_client.operations.ApiSchemaOperations
    :ivar api_diagnostic: ApiDiagnosticOperations operations
    :vartype api_diagnostic: api_management_client.operations.ApiDiagnosticOperations
    :ivar api_issue: ApiIssueOperations operations
    :vartype api_issue: api_management_client.operations.ApiIssueOperations
    :ivar api_issue_comment: ApiIssueCommentOperations operations
    :vartype api_issue_comment: api_management_client.operations.ApiIssueCommentOperations
    :ivar api_issue_attachment: ApiIssueAttachmentOperations operations
    :vartype api_issue_attachment: api_management_client.operations.ApiIssueAttachmentOperations
    :ivar api_tag_description: ApiTagDescriptionOperations operations
    :vartype api_tag_description: api_management_client.operations.ApiTagDescriptionOperations
    :ivar operation: OperationOperations operations
    :vartype operation: api_management_client.operations.OperationOperations
    :ivar api_export: ApiExportOperations operations
    :vartype api_export: api_management_client.operations.ApiExportOperations
    :ivar api_version_set: ApiVersionSetOperations operations
    :vartype api_version_set: api_management_client.operations.ApiVersionSetOperations
    :ivar authorization_server: AuthorizationServerOperations operations
    :vartype authorization_server: api_management_client.operations.AuthorizationServerOperations
    :ivar backend: BackendOperations operations
    :vartype backend: api_management_client.operations.BackendOperations
    :ivar cache: CacheOperations operations
    :vartype cache: api_management_client.operations.CacheOperations
    :ivar certificate: CertificateOperations operations
    :vartype certificate: api_management_client.operations.CertificateOperations
    :ivar content_type: ContentTypeOperations operations
    :vartype content_type: api_management_client.operations.ContentTypeOperations
    :ivar content_item: ContentItemOperations operations
    :vartype content_item: api_management_client.operations.ContentItemOperations
    :ivar deleted_services: DeletedServicesOperations operations
    :vartype deleted_services: api_management_client.operations.DeletedServicesOperations
    :ivar api_management_operations: ApiManagementOperationsOperations operations
    :vartype api_management_operations:
     api_management_client.operations.ApiManagementOperationsOperations
    :ivar api_management_service_skus: ApiManagementServiceSkusOperations operations
    :vartype api_management_service_skus:
     api_management_client.operations.ApiManagementServiceSkusOperations
    :ivar api_management_service: ApiManagementServiceOperations operations
    :vartype api_management_service:
     api_management_client.operations.ApiManagementServiceOperations
    :ivar diagnostic: DiagnosticOperations operations
    :vartype diagnostic: api_management_client.operations.DiagnosticOperations
    :ivar email_template: EmailTemplateOperations operations
    :vartype email_template: api_management_client.operations.EmailTemplateOperations
    :ivar gateway: GatewayOperations operations
    :vartype gateway: api_management_client.operations.GatewayOperations
    :ivar gateway_hostname_configuration: GatewayHostnameConfigurationOperations operations
    :vartype gateway_hostname_configuration:
     api_management_client.operations.GatewayHostnameConfigurationOperations
    :ivar gateway_api: GatewayApiOperations operations
    :vartype gateway_api: api_management_client.operations.GatewayApiOperations
    :ivar gateway_certificate_authority: GatewayCertificateAuthorityOperations operations
    :vartype gateway_certificate_authority:
     api_management_client.operations.GatewayCertificateAuthorityOperations
    :ivar group: GroupOperations operations
    :vartype group: api_management_client.operations.GroupOperations
    :ivar group_user: GroupUserOperations operations
    :vartype group_user: api_management_client.operations.GroupUserOperations
    :ivar identity_provider: IdentityProviderOperations operations
    :vartype identity_provider: api_management_client.operations.IdentityProviderOperations
    :ivar issue: IssueOperations operations
    :vartype issue: api_management_client.operations.IssueOperations
    :ivar logger: LoggerOperations operations
    :vartype logger: api_management_client.operations.LoggerOperations
    :ivar named_value: NamedValueOperations operations
    :vartype named_value: api_management_client.operations.NamedValueOperations
    :ivar network_status: NetworkStatusOperations operations
    :vartype network_status: api_management_client.operations.NetworkStatusOperations
    :ivar notification: NotificationOperations operations
    :vartype notification: api_management_client.operations.NotificationOperations
    :ivar notification_recipient_user: NotificationRecipientUserOperations operations
    :vartype notification_recipient_user:
     api_management_client.operations.NotificationRecipientUserOperations
    :ivar notification_recipient_email: NotificationRecipientEmailOperations operations
    :vartype notification_recipient_email:
     api_management_client.operations.NotificationRecipientEmailOperations
    :ivar open_id_connect_provider: OpenIdConnectProviderOperations operations
    :vartype open_id_connect_provider:
     api_management_client.operations.OpenIdConnectProviderOperations
    :ivar outbound_network_dependencies_endpoints: OutboundNetworkDependenciesEndpointsOperations
     operations
    :vartype outbound_network_dependencies_endpoints:
     api_management_client.operations.OutboundNetworkDependenciesEndpointsOperations
    :ivar policy: PolicyOperations operations
    :vartype policy: api_management_client.operations.PolicyOperations
    :ivar policy_description: PolicyDescriptionOperations operations
    :vartype policy_description: api_management_client.operations.PolicyDescriptionOperations
    :ivar portal_revision: PortalRevisionOperations operations
    :vartype portal_revision: api_management_client.operations.PortalRevisionOperations
    :ivar portal_settings: PortalSettingsOperations operations
    :vartype portal_settings: api_management_client.operations.PortalSettingsOperations
    :ivar sign_in_settings: SignInSettingsOperations operations
    :vartype sign_in_settings: api_management_client.operations.SignInSettingsOperations
    :ivar sign_up_settings: SignUpSettingsOperations operations
    :vartype sign_up_settings: api_management_client.operations.SignUpSettingsOperations
    :ivar delegation_settings: DelegationSettingsOperations operations
    :vartype delegation_settings: api_management_client.operations.DelegationSettingsOperations
    :ivar private_endpoint_connection: PrivateEndpointConnectionOperations operations
    :vartype private_endpoint_connection:
     api_management_client.operations.PrivateEndpointConnectionOperations
    :ivar product: ProductOperations operations
    :vartype product: api_management_client.operations.ProductOperations
    :ivar product_api: ProductApiOperations operations
    :vartype product_api: api_management_client.operations.ProductApiOperations
    :ivar product_group: ProductGroupOperations operations
    :vartype product_group: api_management_client.operations.ProductGroupOperations
    :ivar product_subscriptions: ProductSubscriptionsOperations operations
    :vartype product_subscriptions: api_management_client.operations.ProductSubscriptionsOperations
    :ivar product_policy: ProductPolicyOperations operations
    :vartype product_policy: api_management_client.operations.ProductPolicyOperations
    :ivar quota_by_counter_keys: QuotaByCounterKeysOperations operations
    :vartype quota_by_counter_keys: api_management_client.operations.QuotaByCounterKeysOperations
    :ivar quota_by_period_keys: QuotaByPeriodKeysOperations operations
    :vartype quota_by_period_keys: api_management_client.operations.QuotaByPeriodKeysOperations
    :ivar region: RegionOperations operations
    :vartype region: api_management_client.operations.RegionOperations
    :ivar reports: ReportsOperations operations
    :vartype reports: api_management_client.operations.ReportsOperations
    :ivar global_schema: GlobalSchemaOperations operations
    :vartype global_schema: api_management_client.operations.GlobalSchemaOperations
    :ivar tenant_settings: TenantSettingsOperations operations
    :vartype tenant_settings: api_management_client.operations.TenantSettingsOperations
    :ivar api_management_skus: ApiManagementSkusOperations operations
    :vartype api_management_skus: api_management_client.operations.ApiManagementSkusOperations
    :ivar subscription: SubscriptionOperations operations
    :vartype subscription: api_management_client.operations.SubscriptionOperations
    :ivar tag_resource: TagResourceOperations operations
    :vartype tag_resource: api_management_client.operations.TagResourceOperations
    :ivar tenant_access: TenantAccessOperations operations
    :vartype tenant_access: api_management_client.operations.TenantAccessOperations
    :ivar tenant_access_git: TenantAccessGitOperations operations
    :vartype tenant_access_git: api_management_client.operations.TenantAccessGitOperations
    :ivar tenant_configuration: TenantConfigurationOperations operations
    :vartype tenant_configuration: api_management_client.operations.TenantConfigurationOperations
    :ivar user: UserOperations operations
    :vartype user: api_management_client.operations.UserOperations
    :ivar user_group: UserGroupOperations operations
    :vartype user_group: api_management_client.operations.UserGroupOperations
    :ivar user_subscription: UserSubscriptionOperations operations
    :vartype user_subscription: api_management_client.operations.UserSubscriptionOperations
    :ivar user_identities: UserIdentitiesOperations operations
    :vartype user_identities: api_management_client.operations.UserIdentitiesOperations
    :ivar user_confirmation_password: UserConfirmationPasswordOperations operations
    :vartype user_confirmation_password:
     api_management_client.operations.UserConfirmationPasswordOperations
    :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 = ApiManagementClientConfiguration(
            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.api = ApiOperations(self._client, self._config, self._serialize,
                                 self._deserialize)
        self.api_revision = ApiRevisionOperations(self._client, self._config,
                                                  self._serialize,
                                                  self._deserialize)
        self.api_release = ApiReleaseOperations(self._client, self._config,
                                                self._serialize,
                                                self._deserialize)
        self.api_operation = ApiOperationOperations(self._client, self._config,
                                                    self._serialize,
                                                    self._deserialize)
        self.api_operation_policy = ApiOperationPolicyOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.tag = TagOperations(self._client, self._config, self._serialize,
                                 self._deserialize)
        self.api_product = ApiProductOperations(self._client, self._config,
                                                self._serialize,
                                                self._deserialize)
        self.api_policy = ApiPolicyOperations(self._client, self._config,
                                              self._serialize,
                                              self._deserialize)
        self.api_schema = ApiSchemaOperations(self._client, self._config,
                                              self._serialize,
                                              self._deserialize)
        self.api_diagnostic = ApiDiagnosticOperations(self._client,
                                                      self._config,
                                                      self._serialize,
                                                      self._deserialize)
        self.api_issue = ApiIssueOperations(self._client, self._config,
                                            self._serialize, self._deserialize)
        self.api_issue_comment = ApiIssueCommentOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.api_issue_attachment = ApiIssueAttachmentOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.api_tag_description = ApiTagDescriptionOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.operation = OperationOperations(self._client, self._config,
                                             self._serialize,
                                             self._deserialize)
        self.api_export = ApiExportOperations(self._client, self._config,
                                              self._serialize,
                                              self._deserialize)
        self.api_version_set = ApiVersionSetOperations(self._client,
                                                       self._config,
                                                       self._serialize,
                                                       self._deserialize)
        self.authorization_server = AuthorizationServerOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.backend = BackendOperations(self._client, self._config,
                                         self._serialize, self._deserialize)
        self.cache = CacheOperations(self._client, self._config,
                                     self._serialize, self._deserialize)
        self.certificate = CertificateOperations(self._client, self._config,
                                                 self._serialize,
                                                 self._deserialize)
        self.content_type = ContentTypeOperations(self._client, self._config,
                                                  self._serialize,
                                                  self._deserialize)
        self.content_item = ContentItemOperations(self._client, self._config,
                                                  self._serialize,
                                                  self._deserialize)
        self.deleted_services = DeletedServicesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.api_management_operations = ApiManagementOperationsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.api_management_service_skus = ApiManagementServiceSkusOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.api_management_service = ApiManagementServiceOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.diagnostic = DiagnosticOperations(self._client, self._config,
                                               self._serialize,
                                               self._deserialize)
        self.email_template = EmailTemplateOperations(self._client,
                                                      self._config,
                                                      self._serialize,
                                                      self._deserialize)
        self.gateway = GatewayOperations(self._client, self._config,
                                         self._serialize, self._deserialize)
        self.gateway_hostname_configuration = GatewayHostnameConfigurationOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.gateway_api = GatewayApiOperations(self._client, self._config,
                                                self._serialize,
                                                self._deserialize)
        self.gateway_certificate_authority = GatewayCertificateAuthorityOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.group = GroupOperations(self._client, self._config,
                                     self._serialize, self._deserialize)
        self.group_user = GroupUserOperations(self._client, self._config,
                                              self._serialize,
                                              self._deserialize)
        self.identity_provider = IdentityProviderOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.issue = IssueOperations(self._client, self._config,
                                     self._serialize, self._deserialize)
        self.logger = LoggerOperations(self._client, self._config,
                                       self._serialize, self._deserialize)
        self.named_value = NamedValueOperations(self._client, self._config,
                                                self._serialize,
                                                self._deserialize)
        self.network_status = NetworkStatusOperations(self._client,
                                                      self._config,
                                                      self._serialize,
                                                      self._deserialize)
        self.notification = NotificationOperations(self._client, self._config,
                                                   self._serialize,
                                                   self._deserialize)
        self.notification_recipient_user = NotificationRecipientUserOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.notification_recipient_email = NotificationRecipientEmailOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.open_id_connect_provider = OpenIdConnectProviderOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.outbound_network_dependencies_endpoints = OutboundNetworkDependenciesEndpointsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.policy = PolicyOperations(self._client, self._config,
                                       self._serialize, self._deserialize)
        self.policy_description = PolicyDescriptionOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.portal_revision = PortalRevisionOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.portal_settings = PortalSettingsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.sign_in_settings = SignInSettingsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.sign_up_settings = SignUpSettingsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.delegation_settings = DelegationSettingsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.private_endpoint_connection = PrivateEndpointConnectionOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.product = ProductOperations(self._client, self._config,
                                         self._serialize, self._deserialize)
        self.product_api = ProductApiOperations(self._client, self._config,
                                                self._serialize,
                                                self._deserialize)
        self.product_group = ProductGroupOperations(self._client, self._config,
                                                    self._serialize,
                                                    self._deserialize)
        self.product_subscriptions = ProductSubscriptionsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.product_policy = ProductPolicyOperations(self._client,
                                                      self._config,
                                                      self._serialize,
                                                      self._deserialize)
        self.quota_by_counter_keys = QuotaByCounterKeysOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.quota_by_period_keys = QuotaByPeriodKeysOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.region = RegionOperations(self._client, self._config,
                                       self._serialize, self._deserialize)
        self.reports = ReportsOperations(self._client, self._config,
                                         self._serialize, self._deserialize)
        self.global_schema = GlobalSchemaOperations(self._client, self._config,
                                                    self._serialize,
                                                    self._deserialize)
        self.tenant_settings = TenantSettingsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.api_management_skus = ApiManagementSkusOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.subscription = SubscriptionOperations(self._client, self._config,
                                                   self._serialize,
                                                   self._deserialize)
        self.tag_resource = TagResourceOperations(self._client, self._config,
                                                  self._serialize,
                                                  self._deserialize)
        self.tenant_access = TenantAccessOperations(self._client, self._config,
                                                    self._serialize,
                                                    self._deserialize)
        self.tenant_access_git = TenantAccessGitOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.tenant_configuration = TenantConfigurationOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.user = UserOperations(self._client, self._config, self._serialize,
                                   self._deserialize)
        self.user_group = UserGroupOperations(self._client, self._config,
                                              self._serialize,
                                              self._deserialize)
        self.user_subscription = UserSubscriptionOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.user_identities = UserIdentitiesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.user_confirmation_password = UserConfirmationPasswordOperations(
            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: () -> ApiManagementClient
        self._client.__enter__()
        return self

    def __exit__(self, *exc_details):
        # type: (Any) -> None
        self._client.__exit__(*exc_details)
示例#13
0
class CosmosDBManagementClient:  # pylint: disable=too-many-instance-attributes
    """Azure Cosmos DB Database Service Resource Provider REST API.

    :ivar database_accounts: DatabaseAccountsOperations operations
    :vartype database_accounts: azure.mgmt.cosmosdb.operations.DatabaseAccountsOperations
    :ivar operations: Operations operations
    :vartype operations: azure.mgmt.cosmosdb.operations.Operations
    :ivar database: DatabaseOperations operations
    :vartype database: azure.mgmt.cosmosdb.operations.DatabaseOperations
    :ivar collection: CollectionOperations operations
    :vartype collection: azure.mgmt.cosmosdb.operations.CollectionOperations
    :ivar collection_region: CollectionRegionOperations operations
    :vartype collection_region: azure.mgmt.cosmosdb.operations.CollectionRegionOperations
    :ivar database_account_region: DatabaseAccountRegionOperations operations
    :vartype database_account_region:
     azure.mgmt.cosmosdb.operations.DatabaseAccountRegionOperations
    :ivar percentile_source_target: PercentileSourceTargetOperations operations
    :vartype percentile_source_target:
     azure.mgmt.cosmosdb.operations.PercentileSourceTargetOperations
    :ivar percentile_target: PercentileTargetOperations operations
    :vartype percentile_target: azure.mgmt.cosmosdb.operations.PercentileTargetOperations
    :ivar percentile: PercentileOperations operations
    :vartype percentile: azure.mgmt.cosmosdb.operations.PercentileOperations
    :ivar collection_partition_region: CollectionPartitionRegionOperations operations
    :vartype collection_partition_region:
     azure.mgmt.cosmosdb.operations.CollectionPartitionRegionOperations
    :ivar collection_partition: CollectionPartitionOperations operations
    :vartype collection_partition: azure.mgmt.cosmosdb.operations.CollectionPartitionOperations
    :ivar partition_key_range_id: PartitionKeyRangeIdOperations operations
    :vartype partition_key_range_id: azure.mgmt.cosmosdb.operations.PartitionKeyRangeIdOperations
    :ivar partition_key_range_id_region: PartitionKeyRangeIdRegionOperations operations
    :vartype partition_key_range_id_region:
     azure.mgmt.cosmosdb.operations.PartitionKeyRangeIdRegionOperations
    :ivar graph_resources: GraphResourcesOperations operations
    :vartype graph_resources: azure.mgmt.cosmosdb.operations.GraphResourcesOperations
    :ivar sql_resources: SqlResourcesOperations operations
    :vartype sql_resources: azure.mgmt.cosmosdb.operations.SqlResourcesOperations
    :ivar mongo_db_resources: MongoDBResourcesOperations operations
    :vartype mongo_db_resources: azure.mgmt.cosmosdb.operations.MongoDBResourcesOperations
    :ivar table_resources: TableResourcesOperations operations
    :vartype table_resources: azure.mgmt.cosmosdb.operations.TableResourcesOperations
    :ivar cassandra_resources: CassandraResourcesOperations operations
    :vartype cassandra_resources: azure.mgmt.cosmosdb.operations.CassandraResourcesOperations
    :ivar gremlin_resources: GremlinResourcesOperations operations
    :vartype gremlin_resources: azure.mgmt.cosmosdb.operations.GremlinResourcesOperations
    :ivar locations: LocationsOperations operations
    :vartype locations: azure.mgmt.cosmosdb.operations.LocationsOperations
    :ivar data_transfer_jobs: DataTransferJobsOperations operations
    :vartype data_transfer_jobs: azure.mgmt.cosmosdb.operations.DataTransferJobsOperations
    :ivar cassandra_clusters: CassandraClustersOperations operations
    :vartype cassandra_clusters: azure.mgmt.cosmosdb.operations.CassandraClustersOperations
    :ivar cassandra_data_centers: CassandraDataCentersOperations operations
    :vartype cassandra_data_centers: azure.mgmt.cosmosdb.operations.CassandraDataCentersOperations
    :ivar notebook_workspaces: NotebookWorkspacesOperations operations
    :vartype notebook_workspaces: azure.mgmt.cosmosdb.operations.NotebookWorkspacesOperations
    :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations
    :vartype private_endpoint_connections:
     azure.mgmt.cosmosdb.operations.PrivateEndpointConnectionsOperations
    :ivar private_link_resources: PrivateLinkResourcesOperations operations
    :vartype private_link_resources: azure.mgmt.cosmosdb.operations.PrivateLinkResourcesOperations
    :ivar restorable_database_accounts: RestorableDatabaseAccountsOperations operations
    :vartype restorable_database_accounts:
     azure.mgmt.cosmosdb.operations.RestorableDatabaseAccountsOperations
    :ivar restorable_sql_databases: RestorableSqlDatabasesOperations operations
    :vartype restorable_sql_databases:
     azure.mgmt.cosmosdb.operations.RestorableSqlDatabasesOperations
    :ivar restorable_sql_containers: RestorableSqlContainersOperations operations
    :vartype restorable_sql_containers:
     azure.mgmt.cosmosdb.operations.RestorableSqlContainersOperations
    :ivar restorable_sql_resources: RestorableSqlResourcesOperations operations
    :vartype restorable_sql_resources:
     azure.mgmt.cosmosdb.operations.RestorableSqlResourcesOperations
    :ivar restorable_mongodb_databases: RestorableMongodbDatabasesOperations operations
    :vartype restorable_mongodb_databases:
     azure.mgmt.cosmosdb.operations.RestorableMongodbDatabasesOperations
    :ivar restorable_mongodb_collections: RestorableMongodbCollectionsOperations operations
    :vartype restorable_mongodb_collections:
     azure.mgmt.cosmosdb.operations.RestorableMongodbCollectionsOperations
    :ivar restorable_mongodb_resources: RestorableMongodbResourcesOperations operations
    :vartype restorable_mongodb_resources:
     azure.mgmt.cosmosdb.operations.RestorableMongodbResourcesOperations
    :ivar restorable_gremlin_databases: RestorableGremlinDatabasesOperations operations
    :vartype restorable_gremlin_databases:
     azure.mgmt.cosmosdb.operations.RestorableGremlinDatabasesOperations
    :ivar restorable_gremlin_graphs: RestorableGremlinGraphsOperations operations
    :vartype restorable_gremlin_graphs:
     azure.mgmt.cosmosdb.operations.RestorableGremlinGraphsOperations
    :ivar restorable_gremlin_resources: RestorableGremlinResourcesOperations operations
    :vartype restorable_gremlin_resources:
     azure.mgmt.cosmosdb.operations.RestorableGremlinResourcesOperations
    :ivar restorable_tables: RestorableTablesOperations operations
    :vartype restorable_tables: azure.mgmt.cosmosdb.operations.RestorableTablesOperations
    :ivar restorable_table_resources: RestorableTableResourcesOperations operations
    :vartype restorable_table_resources:
     azure.mgmt.cosmosdb.operations.RestorableTableResourcesOperations
    :ivar service: ServiceOperations operations
    :vartype service: azure.mgmt.cosmosdb.operations.ServiceOperations
    :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 "2022-02-15-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 = CosmosDBManagementClientConfiguration(
            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.database_accounts = DatabaseAccountsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.operations = Operations(self._client, self._config,
                                     self._serialize, self._deserialize)
        self.database = DatabaseOperations(self._client, self._config,
                                           self._serialize, self._deserialize)
        self.collection = CollectionOperations(self._client, self._config,
                                               self._serialize,
                                               self._deserialize)
        self.collection_region = CollectionRegionOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.database_account_region = DatabaseAccountRegionOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.percentile_source_target = PercentileSourceTargetOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.percentile_target = PercentileTargetOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.percentile = PercentileOperations(self._client, self._config,
                                               self._serialize,
                                               self._deserialize)
        self.collection_partition_region = CollectionPartitionRegionOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.collection_partition = CollectionPartitionOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.partition_key_range_id = PartitionKeyRangeIdOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.partition_key_range_id_region = PartitionKeyRangeIdRegionOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.graph_resources = GraphResourcesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.sql_resources = SqlResourcesOperations(self._client, self._config,
                                                    self._serialize,
                                                    self._deserialize)
        self.mongo_db_resources = MongoDBResourcesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.table_resources = TableResourcesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.cassandra_resources = CassandraResourcesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.gremlin_resources = GremlinResourcesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.locations = LocationsOperations(self._client, self._config,
                                             self._serialize,
                                             self._deserialize)
        self.data_transfer_jobs = DataTransferJobsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.cassandra_clusters = CassandraClustersOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.cassandra_data_centers = CassandraDataCentersOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.notebook_workspaces = NotebookWorkspacesOperations(
            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.restorable_database_accounts = RestorableDatabaseAccountsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.restorable_sql_databases = RestorableSqlDatabasesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.restorable_sql_containers = RestorableSqlContainersOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.restorable_sql_resources = RestorableSqlResourcesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.restorable_mongodb_databases = RestorableMongodbDatabasesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.restorable_mongodb_collections = RestorableMongodbCollectionsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.restorable_mongodb_resources = RestorableMongodbResourcesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.restorable_gremlin_databases = RestorableGremlinDatabasesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.restorable_gremlin_graphs = RestorableGremlinGraphsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.restorable_gremlin_resources = RestorableGremlinResourcesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.restorable_tables = RestorableTablesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.restorable_table_resources = RestorableTableResourcesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.service = ServiceOperations(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: () -> CosmosDBManagementClient
        self._client.__enter__()
        return self

    def __exit__(self, *exc_details):
        # type: (Any) -> None
        self._client.__exit__(*exc_details)
示例#14
0
class StorageCacheManagementClient:
    """A Storage Cache provides scalable caching service for NAS clients, serving data from either NFSv3 or Blob at-rest storage (referred to as "Storage Targets"). These operations allow you to manage Caches.

    :ivar operations: Operations operations
    :vartype operations: storage_cache_management_client.operations.Operations
    :ivar skus: SkusOperations operations
    :vartype skus: storage_cache_management_client.operations.SkusOperations
    :ivar usage_models: UsageModelsOperations operations
    :vartype usage_models: storage_cache_management_client.operations.UsageModelsOperations
    :ivar asc_operations: AscOperationsOperations operations
    :vartype asc_operations: storage_cache_management_client.operations.AscOperationsOperations
    :ivar asc_usages: AscUsagesOperations operations
    :vartype asc_usages: storage_cache_management_client.operations.AscUsagesOperations
    :ivar caches: CachesOperations operations
    :vartype caches: storage_cache_management_client.operations.CachesOperations
    :ivar storage_targets: StorageTargetsOperations operations
    :vartype storage_targets: storage_cache_management_client.operations.StorageTargetsOperations
    :ivar storage_target: StorageTargetOperations operations
    :vartype storage_target: storage_cache_management_client.operations.StorageTargetOperations
    :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 = StorageCacheManagementClientConfiguration(
            credential=credential, subscription_id=subscription_id, **kwargs)
        self._client = ARMPipelineClient(base_url=base_url,
                                         config=self._config,
                                         **kwargs)

        client_models = {
            k: v
            for k, v in models.__dict__.items() if isinstance(v, type)
        }
        self._serialize = Serializer(client_models)
        self._deserialize = Deserializer(client_models)
        self._serialize.client_side_validation = False
        self.operations = Operations(self._client, self._config,
                                     self._serialize, self._deserialize)
        self.skus = SkusOperations(self._client, self._config, self._serialize,
                                   self._deserialize)
        self.usage_models = UsageModelsOperations(self._client, self._config,
                                                  self._serialize,
                                                  self._deserialize)
        self.asc_operations = AscOperationsOperations(self._client,
                                                      self._config,
                                                      self._serialize,
                                                      self._deserialize)
        self.asc_usages = AscUsagesOperations(self._client, self._config,
                                              self._serialize,
                                              self._deserialize)
        self.caches = CachesOperations(self._client, self._config,
                                       self._serialize, self._deserialize)
        self.storage_targets = StorageTargetsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.storage_target = StorageTargetOperations(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: () -> StorageCacheManagementClient
        self._client.__enter__()
        return self

    def __exit__(self, *exc_details):
        # type: (Any) -> None
        self._client.__exit__(*exc_details)
示例#15
0
class ApplicationInsightsManagementClient:  # pylint: disable=too-many-instance-attributes
    """Composite Swagger for Application Insights Management Client.

    :ivar operations: Operations operations
    :vartype operations: azure.mgmt.applicationinsights.v2015_05_01.operations.Operations
    :ivar annotations: AnnotationsOperations operations
    :vartype annotations:
     azure.mgmt.applicationinsights.v2015_05_01.operations.AnnotationsOperations
    :ivar api_keys: APIKeysOperations operations
    :vartype api_keys: azure.mgmt.applicationinsights.v2015_05_01.operations.APIKeysOperations
    :ivar export_configurations: ExportConfigurationsOperations operations
    :vartype export_configurations:
     azure.mgmt.applicationinsights.v2015_05_01.operations.ExportConfigurationsOperations
    :ivar component_current_billing_features: ComponentCurrentBillingFeaturesOperations operations
    :vartype component_current_billing_features:
     azure.mgmt.applicationinsights.v2015_05_01.operations.ComponentCurrentBillingFeaturesOperations
    :ivar component_quota_status: ComponentQuotaStatusOperations operations
    :vartype component_quota_status:
     azure.mgmt.applicationinsights.v2015_05_01.operations.ComponentQuotaStatusOperations
    :ivar component_feature_capabilities: ComponentFeatureCapabilitiesOperations operations
    :vartype component_feature_capabilities:
     azure.mgmt.applicationinsights.v2015_05_01.operations.ComponentFeatureCapabilitiesOperations
    :ivar component_available_features: ComponentAvailableFeaturesOperations operations
    :vartype component_available_features:
     azure.mgmt.applicationinsights.v2015_05_01.operations.ComponentAvailableFeaturesOperations
    :ivar proactive_detection_configurations: ProactiveDetectionConfigurationsOperations operations
    :vartype proactive_detection_configurations:
     azure.mgmt.applicationinsights.v2015_05_01.operations.ProactiveDetectionConfigurationsOperations
    :ivar components: ComponentsOperations operations
    :vartype components: azure.mgmt.applicationinsights.v2015_05_01.operations.ComponentsOperations
    :ivar work_item_configurations: WorkItemConfigurationsOperations operations
    :vartype work_item_configurations:
     azure.mgmt.applicationinsights.v2015_05_01.operations.WorkItemConfigurationsOperations
    :ivar favorites: FavoritesOperations operations
    :vartype favorites: azure.mgmt.applicationinsights.v2015_05_01.operations.FavoritesOperations
    :ivar web_test_locations: WebTestLocationsOperations operations
    :vartype web_test_locations:
     azure.mgmt.applicationinsights.v2015_05_01.operations.WebTestLocationsOperations
    :ivar web_tests: WebTestsOperations operations
    :vartype web_tests: azure.mgmt.applicationinsights.v2015_05_01.operations.WebTestsOperations
    :ivar analytics_items: AnalyticsItemsOperations operations
    :vartype analytics_items:
     azure.mgmt.applicationinsights.v2015_05_01.operations.AnalyticsItemsOperations
    :ivar workbooks: WorkbooksOperations operations
    :vartype workbooks: azure.mgmt.applicationinsights.v2015_05_01.operations.WorkbooksOperations
    :ivar my_workbooks: MyWorkbooksOperations operations
    :vartype my_workbooks:
     azure.mgmt.applicationinsights.v2015_05_01.operations.MyWorkbooksOperations
    :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 "2015-05-01". 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.operations = Operations(self._client, self._config,
                                     self._serialize, self._deserialize)
        self.annotations = AnnotationsOperations(self._client, self._config,
                                                 self._serialize,
                                                 self._deserialize)
        self.api_keys = APIKeysOperations(self._client, self._config,
                                          self._serialize, self._deserialize)
        self.export_configurations = ExportConfigurationsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.component_current_billing_features = ComponentCurrentBillingFeaturesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.component_quota_status = ComponentQuotaStatusOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.component_feature_capabilities = ComponentFeatureCapabilitiesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.component_available_features = ComponentAvailableFeaturesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.proactive_detection_configurations = ProactiveDetectionConfigurationsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.components = ComponentsOperations(self._client, self._config,
                                               self._serialize,
                                               self._deserialize)
        self.work_item_configurations = WorkItemConfigurationsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.favorites = FavoritesOperations(self._client, self._config,
                                             self._serialize,
                                             self._deserialize)
        self.web_test_locations = WebTestLocationsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.web_tests = WebTestsOperations(self._client, self._config,
                                            self._serialize, self._deserialize)
        self.analytics_items = AnalyticsItemsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.workbooks = WorkbooksOperations(self._client, self._config,
                                             self._serialize,
                                             self._deserialize)
        self.my_workbooks = MyWorkbooksOperations(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)
class TemplateSpecsClient:
    """The APIs listed in this specification can be used to manage Template Spec resources through the Azure Resource Manager.

    :ivar template_specs: TemplateSpecsOperations operations
    :vartype template_specs:
     azure.mgmt.resource.templatespecs.v2021_03_01_preview.operations.TemplateSpecsOperations
    :ivar template_spec_versions: TemplateSpecVersionsOperations operations
    :vartype template_spec_versions:
     azure.mgmt.resource.templatespecs.v2021_03_01_preview.operations.TemplateSpecVersionsOperations
    :param credential: Credential needed for the client to connect to Azure.
    :type credential: ~azure.core.credentials.TokenCredential
    :param subscription_id: Subscription Id which forms part of the URI for every service call.
    :type subscription_id: str
    :param 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 = TemplateSpecsClientConfiguration(
            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.template_specs = TemplateSpecsOperations(self._client,
                                                      self._config,
                                                      self._serialize,
                                                      self._deserialize)
        self.template_spec_versions = TemplateSpecVersionsOperations(
            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: () -> TemplateSpecsClient
        self._client.__enter__()
        return self

    def __exit__(self, *exc_details):
        # type: (Any) -> None
        self._client.__exit__(*exc_details)
class ContainerServiceClient:  # pylint: disable=too-many-instance-attributes
    """The Container Service Client.

    :ivar operations: Operations operations
    :vartype operations: azure.mgmt.containerservice.v2022_06_02_preview.operations.Operations
    :ivar managed_clusters: ManagedClustersOperations operations
    :vartype managed_clusters:
     azure.mgmt.containerservice.v2022_06_02_preview.operations.ManagedClustersOperations
    :ivar maintenance_configurations: MaintenanceConfigurationsOperations operations
    :vartype maintenance_configurations:
     azure.mgmt.containerservice.v2022_06_02_preview.operations.MaintenanceConfigurationsOperations
    :ivar agent_pools: AgentPoolsOperations operations
    :vartype agent_pools:
     azure.mgmt.containerservice.v2022_06_02_preview.operations.AgentPoolsOperations
    :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations
    :vartype private_endpoint_connections:
     azure.mgmt.containerservice.v2022_06_02_preview.operations.PrivateEndpointConnectionsOperations
    :ivar private_link_resources: PrivateLinkResourcesOperations operations
    :vartype private_link_resources:
     azure.mgmt.containerservice.v2022_06_02_preview.operations.PrivateLinkResourcesOperations
    :ivar resolve_private_link_service_id: ResolvePrivateLinkServiceIdOperations operations
    :vartype resolve_private_link_service_id:
     azure.mgmt.containerservice.v2022_06_02_preview.operations.ResolvePrivateLinkServiceIdOperations
    :ivar snapshots: SnapshotsOperations operations
    :vartype snapshots:
     azure.mgmt.containerservice.v2022_06_02_preview.operations.SnapshotsOperations
    :ivar managed_cluster_snapshots: ManagedClusterSnapshotsOperations operations
    :vartype managed_cluster_snapshots:
     azure.mgmt.containerservice.v2022_06_02_preview.operations.ManagedClusterSnapshotsOperations
    :ivar trusted_access_roles: TrustedAccessRolesOperations operations
    :vartype trusted_access_roles:
     azure.mgmt.containerservice.v2022_06_02_preview.operations.TrustedAccessRolesOperations
    :ivar trusted_access_role_bindings: TrustedAccessRoleBindingsOperations operations
    :vartype trusted_access_role_bindings:
     azure.mgmt.containerservice.v2022_06_02_preview.operations.TrustedAccessRoleBindingsOperations
    :ivar fleets: FleetsOperations operations
    :vartype fleets: azure.mgmt.containerservice.v2022_06_02_preview.operations.FleetsOperations
    :ivar fleet_members: FleetMembersOperations operations
    :vartype fleet_members:
     azure.mgmt.containerservice.v2022_06_02_preview.operations.FleetMembersOperations
    :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 "2022-06-02-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 = 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)
        self.snapshots = SnapshotsOperations(self._client, self._config,
                                             self._serialize,
                                             self._deserialize)
        self.managed_cluster_snapshots = ManagedClusterSnapshotsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.trusted_access_roles = TrustedAccessRolesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.trusted_access_role_bindings = TrustedAccessRoleBindingsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.fleets = FleetsOperations(self._client, self._config,
                                       self._serialize, self._deserialize)
        self.fleet_members = FleetMembersOperations(self._client, self._config,
                                                    self._serialize,
                                                    self._deserialize)

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

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

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

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

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

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

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

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

    :ivar private_link_association: PrivateLinkAssociationOperations operations
    :vartype private_link_association:
     azure.mgmt.resource.privatelinks.v2020_05_01.operations.PrivateLinkAssociationOperations
    :ivar resource_management_private_link: ResourceManagementPrivateLinkOperations operations
    :vartype resource_management_private_link:
     azure.mgmt.resource.privatelinks.v2020_05_01.operations.ResourceManagementPrivateLinkOperations
    :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.private_link_association = PrivateLinkAssociationOperations(self._client, self._config, self._serialize, self._deserialize)
        self.resource_management_private_link = ResourceManagementPrivateLinkOperations(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)
class ManagementLinkClient:
    """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 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 = ManagementLinkClientConfiguration(
            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_links = ResourceLinksOperations(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: () -> ManagementLinkClient
        self._client.__enter__()
        return self

    def __exit__(self, *exc_details):
        # type: (Any) -> None
        self._client.__exit__(*exc_details)
示例#20
0
class LogAnalyticsManagementClient:
    """Operational Insights Client.

    :ivar operations: Operations operations
    :vartype operations: azure.mgmt.loganalytics.operations.Operations
    :ivar workspaces: WorkspacesOperations operations
    :vartype workspaces: azure.mgmt.loganalytics.operations.WorkspacesOperations
    :ivar deleted_workspaces: DeletedWorkspacesOperations operations
    :vartype deleted_workspaces: azure.mgmt.loganalytics.operations.DeletedWorkspacesOperations
    :ivar tables: TablesOperations operations
    :vartype tables: azure.mgmt.loganalytics.operations.TablesOperations
    :ivar data_exports: DataExportsOperations operations
    :vartype data_exports: azure.mgmt.loganalytics.operations.DataExportsOperations
    :ivar data_sources: DataSourcesOperations operations
    :vartype data_sources: azure.mgmt.loganalytics.operations.DataSourcesOperations
    :ivar intelligence_packs: IntelligencePacksOperations operations
    :vartype intelligence_packs: azure.mgmt.loganalytics.operations.IntelligencePacksOperations
    :ivar linked_services: LinkedServicesOperations operations
    :vartype linked_services: azure.mgmt.loganalytics.operations.LinkedServicesOperations
    :ivar linked_storage_accounts: LinkedStorageAccountsOperations operations
    :vartype linked_storage_accounts:
     azure.mgmt.loganalytics.operations.LinkedStorageAccountsOperations
    :ivar management_groups: ManagementGroupsOperations operations
    :vartype management_groups: azure.mgmt.loganalytics.operations.ManagementGroupsOperations
    :ivar operation_statuses: OperationStatusesOperations operations
    :vartype operation_statuses: azure.mgmt.loganalytics.operations.OperationStatusesOperations
    :ivar shared_keys: SharedKeysOperations operations
    :vartype shared_keys: azure.mgmt.loganalytics.operations.SharedKeysOperations
    :ivar usages: UsagesOperations operations
    :vartype usages: azure.mgmt.loganalytics.operations.UsagesOperations
    :ivar storage_insight_configs: StorageInsightConfigsOperations operations
    :vartype storage_insight_configs:
     azure.mgmt.loganalytics.operations.StorageInsightConfigsOperations
    :ivar saved_searches: SavedSearchesOperations operations
    :vartype saved_searches: azure.mgmt.loganalytics.operations.SavedSearchesOperations
    :ivar available_service_tiers: AvailableServiceTiersOperations operations
    :vartype available_service_tiers:
     azure.mgmt.loganalytics.operations.AvailableServiceTiersOperations
    :ivar gateways: GatewaysOperations operations
    :vartype gateways: azure.mgmt.loganalytics.operations.GatewaysOperations
    :ivar schema: SchemaOperations operations
    :vartype schema: azure.mgmt.loganalytics.operations.SchemaOperations
    :ivar workspace_purge: WorkspacePurgeOperations operations
    :vartype workspace_purge: azure.mgmt.loganalytics.operations.WorkspacePurgeOperations
    :ivar clusters: ClustersOperations operations
    :vartype clusters: azure.mgmt.loganalytics.operations.ClustersOperations
    :param credential: Credential needed for the client to connect to Azure.
    :type credential: ~azure.core.credentials.TokenCredential
    :param subscription_id: The ID of the target subscription.
    :type subscription_id: str
    :param base_url: Service URL. Default value is 'https://management.azure.com'.
    :type base_url: str
    :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
     Retry-After header is present.
    """
    def __init__(self,
                 credential: "TokenCredential",
                 subscription_id: str,
                 base_url: str = "https://management.azure.com",
                 **kwargs: Any) -> None:
        self._config = LogAnalyticsManagementClientConfiguration(
            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.workspaces = WorkspacesOperations(self._client, self._config,
                                               self._serialize,
                                               self._deserialize)
        self.deleted_workspaces = DeletedWorkspacesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.tables = TablesOperations(self._client, self._config,
                                       self._serialize, self._deserialize)
        self.data_exports = DataExportsOperations(self._client, self._config,
                                                  self._serialize,
                                                  self._deserialize)
        self.data_sources = DataSourcesOperations(self._client, self._config,
                                                  self._serialize,
                                                  self._deserialize)
        self.intelligence_packs = IntelligencePacksOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.linked_services = LinkedServicesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.linked_storage_accounts = LinkedStorageAccountsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.management_groups = ManagementGroupsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.operation_statuses = OperationStatusesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.shared_keys = SharedKeysOperations(self._client, self._config,
                                                self._serialize,
                                                self._deserialize)
        self.usages = UsagesOperations(self._client, self._config,
                                       self._serialize, self._deserialize)
        self.storage_insight_configs = StorageInsightConfigsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.saved_searches = SavedSearchesOperations(self._client,
                                                      self._config,
                                                      self._serialize,
                                                      self._deserialize)
        self.available_service_tiers = AvailableServiceTiersOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.gateways = GatewaysOperations(self._client, self._config,
                                           self._serialize, self._deserialize)
        self.schema = SchemaOperations(self._client, self._config,
                                       self._serialize, self._deserialize)
        self.workspace_purge = WorkspacePurgeOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.clusters = ClustersOperations(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: () -> LogAnalyticsManagementClient
        self._client.__enter__()
        return self

    def __exit__(self, *exc_details):
        # type: (Any) -> None
        self._client.__exit__(*exc_details)
class MySQLManagementClient(MySQLManagementClientOperationsMixin):
    """The Microsoft Azure management API provides create, read, update, and delete functionality for Azure MySQL resources including servers, databases, firewall rules, VNET rules, log files and configurations with new business model.

    :ivar servers: ServersOperations operations
    :vartype servers: azure.mgmt.rdbms.mysql.operations.ServersOperations
    :ivar replicas: ReplicasOperations operations
    :vartype replicas: azure.mgmt.rdbms.mysql.operations.ReplicasOperations
    :ivar firewall_rules: FirewallRulesOperations operations
    :vartype firewall_rules: azure.mgmt.rdbms.mysql.operations.FirewallRulesOperations
    :ivar virtual_network_rules: VirtualNetworkRulesOperations operations
    :vartype virtual_network_rules: azure.mgmt.rdbms.mysql.operations.VirtualNetworkRulesOperations
    :ivar databases: DatabasesOperations operations
    :vartype databases: azure.mgmt.rdbms.mysql.operations.DatabasesOperations
    :ivar configurations: ConfigurationsOperations operations
    :vartype configurations: azure.mgmt.rdbms.mysql.operations.ConfigurationsOperations
    :ivar server_parameters: ServerParametersOperations operations
    :vartype server_parameters: azure.mgmt.rdbms.mysql.operations.ServerParametersOperations
    :ivar log_files: LogFilesOperations operations
    :vartype log_files: azure.mgmt.rdbms.mysql.operations.LogFilesOperations
    :ivar server_administrators: ServerAdministratorsOperations operations
    :vartype server_administrators:
     azure.mgmt.rdbms.mysql.operations.ServerAdministratorsOperations
    :ivar recoverable_servers: RecoverableServersOperations operations
    :vartype recoverable_servers: azure.mgmt.rdbms.mysql.operations.RecoverableServersOperations
    :ivar server_based_performance_tier: ServerBasedPerformanceTierOperations operations
    :vartype server_based_performance_tier:
     azure.mgmt.rdbms.mysql.operations.ServerBasedPerformanceTierOperations
    :ivar location_based_performance_tier: LocationBasedPerformanceTierOperations operations
    :vartype location_based_performance_tier:
     azure.mgmt.rdbms.mysql.operations.LocationBasedPerformanceTierOperations
    :ivar check_name_availability: CheckNameAvailabilityOperations operations
    :vartype check_name_availability:
     azure.mgmt.rdbms.mysql.operations.CheckNameAvailabilityOperations
    :ivar operations: Operations operations
    :vartype operations: azure.mgmt.rdbms.mysql.operations.Operations
    :ivar server_security_alert_policies: ServerSecurityAlertPoliciesOperations operations
    :vartype server_security_alert_policies:
     azure.mgmt.rdbms.mysql.operations.ServerSecurityAlertPoliciesOperations
    :ivar query_texts: QueryTextsOperations operations
    :vartype query_texts: azure.mgmt.rdbms.mysql.operations.QueryTextsOperations
    :ivar top_query_statistics: TopQueryStatisticsOperations operations
    :vartype top_query_statistics: azure.mgmt.rdbms.mysql.operations.TopQueryStatisticsOperations
    :ivar wait_statistics: WaitStatisticsOperations operations
    :vartype wait_statistics: azure.mgmt.rdbms.mysql.operations.WaitStatisticsOperations
    :ivar advisors: AdvisorsOperations operations
    :vartype advisors: azure.mgmt.rdbms.mysql.operations.AdvisorsOperations
    :ivar recommended_actions: RecommendedActionsOperations operations
    :vartype recommended_actions: azure.mgmt.rdbms.mysql.operations.RecommendedActionsOperations
    :ivar location_based_recommended_action_sessions_operation_status:
     LocationBasedRecommendedActionSessionsOperationStatusOperations operations
    :vartype location_based_recommended_action_sessions_operation_status:
     azure.mgmt.rdbms.mysql.operations.LocationBasedRecommendedActionSessionsOperationStatusOperations
    :ivar location_based_recommended_action_sessions_result:
     LocationBasedRecommendedActionSessionsResultOperations operations
    :vartype location_based_recommended_action_sessions_result:
     azure.mgmt.rdbms.mysql.operations.LocationBasedRecommendedActionSessionsResultOperations
    :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations
    :vartype private_endpoint_connections:
     azure.mgmt.rdbms.mysql.operations.PrivateEndpointConnectionsOperations
    :ivar private_link_resources: PrivateLinkResourcesOperations operations
    :vartype private_link_resources:
     azure.mgmt.rdbms.mysql.operations.PrivateLinkResourcesOperations
    :ivar server_keys: ServerKeysOperations operations
    :vartype server_keys: azure.mgmt.rdbms.mysql.operations.ServerKeysOperations
    :param credential: Credential needed for the client to connect to Azure.
    :type credential: ~azure.core.credentials.TokenCredential
    :param subscription_id: The ID of the target subscription.
    :type subscription_id: str
    :param base_url: Service URL. Default value is 'https://management.azure.com'.
    :type base_url: str
    :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
     Retry-After header is present.
    """
    def __init__(self,
                 credential: "TokenCredential",
                 subscription_id: str,
                 base_url: str = "https://management.azure.com",
                 **kwargs: Any) -> None:
        self._config = MySQLManagementClientConfiguration(
            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.servers = ServersOperations(self._client, self._config,
                                         self._serialize, self._deserialize)
        self.replicas = ReplicasOperations(self._client, self._config,
                                           self._serialize, self._deserialize)
        self.firewall_rules = FirewallRulesOperations(self._client,
                                                      self._config,
                                                      self._serialize,
                                                      self._deserialize)
        self.virtual_network_rules = VirtualNetworkRulesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.databases = DatabasesOperations(self._client, self._config,
                                             self._serialize,
                                             self._deserialize)
        self.configurations = ConfigurationsOperations(self._client,
                                                       self._config,
                                                       self._serialize,
                                                       self._deserialize)
        self.server_parameters = ServerParametersOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.log_files = LogFilesOperations(self._client, self._config,
                                            self._serialize, self._deserialize)
        self.server_administrators = ServerAdministratorsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.recoverable_servers = RecoverableServersOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.server_based_performance_tier = ServerBasedPerformanceTierOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.location_based_performance_tier = LocationBasedPerformanceTierOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.check_name_availability = CheckNameAvailabilityOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.operations = Operations(self._client, self._config,
                                     self._serialize, self._deserialize)
        self.server_security_alert_policies = ServerSecurityAlertPoliciesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.query_texts = QueryTextsOperations(self._client, self._config,
                                                self._serialize,
                                                self._deserialize)
        self.top_query_statistics = TopQueryStatisticsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.wait_statistics = WaitStatisticsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.advisors = AdvisorsOperations(self._client, self._config,
                                           self._serialize, self._deserialize)
        self.recommended_actions = RecommendedActionsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.location_based_recommended_action_sessions_operation_status = LocationBasedRecommendedActionSessionsOperationStatusOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.location_based_recommended_action_sessions_result = LocationBasedRecommendedActionSessionsResultOperations(
            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.server_keys = ServerKeysOperations(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: () -> MySQLManagementClient
        self._client.__enter__()
        return self

    def __exit__(self, *exc_details):
        # type: (Any) -> None
        self._client.__exit__(*exc_details)
示例#22
0
class SCVMM(object):  # pylint: disable=too-many-instance-attributes
    """The Microsoft.ScVmm Rest API spec.

    :ivar vmm_servers: VmmServersOperations operations
    :vartype vmm_servers: scvmm.operations.VmmServersOperations
    :ivar operations: Operations operations
    :vartype operations: scvmm.operations.Operations
    :ivar clouds: CloudsOperations operations
    :vartype clouds: scvmm.operations.CloudsOperations
    :ivar virtual_networks: VirtualNetworksOperations operations
    :vartype virtual_networks: scvmm.operations.VirtualNetworksOperations
    :ivar virtual_machines: VirtualMachinesOperations operations
    :vartype virtual_machines: scvmm.operations.VirtualMachinesOperations
    :ivar virtual_machine_templates: VirtualMachineTemplatesOperations operations
    :vartype virtual_machine_templates: scvmm.operations.VirtualMachineTemplatesOperations
    :ivar availability_sets: AvailabilitySetsOperations operations
    :vartype availability_sets: scvmm.operations.AvailabilitySetsOperations
    :ivar inventory_items: InventoryItemsOperations operations
    :vartype inventory_items: scvmm.operations.InventoryItemsOperations
    :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 base_url: Service URL. Default value is "https://management.azure.com".
    :type base_url: str
    :keyword api_version: Api Version. Default value is "2020-06-05-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 = SCVMMConfiguration(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.vmm_servers = VmmServersOperations(self._client, self._config,
                                                self._serialize,
                                                self._deserialize)
        self.operations = Operations(self._client, self._config,
                                     self._serialize, self._deserialize)
        self.clouds = CloudsOperations(self._client, self._config,
                                       self._serialize, self._deserialize)
        self.virtual_networks = VirtualNetworksOperations(
            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.availability_sets = AvailabilitySetsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.inventory_items = InventoryItemsOperations(
            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: () -> SCVMM
        self._client.__enter__()
        return self

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

    :ivar operations: Operations operations
    :vartype operations: azure.mgmt.iothub.v2018_04_01.operations.Operations
    :ivar iot_hub_resource: IotHubResourceOperations operations
    :vartype iot_hub_resource: azure.mgmt.iothub.v2018_04_01.operations.IotHubResourceOperations
    :ivar resource_provider_common: ResourceProviderCommonOperations operations
    :vartype resource_provider_common:
     azure.mgmt.iothub.v2018_04_01.operations.ResourceProviderCommonOperations
    :ivar certificates: CertificatesOperations operations
    :vartype certificates: azure.mgmt.iothub.v2018_04_01.operations.CertificatesOperations
    :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 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 = IotHubClientConfiguration(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.iot_hub_resource = IotHubResourceOperations(self._client, self._config, self._serialize, self._deserialize)
        self.resource_provider_common = ResourceProviderCommonOperations(self._client, self._config, self._serialize, self._deserialize)
        self.certificates = CertificatesOperations(self._client, self._config, self._serialize, self._deserialize)


    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: () -> IotHubClient
        self._client.__enter__()
        return self

    def __exit__(self, *exc_details):
        # type: (Any) -> None
        self._client.__exit__(*exc_details)
示例#24
0
class ConfidentialLedger(ConfidentialLedgerOperationsMixin):
    """Microsoft Azure Confidential Compute Ledger Control Plane REST API version 2020-12-01-preview.

    :ivar operations: Operations operations
    :vartype operations: azure.mgmt.confidentialledger.operations.Operations
    :ivar ledger: LedgerOperations operations
    :vartype ledger: azure.mgmt.confidentialledger.operations.LedgerOperations
    :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 base_url: Service URL. Default value is "https://management.azure.com".
    :type base_url: str
    :keyword api_version: Api Version. Default value is "2022-05-13". 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 = ConfidentialLedgerConfiguration(
            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.ledger = LedgerOperations(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: () -> ConfidentialLedger
        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_05_01.operations.Operations
    :ivar managed_clusters: ManagedClustersOperations operations
    :vartype managed_clusters:
     azure.mgmt.containerservice.v2021_05_01.operations.ManagedClustersOperations
    :ivar maintenance_configurations: MaintenanceConfigurationsOperations operations
    :vartype maintenance_configurations:
     azure.mgmt.containerservice.v2021_05_01.operations.MaintenanceConfigurationsOperations
    :ivar agent_pools: AgentPoolsOperations operations
    :vartype agent_pools: azure.mgmt.containerservice.v2021_05_01.operations.AgentPoolsOperations
    :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations
    :vartype private_endpoint_connections:
     azure.mgmt.containerservice.v2021_05_01.operations.PrivateEndpointConnectionsOperations
    :ivar private_link_resources: PrivateLinkResourcesOperations operations
    :vartype private_link_resources:
     azure.mgmt.containerservice.v2021_05_01.operations.PrivateLinkResourcesOperations
    :ivar resolve_private_link_service_id: ResolvePrivateLinkServiceIdOperations operations
    :vartype resolve_private_link_service_id:
     azure.mgmt.containerservice.v2021_05_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)
class ApplicationInsightsManagementClient:
    """Composite Swagger for Application Insights Management Client.

    :ivar operations: Operations operations
    :vartype operations: azure.mgmt.applicationinsights.v2020_06_02_preview.operations.Operations
    :ivar live_token: LiveTokenOperations operations
    :vartype live_token:
     azure.mgmt.applicationinsights.v2020_06_02_preview.operations.LiveTokenOperations
    :param credential: Credential needed for the client to connect to Azure.
    :type credential: ~azure.core.credentials.TokenCredential
    :param base_url: Service URL. Default value is "https://management.azure.com".
    :type base_url: str
    :keyword api_version: Api Version. Default value is "2020-06-02-preview". Note that overriding
     this default value may result in unsupported behavior.
    :paramtype api_version: str
    """
    def __init__(self,
                 credential: "TokenCredential",
                 base_url: str = "https://management.azure.com",
                 **kwargs: Any) -> None:
        self._config = ApplicationInsightsManagementClientConfiguration(
            credential=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._deserialize = Deserializer(client_models)
        self._serialize.client_side_validation = False
        self.operations = Operations(self._client, self._config,
                                     self._serialize, self._deserialize)
        self.live_token = LiveTokenOperations(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)
class RecoveryServicesBackupPassiveClient:
    """Open API 2.0 Specs for Azure RecoveryServices Backup service.

    :ivar backup_usage_summaries_crr: BackupUsageSummariesCRROperations operations
    :vartype backup_usage_summaries_crr:
     azure.mgmt.recoveryservicesbackup.passivestamp.operations.BackupUsageSummariesCRROperations
    :ivar aad_properties: AadPropertiesOperations operations
    :vartype aad_properties:
     azure.mgmt.recoveryservicesbackup.passivestamp.operations.AadPropertiesOperations
    :ivar cross_region_restore: CrossRegionRestoreOperations operations
    :vartype cross_region_restore:
     azure.mgmt.recoveryservicesbackup.passivestamp.operations.CrossRegionRestoreOperations
    :ivar backup_crr_job_details: BackupCrrJobDetailsOperations operations
    :vartype backup_crr_job_details:
     azure.mgmt.recoveryservicesbackup.passivestamp.operations.BackupCrrJobDetailsOperations
    :ivar backup_crr_jobs: BackupCrrJobsOperations operations
    :vartype backup_crr_jobs:
     azure.mgmt.recoveryservicesbackup.passivestamp.operations.BackupCrrJobsOperations
    :ivar crr_operation_results: CrrOperationResultsOperations operations
    :vartype crr_operation_results:
     azure.mgmt.recoveryservicesbackup.passivestamp.operations.CrrOperationResultsOperations
    :ivar crr_operation_status: CrrOperationStatusOperations operations
    :vartype crr_operation_status:
     azure.mgmt.recoveryservicesbackup.passivestamp.operations.CrrOperationStatusOperations
    :ivar recovery_points: RecoveryPointsOperations operations
    :vartype recovery_points:
     azure.mgmt.recoveryservicesbackup.passivestamp.operations.RecoveryPointsOperations
    :ivar backup_resource_storage_configs: BackupResourceStorageConfigsOperations operations
    :vartype backup_resource_storage_configs:
     azure.mgmt.recoveryservicesbackup.passivestamp.operations.BackupResourceStorageConfigsOperations
    :ivar recovery_points_crr: RecoveryPointsCrrOperations operations
    :vartype recovery_points_crr:
     azure.mgmt.recoveryservicesbackup.passivestamp.operations.RecoveryPointsCrrOperations
    :ivar backup_protected_items_crr: BackupProtectedItemsCrrOperations operations
    :vartype backup_protected_items_crr:
     azure.mgmt.recoveryservicesbackup.passivestamp.operations.BackupProtectedItemsCrrOperations
    :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 = RecoveryServicesBackupPassiveClientConfiguration(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_usage_summaries_crr = BackupUsageSummariesCRROperations(self._client, self._config, self._serialize, self._deserialize)
        self.aad_properties = AadPropertiesOperations(self._client, self._config, self._serialize, self._deserialize)
        self.cross_region_restore = CrossRegionRestoreOperations(self._client, self._config, self._serialize, self._deserialize)
        self.backup_crr_job_details = BackupCrrJobDetailsOperations(self._client, self._config, self._serialize, self._deserialize)
        self.backup_crr_jobs = BackupCrrJobsOperations(self._client, self._config, self._serialize, self._deserialize)
        self.crr_operation_results = CrrOperationResultsOperations(self._client, self._config, self._serialize, self._deserialize)
        self.crr_operation_status = CrrOperationStatusOperations(self._client, self._config, self._serialize, self._deserialize)
        self.recovery_points = RecoveryPointsOperations(self._client, self._config, self._serialize, self._deserialize)
        self.backup_resource_storage_configs = BackupResourceStorageConfigsOperations(self._client, self._config, self._serialize, self._deserialize)
        self.recovery_points_crr = RecoveryPointsCrrOperations(self._client, self._config, self._serialize, self._deserialize)
        self.backup_protected_items_crr = BackupProtectedItemsCrrOperations(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: () -> RecoveryServicesBackupPassiveClient
        self._client.__enter__()
        return self

    def __exit__(self, *exc_details):
        # type: (Any) -> None
        self._client.__exit__(*exc_details)
示例#28
0
class AzureMediaServices:
    """This Swagger was generated by the API Framework.

    :ivar account_filters: AccountFiltersOperations operations
    :vartype account_filters: azure.mgmt.media.operations.AccountFiltersOperations
    :ivar operations: Operations operations
    :vartype operations: azure.mgmt.media.operations.Operations
    :ivar mediaservices: MediaservicesOperations operations
    :vartype mediaservices: azure.mgmt.media.operations.MediaservicesOperations
    :ivar private_link_resources: PrivateLinkResourcesOperations operations
    :vartype private_link_resources: azure.mgmt.media.operations.PrivateLinkResourcesOperations
    :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations
    :vartype private_endpoint_connections:
     azure.mgmt.media.operations.PrivateEndpointConnectionsOperations
    :ivar locations: LocationsOperations operations
    :vartype locations: azure.mgmt.media.operations.LocationsOperations
    :ivar assets: AssetsOperations operations
    :vartype assets: azure.mgmt.media.operations.AssetsOperations
    :ivar asset_filters: AssetFiltersOperations operations
    :vartype asset_filters: azure.mgmt.media.operations.AssetFiltersOperations
    :ivar tracks: TracksOperations operations
    :vartype tracks: azure.mgmt.media.operations.TracksOperations
    :ivar operation_statuses: OperationStatusesOperations operations
    :vartype operation_statuses: azure.mgmt.media.operations.OperationStatusesOperations
    :ivar operation_results: OperationResultsOperations operations
    :vartype operation_results: azure.mgmt.media.operations.OperationResultsOperations
    :ivar content_key_policies: ContentKeyPoliciesOperations operations
    :vartype content_key_policies: azure.mgmt.media.operations.ContentKeyPoliciesOperations
    :ivar transforms: TransformsOperations operations
    :vartype transforms: azure.mgmt.media.operations.TransformsOperations
    :ivar jobs: JobsOperations operations
    :vartype jobs: azure.mgmt.media.operations.JobsOperations
    :ivar streaming_policies: StreamingPoliciesOperations operations
    :vartype streaming_policies: azure.mgmt.media.operations.StreamingPoliciesOperations
    :ivar streaming_locators: StreamingLocatorsOperations operations
    :vartype streaming_locators: azure.mgmt.media.operations.StreamingLocatorsOperations
    :ivar live_events: LiveEventsOperations operations
    :vartype live_events: azure.mgmt.media.operations.LiveEventsOperations
    :ivar live_outputs: LiveOutputsOperations operations
    :vartype live_outputs: azure.mgmt.media.operations.LiveOutputsOperations
    :ivar streaming_endpoints: StreamingEndpointsOperations operations
    :vartype streaming_endpoints: azure.mgmt.media.operations.StreamingEndpointsOperations
    :param credential: Credential needed for the client to connect to Azure.
    :type credential: ~azure.core.credentials.TokenCredential
    :param subscription_id: The unique identifier for a Microsoft Azure subscription.
    :type subscription_id: str
    :param base_url: Service URL. Default value is 'https://management.azure.com'.
    :type base_url: str
    :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
     Retry-After header is present.
    """
    def __init__(self,
                 credential: "TokenCredential",
                 subscription_id: str,
                 base_url: str = "https://management.azure.com",
                 **kwargs: Any) -> None:
        self._config = AzureMediaServicesConfiguration(
            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.account_filters = AccountFiltersOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.operations = Operations(self._client, self._config,
                                     self._serialize, self._deserialize)
        self.mediaservices = MediaservicesOperations(self._client,
                                                     self._config,
                                                     self._serialize,
                                                     self._deserialize)
        self.private_link_resources = PrivateLinkResourcesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.private_endpoint_connections = PrivateEndpointConnectionsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.locations = LocationsOperations(self._client, self._config,
                                             self._serialize,
                                             self._deserialize)
        self.assets = AssetsOperations(self._client, self._config,
                                       self._serialize, self._deserialize)
        self.asset_filters = AssetFiltersOperations(self._client, self._config,
                                                    self._serialize,
                                                    self._deserialize)
        self.tracks = TracksOperations(self._client, self._config,
                                       self._serialize, self._deserialize)
        self.operation_statuses = OperationStatusesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.operation_results = OperationResultsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.content_key_policies = ContentKeyPoliciesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.transforms = TransformsOperations(self._client, self._config,
                                               self._serialize,
                                               self._deserialize)
        self.jobs = JobsOperations(self._client, self._config, self._serialize,
                                   self._deserialize)
        self.streaming_policies = StreamingPoliciesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.streaming_locators = StreamingLocatorsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.live_events = LiveEventsOperations(self._client, self._config,
                                                self._serialize,
                                                self._deserialize)
        self.live_outputs = LiveOutputsOperations(self._client, self._config,
                                                  self._serialize,
                                                  self._deserialize)
        self.streaming_endpoints = StreamingEndpointsOperations(
            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: () -> AzureMediaServices
        self._client.__enter__()
        return self

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

    :ivar availability_sets: AvailabilitySetsOperations operations
    :vartype availability_sets:
     azure.mgmt.compute.v2017_03_30.operations.AvailabilitySetsOperations
    :ivar virtual_machine_extension_images: VirtualMachineExtensionImagesOperations operations
    :vartype virtual_machine_extension_images:
     azure.mgmt.compute.v2017_03_30.operations.VirtualMachineExtensionImagesOperations
    :ivar virtual_machine_extensions: VirtualMachineExtensionsOperations operations
    :vartype virtual_machine_extensions:
     azure.mgmt.compute.v2017_03_30.operations.VirtualMachineExtensionsOperations
    :ivar virtual_machines: VirtualMachinesOperations operations
    :vartype virtual_machines: azure.mgmt.compute.v2017_03_30.operations.VirtualMachinesOperations
    :ivar virtual_machine_images: VirtualMachineImagesOperations operations
    :vartype virtual_machine_images:
     azure.mgmt.compute.v2017_03_30.operations.VirtualMachineImagesOperations
    :ivar usage: UsageOperations operations
    :vartype usage: azure.mgmt.compute.v2017_03_30.operations.UsageOperations
    :ivar virtual_machine_sizes: VirtualMachineSizesOperations operations
    :vartype virtual_machine_sizes:
     azure.mgmt.compute.v2017_03_30.operations.VirtualMachineSizesOperations
    :ivar images: ImagesOperations operations
    :vartype images: azure.mgmt.compute.v2017_03_30.operations.ImagesOperations
    :ivar resource_skus: ResourceSkusOperations operations
    :vartype resource_skus: azure.mgmt.compute.v2017_03_30.operations.ResourceSkusOperations
    :ivar virtual_machine_scale_sets: VirtualMachineScaleSetsOperations operations
    :vartype virtual_machine_scale_sets:
     azure.mgmt.compute.v2017_03_30.operations.VirtualMachineScaleSetsOperations
    :ivar virtual_machine_scale_set_extensions: VirtualMachineScaleSetExtensionsOperations
     operations
    :vartype virtual_machine_scale_set_extensions:
     azure.mgmt.compute.v2017_03_30.operations.VirtualMachineScaleSetExtensionsOperations
    :ivar virtual_machine_scale_set_rolling_upgrades:
     VirtualMachineScaleSetRollingUpgradesOperations operations
    :vartype virtual_machine_scale_set_rolling_upgrades:
     azure.mgmt.compute.v2017_03_30.operations.VirtualMachineScaleSetRollingUpgradesOperations
    :ivar virtual_machine_scale_set_vms: VirtualMachineScaleSetVMsOperations operations
    :vartype virtual_machine_scale_set_vms:
     azure.mgmt.compute.v2017_03_30.operations.VirtualMachineScaleSetVMsOperations
    :ivar disks: DisksOperations operations
    :vartype disks: azure.mgmt.compute.v2017_03_30.operations.DisksOperations
    :ivar snapshots: SnapshotsOperations operations
    :vartype snapshots: azure.mgmt.compute.v2017_03_30.operations.SnapshotsOperations
    :ivar virtual_machine_run_commands: VirtualMachineRunCommandsOperations operations
    :vartype virtual_machine_run_commands:
     azure.mgmt.compute.v2017_03_30.operations.VirtualMachineRunCommandsOperations
    :param credential: Credential needed for the client to connect to Azure.
    :type credential: ~azure.core.credentials.TokenCredential
    :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure
     subscription. The subscription ID forms part of the URI for every service call.
    :type subscription_id: str
    :param base_url: Service URL. Default value is 'https://management.azure.com'.
    :type base_url: str
    :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
     Retry-After header is present.
    """

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

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


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

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

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

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

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

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

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

    def __exit__(self, *exc_details):
        # type: (Any) -> None
        self._client.__exit__(*exc_details)
示例#30
0
class NetAppManagementClient:
    """Microsoft NetApp Files Azure Resource Provider specification.

    :ivar operations: Operations operations
    :vartype operations: azure.mgmt.netapp.operations.Operations
    :ivar net_app_resource: NetAppResourceOperations operations
    :vartype net_app_resource: azure.mgmt.netapp.operations.NetAppResourceOperations
    :ivar net_app_resource_quota_limits: NetAppResourceQuotaLimitsOperations operations
    :vartype net_app_resource_quota_limits:
     azure.mgmt.netapp.operations.NetAppResourceQuotaLimitsOperations
    :ivar accounts: AccountsOperations operations
    :vartype accounts: azure.mgmt.netapp.operations.AccountsOperations
    :ivar pools: PoolsOperations operations
    :vartype pools: azure.mgmt.netapp.operations.PoolsOperations
    :ivar volumes: VolumesOperations operations
    :vartype volumes: azure.mgmt.netapp.operations.VolumesOperations
    :ivar snapshots: SnapshotsOperations operations
    :vartype snapshots: azure.mgmt.netapp.operations.SnapshotsOperations
    :ivar snapshot_policies: SnapshotPoliciesOperations operations
    :vartype snapshot_policies: azure.mgmt.netapp.operations.SnapshotPoliciesOperations
    :ivar backups: BackupsOperations operations
    :vartype backups: azure.mgmt.netapp.operations.BackupsOperations
    :ivar account_backups: AccountBackupsOperations operations
    :vartype account_backups: azure.mgmt.netapp.operations.AccountBackupsOperations
    :ivar backup_policies: BackupPoliciesOperations operations
    :vartype backup_policies: azure.mgmt.netapp.operations.BackupPoliciesOperations
    :ivar vaults: VaultsOperations operations
    :vartype vaults: azure.mgmt.netapp.operations.VaultsOperations
    :ivar volume_groups: VolumeGroupsOperations operations
    :vartype volume_groups: azure.mgmt.netapp.operations.VolumeGroupsOperations
    :ivar subvolumes: SubvolumesOperations operations
    :vartype subvolumes: azure.mgmt.netapp.operations.SubvolumesOperations
    :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 = NetAppManagementClientConfiguration(
            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.net_app_resource = NetAppResourceOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.net_app_resource_quota_limits = NetAppResourceQuotaLimitsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.accounts = AccountsOperations(self._client, self._config,
                                           self._serialize, self._deserialize)
        self.pools = PoolsOperations(self._client, self._config,
                                     self._serialize, self._deserialize)
        self.volumes = VolumesOperations(self._client, self._config,
                                         self._serialize, self._deserialize)
        self.snapshots = SnapshotsOperations(self._client, self._config,
                                             self._serialize,
                                             self._deserialize)
        self.snapshot_policies = SnapshotPoliciesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.backups = BackupsOperations(self._client, self._config,
                                         self._serialize, self._deserialize)
        self.account_backups = AccountBackupsOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.backup_policies = BackupPoliciesOperations(
            self._client, self._config, self._serialize, self._deserialize)
        self.vaults = VaultsOperations(self._client, self._config,
                                       self._serialize, self._deserialize)
        self.volume_groups = VolumeGroupsOperations(self._client, self._config,
                                                    self._serialize,
                                                    self._deserialize)
        self.subvolumes = SubvolumesOperations(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: () -> NetAppManagementClient
        self._client.__enter__()
        return self

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