From e5f61e9a79410db6c73dc574beaf5fa00337c8ea Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 11 Nov 2020 07:15:58 +0000 Subject: [PATCH] CodeGen from PR 11612 in Azure/azure-rest-api-specs Merge c20bbe0e5c40421a6e877400235b95e6ac478061 into e320555a456cbc894c5a89466defdfca45ca18a8 --- .../synapse/_synapse_management_client.py | 90 + .../azure/mgmt/synapse/models/__init__.py | 112 + .../azure/mgmt/synapse/models/_models.py | 5119 +++++++++++------ .../azure/mgmt/synapse/models/_models_py3.py | 5043 ++++++++++------ .../mgmt/synapse/models/_paged_models.py | 234 + .../_synapse_management_client_enums.py | 35 + .../azure/mgmt/synapse/operations/__init__.py | 36 + .../operations/_big_data_pools_operations.py | 8 +- .../_data_masking_policies_operations.py | 189 + .../_data_masking_rules_operations.py | 197 + ..._pool_blob_auditing_policies_operations.py | 262 + ...ntegration_runtime_auth_keys_operations.py | 4 +- ...ion_runtime_connection_infos_operations.py | 2 +- ...egration_runtime_credentials_operations.py | 2 +- ...tion_runtime_monitoring_data_operations.py | 8 +- ...tion_runtime_node_ip_address_operations.py | 2 +- .../_integration_runtime_nodes_operations.py | 6 +- ...tion_runtime_object_metadata_operations.py | 89 +- .../_integration_runtime_status_operations.py | 2 +- .../_integration_runtimes_operations.py | 300 +- .../_ip_firewall_rules_operations.py | 15 +- .../synapse/operations/_keys_operations.py | 314 + .../mgmt/synapse/operations/_operations.py | 26 +- ...private_endpoint_connections_operations.py | 31 +- ...connections_private_link_hub_operations.py | 112 + .../_private_link_hubs_operations.py | 100 +- .../_private_link_resources_operations.py | 15 +- ...restorable_dropped_sql_pools_operations.py | 176 + ..._pool_blob_auditing_policies_operations.py | 76 + .../_sql_pool_columns_operations.py | 114 + ...sql_pool_connection_policies_operations.py | 8 +- ...sql_pool_geo_backup_policies_operations.py | 85 +- ...l_pool_metadata_sync_configs_operations.py | 6 +- .../_sql_pool_operation_results_operations.py | 12 +- .../_sql_pool_replication_links_operations.py | 77 +- .../_sql_pool_restore_points_operations.py | 135 +- .../_sql_pool_schemas_operations.py | 68 + ...pool_security_alert_policies_operations.py | 78 + ..._sql_pool_sensitivity_labels_operations.py | 88 +- .../operations/_sql_pool_tables_operations.py | 71 + ...transparent_data_encryptions_operations.py | 92 +- .../operations/_sql_pool_usages_operations.py | 8 +- ...ty_assessment_rule_baselines_operations.py | 80 +- ...lnerability_assessment_scans_operations.py | 71 + ...ol_vulnerability_assessments_operations.py | 2 +- ...sql_pool_workload_classifier_operations.py | 407 ++ .../_sql_pool_workload_group_operations.py | 393 ++ .../operations/_sql_pools_operations.py | 37 +- .../_workspace_aad_admins_operations.py | 10 +- ...erver_blob_auditing_policies_operations.py | 182 + ..._server_encryption_protector_operations.py | 379 ++ ...ended_blob_auditing_policies_operations.py | 292 + ..._server_recoverable_sqlpools_operations.py | 182 + ...server_security_alert_policy_operations.py | 291 + ...ce_managed_sql_server_usages_operations.py | 115 + ...er_vulnerability_assessments_operations.py | 317 + ...erver_blob_auditing_policies_operations.py | 149 + .../_workspace_sql_aad_admins_operations.py | 284 + .../operations/_workspaces_operations.py | 15 +- 59 files changed, 12903 insertions(+), 3750 deletions(-) create mode 100644 sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_data_masking_policies_operations.py create mode 100644 sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_data_masking_rules_operations.py create mode 100644 sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_extended_sql_pool_blob_auditing_policies_operations.py create mode 100644 sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_keys_operations.py create mode 100644 sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_private_endpoint_connections_private_link_hub_operations.py create mode 100644 sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_restorable_dropped_sql_pools_operations.py create mode 100644 sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_columns_operations.py create mode 100644 sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_workload_classifier_operations.py create mode 100644 sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_workload_group_operations.py create mode 100644 sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_blob_auditing_policies_operations.py create mode 100644 sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_encryption_protector_operations.py create mode 100644 sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_extended_blob_auditing_policies_operations.py create mode 100644 sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_recoverable_sqlpools_operations.py create mode 100644 sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_security_alert_policy_operations.py create mode 100644 sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_usages_operations.py create mode 100644 sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_vulnerability_assessments_operations.py create mode 100644 sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managedql_server_blob_auditing_policies_operations.py create mode 100644 sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_sql_aad_admins_operations.py diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/_synapse_management_client.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/_synapse_management_client.py index 56a31debe3c6..4118a56c6ee8 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/_synapse_management_client.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/_synapse_management_client.py @@ -36,9 +36,17 @@ from .operations import SqlPoolVulnerabilityAssessmentScansOperations from .operations import SqlPoolSecurityAlertPoliciesOperations from .operations import SqlPoolVulnerabilityAssessmentRuleBaselinesOperations +from .operations import ExtendedSqlPoolBlobAuditingPoliciesOperations +from .operations import DataMaskingPoliciesOperations +from .operations import DataMaskingRulesOperations +from .operations import SqlPoolColumnsOperations +from .operations import SqlPoolWorkloadGroupOperations +from .operations import SqlPoolWorkloadClassifierOperations from .operations import WorkspacesOperations from .operations import WorkspaceAadAdminsOperations +from .operations import WorkspaceSqlAadAdminsOperations from .operations import WorkspaceManagedIdentitySqlControlSettingsOperations +from .operations import RestorableDroppedSqlPoolsOperations from .operations import IntegrationRuntimesOperations from .operations import IntegrationRuntimeNodeIpAddressOperations from .operations import IntegrationRuntimeObjectMetadataOperations @@ -51,6 +59,16 @@ from .operations import PrivateLinkResourcesOperations from .operations import PrivateEndpointConnectionsOperations from .operations import PrivateLinkHubsOperations +from .operations import PrivateEndpointConnectionsPrivateLinkHubOperations +from .operations import WorkspaceManagedSqlServerBlobAuditingPoliciesOperations +from .operations import WorkspaceManagedqlServerBlobAuditingPoliciesOperations +from .operations import WorkspaceManagedSqlServerExtendedBlobAuditingPoliciesOperations +from .operations import WorkspaceManagedSqlServerSecurityAlertPolicyOperations +from .operations import WorkspaceManagedSqlServerVulnerabilityAssessmentsOperations +from .operations import WorkspaceManagedSqlServerEncryptionProtectorOperations +from .operations import WorkspaceManagedSqlServerUsagesOperations +from .operations import WorkspaceManagedSqlServerRecoverableSqlpoolsOperations +from .operations import KeysOperations from . import models @@ -106,12 +124,28 @@ class SynapseManagementClient(SDKClient): :vartype sql_pool_security_alert_policies: azure.mgmt.synapse.operations.SqlPoolSecurityAlertPoliciesOperations :ivar sql_pool_vulnerability_assessment_rule_baselines: SqlPoolVulnerabilityAssessmentRuleBaselines operations :vartype sql_pool_vulnerability_assessment_rule_baselines: azure.mgmt.synapse.operations.SqlPoolVulnerabilityAssessmentRuleBaselinesOperations + :ivar extended_sql_pool_blob_auditing_policies: ExtendedSqlPoolBlobAuditingPolicies operations + :vartype extended_sql_pool_blob_auditing_policies: azure.mgmt.synapse.operations.ExtendedSqlPoolBlobAuditingPoliciesOperations + :ivar data_masking_policies: DataMaskingPolicies operations + :vartype data_masking_policies: azure.mgmt.synapse.operations.DataMaskingPoliciesOperations + :ivar data_masking_rules: DataMaskingRules operations + :vartype data_masking_rules: azure.mgmt.synapse.operations.DataMaskingRulesOperations + :ivar sql_pool_columns: SqlPoolColumns operations + :vartype sql_pool_columns: azure.mgmt.synapse.operations.SqlPoolColumnsOperations + :ivar sql_pool_workload_group: SqlPoolWorkloadGroup operations + :vartype sql_pool_workload_group: azure.mgmt.synapse.operations.SqlPoolWorkloadGroupOperations + :ivar sql_pool_workload_classifier: SqlPoolWorkloadClassifier operations + :vartype sql_pool_workload_classifier: azure.mgmt.synapse.operations.SqlPoolWorkloadClassifierOperations :ivar workspaces: Workspaces operations :vartype workspaces: azure.mgmt.synapse.operations.WorkspacesOperations :ivar workspace_aad_admins: WorkspaceAadAdmins operations :vartype workspace_aad_admins: azure.mgmt.synapse.operations.WorkspaceAadAdminsOperations + :ivar workspace_sql_aad_admins: WorkspaceSqlAadAdmins operations + :vartype workspace_sql_aad_admins: azure.mgmt.synapse.operations.WorkspaceSqlAadAdminsOperations :ivar workspace_managed_identity_sql_control_settings: WorkspaceManagedIdentitySqlControlSettings operations :vartype workspace_managed_identity_sql_control_settings: azure.mgmt.synapse.operations.WorkspaceManagedIdentitySqlControlSettingsOperations + :ivar restorable_dropped_sql_pools: RestorableDroppedSqlPools operations + :vartype restorable_dropped_sql_pools: azure.mgmt.synapse.operations.RestorableDroppedSqlPoolsOperations :ivar integration_runtimes: IntegrationRuntimes operations :vartype integration_runtimes: azure.mgmt.synapse.operations.IntegrationRuntimesOperations :ivar integration_runtime_node_ip_address: IntegrationRuntimeNodeIpAddress operations @@ -136,6 +170,26 @@ class SynapseManagementClient(SDKClient): :vartype private_endpoint_connections: azure.mgmt.synapse.operations.PrivateEndpointConnectionsOperations :ivar private_link_hubs: PrivateLinkHubs operations :vartype private_link_hubs: azure.mgmt.synapse.operations.PrivateLinkHubsOperations + :ivar private_endpoint_connections_private_link_hub: PrivateEndpointConnectionsPrivateLinkHub operations + :vartype private_endpoint_connections_private_link_hub: azure.mgmt.synapse.operations.PrivateEndpointConnectionsPrivateLinkHubOperations + :ivar workspace_managed_sql_server_blob_auditing_policies: WorkspaceManagedSqlServerBlobAuditingPolicies operations + :vartype workspace_managed_sql_server_blob_auditing_policies: azure.mgmt.synapse.operations.WorkspaceManagedSqlServerBlobAuditingPoliciesOperations + :ivar workspace_managedql_server_blob_auditing_policies: WorkspaceManagedqlServerBlobAuditingPolicies operations + :vartype workspace_managedql_server_blob_auditing_policies: azure.mgmt.synapse.operations.WorkspaceManagedqlServerBlobAuditingPoliciesOperations + :ivar workspace_managed_sql_server_extended_blob_auditing_policies: WorkspaceManagedSqlServerExtendedBlobAuditingPolicies operations + :vartype workspace_managed_sql_server_extended_blob_auditing_policies: azure.mgmt.synapse.operations.WorkspaceManagedSqlServerExtendedBlobAuditingPoliciesOperations + :ivar workspace_managed_sql_server_security_alert_policy: WorkspaceManagedSqlServerSecurityAlertPolicy operations + :vartype workspace_managed_sql_server_security_alert_policy: azure.mgmt.synapse.operations.WorkspaceManagedSqlServerSecurityAlertPolicyOperations + :ivar workspace_managed_sql_server_vulnerability_assessments: WorkspaceManagedSqlServerVulnerabilityAssessments operations + :vartype workspace_managed_sql_server_vulnerability_assessments: azure.mgmt.synapse.operations.WorkspaceManagedSqlServerVulnerabilityAssessmentsOperations + :ivar workspace_managed_sql_server_encryption_protector: WorkspaceManagedSqlServerEncryptionProtector operations + :vartype workspace_managed_sql_server_encryption_protector: azure.mgmt.synapse.operations.WorkspaceManagedSqlServerEncryptionProtectorOperations + :ivar workspace_managed_sql_server_usages: WorkspaceManagedSqlServerUsages operations + :vartype workspace_managed_sql_server_usages: azure.mgmt.synapse.operations.WorkspaceManagedSqlServerUsagesOperations + :ivar workspace_managed_sql_server_recoverable_sqlpools: WorkspaceManagedSqlServerRecoverableSqlpools operations + :vartype workspace_managed_sql_server_recoverable_sqlpools: azure.mgmt.synapse.operations.WorkspaceManagedSqlServerRecoverableSqlpoolsOperations + :ivar keys: Keys operations + :vartype keys: azure.mgmt.synapse.operations.KeysOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -202,12 +256,28 @@ def __init__( 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.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.integration_runtimes = IntegrationRuntimesOperations( self._client, self.config, self._serialize, self._deserialize) self.integration_runtime_node_ip_address = IntegrationRuntimeNodeIpAddressOperations( @@ -232,3 +302,23 @@ def __init__( 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.workspace_managed_sql_server_blob_auditing_policies = WorkspaceManagedSqlServerBlobAuditingPoliciesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.workspace_managedql_server_blob_auditing_policies = WorkspaceManagedqlServerBlobAuditingPoliciesOperations( + 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_sqlpools = WorkspaceManagedSqlServerRecoverableSqlpoolsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.keys = KeysOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/__init__.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/__init__.py index ac297f863a74..eb5321f94c21 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/__init__.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/__init__.py @@ -15,6 +15,7 @@ from ._models_py3 import AvailableRpOperation from ._models_py3 import AvailableRpOperationDisplayInfo from ._models_py3 import AzureEntityResource + from ._models_py3 import BabylonConfiguration from ._models_py3 import BigDataPoolPatchInfo from ._models_py3 import BigDataPoolResourceInfo from ._models_py3 import CheckNameAvailabilityRequest @@ -22,15 +23,22 @@ from ._models_py3 import CmdkeySetup from ._models_py3 import ComponentSetup from ._models_py3 import CreateSqlPoolRestorePointDefinition + from ._models_py3 import CustomerManagedKeyDetails from ._models_py3 import CustomSetupBase from ._models_py3 import DataLakeStorageAccountDetails + from ._models_py3 import DataMaskingPolicy + from ._models_py3 import DataMaskingRule from ._models_py3 import DataWarehouseUserActivities + from ._models_py3 import EncryptionDetails + from ._models_py3 import EncryptionProtector from ._models_py3 import EntityReference from ._models_py3 import EnvironmentVariableSetup from ._models_py3 import ErrorAdditionalInfo from ._models_py3 import ErrorContract, ErrorContractException from ._models_py3 import ErrorDetail from ._models_py3 import ErrorResponse + from ._models_py3 import ExtendedServerBlobAuditingPolicy + from ._models_py3 import ExtendedSqlPoolBlobAuditingPolicy from ._models_py3 import GeoBackupPolicy from ._models_py3 import GetSsisObjectMetadataRequest from ._models_py3 import IntegrationRuntime @@ -52,6 +60,7 @@ from ._models_py3 import IntegrationRuntimeVNetProperties from ._models_py3 import IpFirewallRuleInfo from ._models_py3 import IpFirewallRuleProperties + from ._models_py3 import Key from ._models_py3 import LibraryRequirements from ._models_py3 import LinkedIntegrationRuntime from ._models_py3 import LinkedIntegrationRuntimeKeyAuthorization @@ -65,6 +74,7 @@ from ._models_py3 import ManagedIntegrationRuntimeNode from ._models_py3 import ManagedIntegrationRuntimeOperationResult from ._models_py3 import ManagedIntegrationRuntimeStatus + from ._models_py3 import ManagedVirtualNetworkSettings from ._models_py3 import MetadataSyncConfig from ._models_py3 import OperationMetaLogSpecification from ._models_py3 import OperationMetaMetricDimensionSpecification @@ -73,6 +83,8 @@ from ._models_py3 import OperationResource from ._models_py3 import PrivateEndpoint from ._models_py3 import PrivateEndpointConnection + from ._models_py3 import PrivateEndpointConnectionForPrivateLinkHub + from ._models_py3 import PrivateEndpointConnectionForPrivateLinkHubBasic from ._models_py3 import PrivateLinkHub from ._models_py3 import PrivateLinkHubPatchInfo from ._models_py3 import PrivateLinkResource @@ -82,11 +94,13 @@ from ._models_py3 import QueryInterval from ._models_py3 import QueryMetric from ._models_py3 import QueryStatistic + from ._models_py3 import RecoverableSqlPool from ._models_py3 import ReplaceAllFirewallRulesOperationResponse from ._models_py3 import ReplaceAllIpFirewallRulesRequest from ._models_py3 import ReplicationLink from ._models_py3 import Resource from ._models_py3 import ResourceMoveDefinition + from ._models_py3 import RestorableDroppedSqlPool from ._models_py3 import RestorePoint from ._models_py3 import SecretBase from ._models_py3 import SecureString @@ -94,6 +108,10 @@ from ._models_py3 import SelfHostedIntegrationRuntimeNode from ._models_py3 import SelfHostedIntegrationRuntimeStatus from ._models_py3 import SensitivityLabel + from ._models_py3 import ServerBlobAuditingPolicy + from ._models_py3 import ServerSecurityAlertPolicy + from ._models_py3 import ServerUsage + from ._models_py3 import ServerVulnerabilityAssessment from ._models_py3 import Sku from ._models_py3 import SqlPool from ._models_py3 import SqlPoolBlobAuditingPolicy @@ -130,15 +148,20 @@ from ._models_py3 import VulnerabilityAssessmentRecurringScansProperties from ._models_py3 import VulnerabilityAssessmentScanError from ._models_py3 import VulnerabilityAssessmentScanRecord + from ._models_py3 import WorkloadClassifier + from ._models_py3 import WorkloadGroup from ._models_py3 import Workspace from ._models_py3 import WorkspaceAadAdminInfo + from ._models_py3 import WorkspaceKeyDetails from ._models_py3 import WorkspacePatchInfo + from ._models_py3 import WorkspaceRepositoryConfiguration except (SyntaxError, ImportError): from ._models import AutoPauseProperties from ._models import AutoScaleProperties from ._models import AvailableRpOperation from ._models import AvailableRpOperationDisplayInfo from ._models import AzureEntityResource + from ._models import BabylonConfiguration from ._models import BigDataPoolPatchInfo from ._models import BigDataPoolResourceInfo from ._models import CheckNameAvailabilityRequest @@ -146,15 +169,22 @@ from ._models import CmdkeySetup from ._models import ComponentSetup from ._models import CreateSqlPoolRestorePointDefinition + from ._models import CustomerManagedKeyDetails from ._models import CustomSetupBase from ._models import DataLakeStorageAccountDetails + from ._models import DataMaskingPolicy + from ._models import DataMaskingRule from ._models import DataWarehouseUserActivities + from ._models import EncryptionDetails + from ._models import EncryptionProtector from ._models import EntityReference from ._models import EnvironmentVariableSetup from ._models import ErrorAdditionalInfo from ._models import ErrorContract, ErrorContractException from ._models import ErrorDetail from ._models import ErrorResponse + from ._models import ExtendedServerBlobAuditingPolicy + from ._models import ExtendedSqlPoolBlobAuditingPolicy from ._models import GeoBackupPolicy from ._models import GetSsisObjectMetadataRequest from ._models import IntegrationRuntime @@ -176,6 +206,7 @@ from ._models import IntegrationRuntimeVNetProperties from ._models import IpFirewallRuleInfo from ._models import IpFirewallRuleProperties + from ._models import Key from ._models import LibraryRequirements from ._models import LinkedIntegrationRuntime from ._models import LinkedIntegrationRuntimeKeyAuthorization @@ -189,6 +220,7 @@ from ._models import ManagedIntegrationRuntimeNode from ._models import ManagedIntegrationRuntimeOperationResult from ._models import ManagedIntegrationRuntimeStatus + from ._models import ManagedVirtualNetworkSettings from ._models import MetadataSyncConfig from ._models import OperationMetaLogSpecification from ._models import OperationMetaMetricDimensionSpecification @@ -197,6 +229,8 @@ from ._models import OperationResource from ._models import PrivateEndpoint from ._models import PrivateEndpointConnection + from ._models import PrivateEndpointConnectionForPrivateLinkHub + from ._models import PrivateEndpointConnectionForPrivateLinkHubBasic from ._models import PrivateLinkHub from ._models import PrivateLinkHubPatchInfo from ._models import PrivateLinkResource @@ -206,11 +240,13 @@ from ._models import QueryInterval from ._models import QueryMetric from ._models import QueryStatistic + from ._models import RecoverableSqlPool from ._models import ReplaceAllFirewallRulesOperationResponse from ._models import ReplaceAllIpFirewallRulesRequest from ._models import ReplicationLink from ._models import Resource from ._models import ResourceMoveDefinition + from ._models import RestorableDroppedSqlPool from ._models import RestorePoint from ._models import SecretBase from ._models import SecureString @@ -218,6 +254,10 @@ from ._models import SelfHostedIntegrationRuntimeNode from ._models import SelfHostedIntegrationRuntimeStatus from ._models import SensitivityLabel + from ._models import ServerBlobAuditingPolicy + from ._models import ServerSecurityAlertPolicy + from ._models import ServerUsage + from ._models import ServerVulnerabilityAssessment from ._models import Sku from ._models import SqlPool from ._models import SqlPoolBlobAuditingPolicy @@ -254,26 +294,48 @@ from ._models import VulnerabilityAssessmentRecurringScansProperties from ._models import VulnerabilityAssessmentScanError from ._models import VulnerabilityAssessmentScanRecord + from ._models import WorkloadClassifier + from ._models import WorkloadGroup from ._models import Workspace from ._models import WorkspaceAadAdminInfo + from ._models import WorkspaceKeyDetails from ._models import WorkspacePatchInfo + from ._models import WorkspaceRepositoryConfiguration from ._paged_models import BigDataPoolResourceInfoPaged +from ._paged_models import DataMaskingRulePaged +from ._paged_models import EncryptionProtectorPaged +from ._paged_models import ExtendedServerBlobAuditingPolicyPaged +from ._paged_models import ExtendedSqlPoolBlobAuditingPolicyPaged +from ._paged_models import GeoBackupPolicyPaged from ._paged_models import IntegrationRuntimeResourcePaged from ._paged_models import IpFirewallRuleInfoPaged +from ._paged_models import KeyPaged +from ._paged_models import PrivateEndpointConnectionForPrivateLinkHubPaged from ._paged_models import PrivateEndpointConnectionPaged from ._paged_models import PrivateLinkHubPaged from ._paged_models import PrivateLinkResourcePaged +from ._paged_models import RecoverableSqlPoolPaged from ._paged_models import ReplicationLinkPaged +from ._paged_models import RestorableDroppedSqlPoolPaged from ._paged_models import RestorePointPaged from ._paged_models import SensitivityLabelPaged +from ._paged_models import ServerBlobAuditingPolicyPaged +from ._paged_models import ServerSecurityAlertPolicyPaged +from ._paged_models import ServerUsagePaged +from ._paged_models import ServerVulnerabilityAssessmentPaged +from ._paged_models import SqlPoolBlobAuditingPolicyPaged from ._paged_models import SqlPoolColumnPaged from ._paged_models import SqlPoolOperationPaged from ._paged_models import SqlPoolPaged from ._paged_models import SqlPoolSchemaPaged +from ._paged_models import SqlPoolSecurityAlertPolicyPaged from ._paged_models import SqlPoolTablePaged from ._paged_models import SqlPoolUsagePaged from ._paged_models import SqlPoolVulnerabilityAssessmentPaged +from ._paged_models import TransparentDataEncryptionPaged from ._paged_models import VulnerabilityAssessmentScanRecordPaged +from ._paged_models import WorkloadClassifierPaged +from ._paged_models import WorkloadGroupPaged from ._paged_models import WorkspacePaged from ._synapse_management_client_enums import ( NodeSize, @@ -295,6 +357,9 @@ VulnerabilityAssessmentScanTriggerType, VulnerabilityAssessmentScanState, SecurityAlertPolicyState, + DataMaskingState, + DataMaskingRuleState, + DataMaskingFunction, ResourceIdentityType, IntegrationRuntimeType, IntegrationRuntimeState, @@ -310,6 +375,8 @@ IntegrationRuntimeAutoUpdate, IntegrationRuntimeAuthKeyName, SsisObjectMetadataType, + ServerKeyType, + SensitivityLabelSource, VulnerabilityAssessmentPolicyBaselineName, ) @@ -319,6 +386,7 @@ 'AvailableRpOperation', 'AvailableRpOperationDisplayInfo', 'AzureEntityResource', + 'BabylonConfiguration', 'BigDataPoolPatchInfo', 'BigDataPoolResourceInfo', 'CheckNameAvailabilityRequest', @@ -326,15 +394,22 @@ 'CmdkeySetup', 'ComponentSetup', 'CreateSqlPoolRestorePointDefinition', + 'CustomerManagedKeyDetails', 'CustomSetupBase', 'DataLakeStorageAccountDetails', + 'DataMaskingPolicy', + 'DataMaskingRule', 'DataWarehouseUserActivities', + 'EncryptionDetails', + 'EncryptionProtector', 'EntityReference', 'EnvironmentVariableSetup', 'ErrorAdditionalInfo', 'ErrorContract', 'ErrorContractException', 'ErrorDetail', 'ErrorResponse', + 'ExtendedServerBlobAuditingPolicy', + 'ExtendedSqlPoolBlobAuditingPolicy', 'GeoBackupPolicy', 'GetSsisObjectMetadataRequest', 'IntegrationRuntime', @@ -356,6 +431,7 @@ 'IntegrationRuntimeVNetProperties', 'IpFirewallRuleInfo', 'IpFirewallRuleProperties', + 'Key', 'LibraryRequirements', 'LinkedIntegrationRuntime', 'LinkedIntegrationRuntimeKeyAuthorization', @@ -369,6 +445,7 @@ 'ManagedIntegrationRuntimeNode', 'ManagedIntegrationRuntimeOperationResult', 'ManagedIntegrationRuntimeStatus', + 'ManagedVirtualNetworkSettings', 'MetadataSyncConfig', 'OperationMetaLogSpecification', 'OperationMetaMetricDimensionSpecification', @@ -377,6 +454,8 @@ 'OperationResource', 'PrivateEndpoint', 'PrivateEndpointConnection', + 'PrivateEndpointConnectionForPrivateLinkHub', + 'PrivateEndpointConnectionForPrivateLinkHubBasic', 'PrivateLinkHub', 'PrivateLinkHubPatchInfo', 'PrivateLinkResource', @@ -386,11 +465,13 @@ 'QueryInterval', 'QueryMetric', 'QueryStatistic', + 'RecoverableSqlPool', 'ReplaceAllFirewallRulesOperationResponse', 'ReplaceAllIpFirewallRulesRequest', 'ReplicationLink', 'Resource', 'ResourceMoveDefinition', + 'RestorableDroppedSqlPool', 'RestorePoint', 'SecretBase', 'SecureString', @@ -398,6 +479,10 @@ 'SelfHostedIntegrationRuntimeNode', 'SelfHostedIntegrationRuntimeStatus', 'SensitivityLabel', + 'ServerBlobAuditingPolicy', + 'ServerSecurityAlertPolicy', + 'ServerUsage', + 'ServerVulnerabilityAssessment', 'Sku', 'SqlPool', 'SqlPoolBlobAuditingPolicy', @@ -434,14 +519,21 @@ 'VulnerabilityAssessmentRecurringScansProperties', 'VulnerabilityAssessmentScanError', 'VulnerabilityAssessmentScanRecord', + 'WorkloadClassifier', + 'WorkloadGroup', 'Workspace', 'WorkspaceAadAdminInfo', + 'WorkspaceKeyDetails', 'WorkspacePatchInfo', + 'WorkspaceRepositoryConfiguration', 'BigDataPoolResourceInfoPaged', 'IpFirewallRuleInfoPaged', 'SqlPoolPaged', + 'GeoBackupPolicyPaged', 'RestorePointPaged', 'ReplicationLinkPaged', + 'TransparentDataEncryptionPaged', + 'SqlPoolBlobAuditingPolicyPaged', 'SqlPoolOperationPaged', 'SqlPoolUsagePaged', 'SensitivityLabelPaged', @@ -450,11 +542,26 @@ 'SqlPoolColumnPaged', 'SqlPoolVulnerabilityAssessmentPaged', 'VulnerabilityAssessmentScanRecordPaged', + 'SqlPoolSecurityAlertPolicyPaged', + 'ExtendedSqlPoolBlobAuditingPolicyPaged', + 'DataMaskingRulePaged', + 'WorkloadGroupPaged', + 'WorkloadClassifierPaged', 'WorkspacePaged', + 'RestorableDroppedSqlPoolPaged', 'IntegrationRuntimeResourcePaged', 'PrivateLinkResourcePaged', 'PrivateEndpointConnectionPaged', 'PrivateLinkHubPaged', + 'PrivateEndpointConnectionForPrivateLinkHubPaged', + 'ServerBlobAuditingPolicyPaged', + 'ExtendedServerBlobAuditingPolicyPaged', + 'ServerSecurityAlertPolicyPaged', + 'ServerVulnerabilityAssessmentPaged', + 'EncryptionProtectorPaged', + 'ServerUsagePaged', + 'RecoverableSqlPoolPaged', + 'KeyPaged', 'NodeSize', 'NodeSizeFamily', 'ProvisioningState', @@ -474,6 +581,9 @@ 'VulnerabilityAssessmentScanTriggerType', 'VulnerabilityAssessmentScanState', 'SecurityAlertPolicyState', + 'DataMaskingState', + 'DataMaskingRuleState', + 'DataMaskingFunction', 'ResourceIdentityType', 'IntegrationRuntimeType', 'IntegrationRuntimeState', @@ -489,5 +599,7 @@ 'IntegrationRuntimeAutoUpdate', 'IntegrationRuntimeAuthKeyName', 'SsisObjectMetadataType', + 'ServerKeyType', + 'SensitivityLabelSource', 'VulnerabilityAssessmentPolicyBaselineName', ] diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/_models.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/_models.py index e82a36f58589..74760cba9bd3 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/_models.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/_models.py @@ -129,16 +129,19 @@ def __init__(self, **kwargs): class Resource(Model): """Resource. + Common fields that are returned in the response for all Azure Resource + Manager resources. + Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str """ @@ -162,19 +165,21 @@ def __init__(self, **kwargs): class AzureEntityResource(Resource): - """The resource model definition for a Azure Resource Manager resource with an - etag. + """Entity Resource. + + The resource model definition for an Azure Resource Manager resource with + an etag. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :ivar etag: Resource Etag. :vartype etag: str @@ -199,6 +204,22 @@ def __init__(self, **kwargs): self.etag = None +class BabylonConfiguration(Model): + """Babylon Configuration. + + :param babylon_resource_id: Babylon Resource ID + :type babylon_resource_id: str + """ + + _attribute_map = { + 'babylon_resource_id': {'key': 'babylonResourceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(BabylonConfiguration, self).__init__(**kwargs) + self.babylon_resource_id = kwargs.get('babylon_resource_id', None) + + class BigDataPoolPatchInfo(Model): """Patch for a Big Data pool. @@ -218,20 +239,23 @@ def __init__(self, **kwargs): class TrackedResource(Resource): - """The resource model definition for a ARM tracked top level resource. + """Tracked Resource. + + The resource model definition for an Azure Resource Manager tracked top + level resource which has 'tags' and a 'location'. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :param tags: Resource tags. :type tags: dict[str, str] @@ -270,13 +294,13 @@ class BigDataPoolResourceInfo(TrackedResource): All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :param tags: Resource tags. :type tags: dict[str, str] @@ -299,6 +323,10 @@ class BigDataPoolResourceInfo(TrackedResource): :type node_count: int :param library_requirements: Library version requirements :type library_requirements: ~azure.mgmt.synapse.models.LibraryRequirements + :param spark_config_properties: Spark configuration file to specify + additional properties + :type spark_config_properties: + ~azure.mgmt.synapse.models.LibraryRequirements :param spark_version: The Apache Spark version. :type spark_version: str :param default_spark_log_folder: The default folder where Spark logs will @@ -306,7 +334,7 @@ class BigDataPoolResourceInfo(TrackedResource): :type default_spark_log_folder: str :param node_size: The level of compute power that each node in the Big Data pool has. Possible values include: 'None', 'Small', 'Medium', - 'Large', 'XLarge', 'XXLarge' + 'Large', 'XLarge', 'XXLarge', 'XXXLarge' :type node_size: str or ~azure.mgmt.synapse.models.NodeSize :param node_size_family: The kind of nodes that the Big Data pool provides. Possible values include: 'None', 'MemoryOptimized' @@ -334,6 +362,7 @@ class BigDataPoolResourceInfo(TrackedResource): 'spark_events_folder': {'key': 'properties.sparkEventsFolder', 'type': 'str'}, 'node_count': {'key': 'properties.nodeCount', 'type': 'int'}, 'library_requirements': {'key': 'properties.libraryRequirements', 'type': 'LibraryRequirements'}, + 'spark_config_properties': {'key': 'properties.sparkConfigProperties', 'type': 'LibraryRequirements'}, 'spark_version': {'key': 'properties.sparkVersion', 'type': 'str'}, 'default_spark_log_folder': {'key': 'properties.defaultSparkLogFolder', 'type': 'str'}, 'node_size': {'key': 'properties.nodeSize', 'type': 'str'}, @@ -350,6 +379,7 @@ def __init__(self, **kwargs): self.spark_events_folder = kwargs.get('spark_events_folder', None) self.node_count = kwargs.get('node_count', None) self.library_requirements = kwargs.get('library_requirements', None) + self.spark_config_properties = kwargs.get('spark_config_properties', None) self.spark_version = kwargs.get('spark_version', None) self.default_spark_log_folder = kwargs.get('default_spark_log_folder', None) self.node_size = kwargs.get('node_size', None) @@ -575,6 +605,33 @@ def __init__(self, **kwargs): self.restore_point_label = kwargs.get('restore_point_label', None) +class CustomerManagedKeyDetails(Model): + """Details of the customer managed key associated with the workspace. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar status: The customer managed key status on the workspace + :vartype status: str + :param key: The key object of the workspace + :type key: ~azure.mgmt.synapse.models.WorkspaceKeyDetails + """ + + _validation = { + 'status': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'key': {'key': 'key', 'type': 'WorkspaceKeyDetails'}, + } + + def __init__(self, **kwargs): + super(CustomerManagedKeyDetails, self).__init__(**kwargs) + self.status = None + self.key = kwargs.get('key', None) + + class DataLakeStorageAccountDetails(Model): """Details of the data lake storage account associated with the workspace. @@ -596,19 +653,21 @@ def __init__(self, **kwargs): class ProxyResource(Resource): - """The resource model definition for a ARM proxy resource. It will have - everything other than required location and tags. + """Proxy Resource. + + The resource model definition for a Azure Resource Manager proxy resource. + It will not have tags and a location. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str """ @@ -628,19 +687,210 @@ def __init__(self, **kwargs): super(ProxyResource, self).__init__(**kwargs) +class DataMaskingPolicy(ProxyResource): + """DataMaskingPolicy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + :vartype type: str + :param data_masking_state: Required. The state of the data masking policy. + Possible values include: 'Disabled', 'Enabled' + :type data_masking_state: str or + ~azure.mgmt.synapse.models.DataMaskingState + :param exempt_principals: The list of the exempt principals. Specifies the + semicolon-separated list of database users for which the data masking + policy does not apply. The specified users receive data results without + masking for all of the database queries. + :type exempt_principals: str + :ivar application_principals: The list of the application principals. This + is a legacy parameter and is no longer used. + :vartype application_principals: str + :ivar masking_level: The masking level. This is a legacy parameter and is + no longer used. + :vartype masking_level: str + :ivar location: The location of the data masking policy. + :vartype location: str + :ivar kind: The kind of data masking policy. Metadata, used for Azure + portal. + :vartype kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'data_masking_state': {'required': True}, + 'application_principals': {'readonly': True}, + 'masking_level': {'readonly': True}, + 'location': {'readonly': True}, + 'kind': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'data_masking_state': {'key': 'properties.dataMaskingState', 'type': 'DataMaskingState'}, + 'exempt_principals': {'key': 'properties.exemptPrincipals', 'type': 'str'}, + 'application_principals': {'key': 'properties.applicationPrincipals', 'type': 'str'}, + 'masking_level': {'key': 'properties.maskingLevel', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DataMaskingPolicy, self).__init__(**kwargs) + self.data_masking_state = kwargs.get('data_masking_state', None) + self.exempt_principals = kwargs.get('exempt_principals', None) + self.application_principals = None + self.masking_level = None + self.location = None + self.kind = None + + +class DataMaskingRule(ProxyResource): + """Represents a Sql pool data masking rule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + :vartype type: str + :ivar data_masking_rule_id: The rule Id. + :vartype data_masking_rule_id: str + :param alias_name: The alias name. This is a legacy parameter and is no + longer used. + :type alias_name: str + :param rule_state: The rule state. Used to delete a rule. To delete an + existing rule, specify the schemaName, tableName, columnName, + maskingFunction, and specify ruleState as disabled. However, if the rule + doesn't already exist, the rule will be created with ruleState set to + enabled, regardless of the provided value of ruleState. Possible values + include: 'Disabled', 'Enabled' + :type rule_state: str or ~azure.mgmt.synapse.models.DataMaskingRuleState + :param schema_name: Required. The schema name on which the data masking + rule is applied. + :type schema_name: str + :param table_name: Required. The table name on which the data masking rule + is applied. + :type table_name: str + :param column_name: Required. The column name on which the data masking + rule is applied. + :type column_name: str + :param masking_function: Required. The masking function that is used for + the data masking rule. Possible values include: 'Default', 'CCN', 'Email', + 'Number', 'SSN', 'Text' + :type masking_function: str or + ~azure.mgmt.synapse.models.DataMaskingFunction + :param number_from: The numberFrom property of the masking rule. Required + if maskingFunction is set to Number, otherwise this parameter will be + ignored. + :type number_from: str + :param number_to: The numberTo property of the data masking rule. Required + if maskingFunction is set to Number, otherwise this parameter will be + ignored. + :type number_to: str + :param prefix_size: If maskingFunction is set to Text, the number of + characters to show unmasked in the beginning of the string. Otherwise, + this parameter will be ignored. + :type prefix_size: str + :param suffix_size: If maskingFunction is set to Text, the number of + characters to show unmasked at the end of the string. Otherwise, this + parameter will be ignored. + :type suffix_size: str + :param replacement_string: If maskingFunction is set to Text, the + character to use for masking the unexposed part of the string. Otherwise, + this parameter will be ignored. + :type replacement_string: str + :ivar location: The location of the data masking rule. + :vartype location: str + :ivar kind: The kind of Data Masking Rule. Metadata, used for Azure + portal. + :vartype kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'data_masking_rule_id': {'readonly': True}, + 'schema_name': {'required': True}, + 'table_name': {'required': True}, + 'column_name': {'required': True}, + 'masking_function': {'required': True}, + 'location': {'readonly': True}, + 'kind': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'data_masking_rule_id': {'key': 'properties.id', 'type': 'str'}, + 'alias_name': {'key': 'properties.aliasName', 'type': 'str'}, + 'rule_state': {'key': 'properties.ruleState', 'type': 'DataMaskingRuleState'}, + 'schema_name': {'key': 'properties.schemaName', 'type': 'str'}, + 'table_name': {'key': 'properties.tableName', 'type': 'str'}, + 'column_name': {'key': 'properties.columnName', 'type': 'str'}, + 'masking_function': {'key': 'properties.maskingFunction', 'type': 'DataMaskingFunction'}, + 'number_from': {'key': 'properties.numberFrom', 'type': 'str'}, + 'number_to': {'key': 'properties.numberTo', 'type': 'str'}, + 'prefix_size': {'key': 'properties.prefixSize', 'type': 'str'}, + 'suffix_size': {'key': 'properties.suffixSize', 'type': 'str'}, + 'replacement_string': {'key': 'properties.replacementString', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DataMaskingRule, self).__init__(**kwargs) + self.data_masking_rule_id = None + self.alias_name = kwargs.get('alias_name', None) + self.rule_state = kwargs.get('rule_state', None) + self.schema_name = kwargs.get('schema_name', None) + self.table_name = kwargs.get('table_name', None) + self.column_name = kwargs.get('column_name', None) + self.masking_function = kwargs.get('masking_function', None) + self.number_from = kwargs.get('number_from', None) + self.number_to = kwargs.get('number_to', None) + self.prefix_size = kwargs.get('prefix_size', None) + self.suffix_size = kwargs.get('suffix_size', None) + self.replacement_string = kwargs.get('replacement_string', None) + self.location = None + self.kind = None + + class DataWarehouseUserActivities(ProxyResource): """User activities of a data warehouse. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :ivar active_queries_count: Count of running and suspended queries. :vartype active_queries_count: int @@ -665,6 +915,104 @@ def __init__(self, **kwargs): self.active_queries_count = None +class EncryptionDetails(Model): + """Details of the encryption associated with the workspace. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar double_encryption_enabled: Double Encryption enabled + :vartype double_encryption_enabled: bool + :param cmk: Customer Managed Key Details + :type cmk: ~azure.mgmt.synapse.models.CustomerManagedKeyDetails + """ + + _validation = { + 'double_encryption_enabled': {'readonly': True}, + } + + _attribute_map = { + 'double_encryption_enabled': {'key': 'doubleEncryptionEnabled', 'type': 'bool'}, + 'cmk': {'key': 'cmk', 'type': 'CustomerManagedKeyDetails'}, + } + + def __init__(self, **kwargs): + super(EncryptionDetails, self).__init__(**kwargs) + self.double_encryption_enabled = None + self.cmk = kwargs.get('cmk', None) + + +class EncryptionProtector(ProxyResource): + """The server encryption protector. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + :vartype type: str + :ivar kind: Kind of encryption protector. This is metadata used for the + Azure portal experience. + :vartype kind: str + :ivar location: Resource location. + :vartype location: str + :ivar subregion: Subregion of the encryption protector. + :vartype subregion: str + :param server_key_name: The name of the server key. + :type server_key_name: str + :param server_key_type: Required. The encryption protector type like + 'ServiceManaged', 'AzureKeyVault'. Possible values include: + 'ServiceManaged', 'AzureKeyVault' + :type server_key_type: str or ~azure.mgmt.synapse.models.ServerKeyType + :ivar uri: The URI of the server key. + :vartype uri: str + :ivar thumbprint: Thumbprint of the server key. + :vartype thumbprint: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'location': {'readonly': True}, + 'subregion': {'readonly': True}, + 'server_key_type': {'required': True}, + 'uri': {'readonly': True}, + 'thumbprint': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'subregion': {'key': 'properties.subregion', 'type': 'str'}, + 'server_key_name': {'key': 'properties.serverKeyName', 'type': 'str'}, + 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EncryptionProtector, self).__init__(**kwargs) + self.kind = None + self.location = None + self.subregion = None + self.server_key_name = kwargs.get('server_key_name', None) + self.server_key_type = kwargs.get('server_key_type', None) + self.uri = None + self.thumbprint = None + + class EntityReference(Model): """The entity reference. @@ -802,7 +1150,11 @@ def __init__(self, **kwargs): class ErrorResponse(Model): - """The resource management error response. + """Error Response. + + Common error response for all Azure Resource Manager APIs to return error + details for failed operations. (This also follows the OData error response + format.). Variables are only populated by the server, and will be ignored when sending a request. @@ -845,1048 +1197,1779 @@ def __init__(self, **kwargs): self.additional_info = None -class GeoBackupPolicy(ProxyResource): - """A database geo backup policy. +class ExtendedServerBlobAuditingPolicy(ProxyResource): + """An extended server blob auditing policy. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str - :param state: Required. The state of the geo backup policy. Possible - values include: 'Disabled', 'Enabled' - :type state: str or ~azure.mgmt.synapse.models.GeoBackupPolicyState - :ivar storage_type: The storage type of the geo backup policy. - :vartype storage_type: str - :ivar kind: Kind of geo backup policy. This is metadata used for the - Azure portal experience. - :vartype kind: str - :ivar location: Backup policy location. - :vartype location: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - 'storage_type': {'readonly': True}, - 'kind': {'readonly': True}, - 'location': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'GeoBackupPolicyState'}, - 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(GeoBackupPolicy, self).__init__(**kwargs) - self.state = kwargs.get('state', None) - self.storage_type = None - self.kind = None - self.location = None - - -class GetSsisObjectMetadataRequest(Model): - """The request payload of get SSIS object metadata. - - :param metadata_path: Metadata path. - :type metadata_path: str - """ - - _attribute_map = { - 'metadata_path': {'key': 'metadataPath', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(GetSsisObjectMetadataRequest, self).__init__(**kwargs) - self.metadata_path = kwargs.get('metadata_path', None) - - -class IntegrationRuntime(Model): - """Azure Synapse nested object which serves as a compute resource for - activities. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ManagedIntegrationRuntime, SelfHostedIntegrationRuntime - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Integration runtime description. - :type description: str - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - _subtype_map = { - 'type': {'Managed': 'ManagedIntegrationRuntime', 'SelfHosted': 'SelfHostedIntegrationRuntime'} - } - - def __init__(self, **kwargs): - super(IntegrationRuntime, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.description = kwargs.get('description', None) - self.type = None - - -class IntegrationRuntimeAuthKeys(Model): + :param predicate_expression: Specifies condition of where clause when + creating an audit. + :type predicate_expression: str + :param state: Required. Specifies the state of the policy. If state is + Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. + Possible values include: 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.synapse.models.BlobAuditingPolicyState + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). If state is Enabled, + storageEndpoint or isAzureMonitorTargetEnabled is required. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + auditing storage account. + If state is Enabled and storageEndpoint is specified, not specifying the + storageAccountAccessKey will use SQL server system-assigned managed + identity to access the storage. + Prerequisites for using managed identity authentication: + 1. Assign SQL Server a system-assigned managed identity in Azure Active + Directory (AAD). + 2. Grant SQL Server identity access to the storage account by adding + 'Storage Blob Data Contributor' RBAC role to the server identity. + For more information, see [Auditing to storage using Managed Identity + authentication](https://go.microsoft.com/fwlink/?linkid=2114355) + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the audit + logs in the storage account. + :type retention_days: int + :param audit_actions_and_groups: Specifies the Actions-Groups and Actions + to audit. + The recommended set of action groups to use is the following combination - + this will audit all the queries and stored procedures executed against the + database, as well as successful and failed logins: + BATCH_COMPLETED_GROUP, + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + FAILED_DATABASE_AUTHENTICATION_GROUP. + This above combination is also the set that is configured by default when + enabling auditing from the Azure portal. + The supported action groups to audit are (note: choose only specific + groups that cover your auditing needs. Using unnecessary groups could lead + to very large quantities of audit records): + APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + BACKUP_RESTORE_GROUP + DATABASE_LOGOUT_GROUP + DATABASE_OBJECT_CHANGE_GROUP + DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + DATABASE_OPERATION_GROUP + DATABASE_PERMISSION_CHANGE_GROUP + DATABASE_PRINCIPAL_CHANGE_GROUP + DATABASE_PRINCIPAL_IMPERSONATION_GROUP + DATABASE_ROLE_MEMBER_CHANGE_GROUP + FAILED_DATABASE_AUTHENTICATION_GROUP + SCHEMA_OBJECT_ACCESS_GROUP + SCHEMA_OBJECT_CHANGE_GROUP + SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + USER_CHANGE_PASSWORD_GROUP + BATCH_STARTED_GROUP + BATCH_COMPLETED_GROUP + These are groups that cover all sql statements and stored procedures + executed against the database, and should not be used in combination with + other groups as this will result in duplicate audit logs. + For more information, see [Database-Level Audit Action + Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + For Database auditing policy, specific Actions can also be specified (note + that Actions cannot be specified for Server auditing policy). The + supported actions to audit are: + SELECT + UPDATE + INSERT + DELETE + EXECUTE + RECEIVE + REFERENCES + The general form for defining an action to be audited is: + {action} ON {object} BY {principal} + Note that in the above format can refer to an object like a + table, view, or stored procedure, or an entire database or schema. For the + latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are + used, respectively. + For example: + SELECT on dbo.myTable by public + SELECT on DATABASE::myDatabase by public + SELECT on SCHEMA::mySchema by public + For more information, see [Database-Level Audit + Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + :type audit_actions_and_groups: list[str] + :param storage_account_subscription_id: Specifies the blob storage + subscription Id. + :type storage_account_subscription_id: str + :param is_storage_secondary_key_in_use: Specifies whether + storageAccountAccessKey value is the storage's secondary key. + :type is_storage_secondary_key_in_use: bool + :param is_azure_monitor_target_enabled: Specifies whether audit events are + sent to Azure Monitor. + In order to send the events to Azure Monitor, specify 'state' as 'Enabled' + and 'isAzureMonitorTargetEnabled' as true. + When using REST API to configure auditing, Diagnostic Settings with + 'SQLSecurityAuditEvents' diagnostic logs category on the database should + be also created. + Note that for server level audit you should use the 'master' database as + {databaseName}. + Diagnostic Settings URI format: + PUT + https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + For more information, see [Diagnostic Settings REST + API](https://go.microsoft.com/fwlink/?linkid=2033207) + or [Diagnostic Settings + PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + :type is_azure_monitor_target_enabled: bool + :param queue_delay_ms: Specifies the amount of time in milliseconds that + can elapse before audit actions are forced to be processed. + The default minimum value is 1000 (1 second). The maximum is + 2,147,483,647. + :type queue_delay_ms: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'predicate_expression': {'key': 'properties.predicateExpression', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, + 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, + 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, + 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, + 'queue_delay_ms': {'key': 'properties.queueDelayMs', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ExtendedServerBlobAuditingPolicy, self).__init__(**kwargs) + self.predicate_expression = kwargs.get('predicate_expression', None) + self.state = kwargs.get('state', None) + self.storage_endpoint = kwargs.get('storage_endpoint', None) + self.storage_account_access_key = kwargs.get('storage_account_access_key', None) + self.retention_days = kwargs.get('retention_days', None) + self.audit_actions_and_groups = kwargs.get('audit_actions_and_groups', None) + self.storage_account_subscription_id = kwargs.get('storage_account_subscription_id', None) + self.is_storage_secondary_key_in_use = kwargs.get('is_storage_secondary_key_in_use', None) + self.is_azure_monitor_target_enabled = kwargs.get('is_azure_monitor_target_enabled', None) + self.queue_delay_ms = kwargs.get('queue_delay_ms', None) + + +class ExtendedSqlPoolBlobAuditingPolicy(ProxyResource): + """An extended Sql pool blob auditing policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + :vartype type: str + :param predicate_expression: Specifies condition of where clause when + creating an audit. + :type predicate_expression: str + :param state: Required. Specifies the state of the policy. If state is + Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. + Possible values include: 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.synapse.models.BlobAuditingPolicyState + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). If state is Enabled, + storageEndpoint or isAzureMonitorTargetEnabled is required. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + auditing storage account. + If state is Enabled and storageEndpoint is specified, not specifying the + storageAccountAccessKey will use SQL server system-assigned managed + identity to access the storage. + Prerequisites for using managed identity authentication: + 1. Assign SQL Server a system-assigned managed identity in Azure Active + Directory (AAD). + 2. Grant SQL Server identity access to the storage account by adding + 'Storage Blob Data Contributor' RBAC role to the server identity. + For more information, see [Auditing to storage using Managed Identity + authentication](https://go.microsoft.com/fwlink/?linkid=2114355) + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the audit + logs in the storage account. + :type retention_days: int + :param audit_actions_and_groups: Specifies the Actions-Groups and Actions + to audit. + The recommended set of action groups to use is the following combination - + this will audit all the queries and stored procedures executed against the + database, as well as successful and failed logins: + BATCH_COMPLETED_GROUP, + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + FAILED_DATABASE_AUTHENTICATION_GROUP. + This above combination is also the set that is configured by default when + enabling auditing from the Azure portal. + The supported action groups to audit are (note: choose only specific + groups that cover your auditing needs. Using unnecessary groups could lead + to very large quantities of audit records): + APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + BACKUP_RESTORE_GROUP + DATABASE_LOGOUT_GROUP + DATABASE_OBJECT_CHANGE_GROUP + DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + DATABASE_OPERATION_GROUP + DATABASE_PERMISSION_CHANGE_GROUP + DATABASE_PRINCIPAL_CHANGE_GROUP + DATABASE_PRINCIPAL_IMPERSONATION_GROUP + DATABASE_ROLE_MEMBER_CHANGE_GROUP + FAILED_DATABASE_AUTHENTICATION_GROUP + SCHEMA_OBJECT_ACCESS_GROUP + SCHEMA_OBJECT_CHANGE_GROUP + SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + USER_CHANGE_PASSWORD_GROUP + BATCH_STARTED_GROUP + BATCH_COMPLETED_GROUP + These are groups that cover all sql statements and stored procedures + executed against the database, and should not be used in combination with + other groups as this will result in duplicate audit logs. + For more information, see [Database-Level Audit Action + Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + For Database auditing policy, specific Actions can also be specified (note + that Actions cannot be specified for Server auditing policy). The + supported actions to audit are: + SELECT + UPDATE + INSERT + DELETE + EXECUTE + RECEIVE + REFERENCES + The general form for defining an action to be audited is: + {action} ON {object} BY {principal} + Note that in the above format can refer to an object like a + table, view, or stored procedure, or an entire database or schema. For the + latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are + used, respectively. + For example: + SELECT on dbo.myTable by public + SELECT on DATABASE::myDatabase by public + SELECT on SCHEMA::mySchema by public + For more information, see [Database-Level Audit + Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + :type audit_actions_and_groups: list[str] + :param storage_account_subscription_id: Specifies the blob storage + subscription Id. + :type storage_account_subscription_id: str + :param is_storage_secondary_key_in_use: Specifies whether + storageAccountAccessKey value is the storage's secondary key. + :type is_storage_secondary_key_in_use: bool + :param is_azure_monitor_target_enabled: Specifies whether audit events are + sent to Azure Monitor. + In order to send the events to Azure Monitor, specify 'state' as 'Enabled' + and 'isAzureMonitorTargetEnabled' as true. + When using REST API to configure auditing, Diagnostic Settings with + 'SQLSecurityAuditEvents' diagnostic logs category on the database should + be also created. + Note that for server level audit you should use the 'master' database as + {databaseName}. + Diagnostic Settings URI format: + PUT + https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + For more information, see [Diagnostic Settings REST + API](https://go.microsoft.com/fwlink/?linkid=2033207) + or [Diagnostic Settings + PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + :type is_azure_monitor_target_enabled: bool + :param queue_delay_ms: Specifies the amount of time in milliseconds that + can elapse before audit actions are forced to be processed. + The default minimum value is 1000 (1 second). The maximum is + 2,147,483,647. + :type queue_delay_ms: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'predicate_expression': {'key': 'properties.predicateExpression', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, + 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, + 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, + 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, + 'queue_delay_ms': {'key': 'properties.queueDelayMs', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ExtendedSqlPoolBlobAuditingPolicy, self).__init__(**kwargs) + self.predicate_expression = kwargs.get('predicate_expression', None) + self.state = kwargs.get('state', None) + self.storage_endpoint = kwargs.get('storage_endpoint', None) + self.storage_account_access_key = kwargs.get('storage_account_access_key', None) + self.retention_days = kwargs.get('retention_days', None) + self.audit_actions_and_groups = kwargs.get('audit_actions_and_groups', None) + self.storage_account_subscription_id = kwargs.get('storage_account_subscription_id', None) + self.is_storage_secondary_key_in_use = kwargs.get('is_storage_secondary_key_in_use', None) + self.is_azure_monitor_target_enabled = kwargs.get('is_azure_monitor_target_enabled', None) + self.queue_delay_ms = kwargs.get('queue_delay_ms', None) + + +class GeoBackupPolicy(ProxyResource): + """A database geo backup policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + :vartype type: str + :param state: Required. The state of the geo backup policy. Possible + values include: 'Disabled', 'Enabled' + :type state: str or ~azure.mgmt.synapse.models.GeoBackupPolicyState + :ivar storage_type: The storage type of the geo backup policy. + :vartype storage_type: str + :ivar kind: Kind of geo backup policy. This is metadata used for the + Azure portal experience. + :vartype kind: str + :ivar location: Backup policy location. + :vartype location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + 'storage_type': {'readonly': True}, + 'kind': {'readonly': True}, + 'location': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'GeoBackupPolicyState'}, + 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GeoBackupPolicy, self).__init__(**kwargs) + self.state = kwargs.get('state', None) + self.storage_type = None + self.kind = None + self.location = None + + +class GetSsisObjectMetadataRequest(Model): + """The request payload of get SSIS object metadata. + + :param metadata_path: Metadata path. + :type metadata_path: str + """ + + _attribute_map = { + 'metadata_path': {'key': 'metadataPath', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GetSsisObjectMetadataRequest, self).__init__(**kwargs) + self.metadata_path = kwargs.get('metadata_path', None) + + +class IntegrationRuntime(Model): + """Azure Synapse nested object which serves as a compute resource for + activities. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ManagedIntegrationRuntime, SelfHostedIntegrationRuntime + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Integration runtime description. + :type description: str + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'Managed': 'ManagedIntegrationRuntime', 'SelfHosted': 'SelfHostedIntegrationRuntime'} + } + + def __init__(self, **kwargs): + super(IntegrationRuntime, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.description = kwargs.get('description', None) + self.type = None + + +class IntegrationRuntimeAuthKeys(Model): """The integration runtime authentication keys. - :param auth_key1: The primary integration runtime authentication key. - :type auth_key1: str - :param auth_key2: The secondary integration runtime authentication key. - :type auth_key2: str + :param auth_key1: The primary integration runtime authentication key. + :type auth_key1: str + :param auth_key2: The secondary integration runtime authentication key. + :type auth_key2: str + """ + + _attribute_map = { + 'auth_key1': {'key': 'authKey1', 'type': 'str'}, + 'auth_key2': {'key': 'authKey2', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IntegrationRuntimeAuthKeys, self).__init__(**kwargs) + self.auth_key1 = kwargs.get('auth_key1', None) + self.auth_key2 = kwargs.get('auth_key2', None) + + +class IntegrationRuntimeComputeProperties(Model): + """The compute resource properties for managed integration runtime. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param location: The location for managed integration runtime. The + supported regions could be found on + https://docs.microsoft.com/en-us/azure/data-factory/data-factory-data-movement-activities + :type location: str + :param node_size: The node size requirement to managed integration + runtime. + :type node_size: str + :param number_of_nodes: The required number of nodes for managed + integration runtime. + :type number_of_nodes: int + :param max_parallel_executions_per_node: Maximum parallel executions count + per node for managed integration runtime. + :type max_parallel_executions_per_node: int + :param data_flow_properties: Data flow properties for managed integration + runtime. + :type data_flow_properties: + ~azure.mgmt.synapse.models.IntegrationRuntimeDataFlowProperties + :param v_net_properties: VNet properties for managed integration runtime. + :type v_net_properties: + ~azure.mgmt.synapse.models.IntegrationRuntimeVNetProperties + """ + + _validation = { + 'number_of_nodes': {'minimum': 1}, + 'max_parallel_executions_per_node': {'minimum': 1}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'node_size': {'key': 'nodeSize', 'type': 'str'}, + 'number_of_nodes': {'key': 'numberOfNodes', 'type': 'int'}, + 'max_parallel_executions_per_node': {'key': 'maxParallelExecutionsPerNode', 'type': 'int'}, + 'data_flow_properties': {'key': 'dataFlowProperties', 'type': 'IntegrationRuntimeDataFlowProperties'}, + 'v_net_properties': {'key': 'vNetProperties', 'type': 'IntegrationRuntimeVNetProperties'}, + } + + def __init__(self, **kwargs): + super(IntegrationRuntimeComputeProperties, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.location = kwargs.get('location', None) + self.node_size = kwargs.get('node_size', None) + self.number_of_nodes = kwargs.get('number_of_nodes', None) + self.max_parallel_executions_per_node = kwargs.get('max_parallel_executions_per_node', None) + self.data_flow_properties = kwargs.get('data_flow_properties', None) + self.v_net_properties = kwargs.get('v_net_properties', None) + + +class IntegrationRuntimeConnectionInfo(Model): + """Connection information for encrypting the on-premises data source + credentials. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :ivar service_token: The token generated in service. Callers use this + token to authenticate to integration runtime. + :vartype service_token: str + :ivar identity_cert_thumbprint: The integration runtime SSL certificate + thumbprint. Click-Once application uses it to do server validation. + :vartype identity_cert_thumbprint: str + :ivar host_service_uri: The on-premises integration runtime host URL. + :vartype host_service_uri: str + :ivar version: The integration runtime version. + :vartype version: str + :ivar public_key: The public key for encrypting a credential when + transferring the credential to the integration runtime. + :vartype public_key: str + :ivar is_identity_cert_exprired: Whether the identity certificate is + expired. + :vartype is_identity_cert_exprired: bool + """ + + _validation = { + 'service_token': {'readonly': True}, + 'identity_cert_thumbprint': {'readonly': True}, + 'host_service_uri': {'readonly': True}, + 'version': {'readonly': True}, + 'public_key': {'readonly': True}, + 'is_identity_cert_exprired': {'readonly': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'service_token': {'key': 'serviceToken', 'type': 'str'}, + 'identity_cert_thumbprint': {'key': 'identityCertThumbprint', 'type': 'str'}, + 'host_service_uri': {'key': 'hostServiceUri', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'public_key': {'key': 'publicKey', 'type': 'str'}, + 'is_identity_cert_exprired': {'key': 'isIdentityCertExprired', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(IntegrationRuntimeConnectionInfo, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.service_token = None + self.identity_cert_thumbprint = None + self.host_service_uri = None + self.version = None + self.public_key = None + self.is_identity_cert_exprired = None + + +class IntegrationRuntimeCustomSetupScriptProperties(Model): + """Custom setup script properties for a managed dedicated integration runtime. + + :param blob_container_uri: The URI of the Azure blob container that + contains the custom setup script. + :type blob_container_uri: str + :param sas_token: The SAS token of the Azure blob container. + :type sas_token: ~azure.mgmt.synapse.models.SecureString """ _attribute_map = { - 'auth_key1': {'key': 'authKey1', 'type': 'str'}, - 'auth_key2': {'key': 'authKey2', 'type': 'str'}, + 'blob_container_uri': {'key': 'blobContainerUri', 'type': 'str'}, + 'sas_token': {'key': 'sasToken', 'type': 'SecureString'}, } def __init__(self, **kwargs): - super(IntegrationRuntimeAuthKeys, self).__init__(**kwargs) - self.auth_key1 = kwargs.get('auth_key1', None) - self.auth_key2 = kwargs.get('auth_key2', None) + super(IntegrationRuntimeCustomSetupScriptProperties, self).__init__(**kwargs) + self.blob_container_uri = kwargs.get('blob_container_uri', None) + self.sas_token = kwargs.get('sas_token', None) -class IntegrationRuntimeComputeProperties(Model): - """The compute resource properties for managed integration runtime. +class IntegrationRuntimeDataFlowProperties(Model): + """Data flow properties for managed integration runtime. :param additional_properties: Unmatched properties from the message are deserialized this collection :type additional_properties: dict[str, object] - :param location: The location for managed integration runtime. The - supported regions could be found on - https://docs.microsoft.com/en-us/azure/data-factory/data-factory-data-movement-activities - :type location: str - :param node_size: The node size requirement to managed integration - runtime. - :type node_size: str - :param number_of_nodes: The required number of nodes for managed - integration runtime. - :type number_of_nodes: int - :param max_parallel_executions_per_node: Maximum parallel executions count - per node for managed integration runtime. - :type max_parallel_executions_per_node: int - :param data_flow_properties: Data flow properties for managed integration + :param compute_type: Compute type of the cluster which will execute data + flow job. Possible values include: 'General', 'MemoryOptimized', + 'ComputeOptimized' + :type compute_type: str or ~azure.mgmt.synapse.models.DataFlowComputeType + :param core_count: Core count of the cluster which will execute data flow + job. Supported values are: 8, 16, 32, 48, 80, 144 and 272. + :type core_count: int + :param time_to_live: Time to live (in minutes) setting of the cluster + which will execute data flow job. + :type time_to_live: int + """ + + _validation = { + 'time_to_live': {'minimum': 0}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'core_count': {'key': 'coreCount', 'type': 'int'}, + 'time_to_live': {'key': 'timeToLive', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(IntegrationRuntimeDataFlowProperties, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.compute_type = kwargs.get('compute_type', None) + self.core_count = kwargs.get('core_count', None) + self.time_to_live = kwargs.get('time_to_live', None) + + +class IntegrationRuntimeDataProxyProperties(Model): + """Data proxy properties for a managed dedicated integration runtime. + + :param connect_via: The self-hosted integration runtime reference. + :type connect_via: ~azure.mgmt.synapse.models.EntityReference + :param staging_linked_service: The staging linked service reference. + :type staging_linked_service: ~azure.mgmt.synapse.models.EntityReference + :param path: The path to contain the staged data in the Blob storage. + :type path: str + """ + + _attribute_map = { + 'connect_via': {'key': 'connectVia', 'type': 'EntityReference'}, + 'staging_linked_service': {'key': 'stagingLinkedService', 'type': 'EntityReference'}, + 'path': {'key': 'path', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IntegrationRuntimeDataProxyProperties, self).__init__(**kwargs) + self.connect_via = kwargs.get('connect_via', None) + self.staging_linked_service = kwargs.get('staging_linked_service', None) + self.path = kwargs.get('path', None) + + +class IntegrationRuntimeMonitoringData(Model): + """Get monitoring data response. + + :param name: Integration runtime name. + :type name: str + :param nodes: Integration runtime node monitoring data. + :type nodes: + list[~azure.mgmt.synapse.models.IntegrationRuntimeNodeMonitoringData] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'nodes': {'key': 'nodes', 'type': '[IntegrationRuntimeNodeMonitoringData]'}, + } + + def __init__(self, **kwargs): + super(IntegrationRuntimeMonitoringData, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.nodes = kwargs.get('nodes', None) + + +class IntegrationRuntimeNodeIpAddress(Model): + """The IP address of self-hosted integration runtime node. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar ip_address: The IP address of self-hosted integration runtime node. + :vartype ip_address: str + """ + + _validation = { + 'ip_address': {'readonly': True}, + } + + _attribute_map = { + 'ip_address': {'key': 'ipAddress', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IntegrationRuntimeNodeIpAddress, self).__init__(**kwargs) + self.ip_address = None + + +class IntegrationRuntimeNodeMonitoringData(Model): + """Monitoring data for integration runtime node. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :ivar node_name: Name of the integration runtime node. + :vartype node_name: str + :ivar available_memory_in_mb: Available memory (MB) on the integration + runtime node. + :vartype available_memory_in_mb: int + :ivar cpu_utilization: CPU percentage on the integration runtime node. + :vartype cpu_utilization: int + :ivar concurrent_jobs_limit: Maximum concurrent jobs on the integration + runtime node. + :vartype concurrent_jobs_limit: int + :ivar concurrent_jobs_running: The number of jobs currently running on the + integration runtime node. + :vartype concurrent_jobs_running: int + :ivar max_concurrent_jobs: The maximum concurrent jobs in this integration runtime. - :type data_flow_properties: - ~azure.mgmt.synapse.models.IntegrationRuntimeDataFlowProperties - :param v_net_properties: VNet properties for managed integration runtime. - :type v_net_properties: - ~azure.mgmt.synapse.models.IntegrationRuntimeVNetProperties + :vartype max_concurrent_jobs: int + :ivar sent_bytes: Sent bytes on the integration runtime node. + :vartype sent_bytes: float + :ivar received_bytes: Received bytes on the integration runtime node. + :vartype received_bytes: float """ _validation = { - 'number_of_nodes': {'minimum': 1}, - 'max_parallel_executions_per_node': {'minimum': 1}, + 'node_name': {'readonly': True}, + 'available_memory_in_mb': {'readonly': True}, + 'cpu_utilization': {'readonly': True}, + 'concurrent_jobs_limit': {'readonly': True}, + 'concurrent_jobs_running': {'readonly': True}, + 'max_concurrent_jobs': {'readonly': True}, + 'sent_bytes': {'readonly': True}, + 'received_bytes': {'readonly': True}, } _attribute_map = { 'additional_properties': {'key': '', 'type': '{object}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'node_size': {'key': 'nodeSize', 'type': 'str'}, - 'number_of_nodes': {'key': 'numberOfNodes', 'type': 'int'}, - 'max_parallel_executions_per_node': {'key': 'maxParallelExecutionsPerNode', 'type': 'int'}, - 'data_flow_properties': {'key': 'dataFlowProperties', 'type': 'IntegrationRuntimeDataFlowProperties'}, - 'v_net_properties': {'key': 'vNetProperties', 'type': 'IntegrationRuntimeVNetProperties'}, + 'node_name': {'key': 'nodeName', 'type': 'str'}, + 'available_memory_in_mb': {'key': 'availableMemoryInMB', 'type': 'int'}, + 'cpu_utilization': {'key': 'cpuUtilization', 'type': 'int'}, + 'concurrent_jobs_limit': {'key': 'concurrentJobsLimit', 'type': 'int'}, + 'concurrent_jobs_running': {'key': 'concurrentJobsRunning', 'type': 'int'}, + 'max_concurrent_jobs': {'key': 'maxConcurrentJobs', 'type': 'int'}, + 'sent_bytes': {'key': 'sentBytes', 'type': 'float'}, + 'received_bytes': {'key': 'receivedBytes', 'type': 'float'}, } def __init__(self, **kwargs): - super(IntegrationRuntimeComputeProperties, self).__init__(**kwargs) + super(IntegrationRuntimeNodeMonitoringData, self).__init__(**kwargs) self.additional_properties = kwargs.get('additional_properties', None) - self.location = kwargs.get('location', None) - self.node_size = kwargs.get('node_size', None) - self.number_of_nodes = kwargs.get('number_of_nodes', None) - self.max_parallel_executions_per_node = kwargs.get('max_parallel_executions_per_node', None) - self.data_flow_properties = kwargs.get('data_flow_properties', None) - self.v_net_properties = kwargs.get('v_net_properties', None) + self.node_name = None + self.available_memory_in_mb = None + self.cpu_utilization = None + self.concurrent_jobs_limit = None + self.concurrent_jobs_running = None + self.max_concurrent_jobs = None + self.sent_bytes = None + self.received_bytes = None + + +class IntegrationRuntimeRegenerateKeyParameters(Model): + """Parameters to regenerate the authentication key. + + :param key_name: The name of the authentication key to regenerate. + Possible values include: 'authKey1', 'authKey2' + :type key_name: str or + ~azure.mgmt.synapse.models.IntegrationRuntimeAuthKeyName + """ + + _attribute_map = { + 'key_name': {'key': 'keyName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IntegrationRuntimeRegenerateKeyParameters, self).__init__(**kwargs) + self.key_name = kwargs.get('key_name', None) -class IntegrationRuntimeConnectionInfo(Model): - """Connection information for encrypting the on-premises data source - credentials. +class SubResource(AzureEntityResource): + """Azure Synapse nested resource, which belongs to a workspace. Variables are only populated by the server, and will be ignored when sending a request. - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :ivar service_token: The token generated in service. Callers use this - token to authenticate to integration runtime. - :vartype service_token: str - :ivar identity_cert_thumbprint: The integration runtime SSL certificate - thumbprint. Click-Once application uses it to do server validation. - :vartype identity_cert_thumbprint: str - :ivar host_service_uri: The on-premises integration runtime host URL. - :vartype host_service_uri: str - :ivar version: The integration runtime version. - :vartype version: str - :ivar public_key: The public key for encrypting a credential when - transferring the credential to the integration runtime. - :vartype public_key: str - :ivar is_identity_cert_exprired: Whether the identity certificate is - expired. - :vartype is_identity_cert_exprired: bool + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + :vartype type: str + :ivar etag: Resource Etag. + :vartype etag: str """ _validation = { - 'service_token': {'readonly': True}, - 'identity_cert_thumbprint': {'readonly': True}, - 'host_service_uri': {'readonly': True}, - 'version': {'readonly': True}, - 'public_key': {'readonly': True}, - 'is_identity_cert_exprired': {'readonly': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, } _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'service_token': {'key': 'serviceToken', 'type': 'str'}, - 'identity_cert_thumbprint': {'key': 'identityCertThumbprint', 'type': 'str'}, - 'host_service_uri': {'key': 'hostServiceUri', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - 'public_key': {'key': 'publicKey', 'type': 'str'}, - 'is_identity_cert_exprired': {'key': 'isIdentityCertExprired', 'type': 'bool'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, } def __init__(self, **kwargs): - super(IntegrationRuntimeConnectionInfo, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.service_token = None - self.identity_cert_thumbprint = None - self.host_service_uri = None - self.version = None - self.public_key = None - self.is_identity_cert_exprired = None + super(SubResource, self).__init__(**kwargs) -class IntegrationRuntimeCustomSetupScriptProperties(Model): - """Custom setup script properties for a managed dedicated integration runtime. +class IntegrationRuntimeResource(SubResource): + """Integration runtime resource type. - :param blob_container_uri: The URI of the Azure blob container that - contains the custom setup script. - :type blob_container_uri: str - :param sas_token: The SAS token of the Azure blob container. - :type sas_token: ~azure.mgmt.synapse.models.SecureString + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + :vartype type: str + :ivar etag: Resource Etag. + :vartype etag: str + :param properties: Required. Integration runtime properties. + :type properties: ~azure.mgmt.synapse.models.IntegrationRuntime """ + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'properties': {'required': True}, + } + _attribute_map = { - 'blob_container_uri': {'key': 'blobContainerUri', 'type': 'str'}, - 'sas_token': {'key': 'sasToken', 'type': 'SecureString'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'IntegrationRuntime'}, } def __init__(self, **kwargs): - super(IntegrationRuntimeCustomSetupScriptProperties, self).__init__(**kwargs) - self.blob_container_uri = kwargs.get('blob_container_uri', None) - self.sas_token = kwargs.get('sas_token', None) + super(IntegrationRuntimeResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) -class IntegrationRuntimeDataFlowProperties(Model): - """Data flow properties for managed integration runtime. +class IntegrationRuntimeSsisCatalogInfo(Model): + """Catalog information for managed dedicated integration runtime. :param additional_properties: Unmatched properties from the message are deserialized this collection :type additional_properties: dict[str, object] - :param compute_type: Compute type of the cluster which will execute data - flow job. Possible values include: 'General', 'MemoryOptimized', - 'ComputeOptimized' - :type compute_type: str or ~azure.mgmt.synapse.models.DataFlowComputeType - :param core_count: Core count of the cluster which will execute data flow - job. Supported values are: 8, 16, 32, 48, 80, 144 and 272. - :type core_count: int - :param time_to_live: Time to live (in minutes) setting of the cluster - which will execute data flow job. - :type time_to_live: int + :param catalog_server_endpoint: The catalog database server URL. + :type catalog_server_endpoint: str + :param catalog_admin_user_name: The administrator user name of catalog + database. + :type catalog_admin_user_name: str + :param catalog_admin_password: The password of the administrator user + account of the catalog database. + :type catalog_admin_password: ~azure.mgmt.synapse.models.SecureString + :param catalog_pricing_tier: The pricing tier for the catalog database. + The valid values could be found in + https://azure.microsoft.com/en-us/pricing/details/sql-database/. Possible + values include: 'Basic', 'Standard', 'Premium', 'PremiumRS' + :type catalog_pricing_tier: str or + ~azure.mgmt.synapse.models.IntegrationRuntimeSsisCatalogPricingTier """ _validation = { - 'time_to_live': {'minimum': 0}, + 'catalog_admin_user_name': {'max_length': 128, 'min_length': 1}, } _attribute_map = { 'additional_properties': {'key': '', 'type': '{object}'}, - 'compute_type': {'key': 'computeType', 'type': 'str'}, - 'core_count': {'key': 'coreCount', 'type': 'int'}, - 'time_to_live': {'key': 'timeToLive', 'type': 'int'}, + 'catalog_server_endpoint': {'key': 'catalogServerEndpoint', 'type': 'str'}, + 'catalog_admin_user_name': {'key': 'catalogAdminUserName', 'type': 'str'}, + 'catalog_admin_password': {'key': 'catalogAdminPassword', 'type': 'SecureString'}, + 'catalog_pricing_tier': {'key': 'catalogPricingTier', 'type': 'str'}, } def __init__(self, **kwargs): - super(IntegrationRuntimeDataFlowProperties, self).__init__(**kwargs) + super(IntegrationRuntimeSsisCatalogInfo, self).__init__(**kwargs) self.additional_properties = kwargs.get('additional_properties', None) - self.compute_type = kwargs.get('compute_type', None) - self.core_count = kwargs.get('core_count', None) - self.time_to_live = kwargs.get('time_to_live', None) + self.catalog_server_endpoint = kwargs.get('catalog_server_endpoint', None) + self.catalog_admin_user_name = kwargs.get('catalog_admin_user_name', None) + self.catalog_admin_password = kwargs.get('catalog_admin_password', None) + self.catalog_pricing_tier = kwargs.get('catalog_pricing_tier', None) -class IntegrationRuntimeDataProxyProperties(Model): - """Data proxy properties for a managed dedicated integration runtime. +class IntegrationRuntimeSsisProperties(Model): + """SSIS properties for managed integration runtime. - :param connect_via: The self-hosted integration runtime reference. - :type connect_via: ~azure.mgmt.synapse.models.EntityReference - :param staging_linked_service: The staging linked service reference. - :type staging_linked_service: ~azure.mgmt.synapse.models.EntityReference - :param path: The path to contain the staged data in the Blob storage. - :type path: str + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param catalog_info: Catalog information for managed dedicated integration + runtime. + :type catalog_info: + ~azure.mgmt.synapse.models.IntegrationRuntimeSsisCatalogInfo + :param license_type: License type for bringing your own license scenario. + Possible values include: 'BasePrice', 'LicenseIncluded' + :type license_type: str or + ~azure.mgmt.synapse.models.IntegrationRuntimeLicenseType + :param custom_setup_script_properties: Custom setup script properties for + a managed dedicated integration runtime. + :type custom_setup_script_properties: + ~azure.mgmt.synapse.models.IntegrationRuntimeCustomSetupScriptProperties + :param data_proxy_properties: Data proxy properties for a managed + dedicated integration runtime. + :type data_proxy_properties: + ~azure.mgmt.synapse.models.IntegrationRuntimeDataProxyProperties + :param edition: The edition for the SSIS Integration Runtime. Possible + values include: 'Standard', 'Enterprise' + :type edition: str or ~azure.mgmt.synapse.models.IntegrationRuntimeEdition + :param express_custom_setup_properties: Custom setup without script + properties for a SSIS integration runtime. + :type express_custom_setup_properties: + list[~azure.mgmt.synapse.models.CustomSetupBase] """ _attribute_map = { - 'connect_via': {'key': 'connectVia', 'type': 'EntityReference'}, - 'staging_linked_service': {'key': 'stagingLinkedService', 'type': 'EntityReference'}, - 'path': {'key': 'path', 'type': 'str'}, + 'additional_properties': {'key': '', 'type': '{object}'}, + 'catalog_info': {'key': 'catalogInfo', 'type': 'IntegrationRuntimeSsisCatalogInfo'}, + 'license_type': {'key': 'licenseType', 'type': 'str'}, + 'custom_setup_script_properties': {'key': 'customSetupScriptProperties', 'type': 'IntegrationRuntimeCustomSetupScriptProperties'}, + 'data_proxy_properties': {'key': 'dataProxyProperties', 'type': 'IntegrationRuntimeDataProxyProperties'}, + 'edition': {'key': 'edition', 'type': 'str'}, + 'express_custom_setup_properties': {'key': 'expressCustomSetupProperties', 'type': '[CustomSetupBase]'}, } def __init__(self, **kwargs): - super(IntegrationRuntimeDataProxyProperties, self).__init__(**kwargs) - self.connect_via = kwargs.get('connect_via', None) - self.staging_linked_service = kwargs.get('staging_linked_service', None) - self.path = kwargs.get('path', None) - - -class IntegrationRuntimeMonitoringData(Model): - """Get monitoring data response. - - :param name: Integration runtime name. - :type name: str - :param nodes: Integration runtime node monitoring data. - :type nodes: - list[~azure.mgmt.synapse.models.IntegrationRuntimeNodeMonitoringData] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'nodes': {'key': 'nodes', 'type': '[IntegrationRuntimeNodeMonitoringData]'}, - } + super(IntegrationRuntimeSsisProperties, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.catalog_info = kwargs.get('catalog_info', None) + self.license_type = kwargs.get('license_type', None) + self.custom_setup_script_properties = kwargs.get('custom_setup_script_properties', None) + self.data_proxy_properties = kwargs.get('data_proxy_properties', None) + self.edition = kwargs.get('edition', None) + self.express_custom_setup_properties = kwargs.get('express_custom_setup_properties', None) - def __init__(self, **kwargs): - super(IntegrationRuntimeMonitoringData, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.nodes = kwargs.get('nodes', None) +class IntegrationRuntimeStatus(Model): + """Integration runtime status. -class IntegrationRuntimeNodeIpAddress(Model): - """The IP address of self-hosted integration runtime node. + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ManagedIntegrationRuntimeStatus, + SelfHostedIntegrationRuntimeStatus Variables are only populated by the server, and will be ignored when sending a request. - :ivar ip_address: The IP address of self-hosted integration runtime node. - :vartype ip_address: str + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :ivar data_factory_name: The workspace name which the integration runtime + belong to. + :vartype data_factory_name: str + :ivar state: The state of integration runtime. Possible values include: + 'Initial', 'Stopped', 'Started', 'Starting', 'Stopping', + 'NeedRegistration', 'Online', 'Limited', 'Offline', 'AccessDenied' + :vartype state: str or ~azure.mgmt.synapse.models.IntegrationRuntimeState + :param type: Required. Constant filled by server. + :type type: str """ _validation = { - 'ip_address': {'readonly': True}, + 'data_factory_name': {'readonly': True}, + 'state': {'readonly': True}, + 'type': {'required': True}, } _attribute_map = { - 'ip_address': {'key': 'ipAddress', 'type': 'str'}, + 'additional_properties': {'key': '', 'type': '{object}'}, + 'data_factory_name': {'key': 'dataFactoryName', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'Managed': 'ManagedIntegrationRuntimeStatus', 'SelfHosted': 'SelfHostedIntegrationRuntimeStatus'} } def __init__(self, **kwargs): - super(IntegrationRuntimeNodeIpAddress, self).__init__(**kwargs) - self.ip_address = None + super(IntegrationRuntimeStatus, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.data_factory_name = None + self.state = None + self.type = None -class IntegrationRuntimeNodeMonitoringData(Model): - """Monitoring data for integration runtime node. +class IntegrationRuntimeStatusResponse(Model): + """Integration runtime status response. Variables are only populated by the server, and will be ignored when sending a request. - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :ivar node_name: Name of the integration runtime node. - :vartype node_name: str - :ivar available_memory_in_mb: Available memory (MB) on the integration - runtime node. - :vartype available_memory_in_mb: int - :ivar cpu_utilization: CPU percentage on the integration runtime node. - :vartype cpu_utilization: int - :ivar concurrent_jobs_limit: Maximum concurrent jobs on the integration - runtime node. - :vartype concurrent_jobs_limit: int - :ivar concurrent_jobs_running: The number of jobs currently running on the - integration runtime node. - :vartype concurrent_jobs_running: int - :ivar max_concurrent_jobs: The maximum concurrent jobs in this integration - runtime. - :vartype max_concurrent_jobs: int - :ivar sent_bytes: Sent bytes on the integration runtime node. - :vartype sent_bytes: float - :ivar received_bytes: Received bytes on the integration runtime node. - :vartype received_bytes: float + All required parameters must be populated in order to send to Azure. + + :ivar name: The integration runtime name. + :vartype name: str + :param properties: Required. Integration runtime properties. + :type properties: ~azure.mgmt.synapse.models.IntegrationRuntimeStatus """ _validation = { - 'node_name': {'readonly': True}, - 'available_memory_in_mb': {'readonly': True}, - 'cpu_utilization': {'readonly': True}, - 'concurrent_jobs_limit': {'readonly': True}, - 'concurrent_jobs_running': {'readonly': True}, - 'max_concurrent_jobs': {'readonly': True}, - 'sent_bytes': {'readonly': True}, - 'received_bytes': {'readonly': True}, + 'name': {'readonly': True}, + 'properties': {'required': True}, } _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'node_name': {'key': 'nodeName', 'type': 'str'}, - 'available_memory_in_mb': {'key': 'availableMemoryInMB', 'type': 'int'}, - 'cpu_utilization': {'key': 'cpuUtilization', 'type': 'int'}, - 'concurrent_jobs_limit': {'key': 'concurrentJobsLimit', 'type': 'int'}, - 'concurrent_jobs_running': {'key': 'concurrentJobsRunning', 'type': 'int'}, - 'max_concurrent_jobs': {'key': 'maxConcurrentJobs', 'type': 'int'}, - 'sent_bytes': {'key': 'sentBytes', 'type': 'float'}, - 'received_bytes': {'key': 'receivedBytes', 'type': 'float'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'IntegrationRuntimeStatus'}, } def __init__(self, **kwargs): - super(IntegrationRuntimeNodeMonitoringData, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.node_name = None - self.available_memory_in_mb = None - self.cpu_utilization = None - self.concurrent_jobs_limit = None - self.concurrent_jobs_running = None - self.max_concurrent_jobs = None - self.sent_bytes = None - self.received_bytes = None + super(IntegrationRuntimeStatusResponse, self).__init__(**kwargs) + self.name = None + self.properties = kwargs.get('properties', None) -class IntegrationRuntimeRegenerateKeyParameters(Model): - """Parameters to regenerate the authentication key. +class IntegrationRuntimeVNetProperties(Model): + """VNet properties for managed integration runtime. - :param key_name: The name of the authentication key to regenerate. - Possible values include: 'authKey1', 'authKey2' - :type key_name: str or - ~azure.mgmt.synapse.models.IntegrationRuntimeAuthKeyName + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param v_net_id: The ID of the VNet that this integration runtime will + join. + :type v_net_id: str + :param subnet: The name of the subnet this integration runtime will join. + :type subnet: str + :param public_ips: Resource IDs of the public IP addresses that this + integration runtime will use. + :type public_ips: list[str] """ _attribute_map = { - 'key_name': {'key': 'keyName', 'type': 'str'}, + 'additional_properties': {'key': '', 'type': '{object}'}, + 'v_net_id': {'key': 'vNetId', 'type': 'str'}, + 'subnet': {'key': 'subnet', 'type': 'str'}, + 'public_ips': {'key': 'publicIPs', 'type': '[str]'}, } def __init__(self, **kwargs): - super(IntegrationRuntimeRegenerateKeyParameters, self).__init__(**kwargs) - self.key_name = kwargs.get('key_name', None) + super(IntegrationRuntimeVNetProperties, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.v_net_id = kwargs.get('v_net_id', None) + self.subnet = kwargs.get('subnet', None) + self.public_ips = kwargs.get('public_ips', None) -class SubResource(AzureEntityResource): - """Azure Synapse nested resource, which belongs to a workspace. +class IpFirewallRuleInfo(ProxyResource): + """IP firewall rule. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str - :ivar etag: Resource Etag. - :vartype etag: str + :param end_ip_address: The end IP address of the firewall rule. Must be + IPv4 format. Must be greater than or equal to startIpAddress + :type end_ip_address: str + :ivar provisioning_state: Resource provisioning state. Possible values + include: 'Provisioning', 'Succeeded', 'Deleting', 'Failed', 'DeleteError' + :vartype provisioning_state: str or + ~azure.mgmt.synapse.models.ProvisioningState + :param start_ip_address: The start IP address of the firewall rule. Must + be IPv4 format + :type start_ip_address: str """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, + 'end_ip_address': {'key': 'properties.endIpAddress', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'start_ip_address': {'key': 'properties.startIpAddress', 'type': 'str'}, } def __init__(self, **kwargs): - super(SubResource, self).__init__(**kwargs) + super(IpFirewallRuleInfo, self).__init__(**kwargs) + self.end_ip_address = kwargs.get('end_ip_address', None) + self.provisioning_state = None + self.start_ip_address = kwargs.get('start_ip_address', None) -class IntegrationRuntimeResource(SubResource): - """Integration runtime resource type. +class IpFirewallRuleProperties(Model): + """IP firewall rule properties. Variables are only populated by the server, and will be ignored when sending a request. - All required parameters must be populated in order to send to Azure. + :param end_ip_address: The end IP address of the firewall rule. Must be + IPv4 format. Must be greater than or equal to startIpAddress + :type end_ip_address: str + :ivar provisioning_state: Resource provisioning state. Possible values + include: 'Provisioning', 'Succeeded', 'Deleting', 'Failed', 'DeleteError' + :vartype provisioning_state: str or + ~azure.mgmt.synapse.models.ProvisioningState + :param start_ip_address: The start IP address of the firewall rule. Must + be IPv4 format + :type start_ip_address: str + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'end_ip_address': {'key': 'endIpAddress', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'start_ip_address': {'key': 'startIpAddress', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IpFirewallRuleProperties, self).__init__(**kwargs) + self.end_ip_address = kwargs.get('end_ip_address', None) + self.provisioning_state = None + self.start_ip_address = kwargs.get('start_ip_address', None) + + +class Key(ProxyResource): + """A workspace key. - :ivar id: Fully qualified resource Id for the resource. Ex - + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str - :ivar etag: Resource Etag. - :vartype etag: str - :param properties: Required. Integration runtime properties. - :type properties: ~azure.mgmt.synapse.models.IntegrationRuntime + :param is_active_cmk: Used to activate the workspace after a customer + managed key is provided. + :type is_active_cmk: bool + :param key_vault_url: The Key Vault Url of the workspace key. + :type key_vault_url: str """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'etag': {'readonly': True}, - 'properties': {'required': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'IntegrationRuntime'}, + 'is_active_cmk': {'key': 'properties.isActiveCMK', 'type': 'bool'}, + 'key_vault_url': {'key': 'properties.keyVaultUrl', 'type': 'str'}, } def __init__(self, **kwargs): - super(IntegrationRuntimeResource, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) + super(Key, self).__init__(**kwargs) + self.is_active_cmk = kwargs.get('is_active_cmk', None) + self.key_vault_url = kwargs.get('key_vault_url', None) -class IntegrationRuntimeSsisCatalogInfo(Model): - """Catalog information for managed dedicated integration runtime. +class LibraryRequirements(Model): + """Spark pool library version requirements. - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param catalog_server_endpoint: The catalog database server URL. - :type catalog_server_endpoint: str - :param catalog_admin_user_name: The administrator user name of catalog - database. - :type catalog_admin_user_name: str - :param catalog_admin_password: The password of the administrator user - account of the catalog database. - :type catalog_admin_password: ~azure.mgmt.synapse.models.SecureString - :param catalog_pricing_tier: The pricing tier for the catalog database. - The valid values could be found in - https://azure.microsoft.com/en-us/pricing/details/sql-database/. Possible - values include: 'Basic', 'Standard', 'Premium', 'PremiumRS' - :type catalog_pricing_tier: str or - ~azure.mgmt.synapse.models.IntegrationRuntimeSsisCatalogPricingTier + Library requirements for a Big Data pool powered by Apache Spark. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar time: The last update time of the library requirements file. + :vartype time: datetime + :param content: The library requirements. + :type content: str + :param filename: The filename of the library requirements file. + :type filename: str + """ + + _validation = { + 'time': {'readonly': True}, + } + + _attribute_map = { + 'time': {'key': 'time', 'type': 'iso-8601'}, + 'content': {'key': 'content', 'type': 'str'}, + 'filename': {'key': 'filename', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LibraryRequirements, self).__init__(**kwargs) + self.time = None + self.content = kwargs.get('content', None) + self.filename = kwargs.get('filename', None) + + +class LinkedIntegrationRuntime(Model): + """The linked integration runtime information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the linked integration runtime. + :vartype name: str + :ivar subscription_id: The subscription ID for which the linked + integration runtime belong to. + :vartype subscription_id: str + :ivar data_factory_name: The name of the workspace for which the linked + integration runtime belong to. + :vartype data_factory_name: str + :ivar data_factory_location: The location of the workspace for which the + linked integration runtime belong to. + :vartype data_factory_location: str + :ivar create_time: The creating time of the linked integration runtime. + :vartype create_time: datetime """ _validation = { - 'catalog_admin_user_name': {'max_length': 128, 'min_length': 1}, + 'name': {'readonly': True}, + 'subscription_id': {'readonly': True}, + 'data_factory_name': {'readonly': True}, + 'data_factory_location': {'readonly': True}, + 'create_time': {'readonly': True}, } _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'catalog_server_endpoint': {'key': 'catalogServerEndpoint', 'type': 'str'}, - 'catalog_admin_user_name': {'key': 'catalogAdminUserName', 'type': 'str'}, - 'catalog_admin_password': {'key': 'catalogAdminPassword', 'type': 'SecureString'}, - 'catalog_pricing_tier': {'key': 'catalogPricingTier', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'data_factory_name': {'key': 'dataFactoryName', 'type': 'str'}, + 'data_factory_location': {'key': 'dataFactoryLocation', 'type': 'str'}, + 'create_time': {'key': 'createTime', 'type': 'iso-8601'}, } def __init__(self, **kwargs): - super(IntegrationRuntimeSsisCatalogInfo, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.catalog_server_endpoint = kwargs.get('catalog_server_endpoint', None) - self.catalog_admin_user_name = kwargs.get('catalog_admin_user_name', None) - self.catalog_admin_password = kwargs.get('catalog_admin_password', None) - self.catalog_pricing_tier = kwargs.get('catalog_pricing_tier', None) + super(LinkedIntegrationRuntime, self).__init__(**kwargs) + self.name = None + self.subscription_id = None + self.data_factory_name = None + self.data_factory_location = None + self.create_time = None -class IntegrationRuntimeSsisProperties(Model): - """SSIS properties for managed integration runtime. +class LinkedIntegrationRuntimeType(Model): + """The base definition of a linked integration runtime. - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param catalog_info: Catalog information for managed dedicated integration - runtime. - :type catalog_info: - ~azure.mgmt.synapse.models.IntegrationRuntimeSsisCatalogInfo - :param license_type: License type for bringing your own license scenario. - Possible values include: 'BasePrice', 'LicenseIncluded' - :type license_type: str or - ~azure.mgmt.synapse.models.IntegrationRuntimeLicenseType - :param custom_setup_script_properties: Custom setup script properties for - a managed dedicated integration runtime. - :type custom_setup_script_properties: - ~azure.mgmt.synapse.models.IntegrationRuntimeCustomSetupScriptProperties - :param data_proxy_properties: Data proxy properties for a managed - dedicated integration runtime. - :type data_proxy_properties: - ~azure.mgmt.synapse.models.IntegrationRuntimeDataProxyProperties - :param edition: The edition for the SSIS Integration Runtime. Possible - values include: 'Standard', 'Enterprise' - :type edition: str or ~azure.mgmt.synapse.models.IntegrationRuntimeEdition - :param express_custom_setup_properties: Custom setup without script - properties for a SSIS integration runtime. - :type express_custom_setup_properties: - list[~azure.mgmt.synapse.models.CustomSetupBase] + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: LinkedIntegrationRuntimeKeyAuthorization, + LinkedIntegrationRuntimeRbacAuthorization + + All required parameters must be populated in order to send to Azure. + + :param authorization_type: Required. Constant filled by server. + :type authorization_type: str """ - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'catalog_info': {'key': 'catalogInfo', 'type': 'IntegrationRuntimeSsisCatalogInfo'}, - 'license_type': {'key': 'licenseType', 'type': 'str'}, - 'custom_setup_script_properties': {'key': 'customSetupScriptProperties', 'type': 'IntegrationRuntimeCustomSetupScriptProperties'}, - 'data_proxy_properties': {'key': 'dataProxyProperties', 'type': 'IntegrationRuntimeDataProxyProperties'}, - 'edition': {'key': 'edition', 'type': 'str'}, - 'express_custom_setup_properties': {'key': 'expressCustomSetupProperties', 'type': '[CustomSetupBase]'}, + _validation = { + 'authorization_type': {'required': True}, } - def __init__(self, **kwargs): - super(IntegrationRuntimeSsisProperties, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.catalog_info = kwargs.get('catalog_info', None) - self.license_type = kwargs.get('license_type', None) - self.custom_setup_script_properties = kwargs.get('custom_setup_script_properties', None) - self.data_proxy_properties = kwargs.get('data_proxy_properties', None) - self.edition = kwargs.get('edition', None) - self.express_custom_setup_properties = kwargs.get('express_custom_setup_properties', None) + _attribute_map = { + 'authorization_type': {'key': 'authorizationType', 'type': 'str'}, + } + _subtype_map = { + 'authorization_type': {'Key': 'LinkedIntegrationRuntimeKeyAuthorization', 'RBAC': 'LinkedIntegrationRuntimeRbacAuthorization'} + } -class IntegrationRuntimeStatus(Model): - """Integration runtime status. + def __init__(self, **kwargs): + super(LinkedIntegrationRuntimeType, self).__init__(**kwargs) + self.authorization_type = None - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ManagedIntegrationRuntimeStatus, - SelfHostedIntegrationRuntimeStatus - Variables are only populated by the server, and will be ignored when - sending a request. +class LinkedIntegrationRuntimeKeyAuthorization(LinkedIntegrationRuntimeType): + """The key authorization type integration runtime. All required parameters must be populated in order to send to Azure. - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :ivar data_factory_name: The workspace name which the integration runtime - belong to. - :vartype data_factory_name: str - :ivar state: The state of integration runtime. Possible values include: - 'Initial', 'Stopped', 'Started', 'Starting', 'Stopping', - 'NeedRegistration', 'Online', 'Limited', 'Offline', 'AccessDenied' - :vartype state: str or ~azure.mgmt.synapse.models.IntegrationRuntimeState - :param type: Required. Constant filled by server. - :type type: str + :param authorization_type: Required. Constant filled by server. + :type authorization_type: str + :param key: Required. The key used for authorization. + :type key: ~azure.mgmt.synapse.models.SecureString """ _validation = { - 'data_factory_name': {'readonly': True}, - 'state': {'readonly': True}, - 'type': {'required': True}, + 'authorization_type': {'required': True}, + 'key': {'required': True}, } _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'data_factory_name': {'key': 'dataFactoryName', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - _subtype_map = { - 'type': {'Managed': 'ManagedIntegrationRuntimeStatus', 'SelfHosted': 'SelfHostedIntegrationRuntimeStatus'} + 'authorization_type': {'key': 'authorizationType', 'type': 'str'}, + 'key': {'key': 'key', 'type': 'SecureString'}, } def __init__(self, **kwargs): - super(IntegrationRuntimeStatus, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.data_factory_name = None - self.state = None - self.type = None - + super(LinkedIntegrationRuntimeKeyAuthorization, self).__init__(**kwargs) + self.key = kwargs.get('key', None) + self.authorization_type = 'Key' -class IntegrationRuntimeStatusResponse(Model): - """Integration runtime status response. - Variables are only populated by the server, and will be ignored when - sending a request. +class LinkedIntegrationRuntimeRbacAuthorization(LinkedIntegrationRuntimeType): + """The role based access control (RBAC) authorization type integration + runtime. All required parameters must be populated in order to send to Azure. - :ivar name: The integration runtime name. - :vartype name: str - :param properties: Required. Integration runtime properties. - :type properties: ~azure.mgmt.synapse.models.IntegrationRuntimeStatus + :param authorization_type: Required. Constant filled by server. + :type authorization_type: str + :param resource_id: Required. The resource identifier of the integration + runtime to be shared. + :type resource_id: str """ _validation = { - 'name': {'readonly': True}, - 'properties': {'required': True}, + 'authorization_type': {'required': True}, + 'resource_id': {'required': True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'IntegrationRuntimeStatus'}, + 'authorization_type': {'key': 'authorizationType', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, } def __init__(self, **kwargs): - super(IntegrationRuntimeStatusResponse, self).__init__(**kwargs) - self.name = None - self.properties = kwargs.get('properties', None) + super(LinkedIntegrationRuntimeRbacAuthorization, self).__init__(**kwargs) + self.resource_id = kwargs.get('resource_id', None) + self.authorization_type = 'RBAC' -class IntegrationRuntimeVNetProperties(Model): - """VNet properties for managed integration runtime. +class ManagedIdentity(Model): + """The workspace managed identity. - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param v_net_id: The ID of the VNet that this integration runtime will - join. - :type v_net_id: str - :param subnet: The name of the subnet this integration runtime will join. - :type subnet: str - :param public_ips: Resource IDs of the public IP addresses that this - integration runtime will use. - :type public_ips: list[str] + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal ID of the workspace managed identity + :vartype principal_id: str + :ivar tenant_id: The tenant ID of the workspace managed identity + :vartype tenant_id: str + :param type: The type of managed identity for the workspace. Possible + values include: 'None', 'SystemAssigned' + :type type: str or ~azure.mgmt.synapse.models.ResourceIdentityType """ + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'v_net_id': {'key': 'vNetId', 'type': 'str'}, - 'subnet': {'key': 'subnet', 'type': 'str'}, - 'public_ips': {'key': 'publicIPs', 'type': '[str]'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, } def __init__(self, **kwargs): - super(IntegrationRuntimeVNetProperties, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.v_net_id = kwargs.get('v_net_id', None) - self.subnet = kwargs.get('subnet', None) - self.public_ips = kwargs.get('public_ips', None) + super(ManagedIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = kwargs.get('type', None) -class IpFirewallRuleInfo(ProxyResource): - """IP firewall rule. +class ManagedIdentitySqlControlSettingsModel(ProxyResource): + """Managed Identity Sql Control Settings. + + Sql Control Settings for workspace managed identity. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str - :param end_ip_address: The end IP address of the firewall rule. Must be - IPv4 format. Must be greater than or equal to startIpAddress - :type end_ip_address: str - :ivar provisioning_state: Resource provisioning state. Possible values - include: 'Provisioning', 'Succeeded', 'Deleting', 'Failed', 'DeleteError' - :vartype provisioning_state: str or - ~azure.mgmt.synapse.models.ProvisioningState - :param start_ip_address: The start IP address of the firewall rule. Must - be IPv4 format - :type start_ip_address: str + :param grant_sql_control_to_managed_identity: Grant sql control to managed + identity + :type grant_sql_control_to_managed_identity: + ~azure.mgmt.synapse.models.ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentity """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'end_ip_address': {'key': 'properties.endIpAddress', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'start_ip_address': {'key': 'properties.startIpAddress', 'type': 'str'}, + 'grant_sql_control_to_managed_identity': {'key': 'properties.grantSqlControlToManagedIdentity', 'type': 'ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentity'}, } def __init__(self, **kwargs): - super(IpFirewallRuleInfo, self).__init__(**kwargs) - self.end_ip_address = kwargs.get('end_ip_address', None) - self.provisioning_state = None - self.start_ip_address = kwargs.get('start_ip_address', None) + super(ManagedIdentitySqlControlSettingsModel, self).__init__(**kwargs) + self.grant_sql_control_to_managed_identity = kwargs.get('grant_sql_control_to_managed_identity', None) -class IpFirewallRuleProperties(Model): - """IP firewall rule properties. +class ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentity(Model): + """Grant sql control to managed identity. Variables are only populated by the server, and will be ignored when sending a request. - :param end_ip_address: The end IP address of the firewall rule. Must be - IPv4 format. Must be greater than or equal to startIpAddress - :type end_ip_address: str - :ivar provisioning_state: Resource provisioning state. Possible values - include: 'Provisioning', 'Succeeded', 'Deleting', 'Failed', 'DeleteError' - :vartype provisioning_state: str or - ~azure.mgmt.synapse.models.ProvisioningState - :param start_ip_address: The start IP address of the firewall rule. Must - be IPv4 format - :type start_ip_address: str + :param desired_state: Desired state. Possible values include: 'Enabled', + 'Disabled' + :type desired_state: str or ~azure.mgmt.synapse.models.enum + :ivar actual_state: Actual state. Possible values include: 'Enabling', + 'Enabled', 'Disabling', 'Disabled', 'Unknown' + :vartype actual_state: str or ~azure.mgmt.synapse.models.enum """ _validation = { - 'provisioning_state': {'readonly': True}, + 'actual_state': {'readonly': True}, } _attribute_map = { - 'end_ip_address': {'key': 'endIpAddress', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'start_ip_address': {'key': 'startIpAddress', 'type': 'str'}, + 'desired_state': {'key': 'desiredState', 'type': 'str'}, + 'actual_state': {'key': 'actualState', 'type': 'str'}, } def __init__(self, **kwargs): - super(IpFirewallRuleProperties, self).__init__(**kwargs) - self.end_ip_address = kwargs.get('end_ip_address', None) - self.provisioning_state = None - self.start_ip_address = kwargs.get('start_ip_address', None) - + super(ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentity, self).__init__(**kwargs) + self.desired_state = kwargs.get('desired_state', None) + self.actual_state = None -class LibraryRequirements(Model): - """Spark pool library version requirements. - Library requirements for a Big Data pool powered by Apache Spark. +class ManagedIntegrationRuntime(IntegrationRuntime): + """Managed integration runtime, including managed elastic and managed + dedicated integration runtimes. Variables are only populated by the server, and will be ignored when sending a request. - :ivar time: The last update time of the library requirements file. - :vartype time: datetime - :param content: The library requirements. - :type content: str - :param filename: The filename of the library requirements file. - :type filename: str + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Integration runtime description. + :type description: str + :param type: Required. Constant filled by server. + :type type: str + :ivar state: Integration runtime state, only valid for managed dedicated + integration runtime. Possible values include: 'Initial', 'Stopped', + 'Started', 'Starting', 'Stopping', 'NeedRegistration', 'Online', + 'Limited', 'Offline', 'AccessDenied' + :vartype state: str or ~azure.mgmt.synapse.models.IntegrationRuntimeState + :param compute_properties: The compute resource for managed integration + runtime. + :type compute_properties: + ~azure.mgmt.synapse.models.IntegrationRuntimeComputeProperties + :param ssis_properties: SSIS properties for managed integration runtime. + :type ssis_properties: + ~azure.mgmt.synapse.models.IntegrationRuntimeSsisProperties """ _validation = { - 'time': {'readonly': True}, + 'type': {'required': True}, + 'state': {'readonly': True}, } _attribute_map = { - 'time': {'key': 'time', 'type': 'iso-8601'}, - 'content': {'key': 'content', 'type': 'str'}, - 'filename': {'key': 'filename', 'type': 'str'}, + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'compute_properties': {'key': 'typeProperties.computeProperties', 'type': 'IntegrationRuntimeComputeProperties'}, + 'ssis_properties': {'key': 'typeProperties.ssisProperties', 'type': 'IntegrationRuntimeSsisProperties'}, } def __init__(self, **kwargs): - super(LibraryRequirements, self).__init__(**kwargs) - self.time = None - self.content = kwargs.get('content', None) - self.filename = kwargs.get('filename', None) + super(ManagedIntegrationRuntime, self).__init__(**kwargs) + self.state = None + self.compute_properties = kwargs.get('compute_properties', None) + self.ssis_properties = kwargs.get('ssis_properties', None) + self.type = 'Managed' -class LinkedIntegrationRuntime(Model): - """The linked integration runtime information. +class ManagedIntegrationRuntimeError(Model): + """Error definition for managed integration runtime. Variables are only populated by the server, and will be ignored when sending a request. - :ivar name: The name of the linked integration runtime. - :vartype name: str - :ivar subscription_id: The subscription ID for which the linked - integration runtime belong to. - :vartype subscription_id: str - :ivar data_factory_name: The name of the workspace for which the linked - integration runtime belong to. - :vartype data_factory_name: str - :ivar data_factory_location: The location of the workspace for which the - linked integration runtime belong to. - :vartype data_factory_location: str - :ivar create_time: The creating time of the linked integration runtime. - :vartype create_time: datetime + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :ivar time: The time when the error occurred. + :vartype time: datetime + :ivar code: Error code. + :vartype code: str + :ivar parameters: Managed integration runtime error parameters. + :vartype parameters: list[str] + :ivar message: Error message. + :vartype message: str """ _validation = { - 'name': {'readonly': True}, - 'subscription_id': {'readonly': True}, - 'data_factory_name': {'readonly': True}, - 'data_factory_location': {'readonly': True}, - 'create_time': {'readonly': True}, + 'time': {'readonly': True}, + 'code': {'readonly': True}, + 'parameters': {'readonly': True}, + 'message': {'readonly': True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'data_factory_name': {'key': 'dataFactoryName', 'type': 'str'}, - 'data_factory_location': {'key': 'dataFactoryLocation', 'type': 'str'}, - 'create_time': {'key': 'createTime', 'type': 'iso-8601'}, + 'additional_properties': {'key': '', 'type': '{object}'}, + 'time': {'key': 'time', 'type': 'iso-8601'}, + 'code': {'key': 'code', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[str]'}, + 'message': {'key': 'message', 'type': 'str'}, } def __init__(self, **kwargs): - super(LinkedIntegrationRuntime, self).__init__(**kwargs) - self.name = None - self.subscription_id = None - self.data_factory_name = None - self.data_factory_location = None - self.create_time = None - + super(ManagedIntegrationRuntimeError, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.time = None + self.code = None + self.parameters = None + self.message = None -class LinkedIntegrationRuntimeType(Model): - """The base definition of a linked integration runtime. - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: LinkedIntegrationRuntimeKeyAuthorization, - LinkedIntegrationRuntimeRbacAuthorization +class ManagedIntegrationRuntimeNode(Model): + """Properties of integration runtime node. - All required parameters must be populated in order to send to Azure. + Variables are only populated by the server, and will be ignored when + sending a request. - :param authorization_type: Required. Constant filled by server. - :type authorization_type: str + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :ivar node_id: The managed integration runtime node id. + :vartype node_id: str + :ivar status: The managed integration runtime node status. Possible values + include: 'Starting', 'Available', 'Recycling', 'Unavailable' + :vartype status: str or + ~azure.mgmt.synapse.models.ManagedIntegrationRuntimeNodeStatus + :param errors: The errors that occurred on this integration runtime node. + :type errors: + list[~azure.mgmt.synapse.models.ManagedIntegrationRuntimeError] """ _validation = { - 'authorization_type': {'required': True}, + 'node_id': {'readonly': True}, + 'status': {'readonly': True}, } _attribute_map = { - 'authorization_type': {'key': 'authorizationType', 'type': 'str'}, - } - - _subtype_map = { - 'authorization_type': {'Key': 'LinkedIntegrationRuntimeKeyAuthorization', 'RBAC': 'LinkedIntegrationRuntimeRbacAuthorization'} + 'additional_properties': {'key': '', 'type': '{object}'}, + 'node_id': {'key': 'nodeId', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ManagedIntegrationRuntimeError]'}, } def __init__(self, **kwargs): - super(LinkedIntegrationRuntimeType, self).__init__(**kwargs) - self.authorization_type = None + super(ManagedIntegrationRuntimeNode, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.node_id = None + self.status = None + self.errors = kwargs.get('errors', None) -class LinkedIntegrationRuntimeKeyAuthorization(LinkedIntegrationRuntimeType): - """The key authorization type integration runtime. +class ManagedIntegrationRuntimeOperationResult(Model): + """Properties of managed integration runtime operation result. - All required parameters must be populated in order to send to Azure. + Variables are only populated by the server, and will be ignored when + sending a request. - :param authorization_type: Required. Constant filled by server. - :type authorization_type: str - :param key: Required. The key used for authorization. - :type key: ~azure.mgmt.synapse.models.SecureString + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :ivar type: The operation type. Could be start or stop. + :vartype type: str + :ivar start_time: The start time of the operation. + :vartype start_time: datetime + :ivar result: The operation result. + :vartype result: str + :ivar error_code: The error code. + :vartype error_code: str + :ivar parameters: Managed integration runtime error parameters. + :vartype parameters: list[str] + :ivar activity_id: The activity id for the operation request. + :vartype activity_id: str """ _validation = { - 'authorization_type': {'required': True}, - 'key': {'required': True}, + 'type': {'readonly': True}, + 'start_time': {'readonly': True}, + 'result': {'readonly': True}, + 'error_code': {'readonly': True}, + 'parameters': {'readonly': True}, + 'activity_id': {'readonly': True}, } _attribute_map = { - 'authorization_type': {'key': 'authorizationType', 'type': 'str'}, - 'key': {'key': 'key', 'type': 'SecureString'}, + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'result': {'key': 'result', 'type': 'str'}, + 'error_code': {'key': 'errorCode', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[str]'}, + 'activity_id': {'key': 'activityId', 'type': 'str'}, } def __init__(self, **kwargs): - super(LinkedIntegrationRuntimeKeyAuthorization, self).__init__(**kwargs) - self.key = kwargs.get('key', None) - self.authorization_type = 'Key' - + super(ManagedIntegrationRuntimeOperationResult, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.type = None + self.start_time = None + self.result = None + self.error_code = None + self.parameters = None + self.activity_id = None -class LinkedIntegrationRuntimeRbacAuthorization(LinkedIntegrationRuntimeType): - """The role based access control (RBAC) authorization type integration - runtime. - All required parameters must be populated in order to send to Azure. +class ManagedIntegrationRuntimeStatus(IntegrationRuntimeStatus): + """Managed integration runtime status. - :param authorization_type: Required. Constant filled by server. - :type authorization_type: str - :param resource_id: Required. The resource identifier of the integration - runtime to be shared. - :type resource_id: str + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :ivar data_factory_name: The workspace name which the integration runtime + belong to. + :vartype data_factory_name: str + :ivar state: The state of integration runtime. Possible values include: + 'Initial', 'Stopped', 'Started', 'Starting', 'Stopping', + 'NeedRegistration', 'Online', 'Limited', 'Offline', 'AccessDenied' + :vartype state: str or ~azure.mgmt.synapse.models.IntegrationRuntimeState + :param type: Required. Constant filled by server. + :type type: str + :ivar create_time: The time at which the integration runtime was created, + in ISO8601 format. + :vartype create_time: datetime + :ivar nodes: The list of nodes for managed integration runtime. + :vartype nodes: + list[~azure.mgmt.synapse.models.ManagedIntegrationRuntimeNode] + :ivar other_errors: The errors that occurred on this integration runtime. + :vartype other_errors: + list[~azure.mgmt.synapse.models.ManagedIntegrationRuntimeError] + :ivar last_operation: The last operation result that occurred on this + integration runtime. + :vartype last_operation: + ~azure.mgmt.synapse.models.ManagedIntegrationRuntimeOperationResult """ _validation = { - 'authorization_type': {'required': True}, - 'resource_id': {'required': True}, + 'data_factory_name': {'readonly': True}, + 'state': {'readonly': True}, + 'type': {'required': True}, + 'create_time': {'readonly': True}, + 'nodes': {'readonly': True}, + 'other_errors': {'readonly': True}, + 'last_operation': {'readonly': True}, } _attribute_map = { - 'authorization_type': {'key': 'authorizationType', 'type': 'str'}, - 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'additional_properties': {'key': '', 'type': '{object}'}, + 'data_factory_name': {'key': 'dataFactoryName', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'create_time': {'key': 'typeProperties.createTime', 'type': 'iso-8601'}, + 'nodes': {'key': 'typeProperties.nodes', 'type': '[ManagedIntegrationRuntimeNode]'}, + 'other_errors': {'key': 'typeProperties.otherErrors', 'type': '[ManagedIntegrationRuntimeError]'}, + 'last_operation': {'key': 'typeProperties.lastOperation', 'type': 'ManagedIntegrationRuntimeOperationResult'}, } def __init__(self, **kwargs): - super(LinkedIntegrationRuntimeRbacAuthorization, self).__init__(**kwargs) - self.resource_id = kwargs.get('resource_id', None) - self.authorization_type = 'RBAC' - + super(ManagedIntegrationRuntimeStatus, self).__init__(**kwargs) + self.create_time = None + self.nodes = None + self.other_errors = None + self.last_operation = None + self.type = 'Managed' -class ManagedIdentity(Model): - """The workspace managed identity. - Variables are only populated by the server, and will be ignored when - sending a request. +class ManagedVirtualNetworkSettings(Model): + """Managed Virtual Network Settings. - :ivar principal_id: The principal ID of the workspace managed identity - :vartype principal_id: str - :ivar tenant_id: The tenant ID of the workspace managed identity - :vartype tenant_id: str - :param type: The type of managed identity for the workspace. Possible - values include: 'None', 'SystemAssigned' - :type type: str or ~azure.mgmt.synapse.models.ResourceIdentityType + :param prevent_data_exfiltration: Prevent Data Exfiltration + :type prevent_data_exfiltration: bool + :param linked_access_check_on_target_resource: Linked Access Check On + Target Resource + :type linked_access_check_on_target_resource: bool + :param allowed_aad_tenant_ids_for_linking: Allowed Aad Tenant Ids For + Linking + :type allowed_aad_tenant_ids_for_linking: list[str] """ - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, + 'prevent_data_exfiltration': {'key': 'preventDataExfiltration', 'type': 'bool'}, + 'linked_access_check_on_target_resource': {'key': 'linkedAccessCheckOnTargetResource', 'type': 'bool'}, + 'allowed_aad_tenant_ids_for_linking': {'key': 'allowedAadTenantIdsForLinking', 'type': '[str]'}, } def __init__(self, **kwargs): - super(ManagedIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = kwargs.get('type', None) + super(ManagedVirtualNetworkSettings, self).__init__(**kwargs) + self.prevent_data_exfiltration = kwargs.get('prevent_data_exfiltration', None) + self.linked_access_check_on_target_resource = kwargs.get('linked_access_check_on_target_resource', None) + self.allowed_aad_tenant_ids_for_linking = kwargs.get('allowed_aad_tenant_ids_for_linking', None) -class ManagedIdentitySqlControlSettingsModel(ProxyResource): - """Managed Identity Sql Control Settings. +class MetadataSyncConfig(ProxyResource): + """Metadata sync configuration. - Sql Control Settings for workspace managed identity. + Configuration for metadata sync. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str - :param grant_sql_control_to_managed_identity: Grant sql control to managed - identity - :type grant_sql_control_to_managed_identity: - ~azure.mgmt.synapse.models.ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentity + :param enabled: Indicates whether the metadata sync is enabled or disabled + :type enabled: bool + :param sync_interval_in_minutes: The Sync Interval in minutes. + :type sync_interval_in_minutes: int """ _validation = { @@ -1899,1467 +2982,1733 @@ class ManagedIdentitySqlControlSettingsModel(ProxyResource): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'grant_sql_control_to_managed_identity': {'key': 'properties.grantSqlControlToManagedIdentity', 'type': 'ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentity'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'sync_interval_in_minutes': {'key': 'properties.syncIntervalInMinutes', 'type': 'int'}, } def __init__(self, **kwargs): - super(ManagedIdentitySqlControlSettingsModel, self).__init__(**kwargs) - self.grant_sql_control_to_managed_identity = kwargs.get('grant_sql_control_to_managed_identity', None) - + super(MetadataSyncConfig, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.sync_interval_in_minutes = kwargs.get('sync_interval_in_minutes', None) -class ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentity(Model): - """Grant sql control to managed identity. - Variables are only populated by the server, and will be ignored when - sending a request. +class OperationMetaLogSpecification(Model): + """What is this?. - :param desired_state: Desired state. Possible values include: 'Enabled', - 'Disabled' - :type desired_state: str or ~azure.mgmt.synapse.models.enum - :ivar actual_state: Actual state. Possible values include: 'Enabling', - 'Enabled', 'Disabling', 'Disabled', 'Unknown' - :vartype actual_state: str or ~azure.mgmt.synapse.models.enum + :param display_name: Log display name + :type display_name: str + :param blob_duration: Time range the log covers + :type blob_duration: str + :param name: Log unique name + :type name: str """ - _validation = { - 'actual_state': {'readonly': True}, + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, } + def __init__(self, **kwargs): + super(OperationMetaLogSpecification, self).__init__(**kwargs) + self.display_name = kwargs.get('display_name', None) + self.blob_duration = kwargs.get('blob_duration', None) + self.name = kwargs.get('name', None) + + +class OperationMetaMetricDimensionSpecification(Model): + """What is this?. + + :param display_name: Dimension display name + :type display_name: str + :param name: Dimension unique name + :type name: str + :param to_be_exported_for_shoebox: Whether this metric should be exported + for Shoebox + :type to_be_exported_for_shoebox: bool + """ + _attribute_map = { - 'desired_state': {'key': 'desiredState', 'type': 'str'}, - 'actual_state': {'key': 'actualState', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'to_be_exported_for_shoebox': {'key': 'toBeExportedForShoebox', 'type': 'bool'}, } def __init__(self, **kwargs): - super(ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentity, self).__init__(**kwargs) - self.desired_state = kwargs.get('desired_state', None) - self.actual_state = None + super(OperationMetaMetricDimensionSpecification, self).__init__(**kwargs) + self.display_name = kwargs.get('display_name', None) + self.name = kwargs.get('name', None) + self.to_be_exported_for_shoebox = kwargs.get('to_be_exported_for_shoebox', None) -class ManagedIntegrationRuntime(IntegrationRuntime): - """Managed integration runtime, including managed elastic and managed - dedicated integration runtimes. +class OperationMetaMetricSpecification(Model): + """What is this?. - Variables are only populated by the server, and will be ignored when - sending a request. + :param source_mdm_namespace: The source MDM namespace + :type source_mdm_namespace: str + :param display_name: Metric display name + :type display_name: str + :param name: Metric unique name + :type name: str + :param aggregation_type: Metric aggregation type + :type aggregation_type: str + :param display_description: Metric description + :type display_description: str + :param source_mdm_account: The source MDM account + :type source_mdm_account: str + :param enable_regional_mdm_account: Whether the regional MDM account is + enabled + :type enable_regional_mdm_account: bool + :param unit: Metric units + :type unit: str + :param dimensions: Metric dimensions + :type dimensions: + list[~azure.mgmt.synapse.models.OperationMetaMetricDimensionSpecification] + :param supports_instance_level_aggregation: Whether the metric supports + instance-level aggregation + :type supports_instance_level_aggregation: bool + :param metric_filter_pattern: Metric filter + :type metric_filter_pattern: str + """ - All required parameters must be populated in order to send to Azure. + _attribute_map = { + 'source_mdm_namespace': {'key': 'sourceMdmNamespace', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'aggregation_type': {'key': 'aggregationType', 'type': 'str'}, + 'display_description': {'key': 'displayDescription', 'type': 'str'}, + 'source_mdm_account': {'key': 'sourceMdmAccount', 'type': 'str'}, + 'enable_regional_mdm_account': {'key': 'enableRegionalMdmAccount', 'type': 'bool'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'dimensions': {'key': 'dimensions', 'type': '[OperationMetaMetricDimensionSpecification]'}, + 'supports_instance_level_aggregation': {'key': 'supportsInstanceLevelAggregation', 'type': 'bool'}, + 'metric_filter_pattern': {'key': 'metricFilterPattern', 'type': 'str'}, + } - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Integration runtime description. - :type description: str - :param type: Required. Constant filled by server. - :type type: str - :ivar state: Integration runtime state, only valid for managed dedicated - integration runtime. Possible values include: 'Initial', 'Stopped', - 'Started', 'Starting', 'Stopping', 'NeedRegistration', 'Online', - 'Limited', 'Offline', 'AccessDenied' - :vartype state: str or ~azure.mgmt.synapse.models.IntegrationRuntimeState - :param compute_properties: The compute resource for managed integration - runtime. - :type compute_properties: - ~azure.mgmt.synapse.models.IntegrationRuntimeComputeProperties - :param ssis_properties: SSIS properties for managed integration runtime. - :type ssis_properties: - ~azure.mgmt.synapse.models.IntegrationRuntimeSsisProperties + def __init__(self, **kwargs): + super(OperationMetaMetricSpecification, self).__init__(**kwargs) + self.source_mdm_namespace = kwargs.get('source_mdm_namespace', None) + self.display_name = kwargs.get('display_name', None) + self.name = kwargs.get('name', None) + self.aggregation_type = kwargs.get('aggregation_type', None) + self.display_description = kwargs.get('display_description', None) + self.source_mdm_account = kwargs.get('source_mdm_account', None) + self.enable_regional_mdm_account = kwargs.get('enable_regional_mdm_account', None) + self.unit = kwargs.get('unit', None) + self.dimensions = kwargs.get('dimensions', None) + self.supports_instance_level_aggregation = kwargs.get('supports_instance_level_aggregation', None) + self.metric_filter_pattern = kwargs.get('metric_filter_pattern', None) + + +class OperationMetaServiceSpecification(Model): + """What is this?. + + :param metric_specifications: Service metric specifications + :type metric_specifications: + list[~azure.mgmt.synapse.models.OperationMetaMetricSpecification] + :param log_specifications: Service log specifications + :type log_specifications: + list[~azure.mgmt.synapse.models.OperationMetaLogSpecification] """ - _validation = { - 'type': {'required': True}, - 'state': {'readonly': True}, - } + _attribute_map = { + 'metric_specifications': {'key': 'metricSpecifications', 'type': '[OperationMetaMetricSpecification]'}, + 'log_specifications': {'key': 'logSpecifications', 'type': '[OperationMetaLogSpecification]'}, + } + + def __init__(self, **kwargs): + super(OperationMetaServiceSpecification, self).__init__(**kwargs) + self.metric_specifications = kwargs.get('metric_specifications', None) + self.log_specifications = kwargs.get('log_specifications', None) + + +class OperationResource(Model): + """An operation. + + :param id: Operation ID + :type id: str + :param name: Operation name + :type name: str + :param status: Operation status. Possible values include: 'InProgress', + 'Succeeded', 'Failed', 'Canceled' + :type status: str or ~azure.mgmt.synapse.models.OperationStatus + :param properties: Operation properties + :type properties: object + :param error: Errors from the operation + :type error: ~azure.mgmt.synapse.models.ErrorDetail + :param start_time: Operation start time + :type start_time: datetime + :param end_time: Operation start time + :type end_time: datetime + :param percent_complete: Completion percentage of the operation + :type percent_complete: float + """ _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'str'}, - 'compute_properties': {'key': 'typeProperties.computeProperties', 'type': 'IntegrationRuntimeComputeProperties'}, - 'ssis_properties': {'key': 'typeProperties.ssisProperties', 'type': 'IntegrationRuntimeSsisProperties'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'error': {'key': 'error', 'type': 'ErrorDetail'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'percent_complete': {'key': 'percentComplete', 'type': 'float'}, } def __init__(self, **kwargs): - super(ManagedIntegrationRuntime, self).__init__(**kwargs) - self.state = None - self.compute_properties = kwargs.get('compute_properties', None) - self.ssis_properties = kwargs.get('ssis_properties', None) - self.type = 'Managed' + super(OperationResource, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + self.status = kwargs.get('status', None) + self.properties = kwargs.get('properties', None) + self.error = kwargs.get('error', None) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.percent_complete = kwargs.get('percent_complete', None) -class ManagedIntegrationRuntimeError(Model): - """Error definition for managed integration runtime. +class PrivateEndpoint(Model): + """Private endpoint details. Variables are only populated by the server, and will be ignored when sending a request. - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :ivar time: The time when the error occurred. - :vartype time: datetime - :ivar code: Error code. - :vartype code: str - :ivar parameters: Managed integration runtime error parameters. - :vartype parameters: list[str] - :ivar message: Error message. - :vartype message: str + :ivar id: Resource id of the private endpoint. + :vartype id: str """ _validation = { - 'time': {'readonly': True}, - 'code': {'readonly': True}, - 'parameters': {'readonly': True}, - 'message': {'readonly': True}, + 'id': {'readonly': True}, } _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'time': {'key': 'time', 'type': 'iso-8601'}, - 'code': {'key': 'code', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '[str]'}, - 'message': {'key': 'message', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, } def __init__(self, **kwargs): - super(ManagedIntegrationRuntimeError, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.time = None - self.code = None - self.parameters = None - self.message = None + super(PrivateEndpoint, self).__init__(**kwargs) + self.id = None -class ManagedIntegrationRuntimeNode(Model): - """Properties of integration runtime node. +class PrivateEndpointConnection(ProxyResource): + """A private endpoint connection. Variables are only populated by the server, and will be ignored when sending a request. - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :ivar node_id: The managed integration runtime node id. - :vartype node_id: str - :ivar status: The managed integration runtime node status. Possible values - include: 'Starting', 'Available', 'Recycling', 'Unavailable' - :vartype status: str or - ~azure.mgmt.synapse.models.ManagedIntegrationRuntimeNodeStatus - :param errors: The errors that occurred on this integration runtime node. - :type errors: - list[~azure.mgmt.synapse.models.ManagedIntegrationRuntimeError] + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + :vartype type: str + :param private_endpoint: The private endpoint which the connection belongs + to. + :type private_endpoint: ~azure.mgmt.synapse.models.PrivateEndpoint + :param private_link_service_connection_state: Connection state of the + private endpoint connection. + :type private_link_service_connection_state: + ~azure.mgmt.synapse.models.PrivateLinkServiceConnectionState + :ivar provisioning_state: Provisioning state of the private endpoint + connection. + :vartype provisioning_state: str """ _validation = { - 'node_id': {'readonly': True}, - 'status': {'readonly': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, } _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'node_id': {'key': 'nodeId', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'errors': {'key': 'errors', 'type': '[ManagedIntegrationRuntimeError]'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } def __init__(self, **kwargs): - super(ManagedIntegrationRuntimeNode, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.node_id = None - self.status = None - self.errors = kwargs.get('errors', None) + super(PrivateEndpointConnection, self).__init__(**kwargs) + self.private_endpoint = kwargs.get('private_endpoint', None) + self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None) + self.provisioning_state = None -class ManagedIntegrationRuntimeOperationResult(Model): - """Properties of managed integration runtime operation result. +class PrivateEndpointConnectionForPrivateLinkHubBasic(Model): + """Private Endpoint Connection For Private Link Hub - Basic. Variables are only populated by the server, and will be ignored when sending a request. - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :ivar type: The operation type. Could be start or stop. - :vartype type: str - :ivar start_time: The start time of the operation. - :vartype start_time: datetime - :ivar result: The operation result. - :vartype result: str - :ivar error_code: The error code. - :vartype error_code: str - :ivar parameters: Managed integration runtime error parameters. - :vartype parameters: list[str] - :ivar activity_id: The activity id for the operation request. - :vartype activity_id: str + :ivar id: identifier + :vartype id: str + :param private_endpoint: The private endpoint which the connection belongs + to. + :type private_endpoint: ~azure.mgmt.synapse.models.PrivateEndpoint + :param private_link_service_connection_state: Connection state of the + private endpoint connection. + :type private_link_service_connection_state: + ~azure.mgmt.synapse.models.PrivateLinkServiceConnectionState + :ivar provisioning_state: Provisioning state of the private endpoint + connection. + :vartype provisioning_state: str """ _validation = { - 'type': {'readonly': True}, - 'start_time': {'readonly': True}, - 'result': {'readonly': True}, - 'error_code': {'readonly': True}, - 'parameters': {'readonly': True}, - 'activity_id': {'readonly': True}, + 'id': {'readonly': True}, + 'provisioning_state': {'readonly': True}, } _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'type': {'key': 'type', 'type': 'str'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'result': {'key': 'result', 'type': 'str'}, - 'error_code': {'key': 'errorCode', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '[str]'}, - 'activity_id': {'key': 'activityId', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } def __init__(self, **kwargs): - super(ManagedIntegrationRuntimeOperationResult, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.type = None - self.start_time = None - self.result = None - self.error_code = None - self.parameters = None - self.activity_id = None + super(PrivateEndpointConnectionForPrivateLinkHubBasic, self).__init__(**kwargs) + self.id = None + self.private_endpoint = kwargs.get('private_endpoint', None) + self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None) + self.provisioning_state = None -class ManagedIntegrationRuntimeStatus(IntegrationRuntimeStatus): - """Managed integration runtime status. +class PrivateEndpointConnectionForPrivateLinkHub(PrivateEndpointConnectionForPrivateLinkHubBasic): + """PrivateEndpointConnectionForPrivateLinkHub. Variables are only populated by the server, and will be ignored when sending a request. - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :ivar data_factory_name: The workspace name which the integration runtime - belong to. - :vartype data_factory_name: str - :ivar state: The state of integration runtime. Possible values include: - 'Initial', 'Stopped', 'Started', 'Starting', 'Stopping', - 'NeedRegistration', 'Online', 'Limited', 'Offline', 'AccessDenied' - :vartype state: str or ~azure.mgmt.synapse.models.IntegrationRuntimeState - :param type: Required. Constant filled by server. + :ivar id: identifier + :vartype id: str + :param private_endpoint: The private endpoint which the connection belongs + to. + :type private_endpoint: ~azure.mgmt.synapse.models.PrivateEndpoint + :param private_link_service_connection_state: Connection state of the + private endpoint connection. + :type private_link_service_connection_state: + ~azure.mgmt.synapse.models.PrivateLinkServiceConnectionState + :ivar provisioning_state: Provisioning state of the private endpoint + connection. + :vartype provisioning_state: str + :param name: + :type name: str + :param type: :type type: str - :ivar create_time: The time at which the integration runtime was created, - in ISO8601 format. - :vartype create_time: datetime - :ivar nodes: The list of nodes for managed integration runtime. - :vartype nodes: - list[~azure.mgmt.synapse.models.ManagedIntegrationRuntimeNode] - :ivar other_errors: The errors that occurred on this integration runtime. - :vartype other_errors: - list[~azure.mgmt.synapse.models.ManagedIntegrationRuntimeError] - :ivar last_operation: The last operation result that occurred on this - integration runtime. - :vartype last_operation: - ~azure.mgmt.synapse.models.ManagedIntegrationRuntimeOperationResult """ _validation = { - 'data_factory_name': {'readonly': True}, - 'state': {'readonly': True}, - 'type': {'required': True}, - 'create_time': {'readonly': True}, - 'nodes': {'readonly': True}, - 'other_errors': {'readonly': True}, - 'last_operation': {'readonly': True}, + 'id': {'readonly': True}, + 'provisioning_state': {'readonly': True}, } _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'data_factory_name': {'key': 'dataFactoryName', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'create_time': {'key': 'typeProperties.createTime', 'type': 'iso-8601'}, - 'nodes': {'key': 'typeProperties.nodes', 'type': '[ManagedIntegrationRuntimeNode]'}, - 'other_errors': {'key': 'typeProperties.otherErrors', 'type': '[ManagedIntegrationRuntimeError]'}, - 'last_operation': {'key': 'typeProperties.lastOperation', 'type': 'ManagedIntegrationRuntimeOperationResult'}, } def __init__(self, **kwargs): - super(ManagedIntegrationRuntimeStatus, self).__init__(**kwargs) - self.create_time = None - self.nodes = None - self.other_errors = None - self.last_operation = None - self.type = 'Managed' - + super(PrivateEndpointConnectionForPrivateLinkHub, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) -class MetadataSyncConfig(ProxyResource): - """Metadata sync configuration. - Configuration for metadata sync. +class PrivateLinkHub(TrackedResource): + """A privateLinkHub. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str - :param enabled: Indicates whether the metadata sync is enabled or disabled - :type enabled: bool + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + :param provisioning_state: PrivateLinkHub provisioning state + :type provisioning_state: str + :ivar private_endpoint_connections: List of private endpoint connections + :vartype private_endpoint_connections: + list[~azure.mgmt.synapse.models.PrivateEndpointConnectionForPrivateLinkHubBasic] """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'location': {'required': True}, + 'private_endpoint_connections': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnectionForPrivateLinkHubBasic]'}, } def __init__(self, **kwargs): - super(MetadataSyncConfig, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) + super(PrivateLinkHub, self).__init__(**kwargs) + self.provisioning_state = kwargs.get('provisioning_state', None) + self.private_endpoint_connections = None -class OperationMetaLogSpecification(Model): - """What is this?. +class PrivateLinkHubPatchInfo(Model): + """PrivateLinkHub patch details. - :param display_name: Log display name - :type display_name: str - :param blob_duration: Time range the log covers - :type blob_duration: str - :param name: Log unique name - :type name: str + :param tags: Resource tags + :type tags: dict[str, str] """ _attribute_map = { - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, } def __init__(self, **kwargs): - super(OperationMetaLogSpecification, self).__init__(**kwargs) - self.display_name = kwargs.get('display_name', None) - self.blob_duration = kwargs.get('blob_duration', None) - self.name = kwargs.get('name', None) + super(PrivateLinkHubPatchInfo, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) -class OperationMetaMetricDimensionSpecification(Model): - """What is this?. +class PrivateLinkResource(ProxyResource): + """A private link resource. - :param display_name: Dimension display name - :type display_name: str - :param name: Dimension unique name - :type name: str - :param to_be_exported_for_shoebox: Whether this metric should be exported - for Shoebox - :type to_be_exported_for_shoebox: bool + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + :vartype type: str + :ivar properties: The private link resource properties. + :vartype properties: + ~azure.mgmt.synapse.models.PrivateLinkResourceProperties """ + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'properties': {'readonly': True}, + } + _attribute_map = { - 'display_name': {'key': 'displayName', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, - 'to_be_exported_for_shoebox': {'key': 'toBeExportedForShoebox', 'type': 'bool'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'PrivateLinkResourceProperties'}, } def __init__(self, **kwargs): - super(OperationMetaMetricDimensionSpecification, self).__init__(**kwargs) - self.display_name = kwargs.get('display_name', None) - self.name = kwargs.get('name', None) - self.to_be_exported_for_shoebox = kwargs.get('to_be_exported_for_shoebox', None) + super(PrivateLinkResource, self).__init__(**kwargs) + self.properties = None -class OperationMetaMetricSpecification(Model): - """What is this?. +class PrivateLinkResourceProperties(Model): + """Properties of a private link resource. - :param source_mdm_namespace: The source MDM namespace - :type source_mdm_namespace: str - :param display_name: Metric display name - :type display_name: str - :param name: Metric unique name - :type name: str - :param aggregation_type: Metric aggregation type - :type aggregation_type: str - :param display_description: Metric description - :type display_description: str - :param source_mdm_account: The source MDM account - :type source_mdm_account: str - :param enable_regional_mdm_account: Whether the regional MDM account is - enabled - :type enable_regional_mdm_account: bool - :param unit: Metric units - :type unit: str - :param dimensions: Metric dimensions - :type dimensions: - list[~azure.mgmt.synapse.models.OperationMetaMetricDimensionSpecification] - :param supports_instance_level_aggregation: Whether the metric supports - instance-level aggregation - :type supports_instance_level_aggregation: bool - :param metric_filter_pattern: Metric filter - :type metric_filter_pattern: str + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar group_id: The private link resource group id. + :vartype group_id: str + :ivar required_members: The private link resource required member names. + :vartype required_members: list[str] + :ivar required_zone_names: Required DNS zone names of the the private link + resource. + :vartype required_zone_names: list[str] """ + _validation = { + 'group_id': {'readonly': True}, + 'required_members': {'readonly': True}, + 'required_zone_names': {'readonly': True}, + } + _attribute_map = { - 'source_mdm_namespace': {'key': 'sourceMdmNamespace', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'aggregation_type': {'key': 'aggregationType', 'type': 'str'}, - 'display_description': {'key': 'displayDescription', 'type': 'str'}, - 'source_mdm_account': {'key': 'sourceMdmAccount', 'type': 'str'}, - 'enable_regional_mdm_account': {'key': 'enableRegionalMdmAccount', 'type': 'bool'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'dimensions': {'key': 'dimensions', 'type': '[OperationMetaMetricDimensionSpecification]'}, - 'supports_instance_level_aggregation': {'key': 'supportsInstanceLevelAggregation', 'type': 'bool'}, - 'metric_filter_pattern': {'key': 'metricFilterPattern', 'type': 'str'}, + 'group_id': {'key': 'groupId', 'type': 'str'}, + 'required_members': {'key': 'requiredMembers', 'type': '[str]'}, + 'required_zone_names': {'key': 'requiredZoneNames', 'type': '[str]'}, } def __init__(self, **kwargs): - super(OperationMetaMetricSpecification, self).__init__(**kwargs) - self.source_mdm_namespace = kwargs.get('source_mdm_namespace', None) - self.display_name = kwargs.get('display_name', None) - self.name = kwargs.get('name', None) - self.aggregation_type = kwargs.get('aggregation_type', None) - self.display_description = kwargs.get('display_description', None) - self.source_mdm_account = kwargs.get('source_mdm_account', None) - self.enable_regional_mdm_account = kwargs.get('enable_regional_mdm_account', None) - self.unit = kwargs.get('unit', None) - self.dimensions = kwargs.get('dimensions', None) - self.supports_instance_level_aggregation = kwargs.get('supports_instance_level_aggregation', None) - self.metric_filter_pattern = kwargs.get('metric_filter_pattern', None) + super(PrivateLinkResourceProperties, self).__init__(**kwargs) + self.group_id = None + self.required_members = None + self.required_zone_names = None -class OperationMetaServiceSpecification(Model): - """What is this?. +class PrivateLinkServiceConnectionState(Model): + """Connection state details of the private endpoint. - :param metric_specifications: Service metric specifications - :type metric_specifications: - list[~azure.mgmt.synapse.models.OperationMetaMetricSpecification] - :param log_specifications: Service log specifications - :type log_specifications: - list[~azure.mgmt.synapse.models.OperationMetaLogSpecification] + Variables are only populated by the server, and will be ignored when + sending a request. + + :param status: The private link service connection status. + :type status: str + :param description: The private link service connection description. + :type description: str + :ivar actions_required: The actions required for private link service + connection. + :vartype actions_required: str """ + _validation = { + 'actions_required': {'readonly': True}, + } + _attribute_map = { - 'metric_specifications': {'key': 'metricSpecifications', 'type': '[OperationMetaMetricSpecification]'}, - 'log_specifications': {'key': 'logSpecifications', 'type': '[OperationMetaLogSpecification]'}, + 'status': {'key': 'status', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, } def __init__(self, **kwargs): - super(OperationMetaServiceSpecification, self).__init__(**kwargs) - self.metric_specifications = kwargs.get('metric_specifications', None) - self.log_specifications = kwargs.get('log_specifications', None) + super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.description = kwargs.get('description', None) + self.actions_required = None -class OperationResource(Model): - """An operation. +class QueryInterval(Model): + """A database query. - :param id: Operation ID - :type id: str - :param name: Operation name - :type name: str - :param status: Operation status. Possible values include: 'InProgress', - 'Succeeded', 'Failed', 'Canceled' - :type status: str or ~azure.mgmt.synapse.models.OperationStatus - :param properties: Operation properties - :type properties: object - :param error: Errors from the operation - :type error: ~azure.mgmt.synapse.models.ErrorDetail - :param start_time: Operation start time - :type start_time: datetime - :param end_time: Operation start time - :type end_time: datetime - :param percent_complete: Completion percentage of the operation - :type percent_complete: float + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar interval_start_time: The start time of the measurement interval + (ISO8601 format). + :vartype interval_start_time: datetime + :ivar execution_count: The number of times the query was executed during + this interval. + :vartype execution_count: float + :ivar metrics: The list of query metrics during this interval. + :vartype metrics: list[~azure.mgmt.synapse.models.QueryMetric] """ - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'object'}, - 'error': {'key': 'error', 'type': 'ErrorDetail'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'percent_complete': {'key': 'percentComplete', 'type': 'float'}, + _validation = { + 'interval_start_time': {'readonly': True}, + 'execution_count': {'readonly': True}, + 'metrics': {'readonly': True}, + } + + _attribute_map = { + 'interval_start_time': {'key': 'intervalStartTime', 'type': 'iso-8601'}, + 'execution_count': {'key': 'executionCount', 'type': 'float'}, + 'metrics': {'key': 'metrics', 'type': '[QueryMetric]'}, } def __init__(self, **kwargs): - super(OperationResource, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.name = kwargs.get('name', None) - self.status = kwargs.get('status', None) - self.properties = kwargs.get('properties', None) - self.error = kwargs.get('error', None) - self.start_time = kwargs.get('start_time', None) - self.end_time = kwargs.get('end_time', None) - self.percent_complete = kwargs.get('percent_complete', None) + super(QueryInterval, self).__init__(**kwargs) + self.interval_start_time = None + self.execution_count = None + self.metrics = None -class PrivateEndpoint(Model): - """Private endpoint details. +class QueryMetric(Model): + """A database query. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource id of the private endpoint. - :vartype id: str + :ivar name: The name of the metric + :vartype name: str + :ivar display_name: The name of the metric for display in user interface + :vartype display_name: str + :ivar unit: The unit of measurement. Possible values include: + 'percentage', 'KB', 'microseconds' + :vartype unit: str or ~azure.mgmt.synapse.models.QueryMetricUnit + :ivar value: The measured value + :vartype value: float """ _validation = { - 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'display_name': {'readonly': True}, + 'unit': {'readonly': True}, + 'value': {'readonly': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'QueryMetricUnit'}, + 'value': {'key': 'value', 'type': 'float'}, } def __init__(self, **kwargs): - super(PrivateEndpoint, self).__init__(**kwargs) - self.id = None + super(QueryMetric, self).__init__(**kwargs) + self.name = None + self.display_name = None + self.unit = None + self.value = None -class PrivateEndpointConnection(ProxyResource): - """A private endpoint connection. +class QueryStatistic(Model): + """A database query. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param private_endpoint: The private endpoint which the connection belongs - to. - :type private_endpoint: ~azure.mgmt.synapse.models.PrivateEndpoint - :param private_link_service_connection_state: Connection state of the - private endpoint connection. - :type private_link_service_connection_state: - ~azure.mgmt.synapse.models.PrivateLinkServiceConnectionState - :ivar provisioning_state: Provisioning state of the private endpoint - connection. - :vartype provisioning_state: str + :ivar query_id: The id of the query + :vartype query_id: str + :ivar intervals: The list of query intervals. + :vartype intervals: list[~azure.mgmt.synapse.models.QueryInterval] """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, + 'query_id': {'readonly': True}, + 'intervals': {'readonly': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, - 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'query_id': {'key': 'queryId', 'type': 'str'}, + 'intervals': {'key': 'intervals', 'type': '[QueryInterval]'}, } def __init__(self, **kwargs): - super(PrivateEndpointConnection, self).__init__(**kwargs) - self.private_endpoint = kwargs.get('private_endpoint', None) - self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None) - self.provisioning_state = None + super(QueryStatistic, self).__init__(**kwargs) + self.query_id = None + self.intervals = None -class PrivateLinkHub(TrackedResource): - """A privateLinkHub. +class RecoverableSqlPool(ProxyResource): + """A recoverable sql pool. Variables are only populated by the server, and will be ignored when sending a request. - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param location: Required. The geo-location where the resource lives - :type location: str - :ivar provisioning_state: PrivateLinkHub provisioning state. Possible - values include: 'Succeeded', 'Failed' - :vartype provisioning_state: str or ~azure.mgmt.synapse.models.enum + :ivar edition: The edition of the database + :vartype edition: str + :ivar service_level_objective: The service level objective name of the + database + :vartype service_level_objective: str + :ivar elastic_pool_name: The elastic pool name of the database + :vartype elastic_pool_name: str + :ivar last_available_backup_date: The last available backup date of the + database (ISO8601 format) + :vartype last_available_backup_date: datetime """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, + 'edition': {'readonly': True}, + 'service_level_objective': {'readonly': True}, + 'elastic_pool_name': {'readonly': True}, + 'last_available_backup_date': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'edition': {'key': 'properties.edition', 'type': 'str'}, + 'service_level_objective': {'key': 'properties.serviceLevelObjective', 'type': 'str'}, + 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, + 'last_available_backup_date': {'key': 'properties.lastAvailableBackupDate', 'type': 'iso-8601'}, } def __init__(self, **kwargs): - super(PrivateLinkHub, self).__init__(**kwargs) - self.provisioning_state = None + super(RecoverableSqlPool, self).__init__(**kwargs) + self.edition = None + self.service_level_objective = None + self.elastic_pool_name = None + self.last_available_backup_date = None -class PrivateLinkHubPatchInfo(Model): - """PrivateLinkHub patch details. +class ReplaceAllFirewallRulesOperationResponse(Model): + """An existing operation for replacing the firewall rules. - :param tags: Resource tags - :type tags: dict[str, str] + :param operation_id: The operation ID + :type operation_id: str """ _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, + 'operation_id': {'key': 'operationId', 'type': 'str'}, } def __init__(self, **kwargs): - super(PrivateLinkHubPatchInfo, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) + super(ReplaceAllFirewallRulesOperationResponse, self).__init__(**kwargs) + self.operation_id = kwargs.get('operation_id', None) -class PrivateLinkResource(ProxyResource): - """A private link resource. +class ReplaceAllIpFirewallRulesRequest(Model): + """Replace all IP firewall rules request. + + :param ip_firewall_rules: IP firewall rule properties + :type ip_firewall_rules: dict[str, + ~azure.mgmt.synapse.models.IpFirewallRuleProperties] + """ + + _attribute_map = { + 'ip_firewall_rules': {'key': 'ipFirewallRules', 'type': '{IpFirewallRuleProperties}'}, + } + + def __init__(self, **kwargs): + super(ReplaceAllIpFirewallRulesRequest, self).__init__(**kwargs) + self.ip_firewall_rules = kwargs.get('ip_firewall_rules', None) + + +class ReplicationLink(ProxyResource): + """Represents a Sql pool replication link. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str - :ivar properties: The private link resource properties. - :vartype properties: - ~azure.mgmt.synapse.models.PrivateLinkResourceProperties + :ivar location: Location of the workspace that contains this firewall + rule. + :vartype location: str + :ivar is_termination_allowed: Legacy value indicating whether termination + is allowed. Currently always returns true. + :vartype is_termination_allowed: bool + :ivar replication_mode: Replication mode of this replication link. + :vartype replication_mode: str + :ivar partner_server: The name of the workspace hosting the partner Sql + pool. + :vartype partner_server: str + :ivar partner_database: The name of the partner Sql pool. + :vartype partner_database: str + :ivar partner_location: The Azure Region of the partner Sql pool. + :vartype partner_location: str + :ivar role: The role of the Sql pool in the replication link. Possible + values include: 'Primary', 'Secondary', 'NonReadableSecondary', 'Source', + 'Copy' + :vartype role: str or ~azure.mgmt.synapse.models.ReplicationRole + :ivar partner_role: The role of the partner Sql pool in the replication + link. Possible values include: 'Primary', 'Secondary', + 'NonReadableSecondary', 'Source', 'Copy' + :vartype partner_role: str or ~azure.mgmt.synapse.models.ReplicationRole + :ivar start_time: The start time for the replication link. + :vartype start_time: datetime + :ivar percent_complete: The percentage of seeding complete for the + replication link. + :vartype percent_complete: int + :ivar replication_state: The replication state for the replication link. + Possible values include: 'PENDING', 'SEEDING', 'CATCH_UP', 'SUSPENDED' + :vartype replication_state: str or + ~azure.mgmt.synapse.models.ReplicationState """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'properties': {'readonly': True}, + 'location': {'readonly': True}, + 'is_termination_allowed': {'readonly': True}, + 'replication_mode': {'readonly': True}, + 'partner_server': {'readonly': True}, + 'partner_database': {'readonly': True}, + 'partner_location': {'readonly': True}, + 'role': {'readonly': True}, + 'partner_role': {'readonly': True}, + 'start_time': {'readonly': True}, + 'percent_complete': {'readonly': True}, + 'replication_state': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'PrivateLinkResourceProperties'}, + 'location': {'key': 'location', 'type': 'str'}, + 'is_termination_allowed': {'key': 'properties.isTerminationAllowed', 'type': 'bool'}, + 'replication_mode': {'key': 'properties.replicationMode', 'type': 'str'}, + 'partner_server': {'key': 'properties.partnerServer', 'type': 'str'}, + 'partner_database': {'key': 'properties.partnerDatabase', 'type': 'str'}, + 'partner_location': {'key': 'properties.partnerLocation', 'type': 'str'}, + 'role': {'key': 'properties.role', 'type': 'ReplicationRole'}, + 'partner_role': {'key': 'properties.partnerRole', 'type': 'ReplicationRole'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, + 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, } def __init__(self, **kwargs): - super(PrivateLinkResource, self).__init__(**kwargs) - self.properties = None + super(ReplicationLink, self).__init__(**kwargs) + self.location = None + self.is_termination_allowed = None + self.replication_mode = None + self.partner_server = None + self.partner_database = None + self.partner_location = None + self.role = None + self.partner_role = None + self.start_time = None + self.percent_complete = None + self.replication_state = None -class PrivateLinkResourceProperties(Model): - """Properties of a private link resource. +class ResourceMoveDefinition(Model): + """Contains the information necessary to perform a resource move (rename). + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The target ID for the resource + :type id: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceMoveDefinition, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class RestorableDroppedSqlPool(ProxyResource): + """A restorable dropped Sql pool. Variables are only populated by the server, and will be ignored when sending a request. - :ivar group_id: The private link resource group id. - :vartype group_id: str - :ivar required_members: The private link resource required member names. - :vartype required_members: list[str] - :ivar required_zone_names: Required DNS zone names of the the private link - resource. - :vartype required_zone_names: list[str] + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + :vartype type: str + :ivar location: The geo-location where the resource lives + :vartype location: str + :ivar database_name: The name of the database + :vartype database_name: str + :ivar edition: The edition of the database + :vartype edition: str + :ivar max_size_bytes: The max size in bytes of the database + :vartype max_size_bytes: str + :ivar service_level_objective: The service level objective name of the + database + :vartype service_level_objective: str + :ivar elastic_pool_name: The elastic pool name of the database + :vartype elastic_pool_name: str + :ivar creation_date: The creation date of the database (ISO8601 format) + :vartype creation_date: datetime + :ivar deletion_date: The deletion date of the database (ISO8601 format) + :vartype deletion_date: datetime + :ivar earliest_restore_date: The earliest restore date of the database + (ISO8601 format) + :vartype earliest_restore_date: datetime """ _validation = { - 'group_id': {'readonly': True}, - 'required_members': {'readonly': True}, - 'required_zone_names': {'readonly': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'database_name': {'readonly': True}, + 'edition': {'readonly': True}, + 'max_size_bytes': {'readonly': True}, + 'service_level_objective': {'readonly': True}, + 'elastic_pool_name': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'deletion_date': {'readonly': True}, + 'earliest_restore_date': {'readonly': True}, } _attribute_map = { - 'group_id': {'key': 'groupId', 'type': 'str'}, - 'required_members': {'key': 'requiredMembers', 'type': '[str]'}, - 'required_zone_names': {'key': 'requiredZoneNames', 'type': '[str]'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'edition': {'key': 'properties.edition', 'type': 'str'}, + 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'str'}, + 'service_level_objective': {'key': 'properties.serviceLevelObjective', 'type': 'str'}, + 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'deletion_date': {'key': 'properties.deletionDate', 'type': 'iso-8601'}, + 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, } def __init__(self, **kwargs): - super(PrivateLinkResourceProperties, self).__init__(**kwargs) - self.group_id = None - self.required_members = None - self.required_zone_names = None + super(RestorableDroppedSqlPool, self).__init__(**kwargs) + self.location = None + self.database_name = None + self.edition = None + self.max_size_bytes = None + self.service_level_objective = None + self.elastic_pool_name = None + self.creation_date = None + self.deletion_date = None + self.earliest_restore_date = None -class PrivateLinkServiceConnectionState(Model): - """Connection state details of the private endpoint. +class RestorePoint(ProxyResource): + """Database restore points. Variables are only populated by the server, and will be ignored when sending a request. - :param status: The private link service connection status. Possible values - include: 'Approved', 'Pending', 'Rejected', 'Disconnected' - :type status: str or ~azure.mgmt.synapse.models.enum - :param description: The private link service connection description. - :type description: str - :ivar actions_required: The actions required for private link service - connection. - :vartype actions_required: str + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar restore_point_type: The type of restore point. Possible values + include: 'CONTINUOUS', 'DISCRETE' + :vartype restore_point_type: str or + ~azure.mgmt.synapse.models.RestorePointType + :ivar earliest_restore_date: The earliest time to which this database can + be restored + :vartype earliest_restore_date: datetime + :ivar restore_point_creation_date: The time the backup was taken + :vartype restore_point_creation_date: datetime + :ivar restore_point_label: The label of restore point for backup request + by user + :vartype restore_point_label: str """ _validation = { - 'actions_required': {'readonly': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'restore_point_type': {'readonly': True}, + 'earliest_restore_date': {'readonly': True}, + 'restore_point_creation_date': {'readonly': True}, + 'restore_point_label': {'readonly': True}, } _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'restore_point_type': {'key': 'properties.restorePointType', 'type': 'RestorePointType'}, + 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, + 'restore_point_creation_date': {'key': 'properties.restorePointCreationDate', 'type': 'iso-8601'}, + 'restore_point_label': {'key': 'properties.restorePointLabel', 'type': 'str'}, } def __init__(self, **kwargs): - super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.description = kwargs.get('description', None) - self.actions_required = None + super(RestorePoint, self).__init__(**kwargs) + self.location = None + self.restore_point_type = None + self.earliest_restore_date = None + self.restore_point_creation_date = None + self.restore_point_label = None -class QueryInterval(Model): - """A database query. +class SecretBase(Model): + """The base definition of a secret type. - Variables are only populated by the server, and will be ignored when - sending a request. + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: SecureString - :ivar interval_start_time: The start time of the measurement interval - (ISO8601 format). - :vartype interval_start_time: datetime - :ivar execution_count: The number of times the query was executed during - this interval. - :vartype execution_count: float - :ivar metrics: The list of query metrics during this interval. - :vartype metrics: list[~azure.mgmt.synapse.models.QueryMetric] + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str """ _validation = { - 'interval_start_time': {'readonly': True}, - 'execution_count': {'readonly': True}, - 'metrics': {'readonly': True}, + 'type': {'required': True}, } _attribute_map = { - 'interval_start_time': {'key': 'intervalStartTime', 'type': 'iso-8601'}, - 'execution_count': {'key': 'executionCount', 'type': 'float'}, - 'metrics': {'key': 'metrics', 'type': '[QueryMetric]'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'SecureString': 'SecureString'} } def __init__(self, **kwargs): - super(QueryInterval, self).__init__(**kwargs) - self.interval_start_time = None - self.execution_count = None - self.metrics = None + super(SecretBase, self).__init__(**kwargs) + self.type = None -class QueryMetric(Model): - """A database query. +class SecureString(SecretBase): + """Azure Synapse secure string definition. The string value will be masked + with asterisks '*' during Get or List API calls. - Variables are only populated by the server, and will be ignored when - sending a request. + All required parameters must be populated in order to send to Azure. - :ivar name: The name of the metric - :vartype name: str - :ivar display_name: The name of the metric for display in user interface - :vartype display_name: str - :ivar unit: The unit of measurement. Possible values include: - 'percentage', 'KB', 'microseconds' - :vartype unit: str or ~azure.mgmt.synapse.models.QueryMetricUnit - :ivar value: The measured value - :vartype value: float + :param type: Required. Constant filled by server. + :type type: str + :param value: Required. Value of secure string. + :type value: str """ _validation = { - 'name': {'readonly': True}, - 'display_name': {'readonly': True}, - 'unit': {'readonly': True}, - 'value': {'readonly': True}, + 'type': {'required': True}, + 'value': {'required': True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'QueryMetricUnit'}, - 'value': {'key': 'value', 'type': 'float'}, + 'type': {'key': 'type', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, } def __init__(self, **kwargs): - super(QueryMetric, self).__init__(**kwargs) - self.name = None - self.display_name = None - self.unit = None - self.value = None + super(SecureString, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.type = 'SecureString' -class QueryStatistic(Model): - """A database query. +class SelfHostedIntegrationRuntime(IntegrationRuntime): + """Self-hosted integration runtime. - Variables are only populated by the server, and will be ignored when - sending a request. + All required parameters must be populated in order to send to Azure. - :ivar query_id: The id of the query - :vartype query_id: str - :ivar intervals: The list of query intervals. - :vartype intervals: list[~azure.mgmt.synapse.models.QueryInterval] + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Integration runtime description. + :type description: str + :param type: Required. Constant filled by server. + :type type: str + :param linked_info: Linked integration runtime type from data factory + :type linked_info: ~azure.mgmt.synapse.models.LinkedIntegrationRuntimeType """ _validation = { - 'query_id': {'readonly': True}, - 'intervals': {'readonly': True}, + 'type': {'required': True}, } _attribute_map = { - 'query_id': {'key': 'queryId', 'type': 'str'}, - 'intervals': {'key': 'intervals', 'type': '[QueryInterval]'}, + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'linked_info': {'key': 'typeProperties.linkedInfo', 'type': 'LinkedIntegrationRuntimeType'}, } def __init__(self, **kwargs): - super(QueryStatistic, self).__init__(**kwargs) - self.query_id = None - self.intervals = None + super(SelfHostedIntegrationRuntime, self).__init__(**kwargs) + self.linked_info = kwargs.get('linked_info', None) + self.type = 'SelfHosted' -class ReplaceAllFirewallRulesOperationResponse(Model): - """An existing operation for replacing the firewall rules. +class SelfHostedIntegrationRuntimeNode(Model): + """Properties of Self-hosted integration runtime node. - :param operation_id: The operation ID - :type operation_id: str + Variables are only populated by the server, and will be ignored when + sending a request. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :ivar node_name: Name of the integration runtime node. + :vartype node_name: str + :ivar machine_name: Machine name of the integration runtime node. + :vartype machine_name: str + :ivar host_service_uri: URI for the host machine of the integration + runtime. + :vartype host_service_uri: str + :ivar status: Status of the integration runtime node. Possible values + include: 'NeedRegistration', 'Online', 'Limited', 'Offline', 'Upgrading', + 'Initializing', 'InitializeFailed' + :vartype status: str or + ~azure.mgmt.synapse.models.SelfHostedIntegrationRuntimeNodeStatus + :ivar capabilities: The integration runtime capabilities dictionary + :vartype capabilities: dict[str, str] + :ivar version_status: Status of the integration runtime node version. + :vartype version_status: str + :ivar version: Version of the integration runtime node. + :vartype version: str + :ivar register_time: The time at which the integration runtime node was + registered in ISO8601 format. + :vartype register_time: datetime + :ivar last_connect_time: The most recent time at which the integration + runtime was connected in ISO8601 format. + :vartype last_connect_time: datetime + :ivar expiry_time: The time at which the integration runtime will expire + in ISO8601 format. + :vartype expiry_time: datetime + :ivar last_start_time: The time the node last started up. + :vartype last_start_time: datetime + :ivar last_stop_time: The integration runtime node last stop time. + :vartype last_stop_time: datetime + :ivar last_update_result: The result of the last integration runtime node + update. Possible values include: 'None', 'Succeed', 'Fail' + :vartype last_update_result: str or + ~azure.mgmt.synapse.models.IntegrationRuntimeUpdateResult + :ivar last_start_update_time: The last time for the integration runtime + node update start. + :vartype last_start_update_time: datetime + :ivar last_end_update_time: The last time for the integration runtime node + update end. + :vartype last_end_update_time: datetime + :ivar is_active_dispatcher: Indicates whether this node is the active + dispatcher for integration runtime requests. + :vartype is_active_dispatcher: bool + :ivar concurrent_jobs_limit: Maximum concurrent jobs on the integration + runtime node. + :vartype concurrent_jobs_limit: int + :ivar max_concurrent_jobs: The maximum concurrent jobs in this integration + runtime. + :vartype max_concurrent_jobs: int """ - _attribute_map = { - 'operation_id': {'key': 'operationId', 'type': 'str'}, + _validation = { + 'node_name': {'readonly': True}, + 'machine_name': {'readonly': True}, + 'host_service_uri': {'readonly': True}, + 'status': {'readonly': True}, + 'capabilities': {'readonly': True}, + 'version_status': {'readonly': True}, + 'version': {'readonly': True}, + 'register_time': {'readonly': True}, + 'last_connect_time': {'readonly': True}, + 'expiry_time': {'readonly': True}, + 'last_start_time': {'readonly': True}, + 'last_stop_time': {'readonly': True}, + 'last_update_result': {'readonly': True}, + 'last_start_update_time': {'readonly': True}, + 'last_end_update_time': {'readonly': True}, + 'is_active_dispatcher': {'readonly': True}, + 'concurrent_jobs_limit': {'readonly': True}, + 'max_concurrent_jobs': {'readonly': True}, } - def __init__(self, **kwargs): - super(ReplaceAllFirewallRulesOperationResponse, self).__init__(**kwargs) - self.operation_id = kwargs.get('operation_id', None) - - -class ReplaceAllIpFirewallRulesRequest(Model): - """Replace all IP firewall rules request. - - :param ip_firewall_rules: IP firewall rule properties - :type ip_firewall_rules: dict[str, - ~azure.mgmt.synapse.models.IpFirewallRuleProperties] - """ - _attribute_map = { - 'ip_firewall_rules': {'key': 'ipFirewallRules', 'type': '{IpFirewallRuleProperties}'}, + 'additional_properties': {'key': '', 'type': '{object}'}, + 'node_name': {'key': 'nodeName', 'type': 'str'}, + 'machine_name': {'key': 'machineName', 'type': 'str'}, + 'host_service_uri': {'key': 'hostServiceUri', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'capabilities': {'key': 'capabilities', 'type': '{str}'}, + 'version_status': {'key': 'versionStatus', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'register_time': {'key': 'registerTime', 'type': 'iso-8601'}, + 'last_connect_time': {'key': 'lastConnectTime', 'type': 'iso-8601'}, + 'expiry_time': {'key': 'expiryTime', 'type': 'iso-8601'}, + 'last_start_time': {'key': 'lastStartTime', 'type': 'iso-8601'}, + 'last_stop_time': {'key': 'lastStopTime', 'type': 'iso-8601'}, + 'last_update_result': {'key': 'lastUpdateResult', 'type': 'str'}, + 'last_start_update_time': {'key': 'lastStartUpdateTime', 'type': 'iso-8601'}, + 'last_end_update_time': {'key': 'lastEndUpdateTime', 'type': 'iso-8601'}, + 'is_active_dispatcher': {'key': 'isActiveDispatcher', 'type': 'bool'}, + 'concurrent_jobs_limit': {'key': 'concurrentJobsLimit', 'type': 'int'}, + 'max_concurrent_jobs': {'key': 'maxConcurrentJobs', 'type': 'int'}, } def __init__(self, **kwargs): - super(ReplaceAllIpFirewallRulesRequest, self).__init__(**kwargs) - self.ip_firewall_rules = kwargs.get('ip_firewall_rules', None) + super(SelfHostedIntegrationRuntimeNode, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.node_name = None + self.machine_name = None + self.host_service_uri = None + self.status = None + self.capabilities = None + self.version_status = None + self.version = None + self.register_time = None + self.last_connect_time = None + self.expiry_time = None + self.last_start_time = None + self.last_stop_time = None + self.last_update_result = None + self.last_start_update_time = None + self.last_end_update_time = None + self.is_active_dispatcher = None + self.concurrent_jobs_limit = None + self.max_concurrent_jobs = None -class ReplicationLink(ProxyResource): - """Represents a Sql pool replication link. +class SelfHostedIntegrationRuntimeStatus(IntegrationRuntimeStatus): + """Self-hosted integration runtime status. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :ivar location: Location of the workspace that contains this firewall - rule. - :vartype location: str - :ivar is_termination_allowed: Legacy value indicating whether termination - is allowed. Currently always returns true. - :vartype is_termination_allowed: bool - :ivar replication_mode: Replication mode of this replication link. - :vartype replication_mode: str - :ivar partner_server: The name of the workspace hosting the partner Sql - pool. - :vartype partner_server: str - :ivar partner_database: The name of the partner Sql pool. - :vartype partner_database: str - :ivar partner_location: The Azure Region of the partner Sql pool. - :vartype partner_location: str - :ivar role: The role of the Sql pool in the replication link. Possible - values include: 'Primary', 'Secondary', 'NonReadableSecondary', 'Source', - 'Copy' - :vartype role: str or ~azure.mgmt.synapse.models.ReplicationRole - :ivar partner_role: The role of the partner Sql pool in the replication - link. Possible values include: 'Primary', 'Secondary', - 'NonReadableSecondary', 'Source', 'Copy' - :vartype partner_role: str or ~azure.mgmt.synapse.models.ReplicationRole - :ivar start_time: The start time for the replication link. - :vartype start_time: datetime - :ivar percent_complete: The percentage of seeding complete for the - replication link. - :vartype percent_complete: int - :ivar replication_state: The replication state for the replication link. - Possible values include: 'PENDING', 'SEEDING', 'CATCH_UP', 'SUSPENDED' - :vartype replication_state: str or - ~azure.mgmt.synapse.models.ReplicationState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'is_termination_allowed': {'readonly': True}, - 'replication_mode': {'readonly': True}, - 'partner_server': {'readonly': True}, - 'partner_database': {'readonly': True}, - 'partner_location': {'readonly': True}, - 'role': {'readonly': True}, - 'partner_role': {'readonly': True}, - 'start_time': {'readonly': True}, - 'percent_complete': {'readonly': True}, - 'replication_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'is_termination_allowed': {'key': 'properties.isTerminationAllowed', 'type': 'bool'}, - 'replication_mode': {'key': 'properties.replicationMode', 'type': 'str'}, - 'partner_server': {'key': 'properties.partnerServer', 'type': 'str'}, - 'partner_database': {'key': 'properties.partnerDatabase', 'type': 'str'}, - 'partner_location': {'key': 'properties.partnerLocation', 'type': 'str'}, - 'role': {'key': 'properties.role', 'type': 'ReplicationRole'}, - 'partner_role': {'key': 'properties.partnerRole', 'type': 'ReplicationRole'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, - 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ReplicationLink, self).__init__(**kwargs) - self.location = None - self.is_termination_allowed = None - self.replication_mode = None - self.partner_server = None - self.partner_database = None - self.partner_location = None - self.role = None - self.partner_role = None - self.start_time = None - self.percent_complete = None - self.replication_state = None - - -class ResourceMoveDefinition(Model): - """Contains the information necessary to perform a resource move (rename). - All required parameters must be populated in order to send to Azure. - :param id: Required. The target ID for the resource - :type id: str + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :ivar data_factory_name: The workspace name which the integration runtime + belong to. + :vartype data_factory_name: str + :ivar state: The state of integration runtime. Possible values include: + 'Initial', 'Stopped', 'Started', 'Starting', 'Stopping', + 'NeedRegistration', 'Online', 'Limited', 'Offline', 'AccessDenied' + :vartype state: str or ~azure.mgmt.synapse.models.IntegrationRuntimeState + :param type: Required. Constant filled by server. + :type type: str + :ivar create_time: The time at which the integration runtime was created, + in ISO8601 format. + :vartype create_time: datetime + :ivar task_queue_id: The task queue id of the integration runtime. + :vartype task_queue_id: str + :ivar node_communication_channel_encryption_mode: The node communication + Channel encryption mode + :vartype node_communication_channel_encryption_mode: str + :ivar internal_channel_encryption: It is used to set the encryption mode + for node-node communication channel (when more than 2 self-hosted + integration runtime nodes exist). Possible values include: 'NotSet', + 'SslEncrypted', 'NotEncrypted' + :vartype internal_channel_encryption: str or + ~azure.mgmt.synapse.models.IntegrationRuntimeInternalChannelEncryptionMode + :ivar version: Version of the integration runtime. + :vartype version: str + :param nodes: The list of nodes for this integration runtime. + :type nodes: + list[~azure.mgmt.synapse.models.SelfHostedIntegrationRuntimeNode] + :ivar scheduled_update_date: The date at which the integration runtime + will be scheduled to update, in ISO8601 format. + :vartype scheduled_update_date: datetime + :ivar update_delay_offset: The time in the date scheduled by service to + update the integration runtime, e.g., PT03H is 3 hours + :vartype update_delay_offset: str + :ivar local_time_zone_offset: The local time zone offset in hours. + :vartype local_time_zone_offset: str + :ivar capabilities: Object with additional information about integration + runtime capabilities. + :vartype capabilities: dict[str, str] + :ivar service_urls: The URLs for the services used in integration runtime + backend service. + :vartype service_urls: list[str] + :ivar auto_update: Whether Self-hosted integration runtime auto update has + been turned on. Possible values include: 'On', 'Off' + :vartype auto_update: str or + ~azure.mgmt.synapse.models.IntegrationRuntimeAutoUpdate + :ivar version_status: Status of the integration runtime version. + :vartype version_status: str + :param links: The list of linked integration runtimes that are created to + share with this integration runtime. + :type links: list[~azure.mgmt.synapse.models.LinkedIntegrationRuntime] + :ivar pushed_version: The version that the integration runtime is going to + update to. + :vartype pushed_version: str + :ivar latest_version: The latest version on download center. + :vartype latest_version: str + :ivar auto_update_eta: The estimated time when the self-hosted integration + runtime will be updated. + :vartype auto_update_eta: datetime """ _validation = { - 'id': {'required': True}, + 'data_factory_name': {'readonly': True}, + 'state': {'readonly': True}, + 'type': {'required': True}, + 'create_time': {'readonly': True}, + 'task_queue_id': {'readonly': True}, + 'node_communication_channel_encryption_mode': {'readonly': True}, + 'internal_channel_encryption': {'readonly': True}, + 'version': {'readonly': True}, + 'scheduled_update_date': {'readonly': True}, + 'update_delay_offset': {'readonly': True}, + 'local_time_zone_offset': {'readonly': True}, + 'capabilities': {'readonly': True}, + 'service_urls': {'readonly': True}, + 'auto_update': {'readonly': True}, + 'version_status': {'readonly': True}, + 'pushed_version': {'readonly': True}, + 'latest_version': {'readonly': True}, + 'auto_update_eta': {'readonly': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, + 'additional_properties': {'key': '', 'type': '{object}'}, + 'data_factory_name': {'key': 'dataFactoryName', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'create_time': {'key': 'typeProperties.createTime', 'type': 'iso-8601'}, + 'task_queue_id': {'key': 'typeProperties.taskQueueId', 'type': 'str'}, + 'node_communication_channel_encryption_mode': {'key': 'typeProperties.nodeCommunicationChannelEncryptionMode', 'type': 'str'}, + 'internal_channel_encryption': {'key': 'typeProperties.internalChannelEncryption', 'type': 'str'}, + 'version': {'key': 'typeProperties.version', 'type': 'str'}, + 'nodes': {'key': 'typeProperties.nodes', 'type': '[SelfHostedIntegrationRuntimeNode]'}, + 'scheduled_update_date': {'key': 'typeProperties.scheduledUpdateDate', 'type': 'iso-8601'}, + 'update_delay_offset': {'key': 'typeProperties.updateDelayOffset', 'type': 'str'}, + 'local_time_zone_offset': {'key': 'typeProperties.localTimeZoneOffset', 'type': 'str'}, + 'capabilities': {'key': 'typeProperties.capabilities', 'type': '{str}'}, + 'service_urls': {'key': 'typeProperties.serviceUrls', 'type': '[str]'}, + 'auto_update': {'key': 'typeProperties.autoUpdate', 'type': 'str'}, + 'version_status': {'key': 'typeProperties.versionStatus', 'type': 'str'}, + 'links': {'key': 'typeProperties.links', 'type': '[LinkedIntegrationRuntime]'}, + 'pushed_version': {'key': 'typeProperties.pushedVersion', 'type': 'str'}, + 'latest_version': {'key': 'typeProperties.latestVersion', 'type': 'str'}, + 'auto_update_eta': {'key': 'typeProperties.autoUpdateETA', 'type': 'iso-8601'}, } def __init__(self, **kwargs): - super(ResourceMoveDefinition, self).__init__(**kwargs) - self.id = kwargs.get('id', None) + super(SelfHostedIntegrationRuntimeStatus, self).__init__(**kwargs) + self.create_time = None + self.task_queue_id = None + self.node_communication_channel_encryption_mode = None + self.internal_channel_encryption = None + self.version = None + self.nodes = kwargs.get('nodes', None) + self.scheduled_update_date = None + self.update_delay_offset = None + self.local_time_zone_offset = None + self.capabilities = None + self.service_urls = None + self.auto_update = None + self.version_status = None + self.links = kwargs.get('links', None) + self.pushed_version = None + self.latest_version = None + self.auto_update_eta = None + self.type = 'SelfHosted' -class RestorePoint(ProxyResource): - """Database restore points. +class SensitivityLabel(ProxyResource): + """A sensitivity label. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str - :ivar location: Resource location. - :vartype location: str - :ivar restore_point_type: The type of restore point. Possible values - include: 'CONTINUOUS', 'DISCRETE' - :vartype restore_point_type: str or - ~azure.mgmt.synapse.models.RestorePointType - :ivar earliest_restore_date: The earliest time to which this database can - be restored - :vartype earliest_restore_date: datetime - :ivar restore_point_creation_date: The time the backup was taken - :vartype restore_point_creation_date: datetime - :ivar restore_point_label: The label of restore point for backup request - by user - :vartype restore_point_label: str + :param label_name: The label name. + :type label_name: str + :param label_id: The label ID. + :type label_id: str + :param information_type: The information type. + :type information_type: str + :param information_type_id: The information type ID. + :type information_type_id: str + :ivar is_disabled: Is sensitivity recommendation disabled. Applicable for + recommended sensitivity label only. Specifies whether the sensitivity + recommendation on this column is disabled (dismissed) or not. + :vartype is_disabled: bool """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'restore_point_type': {'readonly': True}, - 'earliest_restore_date': {'readonly': True}, - 'restore_point_creation_date': {'readonly': True}, - 'restore_point_label': {'readonly': True}, + 'is_disabled': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'restore_point_type': {'key': 'properties.restorePointType', 'type': 'RestorePointType'}, - 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, - 'restore_point_creation_date': {'key': 'properties.restorePointCreationDate', 'type': 'iso-8601'}, - 'restore_point_label': {'key': 'properties.restorePointLabel', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RestorePoint, self).__init__(**kwargs) - self.location = None - self.restore_point_type = None - self.earliest_restore_date = None - self.restore_point_creation_date = None - self.restore_point_label = None - - -class SecretBase(Model): - """The base definition of a secret type. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: SecureString - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - } - - _subtype_map = { - 'type': {'SecureString': 'SecureString'} + 'label_name': {'key': 'properties.labelName', 'type': 'str'}, + 'label_id': {'key': 'properties.labelId', 'type': 'str'}, + 'information_type': {'key': 'properties.informationType', 'type': 'str'}, + 'information_type_id': {'key': 'properties.informationTypeId', 'type': 'str'}, + 'is_disabled': {'key': 'properties.isDisabled', 'type': 'bool'}, } def __init__(self, **kwargs): - super(SecretBase, self).__init__(**kwargs) - self.type = None - - -class SecureString(SecretBase): - """Azure Synapse secure string definition. The string value will be masked - with asterisks '*' during Get or List API calls. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - :param value: Required. Value of secure string. - :type value: str - """ - - _validation = { - 'type': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } + super(SensitivityLabel, self).__init__(**kwargs) + self.label_name = kwargs.get('label_name', None) + self.label_id = kwargs.get('label_id', None) + self.information_type = kwargs.get('information_type', None) + self.information_type_id = kwargs.get('information_type_id', None) + self.is_disabled = None - def __init__(self, **kwargs): - super(SecureString, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.type = 'SecureString' +class ServerBlobAuditingPolicy(ProxyResource): + """A server blob auditing policy. -class SelfHostedIntegrationRuntime(IntegrationRuntime): - """Self-hosted integration runtime. + Variables are only populated by the server, and will be ignored when + sending a request. All required parameters must be populated in order to send to Azure. - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Integration runtime description. - :type description: str - :param type: Required. Constant filled by server. - :type type: str - :param linked_info: - :type linked_info: ~azure.mgmt.synapse.models.LinkedIntegrationRuntimeType + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + :vartype type: str + :param state: Required. Specifies the state of the policy. If state is + Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. + Possible values include: 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.synapse.models.BlobAuditingPolicyState + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). If state is Enabled, + storageEndpoint or isAzureMonitorTargetEnabled is required. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + auditing storage account. + If state is Enabled and storageEndpoint is specified, not specifying the + storageAccountAccessKey will use SQL server system-assigned managed + identity to access the storage. + Prerequisites for using managed identity authentication: + 1. Assign SQL Server a system-assigned managed identity in Azure Active + Directory (AAD). + 2. Grant SQL Server identity access to the storage account by adding + 'Storage Blob Data Contributor' RBAC role to the server identity. + For more information, see [Auditing to storage using Managed Identity + authentication](https://go.microsoft.com/fwlink/?linkid=2114355) + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the audit + logs in the storage account. + :type retention_days: int + :param audit_actions_and_groups: Specifies the Actions-Groups and Actions + to audit. + The recommended set of action groups to use is the following combination - + this will audit all the queries and stored procedures executed against the + database, as well as successful and failed logins: + BATCH_COMPLETED_GROUP, + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + FAILED_DATABASE_AUTHENTICATION_GROUP. + This above combination is also the set that is configured by default when + enabling auditing from the Azure portal. + The supported action groups to audit are (note: choose only specific + groups that cover your auditing needs. Using unnecessary groups could lead + to very large quantities of audit records): + APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + BACKUP_RESTORE_GROUP + DATABASE_LOGOUT_GROUP + DATABASE_OBJECT_CHANGE_GROUP + DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + DATABASE_OPERATION_GROUP + DATABASE_PERMISSION_CHANGE_GROUP + DATABASE_PRINCIPAL_CHANGE_GROUP + DATABASE_PRINCIPAL_IMPERSONATION_GROUP + DATABASE_ROLE_MEMBER_CHANGE_GROUP + FAILED_DATABASE_AUTHENTICATION_GROUP + SCHEMA_OBJECT_ACCESS_GROUP + SCHEMA_OBJECT_CHANGE_GROUP + SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + USER_CHANGE_PASSWORD_GROUP + BATCH_STARTED_GROUP + BATCH_COMPLETED_GROUP + These are groups that cover all sql statements and stored procedures + executed against the database, and should not be used in combination with + other groups as this will result in duplicate audit logs. + For more information, see [Database-Level Audit Action + Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + For Database auditing policy, specific Actions can also be specified (note + that Actions cannot be specified for Server auditing policy). The + supported actions to audit are: + SELECT + UPDATE + INSERT + DELETE + EXECUTE + RECEIVE + REFERENCES + The general form for defining an action to be audited is: + {action} ON {object} BY {principal} + Note that in the above format can refer to an object like a + table, view, or stored procedure, or an entire database or schema. For the + latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are + used, respectively. + For example: + SELECT on dbo.myTable by public + SELECT on DATABASE::myDatabase by public + SELECT on SCHEMA::mySchema by public + For more information, see [Database-Level Audit + Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + :type audit_actions_and_groups: list[str] + :param storage_account_subscription_id: Specifies the blob storage + subscription Id. + :type storage_account_subscription_id: str + :param is_storage_secondary_key_in_use: Specifies whether + storageAccountAccessKey value is the storage's secondary key. + :type is_storage_secondary_key_in_use: bool + :param is_azure_monitor_target_enabled: Specifies whether audit events are + sent to Azure Monitor. + In order to send the events to Azure Monitor, specify 'state' as 'Enabled' + and 'isAzureMonitorTargetEnabled' as true. + When using REST API to configure auditing, Diagnostic Settings with + 'SQLSecurityAuditEvents' diagnostic logs category on the database should + be also created. + Note that for server level audit you should use the 'master' database as + {databaseName}. + Diagnostic Settings URI format: + PUT + https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + For more information, see [Diagnostic Settings REST + API](https://go.microsoft.com/fwlink/?linkid=2033207) + or [Diagnostic Settings + PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + :type is_azure_monitor_target_enabled: bool + :param queue_delay_ms: Specifies the amount of time in milliseconds that + can elapse before audit actions are forced to be processed. + The default minimum value is 1000 (1 second). The maximum is + 2,147,483,647. + :type queue_delay_ms: int """ _validation = { - 'type': {'required': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, } _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'linked_info': {'key': 'typeProperties.linkedInfo', 'type': 'LinkedIntegrationRuntimeType'}, - } - - def __init__(self, **kwargs): - super(SelfHostedIntegrationRuntime, self).__init__(**kwargs) - self.linked_info = kwargs.get('linked_info', None) - self.type = 'SelfHosted' - - -class SelfHostedIntegrationRuntimeNode(Model): - """Properties of Self-hosted integration runtime node. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :ivar node_name: Name of the integration runtime node. - :vartype node_name: str - :ivar machine_name: Machine name of the integration runtime node. - :vartype machine_name: str - :ivar host_service_uri: URI for the host machine of the integration - runtime. - :vartype host_service_uri: str - :ivar status: Status of the integration runtime node. Possible values - include: 'NeedRegistration', 'Online', 'Limited', 'Offline', 'Upgrading', - 'Initializing', 'InitializeFailed' - :vartype status: str or - ~azure.mgmt.synapse.models.SelfHostedIntegrationRuntimeNodeStatus - :ivar capabilities: The integration runtime capabilities dictionary - :vartype capabilities: dict[str, str] - :ivar version_status: Status of the integration runtime node version. - :vartype version_status: str - :ivar version: Version of the integration runtime node. - :vartype version: str - :ivar register_time: The time at which the integration runtime node was - registered in ISO8601 format. - :vartype register_time: datetime - :ivar last_connect_time: The most recent time at which the integration - runtime was connected in ISO8601 format. - :vartype last_connect_time: datetime - :ivar expiry_time: The time at which the integration runtime will expire - in ISO8601 format. - :vartype expiry_time: datetime - :ivar last_start_time: The time the node last started up. - :vartype last_start_time: datetime - :ivar last_stop_time: The integration runtime node last stop time. - :vartype last_stop_time: datetime - :ivar last_update_result: The result of the last integration runtime node - update. Possible values include: 'None', 'Succeed', 'Fail' - :vartype last_update_result: str or - ~azure.mgmt.synapse.models.IntegrationRuntimeUpdateResult - :ivar last_start_update_time: The last time for the integration runtime - node update start. - :vartype last_start_update_time: datetime - :ivar last_end_update_time: The last time for the integration runtime node - update end. - :vartype last_end_update_time: datetime - :ivar is_active_dispatcher: Indicates whether this node is the active - dispatcher for integration runtime requests. - :vartype is_active_dispatcher: bool - :ivar concurrent_jobs_limit: Maximum concurrent jobs on the integration - runtime node. - :vartype concurrent_jobs_limit: int - :ivar max_concurrent_jobs: The maximum concurrent jobs in this integration - runtime. - :vartype max_concurrent_jobs: int - """ - - _validation = { - 'node_name': {'readonly': True}, - 'machine_name': {'readonly': True}, - 'host_service_uri': {'readonly': True}, - 'status': {'readonly': True}, - 'capabilities': {'readonly': True}, - 'version_status': {'readonly': True}, - 'version': {'readonly': True}, - 'register_time': {'readonly': True}, - 'last_connect_time': {'readonly': True}, - 'expiry_time': {'readonly': True}, - 'last_start_time': {'readonly': True}, - 'last_stop_time': {'readonly': True}, - 'last_update_result': {'readonly': True}, - 'last_start_update_time': {'readonly': True}, - 'last_end_update_time': {'readonly': True}, - 'is_active_dispatcher': {'readonly': True}, - 'concurrent_jobs_limit': {'readonly': True}, - 'max_concurrent_jobs': {'readonly': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'node_name': {'key': 'nodeName', 'type': 'str'}, - 'machine_name': {'key': 'machineName', 'type': 'str'}, - 'host_service_uri': {'key': 'hostServiceUri', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'capabilities': {'key': 'capabilities', 'type': '{str}'}, - 'version_status': {'key': 'versionStatus', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - 'register_time': {'key': 'registerTime', 'type': 'iso-8601'}, - 'last_connect_time': {'key': 'lastConnectTime', 'type': 'iso-8601'}, - 'expiry_time': {'key': 'expiryTime', 'type': 'iso-8601'}, - 'last_start_time': {'key': 'lastStartTime', 'type': 'iso-8601'}, - 'last_stop_time': {'key': 'lastStopTime', 'type': 'iso-8601'}, - 'last_update_result': {'key': 'lastUpdateResult', 'type': 'str'}, - 'last_start_update_time': {'key': 'lastStartUpdateTime', 'type': 'iso-8601'}, - 'last_end_update_time': {'key': 'lastEndUpdateTime', 'type': 'iso-8601'}, - 'is_active_dispatcher': {'key': 'isActiveDispatcher', 'type': 'bool'}, - 'concurrent_jobs_limit': {'key': 'concurrentJobsLimit', 'type': 'int'}, - 'max_concurrent_jobs': {'key': 'maxConcurrentJobs', 'type': 'int'}, + 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, + 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, + 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, + 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, + 'queue_delay_ms': {'key': 'properties.queueDelayMs', 'type': 'int'}, } def __init__(self, **kwargs): - super(SelfHostedIntegrationRuntimeNode, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.node_name = None - self.machine_name = None - self.host_service_uri = None - self.status = None - self.capabilities = None - self.version_status = None - self.version = None - self.register_time = None - self.last_connect_time = None - self.expiry_time = None - self.last_start_time = None - self.last_stop_time = None - self.last_update_result = None - self.last_start_update_time = None - self.last_end_update_time = None - self.is_active_dispatcher = None - self.concurrent_jobs_limit = None - self.max_concurrent_jobs = None + super(ServerBlobAuditingPolicy, self).__init__(**kwargs) + self.state = kwargs.get('state', None) + self.storage_endpoint = kwargs.get('storage_endpoint', None) + self.storage_account_access_key = kwargs.get('storage_account_access_key', None) + self.retention_days = kwargs.get('retention_days', None) + self.audit_actions_and_groups = kwargs.get('audit_actions_and_groups', None) + self.storage_account_subscription_id = kwargs.get('storage_account_subscription_id', None) + self.is_storage_secondary_key_in_use = kwargs.get('is_storage_secondary_key_in_use', None) + self.is_azure_monitor_target_enabled = kwargs.get('is_azure_monitor_target_enabled', None) + self.queue_delay_ms = kwargs.get('queue_delay_ms', None) -class SelfHostedIntegrationRuntimeStatus(IntegrationRuntimeStatus): - """Self-hosted integration runtime status. +class ServerSecurityAlertPolicy(ProxyResource): + """Workspace managed Sql server security alert policy. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :ivar data_factory_name: The workspace name which the integration runtime - belong to. - :vartype data_factory_name: str - :ivar state: The state of integration runtime. Possible values include: - 'Initial', 'Stopped', 'Started', 'Starting', 'Stopping', - 'NeedRegistration', 'Online', 'Limited', 'Offline', 'AccessDenied' - :vartype state: str or ~azure.mgmt.synapse.models.IntegrationRuntimeState - :param type: Required. Constant filled by server. - :type type: str - :ivar create_time: The time at which the integration runtime was created, - in ISO8601 format. - :vartype create_time: datetime - :ivar task_queue_id: The task queue id of the integration runtime. - :vartype task_queue_id: str - :ivar internal_channel_encryption: It is used to set the encryption mode - for node-node communication channel (when more than 2 self-hosted - integration runtime nodes exist). Possible values include: 'NotSet', - 'SslEncrypted', 'NotEncrypted' - :vartype internal_channel_encryption: str or - ~azure.mgmt.synapse.models.IntegrationRuntimeInternalChannelEncryptionMode - :ivar version: Version of the integration runtime. - :vartype version: str - :param nodes: The list of nodes for this integration runtime. - :type nodes: - list[~azure.mgmt.synapse.models.SelfHostedIntegrationRuntimeNode] - :ivar scheduled_update_date: The date at which the integration runtime - will be scheduled to update, in ISO8601 format. - :vartype scheduled_update_date: datetime - :ivar update_delay_offset: The time in the date scheduled by service to - update the integration runtime, e.g., PT03H is 3 hours - :vartype update_delay_offset: str - :ivar local_time_zone_offset: The local time zone offset in hours. - :vartype local_time_zone_offset: str - :ivar capabilities: Object with additional information about integration - runtime capabilities. - :vartype capabilities: dict[str, str] - :ivar service_urls: The URLs for the services used in integration runtime - backend service. - :vartype service_urls: list[str] - :ivar auto_update: Whether Self-hosted integration runtime auto update has - been turned on. Possible values include: 'On', 'Off' - :vartype auto_update: str or - ~azure.mgmt.synapse.models.IntegrationRuntimeAutoUpdate - :ivar version_status: Status of the integration runtime version. - :vartype version_status: str - :param links: The list of linked integration runtimes that are created to - share with this integration runtime. - :type links: list[~azure.mgmt.synapse.models.LinkedIntegrationRuntime] - :ivar pushed_version: The version that the integration runtime is going to - update to. - :vartype pushed_version: str - :ivar latest_version: The latest version on download center. - :vartype latest_version: str - :ivar auto_update_eta: The estimated time when the self-hosted integration - runtime will be updated. - :vartype auto_update_eta: datetime + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + :vartype type: str + :param state: Required. Specifies the state of the policy, whether it is + enabled or disabled or a policy has not been applied yet on the specific + server. Possible values include: 'New', 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.synapse.models.SecurityAlertPolicyState + :param disabled_alerts: Specifies an array of alerts that are disabled. + Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, + Access_Anomaly, Data_Exfiltration, Unsafe_Action + :type disabled_alerts: list[str] + :param email_addresses: Specifies an array of e-mail addresses to which + the alert is sent. + :type email_addresses: list[str] + :param email_account_admins: Specifies that the alert is sent to the + account administrators. + :type email_account_admins: bool + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). This blob storage will hold all + Threat Detection audit logs. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + Threat Detection audit storage account. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the Threat + Detection audit logs. + :type retention_days: int + :ivar creation_time: Specifies the UTC creation time of the policy. + :vartype creation_time: datetime """ _validation = { - 'data_factory_name': {'readonly': True}, - 'state': {'readonly': True}, - 'type': {'required': True}, - 'create_time': {'readonly': True}, - 'task_queue_id': {'readonly': True}, - 'internal_channel_encryption': {'readonly': True}, - 'version': {'readonly': True}, - 'scheduled_update_date': {'readonly': True}, - 'update_delay_offset': {'readonly': True}, - 'local_time_zone_offset': {'readonly': True}, - 'capabilities': {'readonly': True}, - 'service_urls': {'readonly': True}, - 'auto_update': {'readonly': True}, - 'version_status': {'readonly': True}, - 'pushed_version': {'readonly': True}, - 'latest_version': {'readonly': True}, - 'auto_update_eta': {'readonly': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + 'creation_time': {'readonly': True}, } _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'data_factory_name': {'key': 'dataFactoryName', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'create_time': {'key': 'typeProperties.createTime', 'type': 'iso-8601'}, - 'task_queue_id': {'key': 'typeProperties.taskQueueId', 'type': 'str'}, - 'internal_channel_encryption': {'key': 'typeProperties.internalChannelEncryption', 'type': 'str'}, - 'version': {'key': 'typeProperties.version', 'type': 'str'}, - 'nodes': {'key': 'typeProperties.nodes', 'type': '[SelfHostedIntegrationRuntimeNode]'}, - 'scheduled_update_date': {'key': 'typeProperties.scheduledUpdateDate', 'type': 'iso-8601'}, - 'update_delay_offset': {'key': 'typeProperties.updateDelayOffset', 'type': 'str'}, - 'local_time_zone_offset': {'key': 'typeProperties.localTimeZoneOffset', 'type': 'str'}, - 'capabilities': {'key': 'typeProperties.capabilities', 'type': '{str}'}, - 'service_urls': {'key': 'typeProperties.serviceUrls', 'type': '[str]'}, - 'auto_update': {'key': 'typeProperties.autoUpdate', 'type': 'str'}, - 'version_status': {'key': 'typeProperties.versionStatus', 'type': 'str'}, - 'links': {'key': 'typeProperties.links', 'type': '[LinkedIntegrationRuntime]'}, - 'pushed_version': {'key': 'typeProperties.pushedVersion', 'type': 'str'}, - 'latest_version': {'key': 'typeProperties.latestVersion', 'type': 'str'}, - 'auto_update_eta': {'key': 'typeProperties.autoUpdateETA', 'type': 'iso-8601'}, + 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, + 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, + 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, + 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, } def __init__(self, **kwargs): - super(SelfHostedIntegrationRuntimeStatus, self).__init__(**kwargs) - self.create_time = None - self.task_queue_id = None - self.internal_channel_encryption = None - self.version = None - self.nodes = kwargs.get('nodes', None) - self.scheduled_update_date = None - self.update_delay_offset = None - self.local_time_zone_offset = None - self.capabilities = None - self.service_urls = None - self.auto_update = None - self.version_status = None - self.links = kwargs.get('links', None) - self.pushed_version = None - self.latest_version = None - self.auto_update_eta = None - self.type = 'SelfHosted' + super(ServerSecurityAlertPolicy, self).__init__(**kwargs) + self.state = kwargs.get('state', None) + self.disabled_alerts = kwargs.get('disabled_alerts', None) + self.email_addresses = kwargs.get('email_addresses', None) + self.email_account_admins = kwargs.get('email_account_admins', None) + self.storage_endpoint = kwargs.get('storage_endpoint', None) + self.storage_account_access_key = kwargs.get('storage_account_access_key', None) + self.retention_days = kwargs.get('retention_days', None) + self.creation_time = None -class SensitivityLabel(ProxyResource): - """A sensitivity label. +class ServerUsage(Model): + """Represents server metrics. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Name of the server usage metric. + :vartype name: str + :ivar resource_name: The name of the resource. + :vartype resource_name: str + :ivar display_name: The metric display name. + :vartype display_name: str + :ivar current_value: The current value of the metric. + :vartype current_value: float + :ivar limit: The current limit of the metric. + :vartype limit: float + :ivar unit: The units of the metric. + :vartype unit: str + :ivar next_reset_time: The next reset time for the metric (ISO8601 + format). + :vartype next_reset_time: datetime + """ + + _validation = { + 'name': {'readonly': True}, + 'resource_name': {'readonly': True}, + 'display_name': {'readonly': True}, + 'current_value': {'readonly': True}, + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + 'next_reset_time': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'resource_name': {'key': 'resourceName', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'float'}, + 'limit': {'key': 'limit', 'type': 'float'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'next_reset_time': {'key': 'nextResetTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(ServerUsage, self).__init__(**kwargs) + self.name = None + self.resource_name = None + self.display_name = None + self.current_value = None + self.limit = None + self.unit = None + self.next_reset_time = None + + +class ServerVulnerabilityAssessment(ProxyResource): + """A server vulnerability assessment. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str - :param label_name: The label name. - :type label_name: str - :param label_id: The label ID. - :type label_id: str - :param information_type: The information type. - :type information_type: str - :param information_type_id: The information type ID. - :type information_type_id: str - :ivar is_disabled: Is sensitivity recommendation disabled. Applicable for - recommended sensitivity label only. Specifies whether the sensitivity - recommendation on this column is disabled (dismissed) or not. - :vartype is_disabled: bool + :param storage_container_path: Required. A blob storage container path to + hold the scan results (e.g. + https://myStorage.blob.core.windows.net/VaScans/). + :type storage_container_path: str + :param storage_container_sas_key: A shared access signature (SAS Key) that + has read and write access to the blob container specified in + 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't + specified, StorageContainerSasKey is required. + :type storage_container_sas_key: str + :param storage_account_access_key: Specifies the identifier key of the + storage account for vulnerability assessment scan results. If + 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is + required. + :type storage_account_access_key: str + :param recurring_scans: The recurring scans settings + :type recurring_scans: + ~azure.mgmt.synapse.models.VulnerabilityAssessmentRecurringScansProperties """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'is_disabled': {'readonly': True}, + 'storage_container_path': {'required': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'label_name': {'key': 'properties.labelName', 'type': 'str'}, - 'label_id': {'key': 'properties.labelId', 'type': 'str'}, - 'information_type': {'key': 'properties.informationType', 'type': 'str'}, - 'information_type_id': {'key': 'properties.informationTypeId', 'type': 'str'}, - 'is_disabled': {'key': 'properties.isDisabled', 'type': 'bool'}, + 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, + 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, } def __init__(self, **kwargs): - super(SensitivityLabel, self).__init__(**kwargs) - self.label_name = kwargs.get('label_name', None) - self.label_id = kwargs.get('label_id', None) - self.information_type = kwargs.get('information_type', None) - self.information_type_id = kwargs.get('information_type_id', None) - self.is_disabled = None + super(ServerVulnerabilityAssessment, self).__init__(**kwargs) + self.storage_container_path = kwargs.get('storage_container_path', None) + self.storage_container_sas_key = kwargs.get('storage_container_sas_key', None) + self.storage_account_access_key = kwargs.get('storage_account_access_key', None) + self.recurring_scans = kwargs.get('recurring_scans', None) class Sku(Model): @@ -3400,13 +4749,13 @@ class SqlPool(TrackedResource): All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :param tags: Resource tags. :type tags: dict[str, str] @@ -3481,13 +4830,13 @@ class SqlPoolBlobAuditingPolicy(ProxyResource): All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :ivar kind: Resource kind. :vartype kind: str @@ -3634,13 +4983,13 @@ class SqlPoolColumn(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :param column_type: The column data type. Possible values include: 'image', 'text', 'uniqueidentifier', 'date', 'time', 'datetime2', @@ -3676,13 +5025,13 @@ class SqlPoolConnectionPolicy(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :ivar kind: Resource kind. :vartype kind: str @@ -3747,13 +5096,13 @@ class SqlPoolOperation(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :ivar database_name: The name of the Sql pool the operation is being performed on. @@ -3914,13 +5263,13 @@ class SqlPoolSchema(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str """ @@ -3948,13 +5297,13 @@ class SqlPoolSecurityAlertPolicy(ProxyResource): All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :param state: Required. Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific @@ -4024,13 +5373,13 @@ class SqlPoolTable(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str """ @@ -4110,13 +5459,13 @@ class SqlPoolVulnerabilityAssessment(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :param storage_container_path: A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/). It @@ -4169,13 +5518,13 @@ class SqlPoolVulnerabilityAssessmentRuleBaseline(ProxyResource): All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :param baseline_results: Required. The rule baseline result :type baseline_results: @@ -4229,13 +5578,13 @@ class SqlPoolVulnerabilityAssessmentScansExport(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :ivar exported_report_location: Location of the exported report (e.g. https://myStorage.blob.core.windows.net/VaScans/scans/serverName/databaseName/scan_scanId.xlsx). @@ -4741,13 +6090,13 @@ class TransparentDataEncryption(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :ivar location: Resource location. :vartype location: str @@ -4903,13 +6252,13 @@ class VulnerabilityAssessmentScanRecord(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :ivar scan_id: The scan ID. :vartype scan_id: str @@ -4975,6 +6324,131 @@ def __init__(self, **kwargs): self.number_of_failed_security_checks = None +class WorkloadClassifier(ProxyResource): + """Workload classifier operations for a data warehouse. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + :vartype type: str + :param member_name: Required. The workload classifier member name. + :type member_name: str + :param label: The workload classifier label. + :type label: str + :param context: The workload classifier context. + :type context: str + :param start_time: The workload classifier start time for classification. + :type start_time: str + :param end_time: The workload classifier end time for classification. + :type end_time: str + :param importance: The workload classifier importance. + :type importance: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'member_name': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'member_name': {'key': 'properties.memberName', 'type': 'str'}, + 'label': {'key': 'properties.label', 'type': 'str'}, + 'context': {'key': 'properties.context', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'str'}, + 'end_time': {'key': 'properties.endTime', 'type': 'str'}, + 'importance': {'key': 'properties.importance', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WorkloadClassifier, self).__init__(**kwargs) + self.member_name = kwargs.get('member_name', None) + self.label = kwargs.get('label', None) + self.context = kwargs.get('context', None) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.importance = kwargs.get('importance', None) + + +class WorkloadGroup(ProxyResource): + """Workload group operations for a sql pool. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + :vartype type: str + :param min_resource_percent: Required. The workload group minimum + percentage resource. + :type min_resource_percent: int + :param max_resource_percent: Required. The workload group cap percentage + resource. + :type max_resource_percent: int + :param min_resource_percent_per_request: Required. The workload group + request minimum grant percentage. + :type min_resource_percent_per_request: float + :param max_resource_percent_per_request: The workload group request + maximum grant percentage. + :type max_resource_percent_per_request: float + :param importance: The workload group importance level. + :type importance: str + :param query_execution_timeout: The workload group query execution + timeout. + :type query_execution_timeout: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'min_resource_percent': {'required': True}, + 'max_resource_percent': {'required': True}, + 'min_resource_percent_per_request': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'min_resource_percent': {'key': 'properties.minResourcePercent', 'type': 'int'}, + 'max_resource_percent': {'key': 'properties.maxResourcePercent', 'type': 'int'}, + 'min_resource_percent_per_request': {'key': 'properties.minResourcePercentPerRequest', 'type': 'float'}, + 'max_resource_percent_per_request': {'key': 'properties.maxResourcePercentPerRequest', 'type': 'float'}, + 'importance': {'key': 'properties.importance', 'type': 'str'}, + 'query_execution_timeout': {'key': 'properties.queryExecutionTimeout', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(WorkloadGroup, self).__init__(**kwargs) + self.min_resource_percent = kwargs.get('min_resource_percent', None) + self.max_resource_percent = kwargs.get('max_resource_percent', None) + self.min_resource_percent_per_request = kwargs.get('min_resource_percent_per_request', None) + self.max_resource_percent_per_request = kwargs.get('max_resource_percent_per_request', None) + self.importance = kwargs.get('importance', None) + self.query_execution_timeout = kwargs.get('query_execution_timeout', None) + + class Workspace(TrackedResource): """A workspace. @@ -4983,13 +6457,13 @@ class Workspace(TrackedResource): All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :param tags: Resource tags. :type tags: dict[str, str] @@ -5026,8 +6500,21 @@ class Workspace(TrackedResource): workspace :type private_endpoint_connections: list[~azure.mgmt.synapse.models.PrivateEndpointConnection] + :param encryption: The encryption details of the workspace + :type encryption: ~azure.mgmt.synapse.models.EncryptionDetails + :ivar workspace_uid: The workspace unique identifier + :vartype workspace_uid: str :ivar extra_properties: Workspace level configs and feature flags :vartype extra_properties: dict[str, object] + :param managed_virtual_network_settings: Managed Virtual Network Settings + :type managed_virtual_network_settings: + ~azure.mgmt.synapse.models.ManagedVirtualNetworkSettings + :param workspace_repository_configuration: Git integration settings + :type workspace_repository_configuration: + ~azure.mgmt.synapse.models.WorkspaceRepositoryConfiguration + :param babylon_configuration: Babylon Configuration + :type babylon_configuration: + ~azure.mgmt.synapse.models.BabylonConfiguration :param identity: Identity of the workspace :type identity: ~azure.mgmt.synapse.models.ManagedIdentity """ @@ -5038,6 +6525,7 @@ class Workspace(TrackedResource): 'type': {'readonly': True}, 'location': {'required': True}, 'provisioning_state': {'readonly': True}, + 'workspace_uid': {'readonly': True}, 'extra_properties': {'readonly': True}, } @@ -5056,7 +6544,12 @@ class Workspace(TrackedResource): 'connectivity_endpoints': {'key': 'properties.connectivityEndpoints', 'type': '{str}'}, 'managed_virtual_network': {'key': 'properties.managedVirtualNetwork', 'type': 'str'}, 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, + 'encryption': {'key': 'properties.encryption', 'type': 'EncryptionDetails'}, + 'workspace_uid': {'key': 'properties.workspaceUID', 'type': 'str'}, 'extra_properties': {'key': 'properties.extraProperties', 'type': '{object}'}, + 'managed_virtual_network_settings': {'key': 'properties.managedVirtualNetworkSettings', 'type': 'ManagedVirtualNetworkSettings'}, + 'workspace_repository_configuration': {'key': 'properties.workspaceRepositoryConfiguration', 'type': 'WorkspaceRepositoryConfiguration'}, + 'babylon_configuration': {'key': 'properties.babylonConfiguration', 'type': 'BabylonConfiguration'}, 'identity': {'key': 'identity', 'type': 'ManagedIdentity'}, } @@ -5071,7 +6564,12 @@ def __init__(self, **kwargs): self.connectivity_endpoints = kwargs.get('connectivity_endpoints', None) self.managed_virtual_network = kwargs.get('managed_virtual_network', None) self.private_endpoint_connections = kwargs.get('private_endpoint_connections', None) + self.encryption = kwargs.get('encryption', None) + self.workspace_uid = None self.extra_properties = None + self.managed_virtual_network_settings = kwargs.get('managed_virtual_network_settings', None) + self.workspace_repository_configuration = kwargs.get('workspace_repository_configuration', None) + self.babylon_configuration = kwargs.get('babylon_configuration', None) self.identity = kwargs.get('identity', None) @@ -5081,13 +6579,13 @@ class WorkspaceAadAdminInfo(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :param tenant_id: Tenant ID of the workspace active directory administrator @@ -5124,6 +6622,26 @@ def __init__(self, **kwargs): self.sid = kwargs.get('sid', None) +class WorkspaceKeyDetails(Model): + """Details of the customer managed key associated with the workspace. + + :param name: Workspace Key sub-resource name + :type name: str + :param key_vault_url: Workspace Key sub-resource key vault url + :type key_vault_url: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'key_vault_url': {'key': 'keyVaultUrl', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WorkspaceKeyDetails, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.key_vault_url = kwargs.get('key_vault_url', None) + + class WorkspacePatchInfo(Model): """Workspace patch details. @@ -5136,6 +6654,15 @@ class WorkspacePatchInfo(Model): :type identity: ~azure.mgmt.synapse.models.ManagedIdentity :param sql_administrator_login_password: SQL administrator login password :type sql_administrator_login_password: str + :param managed_virtual_network_settings: Managed Virtual Network Settings + :type managed_virtual_network_settings: + ~azure.mgmt.synapse.models.ManagedVirtualNetworkSettings + :param workspace_repository_configuration: Git integration settings + :type workspace_repository_configuration: + ~azure.mgmt.synapse.models.WorkspaceRepositoryConfiguration + :param babylon_configuration: Babylon Configuration + :type babylon_configuration: + ~azure.mgmt.synapse.models.BabylonConfiguration :ivar provisioning_state: Resource provisioning state :vartype provisioning_state: str """ @@ -5148,6 +6675,9 @@ class WorkspacePatchInfo(Model): 'tags': {'key': 'tags', 'type': '{str}'}, 'identity': {'key': 'identity', 'type': 'ManagedIdentity'}, 'sql_administrator_login_password': {'key': 'properties.sqlAdministratorLoginPassword', 'type': 'str'}, + 'managed_virtual_network_settings': {'key': 'properties.managedVirtualNetworkSettings', 'type': 'ManagedVirtualNetworkSettings'}, + 'workspace_repository_configuration': {'key': 'properties.workspaceRepositoryConfiguration', 'type': 'WorkspaceRepositoryConfiguration'}, + 'babylon_configuration': {'key': 'properties.babylonConfiguration', 'type': 'BabylonConfiguration'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } @@ -5156,4 +6686,49 @@ def __init__(self, **kwargs): self.tags = kwargs.get('tags', None) self.identity = kwargs.get('identity', None) self.sql_administrator_login_password = kwargs.get('sql_administrator_login_password', None) + self.managed_virtual_network_settings = kwargs.get('managed_virtual_network_settings', None) + self.workspace_repository_configuration = kwargs.get('workspace_repository_configuration', None) + self.babylon_configuration = kwargs.get('babylon_configuration', None) self.provisioning_state = None + + +class WorkspaceRepositoryConfiguration(Model): + """Git integration settings. + + :param type: Type of workspace repositoryID configuration. Example + WorkspaceVSTSConfiguration, WorkspaceGitHubConfiguration + :type type: str + :param host_name: GitHub Enterprise host name. For example: + https://github.mydomain.com + :type host_name: str + :param account_name: Account name + :type account_name: str + :param project_name: VSTS project name + :type project_name: str + :param repository_name: Repository name + :type repository_name: str + :param collaboration_branch: Collaboration branch + :type collaboration_branch: str + :param root_folder: Root folder to use in the repository + :type root_folder: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'host_name': {'key': 'hostName', 'type': 'str'}, + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'project_name': {'key': 'projectName', 'type': 'str'}, + 'repository_name': {'key': 'repositoryName', 'type': 'str'}, + 'collaboration_branch': {'key': 'collaborationBranch', 'type': 'str'}, + 'root_folder': {'key': 'rootFolder', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WorkspaceRepositoryConfiguration, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.host_name = kwargs.get('host_name', None) + self.account_name = kwargs.get('account_name', None) + self.project_name = kwargs.get('project_name', None) + self.repository_name = kwargs.get('repository_name', None) + self.collaboration_branch = kwargs.get('collaboration_branch', None) + self.root_folder = kwargs.get('root_folder', None) diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/_models_py3.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/_models_py3.py index c4f72918ef88..d3ba097cac0f 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/_models_py3.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/_models_py3.py @@ -129,16 +129,19 @@ def __init__(self, *, description: str=None, resource: str=None, provider: str=N class Resource(Model): """Resource. + Common fields that are returned in the response for all Azure Resource + Manager resources. + Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str """ @@ -162,19 +165,21 @@ def __init__(self, **kwargs) -> None: class AzureEntityResource(Resource): - """The resource model definition for a Azure Resource Manager resource with an - etag. + """Entity Resource. + + The resource model definition for an Azure Resource Manager resource with + an etag. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :ivar etag: Resource Etag. :vartype etag: str @@ -199,6 +204,22 @@ def __init__(self, **kwargs) -> None: self.etag = None +class BabylonConfiguration(Model): + """Babylon Configuration. + + :param babylon_resource_id: Babylon Resource ID + :type babylon_resource_id: str + """ + + _attribute_map = { + 'babylon_resource_id': {'key': 'babylonResourceId', 'type': 'str'}, + } + + def __init__(self, *, babylon_resource_id: str=None, **kwargs) -> None: + super(BabylonConfiguration, self).__init__(**kwargs) + self.babylon_resource_id = babylon_resource_id + + class BigDataPoolPatchInfo(Model): """Patch for a Big Data pool. @@ -218,20 +239,23 @@ def __init__(self, *, tags=None, **kwargs) -> None: class TrackedResource(Resource): - """The resource model definition for a ARM tracked top level resource. + """Tracked Resource. + + The resource model definition for an Azure Resource Manager tracked top + level resource which has 'tags' and a 'location'. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :param tags: Resource tags. :type tags: dict[str, str] @@ -270,13 +294,13 @@ class BigDataPoolResourceInfo(TrackedResource): All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :param tags: Resource tags. :type tags: dict[str, str] @@ -299,6 +323,10 @@ class BigDataPoolResourceInfo(TrackedResource): :type node_count: int :param library_requirements: Library version requirements :type library_requirements: ~azure.mgmt.synapse.models.LibraryRequirements + :param spark_config_properties: Spark configuration file to specify + additional properties + :type spark_config_properties: + ~azure.mgmt.synapse.models.LibraryRequirements :param spark_version: The Apache Spark version. :type spark_version: str :param default_spark_log_folder: The default folder where Spark logs will @@ -306,7 +334,7 @@ class BigDataPoolResourceInfo(TrackedResource): :type default_spark_log_folder: str :param node_size: The level of compute power that each node in the Big Data pool has. Possible values include: 'None', 'Small', 'Medium', - 'Large', 'XLarge', 'XXLarge' + 'Large', 'XLarge', 'XXLarge', 'XXXLarge' :type node_size: str or ~azure.mgmt.synapse.models.NodeSize :param node_size_family: The kind of nodes that the Big Data pool provides. Possible values include: 'None', 'MemoryOptimized' @@ -334,13 +362,14 @@ class BigDataPoolResourceInfo(TrackedResource): 'spark_events_folder': {'key': 'properties.sparkEventsFolder', 'type': 'str'}, 'node_count': {'key': 'properties.nodeCount', 'type': 'int'}, 'library_requirements': {'key': 'properties.libraryRequirements', 'type': 'LibraryRequirements'}, + 'spark_config_properties': {'key': 'properties.sparkConfigProperties', 'type': 'LibraryRequirements'}, 'spark_version': {'key': 'properties.sparkVersion', 'type': 'str'}, 'default_spark_log_folder': {'key': 'properties.defaultSparkLogFolder', 'type': 'str'}, 'node_size': {'key': 'properties.nodeSize', 'type': 'str'}, 'node_size_family': {'key': 'properties.nodeSizeFamily', 'type': 'str'}, } - def __init__(self, *, location: str, tags=None, provisioning_state: str=None, auto_scale=None, creation_date=None, auto_pause=None, is_compute_isolation_enabled: bool=None, spark_events_folder: str=None, node_count: int=None, library_requirements=None, spark_version: str=None, default_spark_log_folder: str=None, node_size=None, node_size_family=None, **kwargs) -> None: + def __init__(self, *, location: str, tags=None, provisioning_state: str=None, auto_scale=None, creation_date=None, auto_pause=None, is_compute_isolation_enabled: bool=None, spark_events_folder: str=None, node_count: int=None, library_requirements=None, spark_config_properties=None, spark_version: str=None, default_spark_log_folder: str=None, node_size=None, node_size_family=None, **kwargs) -> None: super(BigDataPoolResourceInfo, self).__init__(tags=tags, location=location, **kwargs) self.provisioning_state = provisioning_state self.auto_scale = auto_scale @@ -350,6 +379,7 @@ def __init__(self, *, location: str, tags=None, provisioning_state: str=None, au self.spark_events_folder = spark_events_folder self.node_count = node_count self.library_requirements = library_requirements + self.spark_config_properties = spark_config_properties self.spark_version = spark_version self.default_spark_log_folder = default_spark_log_folder self.node_size = node_size @@ -575,6 +605,33 @@ def __init__(self, *, restore_point_label: str, **kwargs) -> None: self.restore_point_label = restore_point_label +class CustomerManagedKeyDetails(Model): + """Details of the customer managed key associated with the workspace. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar status: The customer managed key status on the workspace + :vartype status: str + :param key: The key object of the workspace + :type key: ~azure.mgmt.synapse.models.WorkspaceKeyDetails + """ + + _validation = { + 'status': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'key': {'key': 'key', 'type': 'WorkspaceKeyDetails'}, + } + + def __init__(self, *, key=None, **kwargs) -> None: + super(CustomerManagedKeyDetails, self).__init__(**kwargs) + self.status = None + self.key = key + + class DataLakeStorageAccountDetails(Model): """Details of the data lake storage account associated with the workspace. @@ -596,19 +653,21 @@ def __init__(self, *, account_url: str=None, filesystem: str=None, **kwargs) -> class ProxyResource(Resource): - """The resource model definition for a ARM proxy resource. It will have - everything other than required location and tags. + """Proxy Resource. + + The resource model definition for a Azure Resource Manager proxy resource. + It will not have tags and a location. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str """ @@ -628,19 +687,210 @@ def __init__(self, **kwargs) -> None: super(ProxyResource, self).__init__(**kwargs) +class DataMaskingPolicy(ProxyResource): + """DataMaskingPolicy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + :vartype type: str + :param data_masking_state: Required. The state of the data masking policy. + Possible values include: 'Disabled', 'Enabled' + :type data_masking_state: str or + ~azure.mgmt.synapse.models.DataMaskingState + :param exempt_principals: The list of the exempt principals. Specifies the + semicolon-separated list of database users for which the data masking + policy does not apply. The specified users receive data results without + masking for all of the database queries. + :type exempt_principals: str + :ivar application_principals: The list of the application principals. This + is a legacy parameter and is no longer used. + :vartype application_principals: str + :ivar masking_level: The masking level. This is a legacy parameter and is + no longer used. + :vartype masking_level: str + :ivar location: The location of the data masking policy. + :vartype location: str + :ivar kind: The kind of data masking policy. Metadata, used for Azure + portal. + :vartype kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'data_masking_state': {'required': True}, + 'application_principals': {'readonly': True}, + 'masking_level': {'readonly': True}, + 'location': {'readonly': True}, + 'kind': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'data_masking_state': {'key': 'properties.dataMaskingState', 'type': 'DataMaskingState'}, + 'exempt_principals': {'key': 'properties.exemptPrincipals', 'type': 'str'}, + 'application_principals': {'key': 'properties.applicationPrincipals', 'type': 'str'}, + 'masking_level': {'key': 'properties.maskingLevel', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, *, data_masking_state, exempt_principals: str=None, **kwargs) -> None: + super(DataMaskingPolicy, self).__init__(**kwargs) + self.data_masking_state = data_masking_state + self.exempt_principals = exempt_principals + self.application_principals = None + self.masking_level = None + self.location = None + self.kind = None + + +class DataMaskingRule(ProxyResource): + """Represents a Sql pool data masking rule. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + :vartype type: str + :ivar data_masking_rule_id: The rule Id. + :vartype data_masking_rule_id: str + :param alias_name: The alias name. This is a legacy parameter and is no + longer used. + :type alias_name: str + :param rule_state: The rule state. Used to delete a rule. To delete an + existing rule, specify the schemaName, tableName, columnName, + maskingFunction, and specify ruleState as disabled. However, if the rule + doesn't already exist, the rule will be created with ruleState set to + enabled, regardless of the provided value of ruleState. Possible values + include: 'Disabled', 'Enabled' + :type rule_state: str or ~azure.mgmt.synapse.models.DataMaskingRuleState + :param schema_name: Required. The schema name on which the data masking + rule is applied. + :type schema_name: str + :param table_name: Required. The table name on which the data masking rule + is applied. + :type table_name: str + :param column_name: Required. The column name on which the data masking + rule is applied. + :type column_name: str + :param masking_function: Required. The masking function that is used for + the data masking rule. Possible values include: 'Default', 'CCN', 'Email', + 'Number', 'SSN', 'Text' + :type masking_function: str or + ~azure.mgmt.synapse.models.DataMaskingFunction + :param number_from: The numberFrom property of the masking rule. Required + if maskingFunction is set to Number, otherwise this parameter will be + ignored. + :type number_from: str + :param number_to: The numberTo property of the data masking rule. Required + if maskingFunction is set to Number, otherwise this parameter will be + ignored. + :type number_to: str + :param prefix_size: If maskingFunction is set to Text, the number of + characters to show unmasked in the beginning of the string. Otherwise, + this parameter will be ignored. + :type prefix_size: str + :param suffix_size: If maskingFunction is set to Text, the number of + characters to show unmasked at the end of the string. Otherwise, this + parameter will be ignored. + :type suffix_size: str + :param replacement_string: If maskingFunction is set to Text, the + character to use for masking the unexposed part of the string. Otherwise, + this parameter will be ignored. + :type replacement_string: str + :ivar location: The location of the data masking rule. + :vartype location: str + :ivar kind: The kind of Data Masking Rule. Metadata, used for Azure + portal. + :vartype kind: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'data_masking_rule_id': {'readonly': True}, + 'schema_name': {'required': True}, + 'table_name': {'required': True}, + 'column_name': {'required': True}, + 'masking_function': {'required': True}, + 'location': {'readonly': True}, + 'kind': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'data_masking_rule_id': {'key': 'properties.id', 'type': 'str'}, + 'alias_name': {'key': 'properties.aliasName', 'type': 'str'}, + 'rule_state': {'key': 'properties.ruleState', 'type': 'DataMaskingRuleState'}, + 'schema_name': {'key': 'properties.schemaName', 'type': 'str'}, + 'table_name': {'key': 'properties.tableName', 'type': 'str'}, + 'column_name': {'key': 'properties.columnName', 'type': 'str'}, + 'masking_function': {'key': 'properties.maskingFunction', 'type': 'DataMaskingFunction'}, + 'number_from': {'key': 'properties.numberFrom', 'type': 'str'}, + 'number_to': {'key': 'properties.numberTo', 'type': 'str'}, + 'prefix_size': {'key': 'properties.prefixSize', 'type': 'str'}, + 'suffix_size': {'key': 'properties.suffixSize', 'type': 'str'}, + 'replacement_string': {'key': 'properties.replacementString', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, *, schema_name: str, table_name: str, column_name: str, masking_function, alias_name: str=None, rule_state=None, number_from: str=None, number_to: str=None, prefix_size: str=None, suffix_size: str=None, replacement_string: str=None, **kwargs) -> None: + super(DataMaskingRule, self).__init__(**kwargs) + self.data_masking_rule_id = None + self.alias_name = alias_name + self.rule_state = rule_state + self.schema_name = schema_name + self.table_name = table_name + self.column_name = column_name + self.masking_function = masking_function + self.number_from = number_from + self.number_to = number_to + self.prefix_size = prefix_size + self.suffix_size = suffix_size + self.replacement_string = replacement_string + self.location = None + self.kind = None + + class DataWarehouseUserActivities(ProxyResource): """User activities of a data warehouse. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :ivar active_queries_count: Count of running and suspended queries. :vartype active_queries_count: int @@ -665,6 +915,104 @@ def __init__(self, **kwargs) -> None: self.active_queries_count = None +class EncryptionDetails(Model): + """Details of the encryption associated with the workspace. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar double_encryption_enabled: Double Encryption enabled + :vartype double_encryption_enabled: bool + :param cmk: Customer Managed Key Details + :type cmk: ~azure.mgmt.synapse.models.CustomerManagedKeyDetails + """ + + _validation = { + 'double_encryption_enabled': {'readonly': True}, + } + + _attribute_map = { + 'double_encryption_enabled': {'key': 'doubleEncryptionEnabled', 'type': 'bool'}, + 'cmk': {'key': 'cmk', 'type': 'CustomerManagedKeyDetails'}, + } + + def __init__(self, *, cmk=None, **kwargs) -> None: + super(EncryptionDetails, self).__init__(**kwargs) + self.double_encryption_enabled = None + self.cmk = cmk + + +class EncryptionProtector(ProxyResource): + """The server encryption protector. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + :vartype type: str + :ivar kind: Kind of encryption protector. This is metadata used for the + Azure portal experience. + :vartype kind: str + :ivar location: Resource location. + :vartype location: str + :ivar subregion: Subregion of the encryption protector. + :vartype subregion: str + :param server_key_name: The name of the server key. + :type server_key_name: str + :param server_key_type: Required. The encryption protector type like + 'ServiceManaged', 'AzureKeyVault'. Possible values include: + 'ServiceManaged', 'AzureKeyVault' + :type server_key_type: str or ~azure.mgmt.synapse.models.ServerKeyType + :ivar uri: The URI of the server key. + :vartype uri: str + :ivar thumbprint: Thumbprint of the server key. + :vartype thumbprint: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'location': {'readonly': True}, + 'subregion': {'readonly': True}, + 'server_key_type': {'required': True}, + 'uri': {'readonly': True}, + 'thumbprint': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'subregion': {'key': 'properties.subregion', 'type': 'str'}, + 'server_key_name': {'key': 'properties.serverKeyName', 'type': 'str'}, + 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, + 'uri': {'key': 'properties.uri', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + } + + def __init__(self, *, server_key_type, server_key_name: str=None, **kwargs) -> None: + super(EncryptionProtector, self).__init__(**kwargs) + self.kind = None + self.location = None + self.subregion = None + self.server_key_name = server_key_name + self.server_key_type = server_key_type + self.uri = None + self.thumbprint = None + + class EntityReference(Model): """The entity reference. @@ -802,7 +1150,11 @@ def __init__(self, *, message: str=None, code: str=None, target: str=None, **kwa class ErrorResponse(Model): - """The resource management error response. + """Error Response. + + Common error response for all Azure Resource Manager APIs to return error + details for failed operations. (This also follows the OData error response + format.). Variables are only populated by the server, and will be ignored when sending a request. @@ -845,124 +1197,466 @@ def __init__(self, **kwargs) -> None: self.additional_info = None -class GeoBackupPolicy(ProxyResource): - """A database geo backup policy. +class ExtendedServerBlobAuditingPolicy(ProxyResource): + """An extended server blob auditing policy. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str - :param state: Required. The state of the geo backup policy. Possible - values include: 'Disabled', 'Enabled' - :type state: str or ~azure.mgmt.synapse.models.GeoBackupPolicyState - :ivar storage_type: The storage type of the geo backup policy. - :vartype storage_type: str - :ivar kind: Kind of geo backup policy. This is metadata used for the - Azure portal experience. - :vartype kind: str - :ivar location: Backup policy location. - :vartype location: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'state': {'required': True}, - 'storage_type': {'readonly': True}, - 'kind': {'readonly': True}, - 'location': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'GeoBackupPolicyState'}, - 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__(self, *, state, **kwargs) -> None: - super(GeoBackupPolicy, self).__init__(**kwargs) - self.state = state - self.storage_type = None - self.kind = None - self.location = None - - -class GetSsisObjectMetadataRequest(Model): - """The request payload of get SSIS object metadata. - - :param metadata_path: Metadata path. - :type metadata_path: str - """ - - _attribute_map = { - 'metadata_path': {'key': 'metadataPath', 'type': 'str'}, - } - - def __init__(self, *, metadata_path: str=None, **kwargs) -> None: - super(GetSsisObjectMetadataRequest, self).__init__(**kwargs) - self.metadata_path = metadata_path - - -class IntegrationRuntime(Model): - """Azure Synapse nested object which serves as a compute resource for - activities. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ManagedIntegrationRuntime, SelfHostedIntegrationRuntime - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Integration runtime description. - :type description: str - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - _subtype_map = { - 'type': {'Managed': 'ManagedIntegrationRuntime', 'SelfHosted': 'SelfHostedIntegrationRuntime'} - } - - def __init__(self, *, additional_properties=None, description: str=None, **kwargs) -> None: - super(IntegrationRuntime, self).__init__(**kwargs) - self.additional_properties = additional_properties - self.description = description - self.type = None - - -class IntegrationRuntimeAuthKeys(Model): - """The integration runtime authentication keys. - - :param auth_key1: The primary integration runtime authentication key. - :type auth_key1: str - :param auth_key2: The secondary integration runtime authentication key. - :type auth_key2: str + :param predicate_expression: Specifies condition of where clause when + creating an audit. + :type predicate_expression: str + :param state: Required. Specifies the state of the policy. If state is + Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. + Possible values include: 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.synapse.models.BlobAuditingPolicyState + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). If state is Enabled, + storageEndpoint or isAzureMonitorTargetEnabled is required. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + auditing storage account. + If state is Enabled and storageEndpoint is specified, not specifying the + storageAccountAccessKey will use SQL server system-assigned managed + identity to access the storage. + Prerequisites for using managed identity authentication: + 1. Assign SQL Server a system-assigned managed identity in Azure Active + Directory (AAD). + 2. Grant SQL Server identity access to the storage account by adding + 'Storage Blob Data Contributor' RBAC role to the server identity. + For more information, see [Auditing to storage using Managed Identity + authentication](https://go.microsoft.com/fwlink/?linkid=2114355) + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the audit + logs in the storage account. + :type retention_days: int + :param audit_actions_and_groups: Specifies the Actions-Groups and Actions + to audit. + The recommended set of action groups to use is the following combination - + this will audit all the queries and stored procedures executed against the + database, as well as successful and failed logins: + BATCH_COMPLETED_GROUP, + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + FAILED_DATABASE_AUTHENTICATION_GROUP. + This above combination is also the set that is configured by default when + enabling auditing from the Azure portal. + The supported action groups to audit are (note: choose only specific + groups that cover your auditing needs. Using unnecessary groups could lead + to very large quantities of audit records): + APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + BACKUP_RESTORE_GROUP + DATABASE_LOGOUT_GROUP + DATABASE_OBJECT_CHANGE_GROUP + DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + DATABASE_OPERATION_GROUP + DATABASE_PERMISSION_CHANGE_GROUP + DATABASE_PRINCIPAL_CHANGE_GROUP + DATABASE_PRINCIPAL_IMPERSONATION_GROUP + DATABASE_ROLE_MEMBER_CHANGE_GROUP + FAILED_DATABASE_AUTHENTICATION_GROUP + SCHEMA_OBJECT_ACCESS_GROUP + SCHEMA_OBJECT_CHANGE_GROUP + SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + USER_CHANGE_PASSWORD_GROUP + BATCH_STARTED_GROUP + BATCH_COMPLETED_GROUP + These are groups that cover all sql statements and stored procedures + executed against the database, and should not be used in combination with + other groups as this will result in duplicate audit logs. + For more information, see [Database-Level Audit Action + Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + For Database auditing policy, specific Actions can also be specified (note + that Actions cannot be specified for Server auditing policy). The + supported actions to audit are: + SELECT + UPDATE + INSERT + DELETE + EXECUTE + RECEIVE + REFERENCES + The general form for defining an action to be audited is: + {action} ON {object} BY {principal} + Note that in the above format can refer to an object like a + table, view, or stored procedure, or an entire database or schema. For the + latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are + used, respectively. + For example: + SELECT on dbo.myTable by public + SELECT on DATABASE::myDatabase by public + SELECT on SCHEMA::mySchema by public + For more information, see [Database-Level Audit + Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + :type audit_actions_and_groups: list[str] + :param storage_account_subscription_id: Specifies the blob storage + subscription Id. + :type storage_account_subscription_id: str + :param is_storage_secondary_key_in_use: Specifies whether + storageAccountAccessKey value is the storage's secondary key. + :type is_storage_secondary_key_in_use: bool + :param is_azure_monitor_target_enabled: Specifies whether audit events are + sent to Azure Monitor. + In order to send the events to Azure Monitor, specify 'state' as 'Enabled' + and 'isAzureMonitorTargetEnabled' as true. + When using REST API to configure auditing, Diagnostic Settings with + 'SQLSecurityAuditEvents' diagnostic logs category on the database should + be also created. + Note that for server level audit you should use the 'master' database as + {databaseName}. + Diagnostic Settings URI format: + PUT + https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + For more information, see [Diagnostic Settings REST + API](https://go.microsoft.com/fwlink/?linkid=2033207) + or [Diagnostic Settings + PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + :type is_azure_monitor_target_enabled: bool + :param queue_delay_ms: Specifies the amount of time in milliseconds that + can elapse before audit actions are forced to be processed. + The default minimum value is 1000 (1 second). The maximum is + 2,147,483,647. + :type queue_delay_ms: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'predicate_expression': {'key': 'properties.predicateExpression', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, + 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, + 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, + 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, + 'queue_delay_ms': {'key': 'properties.queueDelayMs', 'type': 'int'}, + } + + def __init__(self, *, state, predicate_expression: str=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, audit_actions_and_groups=None, storage_account_subscription_id: str=None, is_storage_secondary_key_in_use: bool=None, is_azure_monitor_target_enabled: bool=None, queue_delay_ms: int=None, **kwargs) -> None: + super(ExtendedServerBlobAuditingPolicy, self).__init__(**kwargs) + self.predicate_expression = predicate_expression + self.state = state + self.storage_endpoint = storage_endpoint + self.storage_account_access_key = storage_account_access_key + self.retention_days = retention_days + self.audit_actions_and_groups = audit_actions_and_groups + self.storage_account_subscription_id = storage_account_subscription_id + self.is_storage_secondary_key_in_use = is_storage_secondary_key_in_use + self.is_azure_monitor_target_enabled = is_azure_monitor_target_enabled + self.queue_delay_ms = queue_delay_ms + + +class ExtendedSqlPoolBlobAuditingPolicy(ProxyResource): + """An extended Sql pool blob auditing policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + :vartype type: str + :param predicate_expression: Specifies condition of where clause when + creating an audit. + :type predicate_expression: str + :param state: Required. Specifies the state of the policy. If state is + Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. + Possible values include: 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.synapse.models.BlobAuditingPolicyState + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). If state is Enabled, + storageEndpoint or isAzureMonitorTargetEnabled is required. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + auditing storage account. + If state is Enabled and storageEndpoint is specified, not specifying the + storageAccountAccessKey will use SQL server system-assigned managed + identity to access the storage. + Prerequisites for using managed identity authentication: + 1. Assign SQL Server a system-assigned managed identity in Azure Active + Directory (AAD). + 2. Grant SQL Server identity access to the storage account by adding + 'Storage Blob Data Contributor' RBAC role to the server identity. + For more information, see [Auditing to storage using Managed Identity + authentication](https://go.microsoft.com/fwlink/?linkid=2114355) + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the audit + logs in the storage account. + :type retention_days: int + :param audit_actions_and_groups: Specifies the Actions-Groups and Actions + to audit. + The recommended set of action groups to use is the following combination - + this will audit all the queries and stored procedures executed against the + database, as well as successful and failed logins: + BATCH_COMPLETED_GROUP, + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + FAILED_DATABASE_AUTHENTICATION_GROUP. + This above combination is also the set that is configured by default when + enabling auditing from the Azure portal. + The supported action groups to audit are (note: choose only specific + groups that cover your auditing needs. Using unnecessary groups could lead + to very large quantities of audit records): + APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + BACKUP_RESTORE_GROUP + DATABASE_LOGOUT_GROUP + DATABASE_OBJECT_CHANGE_GROUP + DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + DATABASE_OPERATION_GROUP + DATABASE_PERMISSION_CHANGE_GROUP + DATABASE_PRINCIPAL_CHANGE_GROUP + DATABASE_PRINCIPAL_IMPERSONATION_GROUP + DATABASE_ROLE_MEMBER_CHANGE_GROUP + FAILED_DATABASE_AUTHENTICATION_GROUP + SCHEMA_OBJECT_ACCESS_GROUP + SCHEMA_OBJECT_CHANGE_GROUP + SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + USER_CHANGE_PASSWORD_GROUP + BATCH_STARTED_GROUP + BATCH_COMPLETED_GROUP + These are groups that cover all sql statements and stored procedures + executed against the database, and should not be used in combination with + other groups as this will result in duplicate audit logs. + For more information, see [Database-Level Audit Action + Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + For Database auditing policy, specific Actions can also be specified (note + that Actions cannot be specified for Server auditing policy). The + supported actions to audit are: + SELECT + UPDATE + INSERT + DELETE + EXECUTE + RECEIVE + REFERENCES + The general form for defining an action to be audited is: + {action} ON {object} BY {principal} + Note that in the above format can refer to an object like a + table, view, or stored procedure, or an entire database or schema. For the + latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are + used, respectively. + For example: + SELECT on dbo.myTable by public + SELECT on DATABASE::myDatabase by public + SELECT on SCHEMA::mySchema by public + For more information, see [Database-Level Audit + Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + :type audit_actions_and_groups: list[str] + :param storage_account_subscription_id: Specifies the blob storage + subscription Id. + :type storage_account_subscription_id: str + :param is_storage_secondary_key_in_use: Specifies whether + storageAccountAccessKey value is the storage's secondary key. + :type is_storage_secondary_key_in_use: bool + :param is_azure_monitor_target_enabled: Specifies whether audit events are + sent to Azure Monitor. + In order to send the events to Azure Monitor, specify 'state' as 'Enabled' + and 'isAzureMonitorTargetEnabled' as true. + When using REST API to configure auditing, Diagnostic Settings with + 'SQLSecurityAuditEvents' diagnostic logs category on the database should + be also created. + Note that for server level audit you should use the 'master' database as + {databaseName}. + Diagnostic Settings URI format: + PUT + https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + For more information, see [Diagnostic Settings REST + API](https://go.microsoft.com/fwlink/?linkid=2033207) + or [Diagnostic Settings + PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + :type is_azure_monitor_target_enabled: bool + :param queue_delay_ms: Specifies the amount of time in milliseconds that + can elapse before audit actions are forced to be processed. + The default minimum value is 1000 (1 second). The maximum is + 2,147,483,647. + :type queue_delay_ms: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'predicate_expression': {'key': 'properties.predicateExpression', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, + 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, + 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, + 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, + 'queue_delay_ms': {'key': 'properties.queueDelayMs', 'type': 'int'}, + } + + def __init__(self, *, state, predicate_expression: str=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, audit_actions_and_groups=None, storage_account_subscription_id: str=None, is_storage_secondary_key_in_use: bool=None, is_azure_monitor_target_enabled: bool=None, queue_delay_ms: int=None, **kwargs) -> None: + super(ExtendedSqlPoolBlobAuditingPolicy, self).__init__(**kwargs) + self.predicate_expression = predicate_expression + self.state = state + self.storage_endpoint = storage_endpoint + self.storage_account_access_key = storage_account_access_key + self.retention_days = retention_days + self.audit_actions_and_groups = audit_actions_and_groups + self.storage_account_subscription_id = storage_account_subscription_id + self.is_storage_secondary_key_in_use = is_storage_secondary_key_in_use + self.is_azure_monitor_target_enabled = is_azure_monitor_target_enabled + self.queue_delay_ms = queue_delay_ms + + +class GeoBackupPolicy(ProxyResource): + """A database geo backup policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + :vartype type: str + :param state: Required. The state of the geo backup policy. Possible + values include: 'Disabled', 'Enabled' + :type state: str or ~azure.mgmt.synapse.models.GeoBackupPolicyState + :ivar storage_type: The storage type of the geo backup policy. + :vartype storage_type: str + :ivar kind: Kind of geo backup policy. This is metadata used for the + Azure portal experience. + :vartype kind: str + :ivar location: Backup policy location. + :vartype location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + 'storage_type': {'readonly': True}, + 'kind': {'readonly': True}, + 'location': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'GeoBackupPolicyState'}, + 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, *, state, **kwargs) -> None: + super(GeoBackupPolicy, self).__init__(**kwargs) + self.state = state + self.storage_type = None + self.kind = None + self.location = None + + +class GetSsisObjectMetadataRequest(Model): + """The request payload of get SSIS object metadata. + + :param metadata_path: Metadata path. + :type metadata_path: str + """ + + _attribute_map = { + 'metadata_path': {'key': 'metadataPath', 'type': 'str'}, + } + + def __init__(self, *, metadata_path: str=None, **kwargs) -> None: + super(GetSsisObjectMetadataRequest, self).__init__(**kwargs) + self.metadata_path = metadata_path + + +class IntegrationRuntime(Model): + """Azure Synapse nested object which serves as a compute resource for + activities. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ManagedIntegrationRuntime, SelfHostedIntegrationRuntime + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Integration runtime description. + :type description: str + :param type: Required. Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'Managed': 'ManagedIntegrationRuntime', 'SelfHosted': 'SelfHostedIntegrationRuntime'} + } + + def __init__(self, *, additional_properties=None, description: str=None, **kwargs) -> None: + super(IntegrationRuntime, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.description = description + self.type = None + + +class IntegrationRuntimeAuthKeys(Model): + """The integration runtime authentication keys. + + :param auth_key1: The primary integration runtime authentication key. + :type auth_key1: str + :param auth_key2: The secondary integration runtime authentication key. + :type auth_key2: str """ _attribute_map = { @@ -1099,794 +1793,1183 @@ class IntegrationRuntimeCustomSetupScriptProperties(Model): """ _attribute_map = { - 'blob_container_uri': {'key': 'blobContainerUri', 'type': 'str'}, - 'sas_token': {'key': 'sasToken', 'type': 'SecureString'}, + 'blob_container_uri': {'key': 'blobContainerUri', 'type': 'str'}, + 'sas_token': {'key': 'sasToken', 'type': 'SecureString'}, + } + + def __init__(self, *, blob_container_uri: str=None, sas_token=None, **kwargs) -> None: + super(IntegrationRuntimeCustomSetupScriptProperties, self).__init__(**kwargs) + self.blob_container_uri = blob_container_uri + self.sas_token = sas_token + + +class IntegrationRuntimeDataFlowProperties(Model): + """Data flow properties for managed integration runtime. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param compute_type: Compute type of the cluster which will execute data + flow job. Possible values include: 'General', 'MemoryOptimized', + 'ComputeOptimized' + :type compute_type: str or ~azure.mgmt.synapse.models.DataFlowComputeType + :param core_count: Core count of the cluster which will execute data flow + job. Supported values are: 8, 16, 32, 48, 80, 144 and 272. + :type core_count: int + :param time_to_live: Time to live (in minutes) setting of the cluster + which will execute data flow job. + :type time_to_live: int + """ + + _validation = { + 'time_to_live': {'minimum': 0}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'core_count': {'key': 'coreCount', 'type': 'int'}, + 'time_to_live': {'key': 'timeToLive', 'type': 'int'}, + } + + def __init__(self, *, additional_properties=None, compute_type=None, core_count: int=None, time_to_live: int=None, **kwargs) -> None: + super(IntegrationRuntimeDataFlowProperties, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.compute_type = compute_type + self.core_count = core_count + self.time_to_live = time_to_live + + +class IntegrationRuntimeDataProxyProperties(Model): + """Data proxy properties for a managed dedicated integration runtime. + + :param connect_via: The self-hosted integration runtime reference. + :type connect_via: ~azure.mgmt.synapse.models.EntityReference + :param staging_linked_service: The staging linked service reference. + :type staging_linked_service: ~azure.mgmt.synapse.models.EntityReference + :param path: The path to contain the staged data in the Blob storage. + :type path: str + """ + + _attribute_map = { + 'connect_via': {'key': 'connectVia', 'type': 'EntityReference'}, + 'staging_linked_service': {'key': 'stagingLinkedService', 'type': 'EntityReference'}, + 'path': {'key': 'path', 'type': 'str'}, + } + + def __init__(self, *, connect_via=None, staging_linked_service=None, path: str=None, **kwargs) -> None: + super(IntegrationRuntimeDataProxyProperties, self).__init__(**kwargs) + self.connect_via = connect_via + self.staging_linked_service = staging_linked_service + self.path = path + + +class IntegrationRuntimeMonitoringData(Model): + """Get monitoring data response. + + :param name: Integration runtime name. + :type name: str + :param nodes: Integration runtime node monitoring data. + :type nodes: + list[~azure.mgmt.synapse.models.IntegrationRuntimeNodeMonitoringData] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'nodes': {'key': 'nodes', 'type': '[IntegrationRuntimeNodeMonitoringData]'}, + } + + def __init__(self, *, name: str=None, nodes=None, **kwargs) -> None: + super(IntegrationRuntimeMonitoringData, self).__init__(**kwargs) + self.name = name + self.nodes = nodes + + +class IntegrationRuntimeNodeIpAddress(Model): + """The IP address of self-hosted integration runtime node. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar ip_address: The IP address of self-hosted integration runtime node. + :vartype ip_address: str + """ + + _validation = { + 'ip_address': {'readonly': True}, + } + + _attribute_map = { + 'ip_address': {'key': 'ipAddress', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(IntegrationRuntimeNodeIpAddress, self).__init__(**kwargs) + self.ip_address = None + + +class IntegrationRuntimeNodeMonitoringData(Model): + """Monitoring data for integration runtime node. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :ivar node_name: Name of the integration runtime node. + :vartype node_name: str + :ivar available_memory_in_mb: Available memory (MB) on the integration + runtime node. + :vartype available_memory_in_mb: int + :ivar cpu_utilization: CPU percentage on the integration runtime node. + :vartype cpu_utilization: int + :ivar concurrent_jobs_limit: Maximum concurrent jobs on the integration + runtime node. + :vartype concurrent_jobs_limit: int + :ivar concurrent_jobs_running: The number of jobs currently running on the + integration runtime node. + :vartype concurrent_jobs_running: int + :ivar max_concurrent_jobs: The maximum concurrent jobs in this integration + runtime. + :vartype max_concurrent_jobs: int + :ivar sent_bytes: Sent bytes on the integration runtime node. + :vartype sent_bytes: float + :ivar received_bytes: Received bytes on the integration runtime node. + :vartype received_bytes: float + """ + + _validation = { + 'node_name': {'readonly': True}, + 'available_memory_in_mb': {'readonly': True}, + 'cpu_utilization': {'readonly': True}, + 'concurrent_jobs_limit': {'readonly': True}, + 'concurrent_jobs_running': {'readonly': True}, + 'max_concurrent_jobs': {'readonly': True}, + 'sent_bytes': {'readonly': True}, + 'received_bytes': {'readonly': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'node_name': {'key': 'nodeName', 'type': 'str'}, + 'available_memory_in_mb': {'key': 'availableMemoryInMB', 'type': 'int'}, + 'cpu_utilization': {'key': 'cpuUtilization', 'type': 'int'}, + 'concurrent_jobs_limit': {'key': 'concurrentJobsLimit', 'type': 'int'}, + 'concurrent_jobs_running': {'key': 'concurrentJobsRunning', 'type': 'int'}, + 'max_concurrent_jobs': {'key': 'maxConcurrentJobs', 'type': 'int'}, + 'sent_bytes': {'key': 'sentBytes', 'type': 'float'}, + 'received_bytes': {'key': 'receivedBytes', 'type': 'float'}, + } + + def __init__(self, *, additional_properties=None, **kwargs) -> None: + super(IntegrationRuntimeNodeMonitoringData, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.node_name = None + self.available_memory_in_mb = None + self.cpu_utilization = None + self.concurrent_jobs_limit = None + self.concurrent_jobs_running = None + self.max_concurrent_jobs = None + self.sent_bytes = None + self.received_bytes = None + + +class IntegrationRuntimeRegenerateKeyParameters(Model): + """Parameters to regenerate the authentication key. + + :param key_name: The name of the authentication key to regenerate. + Possible values include: 'authKey1', 'authKey2' + :type key_name: str or + ~azure.mgmt.synapse.models.IntegrationRuntimeAuthKeyName + """ + + _attribute_map = { + 'key_name': {'key': 'keyName', 'type': 'str'}, + } + + def __init__(self, *, key_name=None, **kwargs) -> None: + super(IntegrationRuntimeRegenerateKeyParameters, self).__init__(**kwargs) + self.key_name = key_name + + +class SubResource(AzureEntityResource): + """Azure Synapse nested resource, which belongs to a workspace. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + :vartype type: str + :ivar etag: Resource Etag. + :vartype etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SubResource, self).__init__(**kwargs) + + +class IntegrationRuntimeResource(SubResource): + """Integration runtime resource type. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + :vartype type: str + :ivar etag: Resource Etag. + :vartype etag: str + :param properties: Required. Integration runtime properties. + :type properties: ~azure.mgmt.synapse.models.IntegrationRuntime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'IntegrationRuntime'}, } - def __init__(self, *, blob_container_uri: str=None, sas_token=None, **kwargs) -> None: - super(IntegrationRuntimeCustomSetupScriptProperties, self).__init__(**kwargs) - self.blob_container_uri = blob_container_uri - self.sas_token = sas_token + def __init__(self, *, properties, **kwargs) -> None: + super(IntegrationRuntimeResource, self).__init__(**kwargs) + self.properties = properties -class IntegrationRuntimeDataFlowProperties(Model): - """Data flow properties for managed integration runtime. +class IntegrationRuntimeSsisCatalogInfo(Model): + """Catalog information for managed dedicated integration runtime. :param additional_properties: Unmatched properties from the message are deserialized this collection :type additional_properties: dict[str, object] - :param compute_type: Compute type of the cluster which will execute data - flow job. Possible values include: 'General', 'MemoryOptimized', - 'ComputeOptimized' - :type compute_type: str or ~azure.mgmt.synapse.models.DataFlowComputeType - :param core_count: Core count of the cluster which will execute data flow - job. Supported values are: 8, 16, 32, 48, 80, 144 and 272. - :type core_count: int - :param time_to_live: Time to live (in minutes) setting of the cluster - which will execute data flow job. - :type time_to_live: int + :param catalog_server_endpoint: The catalog database server URL. + :type catalog_server_endpoint: str + :param catalog_admin_user_name: The administrator user name of catalog + database. + :type catalog_admin_user_name: str + :param catalog_admin_password: The password of the administrator user + account of the catalog database. + :type catalog_admin_password: ~azure.mgmt.synapse.models.SecureString + :param catalog_pricing_tier: The pricing tier for the catalog database. + The valid values could be found in + https://azure.microsoft.com/en-us/pricing/details/sql-database/. Possible + values include: 'Basic', 'Standard', 'Premium', 'PremiumRS' + :type catalog_pricing_tier: str or + ~azure.mgmt.synapse.models.IntegrationRuntimeSsisCatalogPricingTier """ _validation = { - 'time_to_live': {'minimum': 0}, + 'catalog_admin_user_name': {'max_length': 128, 'min_length': 1}, } _attribute_map = { 'additional_properties': {'key': '', 'type': '{object}'}, - 'compute_type': {'key': 'computeType', 'type': 'str'}, - 'core_count': {'key': 'coreCount', 'type': 'int'}, - 'time_to_live': {'key': 'timeToLive', 'type': 'int'}, + 'catalog_server_endpoint': {'key': 'catalogServerEndpoint', 'type': 'str'}, + 'catalog_admin_user_name': {'key': 'catalogAdminUserName', 'type': 'str'}, + 'catalog_admin_password': {'key': 'catalogAdminPassword', 'type': 'SecureString'}, + 'catalog_pricing_tier': {'key': 'catalogPricingTier', 'type': 'str'}, } - def __init__(self, *, additional_properties=None, compute_type=None, core_count: int=None, time_to_live: int=None, **kwargs) -> None: - super(IntegrationRuntimeDataFlowProperties, self).__init__(**kwargs) + def __init__(self, *, additional_properties=None, catalog_server_endpoint: str=None, catalog_admin_user_name: str=None, catalog_admin_password=None, catalog_pricing_tier=None, **kwargs) -> None: + super(IntegrationRuntimeSsisCatalogInfo, self).__init__(**kwargs) self.additional_properties = additional_properties - self.compute_type = compute_type - self.core_count = core_count - self.time_to_live = time_to_live + self.catalog_server_endpoint = catalog_server_endpoint + self.catalog_admin_user_name = catalog_admin_user_name + self.catalog_admin_password = catalog_admin_password + self.catalog_pricing_tier = catalog_pricing_tier -class IntegrationRuntimeDataProxyProperties(Model): - """Data proxy properties for a managed dedicated integration runtime. +class IntegrationRuntimeSsisProperties(Model): + """SSIS properties for managed integration runtime. - :param connect_via: The self-hosted integration runtime reference. - :type connect_via: ~azure.mgmt.synapse.models.EntityReference - :param staging_linked_service: The staging linked service reference. - :type staging_linked_service: ~azure.mgmt.synapse.models.EntityReference - :param path: The path to contain the staged data in the Blob storage. - :type path: str + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param catalog_info: Catalog information for managed dedicated integration + runtime. + :type catalog_info: + ~azure.mgmt.synapse.models.IntegrationRuntimeSsisCatalogInfo + :param license_type: License type for bringing your own license scenario. + Possible values include: 'BasePrice', 'LicenseIncluded' + :type license_type: str or + ~azure.mgmt.synapse.models.IntegrationRuntimeLicenseType + :param custom_setup_script_properties: Custom setup script properties for + a managed dedicated integration runtime. + :type custom_setup_script_properties: + ~azure.mgmt.synapse.models.IntegrationRuntimeCustomSetupScriptProperties + :param data_proxy_properties: Data proxy properties for a managed + dedicated integration runtime. + :type data_proxy_properties: + ~azure.mgmt.synapse.models.IntegrationRuntimeDataProxyProperties + :param edition: The edition for the SSIS Integration Runtime. Possible + values include: 'Standard', 'Enterprise' + :type edition: str or ~azure.mgmt.synapse.models.IntegrationRuntimeEdition + :param express_custom_setup_properties: Custom setup without script + properties for a SSIS integration runtime. + :type express_custom_setup_properties: + list[~azure.mgmt.synapse.models.CustomSetupBase] """ _attribute_map = { - 'connect_via': {'key': 'connectVia', 'type': 'EntityReference'}, - 'staging_linked_service': {'key': 'stagingLinkedService', 'type': 'EntityReference'}, - 'path': {'key': 'path', 'type': 'str'}, + 'additional_properties': {'key': '', 'type': '{object}'}, + 'catalog_info': {'key': 'catalogInfo', 'type': 'IntegrationRuntimeSsisCatalogInfo'}, + 'license_type': {'key': 'licenseType', 'type': 'str'}, + 'custom_setup_script_properties': {'key': 'customSetupScriptProperties', 'type': 'IntegrationRuntimeCustomSetupScriptProperties'}, + 'data_proxy_properties': {'key': 'dataProxyProperties', 'type': 'IntegrationRuntimeDataProxyProperties'}, + 'edition': {'key': 'edition', 'type': 'str'}, + 'express_custom_setup_properties': {'key': 'expressCustomSetupProperties', 'type': '[CustomSetupBase]'}, } - def __init__(self, *, connect_via=None, staging_linked_service=None, path: str=None, **kwargs) -> None: - super(IntegrationRuntimeDataProxyProperties, self).__init__(**kwargs) - self.connect_via = connect_via - self.staging_linked_service = staging_linked_service - self.path = path - - -class IntegrationRuntimeMonitoringData(Model): - """Get monitoring data response. - - :param name: Integration runtime name. - :type name: str - :param nodes: Integration runtime node monitoring data. - :type nodes: - list[~azure.mgmt.synapse.models.IntegrationRuntimeNodeMonitoringData] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'nodes': {'key': 'nodes', 'type': '[IntegrationRuntimeNodeMonitoringData]'}, - } + def __init__(self, *, additional_properties=None, catalog_info=None, license_type=None, custom_setup_script_properties=None, data_proxy_properties=None, edition=None, express_custom_setup_properties=None, **kwargs) -> None: + super(IntegrationRuntimeSsisProperties, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.catalog_info = catalog_info + self.license_type = license_type + self.custom_setup_script_properties = custom_setup_script_properties + self.data_proxy_properties = data_proxy_properties + self.edition = edition + self.express_custom_setup_properties = express_custom_setup_properties - def __init__(self, *, name: str=None, nodes=None, **kwargs) -> None: - super(IntegrationRuntimeMonitoringData, self).__init__(**kwargs) - self.name = name - self.nodes = nodes +class IntegrationRuntimeStatus(Model): + """Integration runtime status. -class IntegrationRuntimeNodeIpAddress(Model): - """The IP address of self-hosted integration runtime node. + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ManagedIntegrationRuntimeStatus, + SelfHostedIntegrationRuntimeStatus Variables are only populated by the server, and will be ignored when sending a request. - :ivar ip_address: The IP address of self-hosted integration runtime node. - :vartype ip_address: str + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :ivar data_factory_name: The workspace name which the integration runtime + belong to. + :vartype data_factory_name: str + :ivar state: The state of integration runtime. Possible values include: + 'Initial', 'Stopped', 'Started', 'Starting', 'Stopping', + 'NeedRegistration', 'Online', 'Limited', 'Offline', 'AccessDenied' + :vartype state: str or ~azure.mgmt.synapse.models.IntegrationRuntimeState + :param type: Required. Constant filled by server. + :type type: str """ _validation = { - 'ip_address': {'readonly': True}, + 'data_factory_name': {'readonly': True}, + 'state': {'readonly': True}, + 'type': {'required': True}, } _attribute_map = { - 'ip_address': {'key': 'ipAddress', 'type': 'str'}, + 'additional_properties': {'key': '', 'type': '{object}'}, + 'data_factory_name': {'key': 'dataFactoryName', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, **kwargs) -> None: - super(IntegrationRuntimeNodeIpAddress, self).__init__(**kwargs) - self.ip_address = None + _subtype_map = { + 'type': {'Managed': 'ManagedIntegrationRuntimeStatus', 'SelfHosted': 'SelfHostedIntegrationRuntimeStatus'} + } + + def __init__(self, *, additional_properties=None, **kwargs) -> None: + super(IntegrationRuntimeStatus, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.data_factory_name = None + self.state = None + self.type = None -class IntegrationRuntimeNodeMonitoringData(Model): - """Monitoring data for integration runtime node. +class IntegrationRuntimeStatusResponse(Model): + """Integration runtime status response. Variables are only populated by the server, and will be ignored when sending a request. - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :ivar node_name: Name of the integration runtime node. - :vartype node_name: str - :ivar available_memory_in_mb: Available memory (MB) on the integration - runtime node. - :vartype available_memory_in_mb: int - :ivar cpu_utilization: CPU percentage on the integration runtime node. - :vartype cpu_utilization: int - :ivar concurrent_jobs_limit: Maximum concurrent jobs on the integration - runtime node. - :vartype concurrent_jobs_limit: int - :ivar concurrent_jobs_running: The number of jobs currently running on the - integration runtime node. - :vartype concurrent_jobs_running: int - :ivar max_concurrent_jobs: The maximum concurrent jobs in this integration - runtime. - :vartype max_concurrent_jobs: int - :ivar sent_bytes: Sent bytes on the integration runtime node. - :vartype sent_bytes: float - :ivar received_bytes: Received bytes on the integration runtime node. - :vartype received_bytes: float + All required parameters must be populated in order to send to Azure. + + :ivar name: The integration runtime name. + :vartype name: str + :param properties: Required. Integration runtime properties. + :type properties: ~azure.mgmt.synapse.models.IntegrationRuntimeStatus """ _validation = { - 'node_name': {'readonly': True}, - 'available_memory_in_mb': {'readonly': True}, - 'cpu_utilization': {'readonly': True}, - 'concurrent_jobs_limit': {'readonly': True}, - 'concurrent_jobs_running': {'readonly': True}, - 'max_concurrent_jobs': {'readonly': True}, - 'sent_bytes': {'readonly': True}, - 'received_bytes': {'readonly': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'node_name': {'key': 'nodeName', 'type': 'str'}, - 'available_memory_in_mb': {'key': 'availableMemoryInMB', 'type': 'int'}, - 'cpu_utilization': {'key': 'cpuUtilization', 'type': 'int'}, - 'concurrent_jobs_limit': {'key': 'concurrentJobsLimit', 'type': 'int'}, - 'concurrent_jobs_running': {'key': 'concurrentJobsRunning', 'type': 'int'}, - 'max_concurrent_jobs': {'key': 'maxConcurrentJobs', 'type': 'int'}, - 'sent_bytes': {'key': 'sentBytes', 'type': 'float'}, - 'received_bytes': {'key': 'receivedBytes', 'type': 'float'}, + 'name': {'readonly': True}, + 'properties': {'required': True}, } - def __init__(self, *, additional_properties=None, **kwargs) -> None: - super(IntegrationRuntimeNodeMonitoringData, self).__init__(**kwargs) - self.additional_properties = additional_properties - self.node_name = None - self.available_memory_in_mb = None - self.cpu_utilization = None - self.concurrent_jobs_limit = None - self.concurrent_jobs_running = None - self.max_concurrent_jobs = None - self.sent_bytes = None - self.received_bytes = None + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'IntegrationRuntimeStatus'}, + } + + def __init__(self, *, properties, **kwargs) -> None: + super(IntegrationRuntimeStatusResponse, self).__init__(**kwargs) + self.name = None + self.properties = properties -class IntegrationRuntimeRegenerateKeyParameters(Model): - """Parameters to regenerate the authentication key. +class IntegrationRuntimeVNetProperties(Model): + """VNet properties for managed integration runtime. - :param key_name: The name of the authentication key to regenerate. - Possible values include: 'authKey1', 'authKey2' - :type key_name: str or - ~azure.mgmt.synapse.models.IntegrationRuntimeAuthKeyName + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param v_net_id: The ID of the VNet that this integration runtime will + join. + :type v_net_id: str + :param subnet: The name of the subnet this integration runtime will join. + :type subnet: str + :param public_ips: Resource IDs of the public IP addresses that this + integration runtime will use. + :type public_ips: list[str] """ _attribute_map = { - 'key_name': {'key': 'keyName', 'type': 'str'}, + 'additional_properties': {'key': '', 'type': '{object}'}, + 'v_net_id': {'key': 'vNetId', 'type': 'str'}, + 'subnet': {'key': 'subnet', 'type': 'str'}, + 'public_ips': {'key': 'publicIPs', 'type': '[str]'}, } - def __init__(self, *, key_name=None, **kwargs) -> None: - super(IntegrationRuntimeRegenerateKeyParameters, self).__init__(**kwargs) - self.key_name = key_name + def __init__(self, *, additional_properties=None, v_net_id: str=None, subnet: str=None, public_ips=None, **kwargs) -> None: + super(IntegrationRuntimeVNetProperties, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.v_net_id = v_net_id + self.subnet = subnet + self.public_ips = public_ips -class SubResource(AzureEntityResource): - """Azure Synapse nested resource, which belongs to a workspace. +class IpFirewallRuleInfo(ProxyResource): + """IP firewall rule. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str - :ivar etag: Resource Etag. - :vartype etag: str + :param end_ip_address: The end IP address of the firewall rule. Must be + IPv4 format. Must be greater than or equal to startIpAddress + :type end_ip_address: str + :ivar provisioning_state: Resource provisioning state. Possible values + include: 'Provisioning', 'Succeeded', 'Deleting', 'Failed', 'DeleteError' + :vartype provisioning_state: str or + ~azure.mgmt.synapse.models.ProvisioningState + :param start_ip_address: The start IP address of the firewall rule. Must + be IPv4 format + :type start_ip_address: str """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, + 'end_ip_address': {'key': 'properties.endIpAddress', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'start_ip_address': {'key': 'properties.startIpAddress', 'type': 'str'}, } - def __init__(self, **kwargs) -> None: - super(SubResource, self).__init__(**kwargs) + def __init__(self, *, end_ip_address: str=None, start_ip_address: str=None, **kwargs) -> None: + super(IpFirewallRuleInfo, self).__init__(**kwargs) + self.end_ip_address = end_ip_address + self.provisioning_state = None + self.start_ip_address = start_ip_address -class IntegrationRuntimeResource(SubResource): - """Integration runtime resource type. +class IpFirewallRuleProperties(Model): + """IP firewall rule properties. Variables are only populated by the server, and will be ignored when sending a request. - All required parameters must be populated in order to send to Azure. + :param end_ip_address: The end IP address of the firewall rule. Must be + IPv4 format. Must be greater than or equal to startIpAddress + :type end_ip_address: str + :ivar provisioning_state: Resource provisioning state. Possible values + include: 'Provisioning', 'Succeeded', 'Deleting', 'Failed', 'DeleteError' + :vartype provisioning_state: str or + ~azure.mgmt.synapse.models.ProvisioningState + :param start_ip_address: The start IP address of the firewall rule. Must + be IPv4 format + :type start_ip_address: str + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'end_ip_address': {'key': 'endIpAddress', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'start_ip_address': {'key': 'startIpAddress', 'type': 'str'}, + } + + def __init__(self, *, end_ip_address: str=None, start_ip_address: str=None, **kwargs) -> None: + super(IpFirewallRuleProperties, self).__init__(**kwargs) + self.end_ip_address = end_ip_address + self.provisioning_state = None + self.start_ip_address = start_ip_address + + +class Key(ProxyResource): + """A workspace key. - :ivar id: Fully qualified resource Id for the resource. Ex - + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str - :ivar etag: Resource Etag. - :vartype etag: str - :param properties: Required. Integration runtime properties. - :type properties: ~azure.mgmt.synapse.models.IntegrationRuntime + :param is_active_cmk: Used to activate the workspace after a customer + managed key is provided. + :type is_active_cmk: bool + :param key_vault_url: The Key Vault Url of the workspace key. + :type key_vault_url: str """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'etag': {'readonly': True}, - 'properties': {'required': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'IntegrationRuntime'}, + 'is_active_cmk': {'key': 'properties.isActiveCMK', 'type': 'bool'}, + 'key_vault_url': {'key': 'properties.keyVaultUrl', 'type': 'str'}, } - def __init__(self, *, properties, **kwargs) -> None: - super(IntegrationRuntimeResource, self).__init__(**kwargs) - self.properties = properties + def __init__(self, *, is_active_cmk: bool=None, key_vault_url: str=None, **kwargs) -> None: + super(Key, self).__init__(**kwargs) + self.is_active_cmk = is_active_cmk + self.key_vault_url = key_vault_url -class IntegrationRuntimeSsisCatalogInfo(Model): - """Catalog information for managed dedicated integration runtime. +class LibraryRequirements(Model): + """Spark pool library version requirements. - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param catalog_server_endpoint: The catalog database server URL. - :type catalog_server_endpoint: str - :param catalog_admin_user_name: The administrator user name of catalog - database. - :type catalog_admin_user_name: str - :param catalog_admin_password: The password of the administrator user - account of the catalog database. - :type catalog_admin_password: ~azure.mgmt.synapse.models.SecureString - :param catalog_pricing_tier: The pricing tier for the catalog database. - The valid values could be found in - https://azure.microsoft.com/en-us/pricing/details/sql-database/. Possible - values include: 'Basic', 'Standard', 'Premium', 'PremiumRS' - :type catalog_pricing_tier: str or - ~azure.mgmt.synapse.models.IntegrationRuntimeSsisCatalogPricingTier + Library requirements for a Big Data pool powered by Apache Spark. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar time: The last update time of the library requirements file. + :vartype time: datetime + :param content: The library requirements. + :type content: str + :param filename: The filename of the library requirements file. + :type filename: str """ _validation = { - 'catalog_admin_user_name': {'max_length': 128, 'min_length': 1}, + 'time': {'readonly': True}, } _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'catalog_server_endpoint': {'key': 'catalogServerEndpoint', 'type': 'str'}, - 'catalog_admin_user_name': {'key': 'catalogAdminUserName', 'type': 'str'}, - 'catalog_admin_password': {'key': 'catalogAdminPassword', 'type': 'SecureString'}, - 'catalog_pricing_tier': {'key': 'catalogPricingTier', 'type': 'str'}, + 'time': {'key': 'time', 'type': 'iso-8601'}, + 'content': {'key': 'content', 'type': 'str'}, + 'filename': {'key': 'filename', 'type': 'str'}, } - def __init__(self, *, additional_properties=None, catalog_server_endpoint: str=None, catalog_admin_user_name: str=None, catalog_admin_password=None, catalog_pricing_tier=None, **kwargs) -> None: - super(IntegrationRuntimeSsisCatalogInfo, self).__init__(**kwargs) - self.additional_properties = additional_properties - self.catalog_server_endpoint = catalog_server_endpoint - self.catalog_admin_user_name = catalog_admin_user_name - self.catalog_admin_password = catalog_admin_password - self.catalog_pricing_tier = catalog_pricing_tier + def __init__(self, *, content: str=None, filename: str=None, **kwargs) -> None: + super(LibraryRequirements, self).__init__(**kwargs) + self.time = None + self.content = content + self.filename = filename -class IntegrationRuntimeSsisProperties(Model): - """SSIS properties for managed integration runtime. +class LinkedIntegrationRuntime(Model): + """The linked integration runtime information. - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param catalog_info: Catalog information for managed dedicated integration - runtime. - :type catalog_info: - ~azure.mgmt.synapse.models.IntegrationRuntimeSsisCatalogInfo - :param license_type: License type for bringing your own license scenario. - Possible values include: 'BasePrice', 'LicenseIncluded' - :type license_type: str or - ~azure.mgmt.synapse.models.IntegrationRuntimeLicenseType - :param custom_setup_script_properties: Custom setup script properties for - a managed dedicated integration runtime. - :type custom_setup_script_properties: - ~azure.mgmt.synapse.models.IntegrationRuntimeCustomSetupScriptProperties - :param data_proxy_properties: Data proxy properties for a managed - dedicated integration runtime. - :type data_proxy_properties: - ~azure.mgmt.synapse.models.IntegrationRuntimeDataProxyProperties - :param edition: The edition for the SSIS Integration Runtime. Possible - values include: 'Standard', 'Enterprise' - :type edition: str or ~azure.mgmt.synapse.models.IntegrationRuntimeEdition - :param express_custom_setup_properties: Custom setup without script - properties for a SSIS integration runtime. - :type express_custom_setup_properties: - list[~azure.mgmt.synapse.models.CustomSetupBase] + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the linked integration runtime. + :vartype name: str + :ivar subscription_id: The subscription ID for which the linked + integration runtime belong to. + :vartype subscription_id: str + :ivar data_factory_name: The name of the workspace for which the linked + integration runtime belong to. + :vartype data_factory_name: str + :ivar data_factory_location: The location of the workspace for which the + linked integration runtime belong to. + :vartype data_factory_location: str + :ivar create_time: The creating time of the linked integration runtime. + :vartype create_time: datetime """ - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'catalog_info': {'key': 'catalogInfo', 'type': 'IntegrationRuntimeSsisCatalogInfo'}, - 'license_type': {'key': 'licenseType', 'type': 'str'}, - 'custom_setup_script_properties': {'key': 'customSetupScriptProperties', 'type': 'IntegrationRuntimeCustomSetupScriptProperties'}, - 'data_proxy_properties': {'key': 'dataProxyProperties', 'type': 'IntegrationRuntimeDataProxyProperties'}, - 'edition': {'key': 'edition', 'type': 'str'}, - 'express_custom_setup_properties': {'key': 'expressCustomSetupProperties', 'type': '[CustomSetupBase]'}, + _validation = { + 'name': {'readonly': True}, + 'subscription_id': {'readonly': True}, + 'data_factory_name': {'readonly': True}, + 'data_factory_location': {'readonly': True}, + 'create_time': {'readonly': True}, } - def __init__(self, *, additional_properties=None, catalog_info=None, license_type=None, custom_setup_script_properties=None, data_proxy_properties=None, edition=None, express_custom_setup_properties=None, **kwargs) -> None: - super(IntegrationRuntimeSsisProperties, self).__init__(**kwargs) - self.additional_properties = additional_properties - self.catalog_info = catalog_info - self.license_type = license_type - self.custom_setup_script_properties = custom_setup_script_properties - self.data_proxy_properties = data_proxy_properties - self.edition = edition - self.express_custom_setup_properties = express_custom_setup_properties + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'data_factory_name': {'key': 'dataFactoryName', 'type': 'str'}, + 'data_factory_location': {'key': 'dataFactoryLocation', 'type': 'str'}, + 'create_time': {'key': 'createTime', 'type': 'iso-8601'}, + } + def __init__(self, **kwargs) -> None: + super(LinkedIntegrationRuntime, self).__init__(**kwargs) + self.name = None + self.subscription_id = None + self.data_factory_name = None + self.data_factory_location = None + self.create_time = None -class IntegrationRuntimeStatus(Model): - """Integration runtime status. - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ManagedIntegrationRuntimeStatus, - SelfHostedIntegrationRuntimeStatus +class LinkedIntegrationRuntimeType(Model): + """The base definition of a linked integration runtime. - Variables are only populated by the server, and will be ignored when - sending a request. + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: LinkedIntegrationRuntimeKeyAuthorization, + LinkedIntegrationRuntimeRbacAuthorization All required parameters must be populated in order to send to Azure. - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :ivar data_factory_name: The workspace name which the integration runtime - belong to. - :vartype data_factory_name: str - :ivar state: The state of integration runtime. Possible values include: - 'Initial', 'Stopped', 'Started', 'Starting', 'Stopping', - 'NeedRegistration', 'Online', 'Limited', 'Offline', 'AccessDenied' - :vartype state: str or ~azure.mgmt.synapse.models.IntegrationRuntimeState - :param type: Required. Constant filled by server. - :type type: str + :param authorization_type: Required. Constant filled by server. + :type authorization_type: str """ _validation = { - 'data_factory_name': {'readonly': True}, - 'state': {'readonly': True}, - 'type': {'required': True}, + 'authorization_type': {'required': True}, } _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'data_factory_name': {'key': 'dataFactoryName', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, + 'authorization_type': {'key': 'authorizationType', 'type': 'str'}, } _subtype_map = { - 'type': {'Managed': 'ManagedIntegrationRuntimeStatus', 'SelfHosted': 'SelfHostedIntegrationRuntimeStatus'} + 'authorization_type': {'Key': 'LinkedIntegrationRuntimeKeyAuthorization', 'RBAC': 'LinkedIntegrationRuntimeRbacAuthorization'} } - def __init__(self, *, additional_properties=None, **kwargs) -> None: - super(IntegrationRuntimeStatus, self).__init__(**kwargs) - self.additional_properties = additional_properties - self.data_factory_name = None - self.state = None - self.type = None + def __init__(self, **kwargs) -> None: + super(LinkedIntegrationRuntimeType, self).__init__(**kwargs) + self.authorization_type = None -class IntegrationRuntimeStatusResponse(Model): - """Integration runtime status response. +class LinkedIntegrationRuntimeKeyAuthorization(LinkedIntegrationRuntimeType): + """The key authorization type integration runtime. - Variables are only populated by the server, and will be ignored when - sending a request. + All required parameters must be populated in order to send to Azure. + + :param authorization_type: Required. Constant filled by server. + :type authorization_type: str + :param key: Required. The key used for authorization. + :type key: ~azure.mgmt.synapse.models.SecureString + """ + + _validation = { + 'authorization_type': {'required': True}, + 'key': {'required': True}, + } + + _attribute_map = { + 'authorization_type': {'key': 'authorizationType', 'type': 'str'}, + 'key': {'key': 'key', 'type': 'SecureString'}, + } + + def __init__(self, *, key, **kwargs) -> None: + super(LinkedIntegrationRuntimeKeyAuthorization, self).__init__(**kwargs) + self.key = key + self.authorization_type = 'Key' + + +class LinkedIntegrationRuntimeRbacAuthorization(LinkedIntegrationRuntimeType): + """The role based access control (RBAC) authorization type integration + runtime. All required parameters must be populated in order to send to Azure. - :ivar name: The integration runtime name. - :vartype name: str - :param properties: Required. Integration runtime properties. - :type properties: ~azure.mgmt.synapse.models.IntegrationRuntimeStatus + :param authorization_type: Required. Constant filled by server. + :type authorization_type: str + :param resource_id: Required. The resource identifier of the integration + runtime to be shared. + :type resource_id: str """ _validation = { - 'name': {'readonly': True}, - 'properties': {'required': True}, + 'authorization_type': {'required': True}, + 'resource_id': {'required': True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'IntegrationRuntimeStatus'}, + 'authorization_type': {'key': 'authorizationType', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, } - def __init__(self, *, properties, **kwargs) -> None: - super(IntegrationRuntimeStatusResponse, self).__init__(**kwargs) - self.name = None - self.properties = properties + def __init__(self, *, resource_id: str, **kwargs) -> None: + super(LinkedIntegrationRuntimeRbacAuthorization, self).__init__(**kwargs) + self.resource_id = resource_id + self.authorization_type = 'RBAC' -class IntegrationRuntimeVNetProperties(Model): - """VNet properties for managed integration runtime. +class ManagedIdentity(Model): + """The workspace managed identity. - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param v_net_id: The ID of the VNet that this integration runtime will - join. - :type v_net_id: str - :param subnet: The name of the subnet this integration runtime will join. - :type subnet: str - :param public_ips: Resource IDs of the public IP addresses that this - integration runtime will use. - :type public_ips: list[str] + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal ID of the workspace managed identity + :vartype principal_id: str + :ivar tenant_id: The tenant ID of the workspace managed identity + :vartype tenant_id: str + :param type: The type of managed identity for the workspace. Possible + values include: 'None', 'SystemAssigned' + :type type: str or ~azure.mgmt.synapse.models.ResourceIdentityType """ + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'v_net_id': {'key': 'vNetId', 'type': 'str'}, - 'subnet': {'key': 'subnet', 'type': 'str'}, - 'public_ips': {'key': 'publicIPs', 'type': '[str]'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, } - def __init__(self, *, additional_properties=None, v_net_id: str=None, subnet: str=None, public_ips=None, **kwargs) -> None: - super(IntegrationRuntimeVNetProperties, self).__init__(**kwargs) - self.additional_properties = additional_properties - self.v_net_id = v_net_id - self.subnet = subnet - self.public_ips = public_ips + def __init__(self, *, type=None, **kwargs) -> None: + super(ManagedIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = type -class IpFirewallRuleInfo(ProxyResource): - """IP firewall rule. +class ManagedIdentitySqlControlSettingsModel(ProxyResource): + """Managed Identity Sql Control Settings. + + Sql Control Settings for workspace managed identity. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str - :param end_ip_address: The end IP address of the firewall rule. Must be - IPv4 format. Must be greater than or equal to startIpAddress - :type end_ip_address: str - :ivar provisioning_state: Resource provisioning state. Possible values - include: 'Provisioning', 'Succeeded', 'Deleting', 'Failed', 'DeleteError' - :vartype provisioning_state: str or - ~azure.mgmt.synapse.models.ProvisioningState - :param start_ip_address: The start IP address of the firewall rule. Must - be IPv4 format - :type start_ip_address: str + :param grant_sql_control_to_managed_identity: Grant sql control to managed + identity + :type grant_sql_control_to_managed_identity: + ~azure.mgmt.synapse.models.ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentity """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'end_ip_address': {'key': 'properties.endIpAddress', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'start_ip_address': {'key': 'properties.startIpAddress', 'type': 'str'}, + 'grant_sql_control_to_managed_identity': {'key': 'properties.grantSqlControlToManagedIdentity', 'type': 'ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentity'}, } - def __init__(self, *, end_ip_address: str=None, start_ip_address: str=None, **kwargs) -> None: - super(IpFirewallRuleInfo, self).__init__(**kwargs) - self.end_ip_address = end_ip_address - self.provisioning_state = None - self.start_ip_address = start_ip_address + def __init__(self, *, grant_sql_control_to_managed_identity=None, **kwargs) -> None: + super(ManagedIdentitySqlControlSettingsModel, self).__init__(**kwargs) + self.grant_sql_control_to_managed_identity = grant_sql_control_to_managed_identity -class IpFirewallRuleProperties(Model): - """IP firewall rule properties. +class ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentity(Model): + """Grant sql control to managed identity. Variables are only populated by the server, and will be ignored when sending a request. - :param end_ip_address: The end IP address of the firewall rule. Must be - IPv4 format. Must be greater than or equal to startIpAddress - :type end_ip_address: str - :ivar provisioning_state: Resource provisioning state. Possible values - include: 'Provisioning', 'Succeeded', 'Deleting', 'Failed', 'DeleteError' - :vartype provisioning_state: str or - ~azure.mgmt.synapse.models.ProvisioningState - :param start_ip_address: The start IP address of the firewall rule. Must - be IPv4 format - :type start_ip_address: str + :param desired_state: Desired state. Possible values include: 'Enabled', + 'Disabled' + :type desired_state: str or ~azure.mgmt.synapse.models.enum + :ivar actual_state: Actual state. Possible values include: 'Enabling', + 'Enabled', 'Disabling', 'Disabled', 'Unknown' + :vartype actual_state: str or ~azure.mgmt.synapse.models.enum + """ + + _validation = { + 'actual_state': {'readonly': True}, + } + + _attribute_map = { + 'desired_state': {'key': 'desiredState', 'type': 'str'}, + 'actual_state': {'key': 'actualState', 'type': 'str'}, + } + + def __init__(self, *, desired_state=None, **kwargs) -> None: + super(ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentity, self).__init__(**kwargs) + self.desired_state = desired_state + self.actual_state = None + + +class ManagedIntegrationRuntime(IntegrationRuntime): + """Managed integration runtime, including managed elastic and managed + dedicated integration runtimes. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Integration runtime description. + :type description: str + :param type: Required. Constant filled by server. + :type type: str + :ivar state: Integration runtime state, only valid for managed dedicated + integration runtime. Possible values include: 'Initial', 'Stopped', + 'Started', 'Starting', 'Stopping', 'NeedRegistration', 'Online', + 'Limited', 'Offline', 'AccessDenied' + :vartype state: str or ~azure.mgmt.synapse.models.IntegrationRuntimeState + :param compute_properties: The compute resource for managed integration + runtime. + :type compute_properties: + ~azure.mgmt.synapse.models.IntegrationRuntimeComputeProperties + :param ssis_properties: SSIS properties for managed integration runtime. + :type ssis_properties: + ~azure.mgmt.synapse.models.IntegrationRuntimeSsisProperties """ _validation = { - 'provisioning_state': {'readonly': True}, + 'type': {'required': True}, + 'state': {'readonly': True}, } _attribute_map = { - 'end_ip_address': {'key': 'endIpAddress', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'start_ip_address': {'key': 'startIpAddress', 'type': 'str'}, + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'compute_properties': {'key': 'typeProperties.computeProperties', 'type': 'IntegrationRuntimeComputeProperties'}, + 'ssis_properties': {'key': 'typeProperties.ssisProperties', 'type': 'IntegrationRuntimeSsisProperties'}, } - def __init__(self, *, end_ip_address: str=None, start_ip_address: str=None, **kwargs) -> None: - super(IpFirewallRuleProperties, self).__init__(**kwargs) - self.end_ip_address = end_ip_address - self.provisioning_state = None - self.start_ip_address = start_ip_address - + def __init__(self, *, additional_properties=None, description: str=None, compute_properties=None, ssis_properties=None, **kwargs) -> None: + super(ManagedIntegrationRuntime, self).__init__(additional_properties=additional_properties, description=description, **kwargs) + self.state = None + self.compute_properties = compute_properties + self.ssis_properties = ssis_properties + self.type = 'Managed' -class LibraryRequirements(Model): - """Spark pool library version requirements. - Library requirements for a Big Data pool powered by Apache Spark. +class ManagedIntegrationRuntimeError(Model): + """Error definition for managed integration runtime. Variables are only populated by the server, and will be ignored when sending a request. - :ivar time: The last update time of the library requirements file. + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :ivar time: The time when the error occurred. :vartype time: datetime - :param content: The library requirements. - :type content: str - :param filename: The filename of the library requirements file. - :type filename: str + :ivar code: Error code. + :vartype code: str + :ivar parameters: Managed integration runtime error parameters. + :vartype parameters: list[str] + :ivar message: Error message. + :vartype message: str """ _validation = { 'time': {'readonly': True}, + 'code': {'readonly': True}, + 'parameters': {'readonly': True}, + 'message': {'readonly': True}, } _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, 'time': {'key': 'time', 'type': 'iso-8601'}, - 'content': {'key': 'content', 'type': 'str'}, - 'filename': {'key': 'filename', 'type': 'str'}, + 'code': {'key': 'code', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[str]'}, + 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self, *, content: str=None, filename: str=None, **kwargs) -> None: - super(LibraryRequirements, self).__init__(**kwargs) + def __init__(self, *, additional_properties=None, **kwargs) -> None: + super(ManagedIntegrationRuntimeError, self).__init__(**kwargs) + self.additional_properties = additional_properties self.time = None - self.content = content - self.filename = filename + self.code = None + self.parameters = None + self.message = None -class LinkedIntegrationRuntime(Model): - """The linked integration runtime information. +class ManagedIntegrationRuntimeNode(Model): + """Properties of integration runtime node. Variables are only populated by the server, and will be ignored when sending a request. - :ivar name: The name of the linked integration runtime. - :vartype name: str - :ivar subscription_id: The subscription ID for which the linked - integration runtime belong to. - :vartype subscription_id: str - :ivar data_factory_name: The name of the workspace for which the linked - integration runtime belong to. - :vartype data_factory_name: str - :ivar data_factory_location: The location of the workspace for which the - linked integration runtime belong to. - :vartype data_factory_location: str - :ivar create_time: The creating time of the linked integration runtime. - :vartype create_time: datetime + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :ivar node_id: The managed integration runtime node id. + :vartype node_id: str + :ivar status: The managed integration runtime node status. Possible values + include: 'Starting', 'Available', 'Recycling', 'Unavailable' + :vartype status: str or + ~azure.mgmt.synapse.models.ManagedIntegrationRuntimeNodeStatus + :param errors: The errors that occurred on this integration runtime node. + :type errors: + list[~azure.mgmt.synapse.models.ManagedIntegrationRuntimeError] """ _validation = { - 'name': {'readonly': True}, - 'subscription_id': {'readonly': True}, - 'data_factory_name': {'readonly': True}, - 'data_factory_location': {'readonly': True}, - 'create_time': {'readonly': True}, + 'node_id': {'readonly': True}, + 'status': {'readonly': True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'data_factory_name': {'key': 'dataFactoryName', 'type': 'str'}, - 'data_factory_location': {'key': 'dataFactoryLocation', 'type': 'str'}, - 'create_time': {'key': 'createTime', 'type': 'iso-8601'}, + 'additional_properties': {'key': '', 'type': '{object}'}, + 'node_id': {'key': 'nodeId', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[ManagedIntegrationRuntimeError]'}, } - def __init__(self, **kwargs) -> None: - super(LinkedIntegrationRuntime, self).__init__(**kwargs) - self.name = None - self.subscription_id = None - self.data_factory_name = None - self.data_factory_location = None - self.create_time = None - + def __init__(self, *, additional_properties=None, errors=None, **kwargs) -> None: + super(ManagedIntegrationRuntimeNode, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.node_id = None + self.status = None + self.errors = errors -class LinkedIntegrationRuntimeType(Model): - """The base definition of a linked integration runtime. - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: LinkedIntegrationRuntimeKeyAuthorization, - LinkedIntegrationRuntimeRbacAuthorization +class ManagedIntegrationRuntimeOperationResult(Model): + """Properties of managed integration runtime operation result. - All required parameters must be populated in order to send to Azure. + Variables are only populated by the server, and will be ignored when + sending a request. - :param authorization_type: Required. Constant filled by server. - :type authorization_type: str + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :ivar type: The operation type. Could be start or stop. + :vartype type: str + :ivar start_time: The start time of the operation. + :vartype start_time: datetime + :ivar result: The operation result. + :vartype result: str + :ivar error_code: The error code. + :vartype error_code: str + :ivar parameters: Managed integration runtime error parameters. + :vartype parameters: list[str] + :ivar activity_id: The activity id for the operation request. + :vartype activity_id: str """ _validation = { - 'authorization_type': {'required': True}, + 'type': {'readonly': True}, + 'start_time': {'readonly': True}, + 'result': {'readonly': True}, + 'error_code': {'readonly': True}, + 'parameters': {'readonly': True}, + 'activity_id': {'readonly': True}, } _attribute_map = { - 'authorization_type': {'key': 'authorizationType', 'type': 'str'}, - } - - _subtype_map = { - 'authorization_type': {'Key': 'LinkedIntegrationRuntimeKeyAuthorization', 'RBAC': 'LinkedIntegrationRuntimeRbacAuthorization'} - } - - def __init__(self, **kwargs) -> None: - super(LinkedIntegrationRuntimeType, self).__init__(**kwargs) - self.authorization_type = None - - -class LinkedIntegrationRuntimeKeyAuthorization(LinkedIntegrationRuntimeType): - """The key authorization type integration runtime. - - All required parameters must be populated in order to send to Azure. - - :param authorization_type: Required. Constant filled by server. - :type authorization_type: str - :param key: Required. The key used for authorization. - :type key: ~azure.mgmt.synapse.models.SecureString - """ - - _validation = { - 'authorization_type': {'required': True}, - 'key': {'required': True}, + 'additional_properties': {'key': '', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'result': {'key': 'result', 'type': 'str'}, + 'error_code': {'key': 'errorCode', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[str]'}, + 'activity_id': {'key': 'activityId', 'type': 'str'}, } - _attribute_map = { - 'authorization_type': {'key': 'authorizationType', 'type': 'str'}, - 'key': {'key': 'key', 'type': 'SecureString'}, - } + def __init__(self, *, additional_properties=None, **kwargs) -> None: + super(ManagedIntegrationRuntimeOperationResult, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.type = None + self.start_time = None + self.result = None + self.error_code = None + self.parameters = None + self.activity_id = None - def __init__(self, *, key, **kwargs) -> None: - super(LinkedIntegrationRuntimeKeyAuthorization, self).__init__(**kwargs) - self.key = key - self.authorization_type = 'Key' +class ManagedIntegrationRuntimeStatus(IntegrationRuntimeStatus): + """Managed integration runtime status. -class LinkedIntegrationRuntimeRbacAuthorization(LinkedIntegrationRuntimeType): - """The role based access control (RBAC) authorization type integration - runtime. + Variables are only populated by the server, and will be ignored when + sending a request. All required parameters must be populated in order to send to Azure. - :param authorization_type: Required. Constant filled by server. - :type authorization_type: str - :param resource_id: Required. The resource identifier of the integration - runtime to be shared. - :type resource_id: str + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :ivar data_factory_name: The workspace name which the integration runtime + belong to. + :vartype data_factory_name: str + :ivar state: The state of integration runtime. Possible values include: + 'Initial', 'Stopped', 'Started', 'Starting', 'Stopping', + 'NeedRegistration', 'Online', 'Limited', 'Offline', 'AccessDenied' + :vartype state: str or ~azure.mgmt.synapse.models.IntegrationRuntimeState + :param type: Required. Constant filled by server. + :type type: str + :ivar create_time: The time at which the integration runtime was created, + in ISO8601 format. + :vartype create_time: datetime + :ivar nodes: The list of nodes for managed integration runtime. + :vartype nodes: + list[~azure.mgmt.synapse.models.ManagedIntegrationRuntimeNode] + :ivar other_errors: The errors that occurred on this integration runtime. + :vartype other_errors: + list[~azure.mgmt.synapse.models.ManagedIntegrationRuntimeError] + :ivar last_operation: The last operation result that occurred on this + integration runtime. + :vartype last_operation: + ~azure.mgmt.synapse.models.ManagedIntegrationRuntimeOperationResult """ _validation = { - 'authorization_type': {'required': True}, - 'resource_id': {'required': True}, + 'data_factory_name': {'readonly': True}, + 'state': {'readonly': True}, + 'type': {'required': True}, + 'create_time': {'readonly': True}, + 'nodes': {'readonly': True}, + 'other_errors': {'readonly': True}, + 'last_operation': {'readonly': True}, } _attribute_map = { - 'authorization_type': {'key': 'authorizationType', 'type': 'str'}, - 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'additional_properties': {'key': '', 'type': '{object}'}, + 'data_factory_name': {'key': 'dataFactoryName', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'create_time': {'key': 'typeProperties.createTime', 'type': 'iso-8601'}, + 'nodes': {'key': 'typeProperties.nodes', 'type': '[ManagedIntegrationRuntimeNode]'}, + 'other_errors': {'key': 'typeProperties.otherErrors', 'type': '[ManagedIntegrationRuntimeError]'}, + 'last_operation': {'key': 'typeProperties.lastOperation', 'type': 'ManagedIntegrationRuntimeOperationResult'}, } - def __init__(self, *, resource_id: str, **kwargs) -> None: - super(LinkedIntegrationRuntimeRbacAuthorization, self).__init__(**kwargs) - self.resource_id = resource_id - self.authorization_type = 'RBAC' - + def __init__(self, *, additional_properties=None, **kwargs) -> None: + super(ManagedIntegrationRuntimeStatus, self).__init__(additional_properties=additional_properties, **kwargs) + self.create_time = None + self.nodes = None + self.other_errors = None + self.last_operation = None + self.type = 'Managed' -class ManagedIdentity(Model): - """The workspace managed identity. - Variables are only populated by the server, and will be ignored when - sending a request. +class ManagedVirtualNetworkSettings(Model): + """Managed Virtual Network Settings. - :ivar principal_id: The principal ID of the workspace managed identity - :vartype principal_id: str - :ivar tenant_id: The tenant ID of the workspace managed identity - :vartype tenant_id: str - :param type: The type of managed identity for the workspace. Possible - values include: 'None', 'SystemAssigned' - :type type: str or ~azure.mgmt.synapse.models.ResourceIdentityType + :param prevent_data_exfiltration: Prevent Data Exfiltration + :type prevent_data_exfiltration: bool + :param linked_access_check_on_target_resource: Linked Access Check On + Target Resource + :type linked_access_check_on_target_resource: bool + :param allowed_aad_tenant_ids_for_linking: Allowed Aad Tenant Ids For + Linking + :type allowed_aad_tenant_ids_for_linking: list[str] """ - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, + 'prevent_data_exfiltration': {'key': 'preventDataExfiltration', 'type': 'bool'}, + 'linked_access_check_on_target_resource': {'key': 'linkedAccessCheckOnTargetResource', 'type': 'bool'}, + 'allowed_aad_tenant_ids_for_linking': {'key': 'allowedAadTenantIdsForLinking', 'type': '[str]'}, } - def __init__(self, *, type=None, **kwargs) -> None: - super(ManagedIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = type + def __init__(self, *, prevent_data_exfiltration: bool=None, linked_access_check_on_target_resource: bool=None, allowed_aad_tenant_ids_for_linking=None, **kwargs) -> None: + super(ManagedVirtualNetworkSettings, self).__init__(**kwargs) + self.prevent_data_exfiltration = prevent_data_exfiltration + self.linked_access_check_on_target_resource = linked_access_check_on_target_resource + self.allowed_aad_tenant_ids_for_linking = allowed_aad_tenant_ids_for_linking -class ManagedIdentitySqlControlSettingsModel(ProxyResource): - """Managed Identity Sql Control Settings. +class MetadataSyncConfig(ProxyResource): + """Metadata sync configuration. - Sql Control Settings for workspace managed identity. + Configuration for metadata sync. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str - :param grant_sql_control_to_managed_identity: Grant sql control to managed - identity - :type grant_sql_control_to_managed_identity: - ~azure.mgmt.synapse.models.ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentity + :param enabled: Indicates whether the metadata sync is enabled or disabled + :type enabled: bool + :param sync_interval_in_minutes: The Sync Interval in minutes. + :type sync_interval_in_minutes: int """ _validation = { @@ -1899,1467 +2982,1733 @@ class ManagedIdentitySqlControlSettingsModel(ProxyResource): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'grant_sql_control_to_managed_identity': {'key': 'properties.grantSqlControlToManagedIdentity', 'type': 'ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentity'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'sync_interval_in_minutes': {'key': 'properties.syncIntervalInMinutes', 'type': 'int'}, } - def __init__(self, *, grant_sql_control_to_managed_identity=None, **kwargs) -> None: - super(ManagedIdentitySqlControlSettingsModel, self).__init__(**kwargs) - self.grant_sql_control_to_managed_identity = grant_sql_control_to_managed_identity - + def __init__(self, *, enabled: bool=None, sync_interval_in_minutes: int=None, **kwargs) -> None: + super(MetadataSyncConfig, self).__init__(**kwargs) + self.enabled = enabled + self.sync_interval_in_minutes = sync_interval_in_minutes -class ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentity(Model): - """Grant sql control to managed identity. - Variables are only populated by the server, and will be ignored when - sending a request. +class OperationMetaLogSpecification(Model): + """What is this?. - :param desired_state: Desired state. Possible values include: 'Enabled', - 'Disabled' - :type desired_state: str or ~azure.mgmt.synapse.models.enum - :ivar actual_state: Actual state. Possible values include: 'Enabling', - 'Enabled', 'Disabling', 'Disabled', 'Unknown' - :vartype actual_state: str or ~azure.mgmt.synapse.models.enum + :param display_name: Log display name + :type display_name: str + :param blob_duration: Time range the log covers + :type blob_duration: str + :param name: Log unique name + :type name: str """ - _validation = { - 'actual_state': {'readonly': True}, + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, } + def __init__(self, *, display_name: str=None, blob_duration: str=None, name: str=None, **kwargs) -> None: + super(OperationMetaLogSpecification, self).__init__(**kwargs) + self.display_name = display_name + self.blob_duration = blob_duration + self.name = name + + +class OperationMetaMetricDimensionSpecification(Model): + """What is this?. + + :param display_name: Dimension display name + :type display_name: str + :param name: Dimension unique name + :type name: str + :param to_be_exported_for_shoebox: Whether this metric should be exported + for Shoebox + :type to_be_exported_for_shoebox: bool + """ + _attribute_map = { - 'desired_state': {'key': 'desiredState', 'type': 'str'}, - 'actual_state': {'key': 'actualState', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'to_be_exported_for_shoebox': {'key': 'toBeExportedForShoebox', 'type': 'bool'}, } - def __init__(self, *, desired_state=None, **kwargs) -> None: - super(ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentity, self).__init__(**kwargs) - self.desired_state = desired_state - self.actual_state = None + def __init__(self, *, display_name: str=None, name: str=None, to_be_exported_for_shoebox: bool=None, **kwargs) -> None: + super(OperationMetaMetricDimensionSpecification, self).__init__(**kwargs) + self.display_name = display_name + self.name = name + self.to_be_exported_for_shoebox = to_be_exported_for_shoebox -class ManagedIntegrationRuntime(IntegrationRuntime): - """Managed integration runtime, including managed elastic and managed - dedicated integration runtimes. +class OperationMetaMetricSpecification(Model): + """What is this?. - Variables are only populated by the server, and will be ignored when - sending a request. + :param source_mdm_namespace: The source MDM namespace + :type source_mdm_namespace: str + :param display_name: Metric display name + :type display_name: str + :param name: Metric unique name + :type name: str + :param aggregation_type: Metric aggregation type + :type aggregation_type: str + :param display_description: Metric description + :type display_description: str + :param source_mdm_account: The source MDM account + :type source_mdm_account: str + :param enable_regional_mdm_account: Whether the regional MDM account is + enabled + :type enable_regional_mdm_account: bool + :param unit: Metric units + :type unit: str + :param dimensions: Metric dimensions + :type dimensions: + list[~azure.mgmt.synapse.models.OperationMetaMetricDimensionSpecification] + :param supports_instance_level_aggregation: Whether the metric supports + instance-level aggregation + :type supports_instance_level_aggregation: bool + :param metric_filter_pattern: Metric filter + :type metric_filter_pattern: str + """ - All required parameters must be populated in order to send to Azure. + _attribute_map = { + 'source_mdm_namespace': {'key': 'sourceMdmNamespace', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'aggregation_type': {'key': 'aggregationType', 'type': 'str'}, + 'display_description': {'key': 'displayDescription', 'type': 'str'}, + 'source_mdm_account': {'key': 'sourceMdmAccount', 'type': 'str'}, + 'enable_regional_mdm_account': {'key': 'enableRegionalMdmAccount', 'type': 'bool'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'dimensions': {'key': 'dimensions', 'type': '[OperationMetaMetricDimensionSpecification]'}, + 'supports_instance_level_aggregation': {'key': 'supportsInstanceLevelAggregation', 'type': 'bool'}, + 'metric_filter_pattern': {'key': 'metricFilterPattern', 'type': 'str'}, + } - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Integration runtime description. - :type description: str - :param type: Required. Constant filled by server. - :type type: str - :ivar state: Integration runtime state, only valid for managed dedicated - integration runtime. Possible values include: 'Initial', 'Stopped', - 'Started', 'Starting', 'Stopping', 'NeedRegistration', 'Online', - 'Limited', 'Offline', 'AccessDenied' - :vartype state: str or ~azure.mgmt.synapse.models.IntegrationRuntimeState - :param compute_properties: The compute resource for managed integration - runtime. - :type compute_properties: - ~azure.mgmt.synapse.models.IntegrationRuntimeComputeProperties - :param ssis_properties: SSIS properties for managed integration runtime. - :type ssis_properties: - ~azure.mgmt.synapse.models.IntegrationRuntimeSsisProperties + def __init__(self, *, source_mdm_namespace: str=None, display_name: str=None, name: str=None, aggregation_type: str=None, display_description: str=None, source_mdm_account: str=None, enable_regional_mdm_account: bool=None, unit: str=None, dimensions=None, supports_instance_level_aggregation: bool=None, metric_filter_pattern: str=None, **kwargs) -> None: + super(OperationMetaMetricSpecification, self).__init__(**kwargs) + self.source_mdm_namespace = source_mdm_namespace + self.display_name = display_name + self.name = name + self.aggregation_type = aggregation_type + self.display_description = display_description + self.source_mdm_account = source_mdm_account + self.enable_regional_mdm_account = enable_regional_mdm_account + self.unit = unit + self.dimensions = dimensions + self.supports_instance_level_aggregation = supports_instance_level_aggregation + self.metric_filter_pattern = metric_filter_pattern + + +class OperationMetaServiceSpecification(Model): + """What is this?. + + :param metric_specifications: Service metric specifications + :type metric_specifications: + list[~azure.mgmt.synapse.models.OperationMetaMetricSpecification] + :param log_specifications: Service log specifications + :type log_specifications: + list[~azure.mgmt.synapse.models.OperationMetaLogSpecification] """ - _validation = { - 'type': {'required': True}, - 'state': {'readonly': True}, + _attribute_map = { + 'metric_specifications': {'key': 'metricSpecifications', 'type': '[OperationMetaMetricSpecification]'}, + 'log_specifications': {'key': 'logSpecifications', 'type': '[OperationMetaLogSpecification]'}, } + def __init__(self, *, metric_specifications=None, log_specifications=None, **kwargs) -> None: + super(OperationMetaServiceSpecification, self).__init__(**kwargs) + self.metric_specifications = metric_specifications + self.log_specifications = log_specifications + + +class OperationResource(Model): + """An operation. + + :param id: Operation ID + :type id: str + :param name: Operation name + :type name: str + :param status: Operation status. Possible values include: 'InProgress', + 'Succeeded', 'Failed', 'Canceled' + :type status: str or ~azure.mgmt.synapse.models.OperationStatus + :param properties: Operation properties + :type properties: object + :param error: Errors from the operation + :type error: ~azure.mgmt.synapse.models.ErrorDetail + :param start_time: Operation start time + :type start_time: datetime + :param end_time: Operation start time + :type end_time: datetime + :param percent_complete: Completion percentage of the operation + :type percent_complete: float + """ + _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'str'}, - 'compute_properties': {'key': 'typeProperties.computeProperties', 'type': 'IntegrationRuntimeComputeProperties'}, - 'ssis_properties': {'key': 'typeProperties.ssisProperties', 'type': 'IntegrationRuntimeSsisProperties'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'error': {'key': 'error', 'type': 'ErrorDetail'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'percent_complete': {'key': 'percentComplete', 'type': 'float'}, } - def __init__(self, *, additional_properties=None, description: str=None, compute_properties=None, ssis_properties=None, **kwargs) -> None: - super(ManagedIntegrationRuntime, self).__init__(additional_properties=additional_properties, description=description, **kwargs) - self.state = None - self.compute_properties = compute_properties - self.ssis_properties = ssis_properties - self.type = 'Managed' + def __init__(self, *, id: str=None, name: str=None, status=None, properties=None, error=None, start_time=None, end_time=None, percent_complete: float=None, **kwargs) -> None: + super(OperationResource, self).__init__(**kwargs) + self.id = id + self.name = name + self.status = status + self.properties = properties + self.error = error + self.start_time = start_time + self.end_time = end_time + self.percent_complete = percent_complete -class ManagedIntegrationRuntimeError(Model): - """Error definition for managed integration runtime. +class PrivateEndpoint(Model): + """Private endpoint details. Variables are only populated by the server, and will be ignored when sending a request. - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :ivar time: The time when the error occurred. - :vartype time: datetime - :ivar code: Error code. - :vartype code: str - :ivar parameters: Managed integration runtime error parameters. - :vartype parameters: list[str] - :ivar message: Error message. - :vartype message: str + :ivar id: Resource id of the private endpoint. + :vartype id: str """ _validation = { - 'time': {'readonly': True}, - 'code': {'readonly': True}, - 'parameters': {'readonly': True}, - 'message': {'readonly': True}, + 'id': {'readonly': True}, } _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'time': {'key': 'time', 'type': 'iso-8601'}, - 'code': {'key': 'code', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '[str]'}, - 'message': {'key': 'message', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, } - def __init__(self, *, additional_properties=None, **kwargs) -> None: - super(ManagedIntegrationRuntimeError, self).__init__(**kwargs) - self.additional_properties = additional_properties - self.time = None - self.code = None - self.parameters = None - self.message = None + def __init__(self, **kwargs) -> None: + super(PrivateEndpoint, self).__init__(**kwargs) + self.id = None -class ManagedIntegrationRuntimeNode(Model): - """Properties of integration runtime node. +class PrivateEndpointConnection(ProxyResource): + """A private endpoint connection. Variables are only populated by the server, and will be ignored when sending a request. - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :ivar node_id: The managed integration runtime node id. - :vartype node_id: str - :ivar status: The managed integration runtime node status. Possible values - include: 'Starting', 'Available', 'Recycling', 'Unavailable' - :vartype status: str or - ~azure.mgmt.synapse.models.ManagedIntegrationRuntimeNodeStatus - :param errors: The errors that occurred on this integration runtime node. - :type errors: - list[~azure.mgmt.synapse.models.ManagedIntegrationRuntimeError] + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + :vartype type: str + :param private_endpoint: The private endpoint which the connection belongs + to. + :type private_endpoint: ~azure.mgmt.synapse.models.PrivateEndpoint + :param private_link_service_connection_state: Connection state of the + private endpoint connection. + :type private_link_service_connection_state: + ~azure.mgmt.synapse.models.PrivateLinkServiceConnectionState + :ivar provisioning_state: Provisioning state of the private endpoint + connection. + :vartype provisioning_state: str """ _validation = { - 'node_id': {'readonly': True}, - 'status': {'readonly': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, } _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'node_id': {'key': 'nodeId', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'errors': {'key': 'errors', 'type': '[ManagedIntegrationRuntimeError]'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } - def __init__(self, *, additional_properties=None, errors=None, **kwargs) -> None: - super(ManagedIntegrationRuntimeNode, self).__init__(**kwargs) - self.additional_properties = additional_properties - self.node_id = None - self.status = None - self.errors = errors + def __init__(self, *, private_endpoint=None, private_link_service_connection_state=None, **kwargs) -> None: + super(PrivateEndpointConnection, self).__init__(**kwargs) + self.private_endpoint = private_endpoint + self.private_link_service_connection_state = private_link_service_connection_state + self.provisioning_state = None -class ManagedIntegrationRuntimeOperationResult(Model): - """Properties of managed integration runtime operation result. +class PrivateEndpointConnectionForPrivateLinkHubBasic(Model): + """Private Endpoint Connection For Private Link Hub - Basic. Variables are only populated by the server, and will be ignored when sending a request. - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :ivar type: The operation type. Could be start or stop. - :vartype type: str - :ivar start_time: The start time of the operation. - :vartype start_time: datetime - :ivar result: The operation result. - :vartype result: str - :ivar error_code: The error code. - :vartype error_code: str - :ivar parameters: Managed integration runtime error parameters. - :vartype parameters: list[str] - :ivar activity_id: The activity id for the operation request. - :vartype activity_id: str + :ivar id: identifier + :vartype id: str + :param private_endpoint: The private endpoint which the connection belongs + to. + :type private_endpoint: ~azure.mgmt.synapse.models.PrivateEndpoint + :param private_link_service_connection_state: Connection state of the + private endpoint connection. + :type private_link_service_connection_state: + ~azure.mgmt.synapse.models.PrivateLinkServiceConnectionState + :ivar provisioning_state: Provisioning state of the private endpoint + connection. + :vartype provisioning_state: str """ _validation = { - 'type': {'readonly': True}, - 'start_time': {'readonly': True}, - 'result': {'readonly': True}, - 'error_code': {'readonly': True}, - 'parameters': {'readonly': True}, - 'activity_id': {'readonly': True}, + 'id': {'readonly': True}, + 'provisioning_state': {'readonly': True}, } _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'type': {'key': 'type', 'type': 'str'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'result': {'key': 'result', 'type': 'str'}, - 'error_code': {'key': 'errorCode', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '[str]'}, - 'activity_id': {'key': 'activityId', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } - def __init__(self, *, additional_properties=None, **kwargs) -> None: - super(ManagedIntegrationRuntimeOperationResult, self).__init__(**kwargs) - self.additional_properties = additional_properties - self.type = None - self.start_time = None - self.result = None - self.error_code = None - self.parameters = None - self.activity_id = None + def __init__(self, *, private_endpoint=None, private_link_service_connection_state=None, **kwargs) -> None: + super(PrivateEndpointConnectionForPrivateLinkHubBasic, self).__init__(**kwargs) + self.id = None + self.private_endpoint = private_endpoint + self.private_link_service_connection_state = private_link_service_connection_state + self.provisioning_state = None -class ManagedIntegrationRuntimeStatus(IntegrationRuntimeStatus): - """Managed integration runtime status. +class PrivateEndpointConnectionForPrivateLinkHub(PrivateEndpointConnectionForPrivateLinkHubBasic): + """PrivateEndpointConnectionForPrivateLinkHub. Variables are only populated by the server, and will be ignored when sending a request. - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :ivar data_factory_name: The workspace name which the integration runtime - belong to. - :vartype data_factory_name: str - :ivar state: The state of integration runtime. Possible values include: - 'Initial', 'Stopped', 'Started', 'Starting', 'Stopping', - 'NeedRegistration', 'Online', 'Limited', 'Offline', 'AccessDenied' - :vartype state: str or ~azure.mgmt.synapse.models.IntegrationRuntimeState - :param type: Required. Constant filled by server. + :ivar id: identifier + :vartype id: str + :param private_endpoint: The private endpoint which the connection belongs + to. + :type private_endpoint: ~azure.mgmt.synapse.models.PrivateEndpoint + :param private_link_service_connection_state: Connection state of the + private endpoint connection. + :type private_link_service_connection_state: + ~azure.mgmt.synapse.models.PrivateLinkServiceConnectionState + :ivar provisioning_state: Provisioning state of the private endpoint + connection. + :vartype provisioning_state: str + :param name: + :type name: str + :param type: :type type: str - :ivar create_time: The time at which the integration runtime was created, - in ISO8601 format. - :vartype create_time: datetime - :ivar nodes: The list of nodes for managed integration runtime. - :vartype nodes: - list[~azure.mgmt.synapse.models.ManagedIntegrationRuntimeNode] - :ivar other_errors: The errors that occurred on this integration runtime. - :vartype other_errors: - list[~azure.mgmt.synapse.models.ManagedIntegrationRuntimeError] - :ivar last_operation: The last operation result that occurred on this - integration runtime. - :vartype last_operation: - ~azure.mgmt.synapse.models.ManagedIntegrationRuntimeOperationResult """ _validation = { - 'data_factory_name': {'readonly': True}, - 'state': {'readonly': True}, - 'type': {'required': True}, - 'create_time': {'readonly': True}, - 'nodes': {'readonly': True}, - 'other_errors': {'readonly': True}, - 'last_operation': {'readonly': True}, + 'id': {'readonly': True}, + 'provisioning_state': {'readonly': True}, } _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'data_factory_name': {'key': 'dataFactoryName', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'create_time': {'key': 'typeProperties.createTime', 'type': 'iso-8601'}, - 'nodes': {'key': 'typeProperties.nodes', 'type': '[ManagedIntegrationRuntimeNode]'}, - 'other_errors': {'key': 'typeProperties.otherErrors', 'type': '[ManagedIntegrationRuntimeError]'}, - 'last_operation': {'key': 'typeProperties.lastOperation', 'type': 'ManagedIntegrationRuntimeOperationResult'}, } - def __init__(self, *, additional_properties=None, **kwargs) -> None: - super(ManagedIntegrationRuntimeStatus, self).__init__(additional_properties=additional_properties, **kwargs) - self.create_time = None - self.nodes = None - self.other_errors = None - self.last_operation = None - self.type = 'Managed' - + def __init__(self, *, private_endpoint=None, private_link_service_connection_state=None, name: str=None, type: str=None, **kwargs) -> None: + super(PrivateEndpointConnectionForPrivateLinkHub, self).__init__(private_endpoint=private_endpoint, private_link_service_connection_state=private_link_service_connection_state, **kwargs) + self.name = name + self.type = type -class MetadataSyncConfig(ProxyResource): - """Metadata sync configuration. - Configuration for metadata sync. +class PrivateLinkHub(TrackedResource): + """A privateLinkHub. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str - :param enabled: Indicates whether the metadata sync is enabled or disabled - :type enabled: bool + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + :param provisioning_state: PrivateLinkHub provisioning state + :type provisioning_state: str + :ivar private_endpoint_connections: List of private endpoint connections + :vartype private_endpoint_connections: + list[~azure.mgmt.synapse.models.PrivateEndpointConnectionForPrivateLinkHubBasic] """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'location': {'required': True}, + 'private_endpoint_connections': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnectionForPrivateLinkHubBasic]'}, } - def __init__(self, *, enabled: bool=None, **kwargs) -> None: - super(MetadataSyncConfig, self).__init__(**kwargs) - self.enabled = enabled + def __init__(self, *, location: str, tags=None, provisioning_state: str=None, **kwargs) -> None: + super(PrivateLinkHub, self).__init__(tags=tags, location=location, **kwargs) + self.provisioning_state = provisioning_state + self.private_endpoint_connections = None -class OperationMetaLogSpecification(Model): - """What is this?. +class PrivateLinkHubPatchInfo(Model): + """PrivateLinkHub patch details. - :param display_name: Log display name - :type display_name: str - :param blob_duration: Time range the log covers - :type blob_duration: str - :param name: Log unique name - :type name: str + :param tags: Resource tags + :type tags: dict[str, str] """ _attribute_map = { - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, } - def __init__(self, *, display_name: str=None, blob_duration: str=None, name: str=None, **kwargs) -> None: - super(OperationMetaLogSpecification, self).__init__(**kwargs) - self.display_name = display_name - self.blob_duration = blob_duration - self.name = name + def __init__(self, *, tags=None, **kwargs) -> None: + super(PrivateLinkHubPatchInfo, self).__init__(**kwargs) + self.tags = tags -class OperationMetaMetricDimensionSpecification(Model): - """What is this?. +class PrivateLinkResource(ProxyResource): + """A private link resource. - :param display_name: Dimension display name - :type display_name: str - :param name: Dimension unique name - :type name: str - :param to_be_exported_for_shoebox: Whether this metric should be exported - for Shoebox - :type to_be_exported_for_shoebox: bool + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + :vartype type: str + :ivar properties: The private link resource properties. + :vartype properties: + ~azure.mgmt.synapse.models.PrivateLinkResourceProperties """ + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'properties': {'readonly': True}, + } + _attribute_map = { - 'display_name': {'key': 'displayName', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, - 'to_be_exported_for_shoebox': {'key': 'toBeExportedForShoebox', 'type': 'bool'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'PrivateLinkResourceProperties'}, } - def __init__(self, *, display_name: str=None, name: str=None, to_be_exported_for_shoebox: bool=None, **kwargs) -> None: - super(OperationMetaMetricDimensionSpecification, self).__init__(**kwargs) - self.display_name = display_name - self.name = name - self.to_be_exported_for_shoebox = to_be_exported_for_shoebox + def __init__(self, **kwargs) -> None: + super(PrivateLinkResource, self).__init__(**kwargs) + self.properties = None -class OperationMetaMetricSpecification(Model): - """What is this?. +class PrivateLinkResourceProperties(Model): + """Properties of a private link resource. - :param source_mdm_namespace: The source MDM namespace - :type source_mdm_namespace: str - :param display_name: Metric display name - :type display_name: str - :param name: Metric unique name - :type name: str - :param aggregation_type: Metric aggregation type - :type aggregation_type: str - :param display_description: Metric description - :type display_description: str - :param source_mdm_account: The source MDM account - :type source_mdm_account: str - :param enable_regional_mdm_account: Whether the regional MDM account is - enabled - :type enable_regional_mdm_account: bool - :param unit: Metric units - :type unit: str - :param dimensions: Metric dimensions - :type dimensions: - list[~azure.mgmt.synapse.models.OperationMetaMetricDimensionSpecification] - :param supports_instance_level_aggregation: Whether the metric supports - instance-level aggregation - :type supports_instance_level_aggregation: bool - :param metric_filter_pattern: Metric filter - :type metric_filter_pattern: str + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar group_id: The private link resource group id. + :vartype group_id: str + :ivar required_members: The private link resource required member names. + :vartype required_members: list[str] + :ivar required_zone_names: Required DNS zone names of the the private link + resource. + :vartype required_zone_names: list[str] """ + _validation = { + 'group_id': {'readonly': True}, + 'required_members': {'readonly': True}, + 'required_zone_names': {'readonly': True}, + } + _attribute_map = { - 'source_mdm_namespace': {'key': 'sourceMdmNamespace', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'aggregation_type': {'key': 'aggregationType', 'type': 'str'}, - 'display_description': {'key': 'displayDescription', 'type': 'str'}, - 'source_mdm_account': {'key': 'sourceMdmAccount', 'type': 'str'}, - 'enable_regional_mdm_account': {'key': 'enableRegionalMdmAccount', 'type': 'bool'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'dimensions': {'key': 'dimensions', 'type': '[OperationMetaMetricDimensionSpecification]'}, - 'supports_instance_level_aggregation': {'key': 'supportsInstanceLevelAggregation', 'type': 'bool'}, - 'metric_filter_pattern': {'key': 'metricFilterPattern', 'type': 'str'}, + 'group_id': {'key': 'groupId', 'type': 'str'}, + 'required_members': {'key': 'requiredMembers', 'type': '[str]'}, + 'required_zone_names': {'key': 'requiredZoneNames', 'type': '[str]'}, } - def __init__(self, *, source_mdm_namespace: str=None, display_name: str=None, name: str=None, aggregation_type: str=None, display_description: str=None, source_mdm_account: str=None, enable_regional_mdm_account: bool=None, unit: str=None, dimensions=None, supports_instance_level_aggregation: bool=None, metric_filter_pattern: str=None, **kwargs) -> None: - super(OperationMetaMetricSpecification, self).__init__(**kwargs) - self.source_mdm_namespace = source_mdm_namespace - self.display_name = display_name - self.name = name - self.aggregation_type = aggregation_type - self.display_description = display_description - self.source_mdm_account = source_mdm_account - self.enable_regional_mdm_account = enable_regional_mdm_account - self.unit = unit - self.dimensions = dimensions - self.supports_instance_level_aggregation = supports_instance_level_aggregation - self.metric_filter_pattern = metric_filter_pattern + def __init__(self, **kwargs) -> None: + super(PrivateLinkResourceProperties, self).__init__(**kwargs) + self.group_id = None + self.required_members = None + self.required_zone_names = None -class OperationMetaServiceSpecification(Model): - """What is this?. +class PrivateLinkServiceConnectionState(Model): + """Connection state details of the private endpoint. - :param metric_specifications: Service metric specifications - :type metric_specifications: - list[~azure.mgmt.synapse.models.OperationMetaMetricSpecification] - :param log_specifications: Service log specifications - :type log_specifications: - list[~azure.mgmt.synapse.models.OperationMetaLogSpecification] + Variables are only populated by the server, and will be ignored when + sending a request. + + :param status: The private link service connection status. + :type status: str + :param description: The private link service connection description. + :type description: str + :ivar actions_required: The actions required for private link service + connection. + :vartype actions_required: str """ + _validation = { + 'actions_required': {'readonly': True}, + } + _attribute_map = { - 'metric_specifications': {'key': 'metricSpecifications', 'type': '[OperationMetaMetricSpecification]'}, - 'log_specifications': {'key': 'logSpecifications', 'type': '[OperationMetaLogSpecification]'}, + 'status': {'key': 'status', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, } - def __init__(self, *, metric_specifications=None, log_specifications=None, **kwargs) -> None: - super(OperationMetaServiceSpecification, self).__init__(**kwargs) - self.metric_specifications = metric_specifications - self.log_specifications = log_specifications + def __init__(self, *, status: str=None, description: str=None, **kwargs) -> None: + super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) + self.status = status + self.description = description + self.actions_required = None -class OperationResource(Model): - """An operation. +class QueryInterval(Model): + """A database query. - :param id: Operation ID - :type id: str - :param name: Operation name - :type name: str - :param status: Operation status. Possible values include: 'InProgress', - 'Succeeded', 'Failed', 'Canceled' - :type status: str or ~azure.mgmt.synapse.models.OperationStatus - :param properties: Operation properties - :type properties: object - :param error: Errors from the operation - :type error: ~azure.mgmt.synapse.models.ErrorDetail - :param start_time: Operation start time - :type start_time: datetime - :param end_time: Operation start time - :type end_time: datetime - :param percent_complete: Completion percentage of the operation - :type percent_complete: float + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar interval_start_time: The start time of the measurement interval + (ISO8601 format). + :vartype interval_start_time: datetime + :ivar execution_count: The number of times the query was executed during + this interval. + :vartype execution_count: float + :ivar metrics: The list of query metrics during this interval. + :vartype metrics: list[~azure.mgmt.synapse.models.QueryMetric] """ - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'object'}, - 'error': {'key': 'error', 'type': 'ErrorDetail'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'percent_complete': {'key': 'percentComplete', 'type': 'float'}, + _validation = { + 'interval_start_time': {'readonly': True}, + 'execution_count': {'readonly': True}, + 'metrics': {'readonly': True}, } - def __init__(self, *, id: str=None, name: str=None, status=None, properties=None, error=None, start_time=None, end_time=None, percent_complete: float=None, **kwargs) -> None: - super(OperationResource, self).__init__(**kwargs) - self.id = id - self.name = name - self.status = status - self.properties = properties - self.error = error - self.start_time = start_time - self.end_time = end_time - self.percent_complete = percent_complete + _attribute_map = { + 'interval_start_time': {'key': 'intervalStartTime', 'type': 'iso-8601'}, + 'execution_count': {'key': 'executionCount', 'type': 'float'}, + 'metrics': {'key': 'metrics', 'type': '[QueryMetric]'}, + } + def __init__(self, **kwargs) -> None: + super(QueryInterval, self).__init__(**kwargs) + self.interval_start_time = None + self.execution_count = None + self.metrics = None -class PrivateEndpoint(Model): - """Private endpoint details. + +class QueryMetric(Model): + """A database query. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource id of the private endpoint. - :vartype id: str + :ivar name: The name of the metric + :vartype name: str + :ivar display_name: The name of the metric for display in user interface + :vartype display_name: str + :ivar unit: The unit of measurement. Possible values include: + 'percentage', 'KB', 'microseconds' + :vartype unit: str or ~azure.mgmt.synapse.models.QueryMetricUnit + :ivar value: The measured value + :vartype value: float """ _validation = { - 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'display_name': {'readonly': True}, + 'unit': {'readonly': True}, + 'value': {'readonly': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'QueryMetricUnit'}, + 'value': {'key': 'value', 'type': 'float'}, } def __init__(self, **kwargs) -> None: - super(PrivateEndpoint, self).__init__(**kwargs) - self.id = None + super(QueryMetric, self).__init__(**kwargs) + self.name = None + self.display_name = None + self.unit = None + self.value = None -class PrivateEndpointConnection(ProxyResource): - """A private endpoint connection. +class QueryStatistic(Model): + """A database query. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param private_endpoint: The private endpoint which the connection belongs - to. - :type private_endpoint: ~azure.mgmt.synapse.models.PrivateEndpoint - :param private_link_service_connection_state: Connection state of the - private endpoint connection. - :type private_link_service_connection_state: - ~azure.mgmt.synapse.models.PrivateLinkServiceConnectionState - :ivar provisioning_state: Provisioning state of the private endpoint - connection. - :vartype provisioning_state: str + :ivar query_id: The id of the query + :vartype query_id: str + :ivar intervals: The list of query intervals. + :vartype intervals: list[~azure.mgmt.synapse.models.QueryInterval] """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, + 'query_id': {'readonly': True}, + 'intervals': {'readonly': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, - 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'query_id': {'key': 'queryId', 'type': 'str'}, + 'intervals': {'key': 'intervals', 'type': '[QueryInterval]'}, } - def __init__(self, *, private_endpoint=None, private_link_service_connection_state=None, **kwargs) -> None: - super(PrivateEndpointConnection, self).__init__(**kwargs) - self.private_endpoint = private_endpoint - self.private_link_service_connection_state = private_link_service_connection_state - self.provisioning_state = None + def __init__(self, **kwargs) -> None: + super(QueryStatistic, self).__init__(**kwargs) + self.query_id = None + self.intervals = None -class PrivateLinkHub(TrackedResource): - """A privateLinkHub. +class RecoverableSqlPool(ProxyResource): + """A recoverable sql pool. Variables are only populated by the server, and will be ignored when sending a request. - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param location: Required. The geo-location where the resource lives - :type location: str - :ivar provisioning_state: PrivateLinkHub provisioning state. Possible - values include: 'Succeeded', 'Failed' - :vartype provisioning_state: str or ~azure.mgmt.synapse.models.enum + :ivar edition: The edition of the database + :vartype edition: str + :ivar service_level_objective: The service level objective name of the + database + :vartype service_level_objective: str + :ivar elastic_pool_name: The elastic pool name of the database + :vartype elastic_pool_name: str + :ivar last_available_backup_date: The last available backup date of the + database (ISO8601 format) + :vartype last_available_backup_date: datetime """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'location': {'required': True}, - 'provisioning_state': {'readonly': True}, + 'edition': {'readonly': True}, + 'service_level_objective': {'readonly': True}, + 'elastic_pool_name': {'readonly': True}, + 'last_available_backup_date': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'edition': {'key': 'properties.edition', 'type': 'str'}, + 'service_level_objective': {'key': 'properties.serviceLevelObjective', 'type': 'str'}, + 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, + 'last_available_backup_date': {'key': 'properties.lastAvailableBackupDate', 'type': 'iso-8601'}, } - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(PrivateLinkHub, self).__init__(tags=tags, location=location, **kwargs) - self.provisioning_state = None + def __init__(self, **kwargs) -> None: + super(RecoverableSqlPool, self).__init__(**kwargs) + self.edition = None + self.service_level_objective = None + self.elastic_pool_name = None + self.last_available_backup_date = None -class PrivateLinkHubPatchInfo(Model): - """PrivateLinkHub patch details. +class ReplaceAllFirewallRulesOperationResponse(Model): + """An existing operation for replacing the firewall rules. - :param tags: Resource tags - :type tags: dict[str, str] + :param operation_id: The operation ID + :type operation_id: str """ _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, + 'operation_id': {'key': 'operationId', 'type': 'str'}, } - def __init__(self, *, tags=None, **kwargs) -> None: - super(PrivateLinkHubPatchInfo, self).__init__(**kwargs) - self.tags = tags + def __init__(self, *, operation_id: str=None, **kwargs) -> None: + super(ReplaceAllFirewallRulesOperationResponse, self).__init__(**kwargs) + self.operation_id = operation_id -class PrivateLinkResource(ProxyResource): - """A private link resource. +class ReplaceAllIpFirewallRulesRequest(Model): + """Replace all IP firewall rules request. + + :param ip_firewall_rules: IP firewall rule properties + :type ip_firewall_rules: dict[str, + ~azure.mgmt.synapse.models.IpFirewallRuleProperties] + """ + + _attribute_map = { + 'ip_firewall_rules': {'key': 'ipFirewallRules', 'type': '{IpFirewallRuleProperties}'}, + } + + def __init__(self, *, ip_firewall_rules=None, **kwargs) -> None: + super(ReplaceAllIpFirewallRulesRequest, self).__init__(**kwargs) + self.ip_firewall_rules = ip_firewall_rules + + +class ReplicationLink(ProxyResource): + """Represents a Sql pool replication link. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str - :ivar properties: The private link resource properties. - :vartype properties: - ~azure.mgmt.synapse.models.PrivateLinkResourceProperties + :ivar location: Location of the workspace that contains this firewall + rule. + :vartype location: str + :ivar is_termination_allowed: Legacy value indicating whether termination + is allowed. Currently always returns true. + :vartype is_termination_allowed: bool + :ivar replication_mode: Replication mode of this replication link. + :vartype replication_mode: str + :ivar partner_server: The name of the workspace hosting the partner Sql + pool. + :vartype partner_server: str + :ivar partner_database: The name of the partner Sql pool. + :vartype partner_database: str + :ivar partner_location: The Azure Region of the partner Sql pool. + :vartype partner_location: str + :ivar role: The role of the Sql pool in the replication link. Possible + values include: 'Primary', 'Secondary', 'NonReadableSecondary', 'Source', + 'Copy' + :vartype role: str or ~azure.mgmt.synapse.models.ReplicationRole + :ivar partner_role: The role of the partner Sql pool in the replication + link. Possible values include: 'Primary', 'Secondary', + 'NonReadableSecondary', 'Source', 'Copy' + :vartype partner_role: str or ~azure.mgmt.synapse.models.ReplicationRole + :ivar start_time: The start time for the replication link. + :vartype start_time: datetime + :ivar percent_complete: The percentage of seeding complete for the + replication link. + :vartype percent_complete: int + :ivar replication_state: The replication state for the replication link. + Possible values include: 'PENDING', 'SEEDING', 'CATCH_UP', 'SUSPENDED' + :vartype replication_state: str or + ~azure.mgmt.synapse.models.ReplicationState """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'properties': {'readonly': True}, + 'location': {'readonly': True}, + 'is_termination_allowed': {'readonly': True}, + 'replication_mode': {'readonly': True}, + 'partner_server': {'readonly': True}, + 'partner_database': {'readonly': True}, + 'partner_location': {'readonly': True}, + 'role': {'readonly': True}, + 'partner_role': {'readonly': True}, + 'start_time': {'readonly': True}, + 'percent_complete': {'readonly': True}, + 'replication_state': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'PrivateLinkResourceProperties'}, + 'location': {'key': 'location', 'type': 'str'}, + 'is_termination_allowed': {'key': 'properties.isTerminationAllowed', 'type': 'bool'}, + 'replication_mode': {'key': 'properties.replicationMode', 'type': 'str'}, + 'partner_server': {'key': 'properties.partnerServer', 'type': 'str'}, + 'partner_database': {'key': 'properties.partnerDatabase', 'type': 'str'}, + 'partner_location': {'key': 'properties.partnerLocation', 'type': 'str'}, + 'role': {'key': 'properties.role', 'type': 'ReplicationRole'}, + 'partner_role': {'key': 'properties.partnerRole', 'type': 'ReplicationRole'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, + 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, } def __init__(self, **kwargs) -> None: - super(PrivateLinkResource, self).__init__(**kwargs) - self.properties = None + super(ReplicationLink, self).__init__(**kwargs) + self.location = None + self.is_termination_allowed = None + self.replication_mode = None + self.partner_server = None + self.partner_database = None + self.partner_location = None + self.role = None + self.partner_role = None + self.start_time = None + self.percent_complete = None + self.replication_state = None -class PrivateLinkResourceProperties(Model): - """Properties of a private link resource. +class ResourceMoveDefinition(Model): + """Contains the information necessary to perform a resource move (rename). + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The target ID for the resource + :type id: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str, **kwargs) -> None: + super(ResourceMoveDefinition, self).__init__(**kwargs) + self.id = id + + +class RestorableDroppedSqlPool(ProxyResource): + """A restorable dropped Sql pool. Variables are only populated by the server, and will be ignored when sending a request. - :ivar group_id: The private link resource group id. - :vartype group_id: str - :ivar required_members: The private link resource required member names. - :vartype required_members: list[str] - :ivar required_zone_names: Required DNS zone names of the the private link - resource. - :vartype required_zone_names: list[str] + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + :vartype type: str + :ivar location: The geo-location where the resource lives + :vartype location: str + :ivar database_name: The name of the database + :vartype database_name: str + :ivar edition: The edition of the database + :vartype edition: str + :ivar max_size_bytes: The max size in bytes of the database + :vartype max_size_bytes: str + :ivar service_level_objective: The service level objective name of the + database + :vartype service_level_objective: str + :ivar elastic_pool_name: The elastic pool name of the database + :vartype elastic_pool_name: str + :ivar creation_date: The creation date of the database (ISO8601 format) + :vartype creation_date: datetime + :ivar deletion_date: The deletion date of the database (ISO8601 format) + :vartype deletion_date: datetime + :ivar earliest_restore_date: The earliest restore date of the database + (ISO8601 format) + :vartype earliest_restore_date: datetime """ _validation = { - 'group_id': {'readonly': True}, - 'required_members': {'readonly': True}, - 'required_zone_names': {'readonly': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'database_name': {'readonly': True}, + 'edition': {'readonly': True}, + 'max_size_bytes': {'readonly': True}, + 'service_level_objective': {'readonly': True}, + 'elastic_pool_name': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'deletion_date': {'readonly': True}, + 'earliest_restore_date': {'readonly': True}, } _attribute_map = { - 'group_id': {'key': 'groupId', 'type': 'str'}, - 'required_members': {'key': 'requiredMembers', 'type': '[str]'}, - 'required_zone_names': {'key': 'requiredZoneNames', 'type': '[str]'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'edition': {'key': 'properties.edition', 'type': 'str'}, + 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'str'}, + 'service_level_objective': {'key': 'properties.serviceLevelObjective', 'type': 'str'}, + 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'deletion_date': {'key': 'properties.deletionDate', 'type': 'iso-8601'}, + 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, } def __init__(self, **kwargs) -> None: - super(PrivateLinkResourceProperties, self).__init__(**kwargs) - self.group_id = None - self.required_members = None - self.required_zone_names = None + super(RestorableDroppedSqlPool, self).__init__(**kwargs) + self.location = None + self.database_name = None + self.edition = None + self.max_size_bytes = None + self.service_level_objective = None + self.elastic_pool_name = None + self.creation_date = None + self.deletion_date = None + self.earliest_restore_date = None -class PrivateLinkServiceConnectionState(Model): - """Connection state details of the private endpoint. +class RestorePoint(ProxyResource): + """Database restore points. Variables are only populated by the server, and will be ignored when sending a request. - :param status: The private link service connection status. Possible values - include: 'Approved', 'Pending', 'Rejected', 'Disconnected' - :type status: str or ~azure.mgmt.synapse.models.enum - :param description: The private link service connection description. - :type description: str - :ivar actions_required: The actions required for private link service - connection. - :vartype actions_required: str + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar restore_point_type: The type of restore point. Possible values + include: 'CONTINUOUS', 'DISCRETE' + :vartype restore_point_type: str or + ~azure.mgmt.synapse.models.RestorePointType + :ivar earliest_restore_date: The earliest time to which this database can + be restored + :vartype earliest_restore_date: datetime + :ivar restore_point_creation_date: The time the backup was taken + :vartype restore_point_creation_date: datetime + :ivar restore_point_label: The label of restore point for backup request + by user + :vartype restore_point_label: str """ _validation = { - 'actions_required': {'readonly': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'restore_point_type': {'readonly': True}, + 'earliest_restore_date': {'readonly': True}, + 'restore_point_creation_date': {'readonly': True}, + 'restore_point_label': {'readonly': True}, } _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'restore_point_type': {'key': 'properties.restorePointType', 'type': 'RestorePointType'}, + 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, + 'restore_point_creation_date': {'key': 'properties.restorePointCreationDate', 'type': 'iso-8601'}, + 'restore_point_label': {'key': 'properties.restorePointLabel', 'type': 'str'}, } - def __init__(self, *, status=None, description: str=None, **kwargs) -> None: - super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) - self.status = status - self.description = description - self.actions_required = None + def __init__(self, **kwargs) -> None: + super(RestorePoint, self).__init__(**kwargs) + self.location = None + self.restore_point_type = None + self.earliest_restore_date = None + self.restore_point_creation_date = None + self.restore_point_label = None -class QueryInterval(Model): - """A database query. +class SecretBase(Model): + """The base definition of a secret type. - Variables are only populated by the server, and will be ignored when - sending a request. + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: SecureString - :ivar interval_start_time: The start time of the measurement interval - (ISO8601 format). - :vartype interval_start_time: datetime - :ivar execution_count: The number of times the query was executed during - this interval. - :vartype execution_count: float - :ivar metrics: The list of query metrics during this interval. - :vartype metrics: list[~azure.mgmt.synapse.models.QueryMetric] + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str """ _validation = { - 'interval_start_time': {'readonly': True}, - 'execution_count': {'readonly': True}, - 'metrics': {'readonly': True}, + 'type': {'required': True}, } _attribute_map = { - 'interval_start_time': {'key': 'intervalStartTime', 'type': 'iso-8601'}, - 'execution_count': {'key': 'executionCount', 'type': 'float'}, - 'metrics': {'key': 'metrics', 'type': '[QueryMetric]'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'SecureString': 'SecureString'} } def __init__(self, **kwargs) -> None: - super(QueryInterval, self).__init__(**kwargs) - self.interval_start_time = None - self.execution_count = None - self.metrics = None + super(SecretBase, self).__init__(**kwargs) + self.type = None -class QueryMetric(Model): - """A database query. +class SecureString(SecretBase): + """Azure Synapse secure string definition. The string value will be masked + with asterisks '*' during Get or List API calls. - Variables are only populated by the server, and will be ignored when - sending a request. + All required parameters must be populated in order to send to Azure. - :ivar name: The name of the metric - :vartype name: str - :ivar display_name: The name of the metric for display in user interface - :vartype display_name: str - :ivar unit: The unit of measurement. Possible values include: - 'percentage', 'KB', 'microseconds' - :vartype unit: str or ~azure.mgmt.synapse.models.QueryMetricUnit - :ivar value: The measured value - :vartype value: float + :param type: Required. Constant filled by server. + :type type: str + :param value: Required. Value of secure string. + :type value: str """ _validation = { - 'name': {'readonly': True}, - 'display_name': {'readonly': True}, - 'unit': {'readonly': True}, - 'value': {'readonly': True}, + 'type': {'required': True}, + 'value': {'required': True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'QueryMetricUnit'}, - 'value': {'key': 'value', 'type': 'float'}, + 'type': {'key': 'type', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, } - def __init__(self, **kwargs) -> None: - super(QueryMetric, self).__init__(**kwargs) - self.name = None - self.display_name = None - self.unit = None - self.value = None + def __init__(self, *, value: str, **kwargs) -> None: + super(SecureString, self).__init__(**kwargs) + self.value = value + self.type = 'SecureString' -class QueryStatistic(Model): - """A database query. +class SelfHostedIntegrationRuntime(IntegrationRuntime): + """Self-hosted integration runtime. - Variables are only populated by the server, and will be ignored when - sending a request. + All required parameters must be populated in order to send to Azure. - :ivar query_id: The id of the query - :vartype query_id: str - :ivar intervals: The list of query intervals. - :vartype intervals: list[~azure.mgmt.synapse.models.QueryInterval] + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param description: Integration runtime description. + :type description: str + :param type: Required. Constant filled by server. + :type type: str + :param linked_info: Linked integration runtime type from data factory + :type linked_info: ~azure.mgmt.synapse.models.LinkedIntegrationRuntimeType """ _validation = { - 'query_id': {'readonly': True}, - 'intervals': {'readonly': True}, + 'type': {'required': True}, } _attribute_map = { - 'query_id': {'key': 'queryId', 'type': 'str'}, - 'intervals': {'key': 'intervals', 'type': '[QueryInterval]'}, + 'additional_properties': {'key': '', 'type': '{object}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'linked_info': {'key': 'typeProperties.linkedInfo', 'type': 'LinkedIntegrationRuntimeType'}, } - def __init__(self, **kwargs) -> None: - super(QueryStatistic, self).__init__(**kwargs) - self.query_id = None - self.intervals = None + def __init__(self, *, additional_properties=None, description: str=None, linked_info=None, **kwargs) -> None: + super(SelfHostedIntegrationRuntime, self).__init__(additional_properties=additional_properties, description=description, **kwargs) + self.linked_info = linked_info + self.type = 'SelfHosted' -class ReplaceAllFirewallRulesOperationResponse(Model): - """An existing operation for replacing the firewall rules. +class SelfHostedIntegrationRuntimeNode(Model): + """Properties of Self-hosted integration runtime node. - :param operation_id: The operation ID - :type operation_id: str + Variables are only populated by the server, and will be ignored when + sending a request. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :ivar node_name: Name of the integration runtime node. + :vartype node_name: str + :ivar machine_name: Machine name of the integration runtime node. + :vartype machine_name: str + :ivar host_service_uri: URI for the host machine of the integration + runtime. + :vartype host_service_uri: str + :ivar status: Status of the integration runtime node. Possible values + include: 'NeedRegistration', 'Online', 'Limited', 'Offline', 'Upgrading', + 'Initializing', 'InitializeFailed' + :vartype status: str or + ~azure.mgmt.synapse.models.SelfHostedIntegrationRuntimeNodeStatus + :ivar capabilities: The integration runtime capabilities dictionary + :vartype capabilities: dict[str, str] + :ivar version_status: Status of the integration runtime node version. + :vartype version_status: str + :ivar version: Version of the integration runtime node. + :vartype version: str + :ivar register_time: The time at which the integration runtime node was + registered in ISO8601 format. + :vartype register_time: datetime + :ivar last_connect_time: The most recent time at which the integration + runtime was connected in ISO8601 format. + :vartype last_connect_time: datetime + :ivar expiry_time: The time at which the integration runtime will expire + in ISO8601 format. + :vartype expiry_time: datetime + :ivar last_start_time: The time the node last started up. + :vartype last_start_time: datetime + :ivar last_stop_time: The integration runtime node last stop time. + :vartype last_stop_time: datetime + :ivar last_update_result: The result of the last integration runtime node + update. Possible values include: 'None', 'Succeed', 'Fail' + :vartype last_update_result: str or + ~azure.mgmt.synapse.models.IntegrationRuntimeUpdateResult + :ivar last_start_update_time: The last time for the integration runtime + node update start. + :vartype last_start_update_time: datetime + :ivar last_end_update_time: The last time for the integration runtime node + update end. + :vartype last_end_update_time: datetime + :ivar is_active_dispatcher: Indicates whether this node is the active + dispatcher for integration runtime requests. + :vartype is_active_dispatcher: bool + :ivar concurrent_jobs_limit: Maximum concurrent jobs on the integration + runtime node. + :vartype concurrent_jobs_limit: int + :ivar max_concurrent_jobs: The maximum concurrent jobs in this integration + runtime. + :vartype max_concurrent_jobs: int """ - _attribute_map = { - 'operation_id': {'key': 'operationId', 'type': 'str'}, + _validation = { + 'node_name': {'readonly': True}, + 'machine_name': {'readonly': True}, + 'host_service_uri': {'readonly': True}, + 'status': {'readonly': True}, + 'capabilities': {'readonly': True}, + 'version_status': {'readonly': True}, + 'version': {'readonly': True}, + 'register_time': {'readonly': True}, + 'last_connect_time': {'readonly': True}, + 'expiry_time': {'readonly': True}, + 'last_start_time': {'readonly': True}, + 'last_stop_time': {'readonly': True}, + 'last_update_result': {'readonly': True}, + 'last_start_update_time': {'readonly': True}, + 'last_end_update_time': {'readonly': True}, + 'is_active_dispatcher': {'readonly': True}, + 'concurrent_jobs_limit': {'readonly': True}, + 'max_concurrent_jobs': {'readonly': True}, } - def __init__(self, *, operation_id: str=None, **kwargs) -> None: - super(ReplaceAllFirewallRulesOperationResponse, self).__init__(**kwargs) - self.operation_id = operation_id - - -class ReplaceAllIpFirewallRulesRequest(Model): - """Replace all IP firewall rules request. - - :param ip_firewall_rules: IP firewall rule properties - :type ip_firewall_rules: dict[str, - ~azure.mgmt.synapse.models.IpFirewallRuleProperties] - """ - _attribute_map = { - 'ip_firewall_rules': {'key': 'ipFirewallRules', 'type': '{IpFirewallRuleProperties}'}, + 'additional_properties': {'key': '', 'type': '{object}'}, + 'node_name': {'key': 'nodeName', 'type': 'str'}, + 'machine_name': {'key': 'machineName', 'type': 'str'}, + 'host_service_uri': {'key': 'hostServiceUri', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'capabilities': {'key': 'capabilities', 'type': '{str}'}, + 'version_status': {'key': 'versionStatus', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'register_time': {'key': 'registerTime', 'type': 'iso-8601'}, + 'last_connect_time': {'key': 'lastConnectTime', 'type': 'iso-8601'}, + 'expiry_time': {'key': 'expiryTime', 'type': 'iso-8601'}, + 'last_start_time': {'key': 'lastStartTime', 'type': 'iso-8601'}, + 'last_stop_time': {'key': 'lastStopTime', 'type': 'iso-8601'}, + 'last_update_result': {'key': 'lastUpdateResult', 'type': 'str'}, + 'last_start_update_time': {'key': 'lastStartUpdateTime', 'type': 'iso-8601'}, + 'last_end_update_time': {'key': 'lastEndUpdateTime', 'type': 'iso-8601'}, + 'is_active_dispatcher': {'key': 'isActiveDispatcher', 'type': 'bool'}, + 'concurrent_jobs_limit': {'key': 'concurrentJobsLimit', 'type': 'int'}, + 'max_concurrent_jobs': {'key': 'maxConcurrentJobs', 'type': 'int'}, } - def __init__(self, *, ip_firewall_rules=None, **kwargs) -> None: - super(ReplaceAllIpFirewallRulesRequest, self).__init__(**kwargs) - self.ip_firewall_rules = ip_firewall_rules + def __init__(self, *, additional_properties=None, **kwargs) -> None: + super(SelfHostedIntegrationRuntimeNode, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.node_name = None + self.machine_name = None + self.host_service_uri = None + self.status = None + self.capabilities = None + self.version_status = None + self.version = None + self.register_time = None + self.last_connect_time = None + self.expiry_time = None + self.last_start_time = None + self.last_stop_time = None + self.last_update_result = None + self.last_start_update_time = None + self.last_end_update_time = None + self.is_active_dispatcher = None + self.concurrent_jobs_limit = None + self.max_concurrent_jobs = None -class ReplicationLink(ProxyResource): - """Represents a Sql pool replication link. +class SelfHostedIntegrationRuntimeStatus(IntegrationRuntimeStatus): + """Self-hosted integration runtime status. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :ivar location: Location of the workspace that contains this firewall - rule. - :vartype location: str - :ivar is_termination_allowed: Legacy value indicating whether termination - is allowed. Currently always returns true. - :vartype is_termination_allowed: bool - :ivar replication_mode: Replication mode of this replication link. - :vartype replication_mode: str - :ivar partner_server: The name of the workspace hosting the partner Sql - pool. - :vartype partner_server: str - :ivar partner_database: The name of the partner Sql pool. - :vartype partner_database: str - :ivar partner_location: The Azure Region of the partner Sql pool. - :vartype partner_location: str - :ivar role: The role of the Sql pool in the replication link. Possible - values include: 'Primary', 'Secondary', 'NonReadableSecondary', 'Source', - 'Copy' - :vartype role: str or ~azure.mgmt.synapse.models.ReplicationRole - :ivar partner_role: The role of the partner Sql pool in the replication - link. Possible values include: 'Primary', 'Secondary', - 'NonReadableSecondary', 'Source', 'Copy' - :vartype partner_role: str or ~azure.mgmt.synapse.models.ReplicationRole - :ivar start_time: The start time for the replication link. - :vartype start_time: datetime - :ivar percent_complete: The percentage of seeding complete for the - replication link. - :vartype percent_complete: int - :ivar replication_state: The replication state for the replication link. - Possible values include: 'PENDING', 'SEEDING', 'CATCH_UP', 'SUSPENDED' - :vartype replication_state: str or - ~azure.mgmt.synapse.models.ReplicationState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'is_termination_allowed': {'readonly': True}, - 'replication_mode': {'readonly': True}, - 'partner_server': {'readonly': True}, - 'partner_database': {'readonly': True}, - 'partner_location': {'readonly': True}, - 'role': {'readonly': True}, - 'partner_role': {'readonly': True}, - 'start_time': {'readonly': True}, - 'percent_complete': {'readonly': True}, - 'replication_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'is_termination_allowed': {'key': 'properties.isTerminationAllowed', 'type': 'bool'}, - 'replication_mode': {'key': 'properties.replicationMode', 'type': 'str'}, - 'partner_server': {'key': 'properties.partnerServer', 'type': 'str'}, - 'partner_database': {'key': 'properties.partnerDatabase', 'type': 'str'}, - 'partner_location': {'key': 'properties.partnerLocation', 'type': 'str'}, - 'role': {'key': 'properties.role', 'type': 'ReplicationRole'}, - 'partner_role': {'key': 'properties.partnerRole', 'type': 'ReplicationRole'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, - 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ReplicationLink, self).__init__(**kwargs) - self.location = None - self.is_termination_allowed = None - self.replication_mode = None - self.partner_server = None - self.partner_database = None - self.partner_location = None - self.role = None - self.partner_role = None - self.start_time = None - self.percent_complete = None - self.replication_state = None - - -class ResourceMoveDefinition(Model): - """Contains the information necessary to perform a resource move (rename). - All required parameters must be populated in order to send to Azure. - :param id: Required. The target ID for the resource - :type id: str + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :ivar data_factory_name: The workspace name which the integration runtime + belong to. + :vartype data_factory_name: str + :ivar state: The state of integration runtime. Possible values include: + 'Initial', 'Stopped', 'Started', 'Starting', 'Stopping', + 'NeedRegistration', 'Online', 'Limited', 'Offline', 'AccessDenied' + :vartype state: str or ~azure.mgmt.synapse.models.IntegrationRuntimeState + :param type: Required. Constant filled by server. + :type type: str + :ivar create_time: The time at which the integration runtime was created, + in ISO8601 format. + :vartype create_time: datetime + :ivar task_queue_id: The task queue id of the integration runtime. + :vartype task_queue_id: str + :ivar node_communication_channel_encryption_mode: The node communication + Channel encryption mode + :vartype node_communication_channel_encryption_mode: str + :ivar internal_channel_encryption: It is used to set the encryption mode + for node-node communication channel (when more than 2 self-hosted + integration runtime nodes exist). Possible values include: 'NotSet', + 'SslEncrypted', 'NotEncrypted' + :vartype internal_channel_encryption: str or + ~azure.mgmt.synapse.models.IntegrationRuntimeInternalChannelEncryptionMode + :ivar version: Version of the integration runtime. + :vartype version: str + :param nodes: The list of nodes for this integration runtime. + :type nodes: + list[~azure.mgmt.synapse.models.SelfHostedIntegrationRuntimeNode] + :ivar scheduled_update_date: The date at which the integration runtime + will be scheduled to update, in ISO8601 format. + :vartype scheduled_update_date: datetime + :ivar update_delay_offset: The time in the date scheduled by service to + update the integration runtime, e.g., PT03H is 3 hours + :vartype update_delay_offset: str + :ivar local_time_zone_offset: The local time zone offset in hours. + :vartype local_time_zone_offset: str + :ivar capabilities: Object with additional information about integration + runtime capabilities. + :vartype capabilities: dict[str, str] + :ivar service_urls: The URLs for the services used in integration runtime + backend service. + :vartype service_urls: list[str] + :ivar auto_update: Whether Self-hosted integration runtime auto update has + been turned on. Possible values include: 'On', 'Off' + :vartype auto_update: str or + ~azure.mgmt.synapse.models.IntegrationRuntimeAutoUpdate + :ivar version_status: Status of the integration runtime version. + :vartype version_status: str + :param links: The list of linked integration runtimes that are created to + share with this integration runtime. + :type links: list[~azure.mgmt.synapse.models.LinkedIntegrationRuntime] + :ivar pushed_version: The version that the integration runtime is going to + update to. + :vartype pushed_version: str + :ivar latest_version: The latest version on download center. + :vartype latest_version: str + :ivar auto_update_eta: The estimated time when the self-hosted integration + runtime will be updated. + :vartype auto_update_eta: datetime """ _validation = { - 'id': {'required': True}, + 'data_factory_name': {'readonly': True}, + 'state': {'readonly': True}, + 'type': {'required': True}, + 'create_time': {'readonly': True}, + 'task_queue_id': {'readonly': True}, + 'node_communication_channel_encryption_mode': {'readonly': True}, + 'internal_channel_encryption': {'readonly': True}, + 'version': {'readonly': True}, + 'scheduled_update_date': {'readonly': True}, + 'update_delay_offset': {'readonly': True}, + 'local_time_zone_offset': {'readonly': True}, + 'capabilities': {'readonly': True}, + 'service_urls': {'readonly': True}, + 'auto_update': {'readonly': True}, + 'version_status': {'readonly': True}, + 'pushed_version': {'readonly': True}, + 'latest_version': {'readonly': True}, + 'auto_update_eta': {'readonly': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, + 'additional_properties': {'key': '', 'type': '{object}'}, + 'data_factory_name': {'key': 'dataFactoryName', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'create_time': {'key': 'typeProperties.createTime', 'type': 'iso-8601'}, + 'task_queue_id': {'key': 'typeProperties.taskQueueId', 'type': 'str'}, + 'node_communication_channel_encryption_mode': {'key': 'typeProperties.nodeCommunicationChannelEncryptionMode', 'type': 'str'}, + 'internal_channel_encryption': {'key': 'typeProperties.internalChannelEncryption', 'type': 'str'}, + 'version': {'key': 'typeProperties.version', 'type': 'str'}, + 'nodes': {'key': 'typeProperties.nodes', 'type': '[SelfHostedIntegrationRuntimeNode]'}, + 'scheduled_update_date': {'key': 'typeProperties.scheduledUpdateDate', 'type': 'iso-8601'}, + 'update_delay_offset': {'key': 'typeProperties.updateDelayOffset', 'type': 'str'}, + 'local_time_zone_offset': {'key': 'typeProperties.localTimeZoneOffset', 'type': 'str'}, + 'capabilities': {'key': 'typeProperties.capabilities', 'type': '{str}'}, + 'service_urls': {'key': 'typeProperties.serviceUrls', 'type': '[str]'}, + 'auto_update': {'key': 'typeProperties.autoUpdate', 'type': 'str'}, + 'version_status': {'key': 'typeProperties.versionStatus', 'type': 'str'}, + 'links': {'key': 'typeProperties.links', 'type': '[LinkedIntegrationRuntime]'}, + 'pushed_version': {'key': 'typeProperties.pushedVersion', 'type': 'str'}, + 'latest_version': {'key': 'typeProperties.latestVersion', 'type': 'str'}, + 'auto_update_eta': {'key': 'typeProperties.autoUpdateETA', 'type': 'iso-8601'}, } - def __init__(self, *, id: str, **kwargs) -> None: - super(ResourceMoveDefinition, self).__init__(**kwargs) - self.id = id + def __init__(self, *, additional_properties=None, nodes=None, links=None, **kwargs) -> None: + super(SelfHostedIntegrationRuntimeStatus, self).__init__(additional_properties=additional_properties, **kwargs) + self.create_time = None + self.task_queue_id = None + self.node_communication_channel_encryption_mode = None + self.internal_channel_encryption = None + self.version = None + self.nodes = nodes + self.scheduled_update_date = None + self.update_delay_offset = None + self.local_time_zone_offset = None + self.capabilities = None + self.service_urls = None + self.auto_update = None + self.version_status = None + self.links = links + self.pushed_version = None + self.latest_version = None + self.auto_update_eta = None + self.type = 'SelfHosted' -class RestorePoint(ProxyResource): - """Database restore points. +class SensitivityLabel(ProxyResource): + """A sensitivity label. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str - :ivar location: Resource location. - :vartype location: str - :ivar restore_point_type: The type of restore point. Possible values - include: 'CONTINUOUS', 'DISCRETE' - :vartype restore_point_type: str or - ~azure.mgmt.synapse.models.RestorePointType - :ivar earliest_restore_date: The earliest time to which this database can - be restored - :vartype earliest_restore_date: datetime - :ivar restore_point_creation_date: The time the backup was taken - :vartype restore_point_creation_date: datetime - :ivar restore_point_label: The label of restore point for backup request - by user - :vartype restore_point_label: str + :param label_name: The label name. + :type label_name: str + :param label_id: The label ID. + :type label_id: str + :param information_type: The information type. + :type information_type: str + :param information_type_id: The information type ID. + :type information_type_id: str + :ivar is_disabled: Is sensitivity recommendation disabled. Applicable for + recommended sensitivity label only. Specifies whether the sensitivity + recommendation on this column is disabled (dismissed) or not. + :vartype is_disabled: bool """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'restore_point_type': {'readonly': True}, - 'earliest_restore_date': {'readonly': True}, - 'restore_point_creation_date': {'readonly': True}, - 'restore_point_label': {'readonly': True}, + 'is_disabled': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'restore_point_type': {'key': 'properties.restorePointType', 'type': 'RestorePointType'}, - 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, - 'restore_point_creation_date': {'key': 'properties.restorePointCreationDate', 'type': 'iso-8601'}, - 'restore_point_label': {'key': 'properties.restorePointLabel', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(RestorePoint, self).__init__(**kwargs) - self.location = None - self.restore_point_type = None - self.earliest_restore_date = None - self.restore_point_creation_date = None - self.restore_point_label = None - - -class SecretBase(Model): - """The base definition of a secret type. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: SecureString - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - } - - _subtype_map = { - 'type': {'SecureString': 'SecureString'} - } - - def __init__(self, **kwargs) -> None: - super(SecretBase, self).__init__(**kwargs) - self.type = None - - -class SecureString(SecretBase): - """Azure Synapse secure string definition. The string value will be masked - with asterisks '*' during Get or List API calls. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Constant filled by server. - :type type: str - :param value: Required. Value of secure string. - :type value: str - """ - - _validation = { - 'type': {'required': True}, - 'value': {'required': True}, + 'label_name': {'key': 'properties.labelName', 'type': 'str'}, + 'label_id': {'key': 'properties.labelId', 'type': 'str'}, + 'information_type': {'key': 'properties.informationType', 'type': 'str'}, + 'information_type_id': {'key': 'properties.informationTypeId', 'type': 'str'}, + 'is_disabled': {'key': 'properties.isDisabled', 'type': 'bool'}, } - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } + def __init__(self, *, label_name: str=None, label_id: str=None, information_type: str=None, information_type_id: str=None, **kwargs) -> None: + super(SensitivityLabel, self).__init__(**kwargs) + self.label_name = label_name + self.label_id = label_id + self.information_type = information_type + self.information_type_id = information_type_id + self.is_disabled = None - def __init__(self, *, value: str, **kwargs) -> None: - super(SecureString, self).__init__(**kwargs) - self.value = value - self.type = 'SecureString' +class ServerBlobAuditingPolicy(ProxyResource): + """A server blob auditing policy. -class SelfHostedIntegrationRuntime(IntegrationRuntime): - """Self-hosted integration runtime. + Variables are only populated by the server, and will be ignored when + sending a request. All required parameters must be populated in order to send to Azure. - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param description: Integration runtime description. - :type description: str - :param type: Required. Constant filled by server. - :type type: str - :param linked_info: - :type linked_info: ~azure.mgmt.synapse.models.LinkedIntegrationRuntimeType + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + :vartype type: str + :param state: Required. Specifies the state of the policy. If state is + Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. + Possible values include: 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.synapse.models.BlobAuditingPolicyState + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). If state is Enabled, + storageEndpoint or isAzureMonitorTargetEnabled is required. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + auditing storage account. + If state is Enabled and storageEndpoint is specified, not specifying the + storageAccountAccessKey will use SQL server system-assigned managed + identity to access the storage. + Prerequisites for using managed identity authentication: + 1. Assign SQL Server a system-assigned managed identity in Azure Active + Directory (AAD). + 2. Grant SQL Server identity access to the storage account by adding + 'Storage Blob Data Contributor' RBAC role to the server identity. + For more information, see [Auditing to storage using Managed Identity + authentication](https://go.microsoft.com/fwlink/?linkid=2114355) + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the audit + logs in the storage account. + :type retention_days: int + :param audit_actions_and_groups: Specifies the Actions-Groups and Actions + to audit. + The recommended set of action groups to use is the following combination - + this will audit all the queries and stored procedures executed against the + database, as well as successful and failed logins: + BATCH_COMPLETED_GROUP, + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + FAILED_DATABASE_AUTHENTICATION_GROUP. + This above combination is also the set that is configured by default when + enabling auditing from the Azure portal. + The supported action groups to audit are (note: choose only specific + groups that cover your auditing needs. Using unnecessary groups could lead + to very large quantities of audit records): + APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + BACKUP_RESTORE_GROUP + DATABASE_LOGOUT_GROUP + DATABASE_OBJECT_CHANGE_GROUP + DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + DATABASE_OPERATION_GROUP + DATABASE_PERMISSION_CHANGE_GROUP + DATABASE_PRINCIPAL_CHANGE_GROUP + DATABASE_PRINCIPAL_IMPERSONATION_GROUP + DATABASE_ROLE_MEMBER_CHANGE_GROUP + FAILED_DATABASE_AUTHENTICATION_GROUP + SCHEMA_OBJECT_ACCESS_GROUP + SCHEMA_OBJECT_CHANGE_GROUP + SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + USER_CHANGE_PASSWORD_GROUP + BATCH_STARTED_GROUP + BATCH_COMPLETED_GROUP + These are groups that cover all sql statements and stored procedures + executed against the database, and should not be used in combination with + other groups as this will result in duplicate audit logs. + For more information, see [Database-Level Audit Action + Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + For Database auditing policy, specific Actions can also be specified (note + that Actions cannot be specified for Server auditing policy). The + supported actions to audit are: + SELECT + UPDATE + INSERT + DELETE + EXECUTE + RECEIVE + REFERENCES + The general form for defining an action to be audited is: + {action} ON {object} BY {principal} + Note that in the above format can refer to an object like a + table, view, or stored procedure, or an entire database or schema. For the + latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are + used, respectively. + For example: + SELECT on dbo.myTable by public + SELECT on DATABASE::myDatabase by public + SELECT on SCHEMA::mySchema by public + For more information, see [Database-Level Audit + Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + :type audit_actions_and_groups: list[str] + :param storage_account_subscription_id: Specifies the blob storage + subscription Id. + :type storage_account_subscription_id: str + :param is_storage_secondary_key_in_use: Specifies whether + storageAccountAccessKey value is the storage's secondary key. + :type is_storage_secondary_key_in_use: bool + :param is_azure_monitor_target_enabled: Specifies whether audit events are + sent to Azure Monitor. + In order to send the events to Azure Monitor, specify 'state' as 'Enabled' + and 'isAzureMonitorTargetEnabled' as true. + When using REST API to configure auditing, Diagnostic Settings with + 'SQLSecurityAuditEvents' diagnostic logs category on the database should + be also created. + Note that for server level audit you should use the 'master' database as + {databaseName}. + Diagnostic Settings URI format: + PUT + https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + For more information, see [Diagnostic Settings REST + API](https://go.microsoft.com/fwlink/?linkid=2033207) + or [Diagnostic Settings + PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + :type is_azure_monitor_target_enabled: bool + :param queue_delay_ms: Specifies the amount of time in milliseconds that + can elapse before audit actions are forced to be processed. + The default minimum value is 1000 (1 second). The maximum is + 2,147,483,647. + :type queue_delay_ms: int """ _validation = { - 'type': {'required': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, } _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'description': {'key': 'description', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'linked_info': {'key': 'typeProperties.linkedInfo', 'type': 'LinkedIntegrationRuntimeType'}, - } - - def __init__(self, *, additional_properties=None, description: str=None, linked_info=None, **kwargs) -> None: - super(SelfHostedIntegrationRuntime, self).__init__(additional_properties=additional_properties, description=description, **kwargs) - self.linked_info = linked_info - self.type = 'SelfHosted' - - -class SelfHostedIntegrationRuntimeNode(Model): - """Properties of Self-hosted integration runtime node. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :ivar node_name: Name of the integration runtime node. - :vartype node_name: str - :ivar machine_name: Machine name of the integration runtime node. - :vartype machine_name: str - :ivar host_service_uri: URI for the host machine of the integration - runtime. - :vartype host_service_uri: str - :ivar status: Status of the integration runtime node. Possible values - include: 'NeedRegistration', 'Online', 'Limited', 'Offline', 'Upgrading', - 'Initializing', 'InitializeFailed' - :vartype status: str or - ~azure.mgmt.synapse.models.SelfHostedIntegrationRuntimeNodeStatus - :ivar capabilities: The integration runtime capabilities dictionary - :vartype capabilities: dict[str, str] - :ivar version_status: Status of the integration runtime node version. - :vartype version_status: str - :ivar version: Version of the integration runtime node. - :vartype version: str - :ivar register_time: The time at which the integration runtime node was - registered in ISO8601 format. - :vartype register_time: datetime - :ivar last_connect_time: The most recent time at which the integration - runtime was connected in ISO8601 format. - :vartype last_connect_time: datetime - :ivar expiry_time: The time at which the integration runtime will expire - in ISO8601 format. - :vartype expiry_time: datetime - :ivar last_start_time: The time the node last started up. - :vartype last_start_time: datetime - :ivar last_stop_time: The integration runtime node last stop time. - :vartype last_stop_time: datetime - :ivar last_update_result: The result of the last integration runtime node - update. Possible values include: 'None', 'Succeed', 'Fail' - :vartype last_update_result: str or - ~azure.mgmt.synapse.models.IntegrationRuntimeUpdateResult - :ivar last_start_update_time: The last time for the integration runtime - node update start. - :vartype last_start_update_time: datetime - :ivar last_end_update_time: The last time for the integration runtime node - update end. - :vartype last_end_update_time: datetime - :ivar is_active_dispatcher: Indicates whether this node is the active - dispatcher for integration runtime requests. - :vartype is_active_dispatcher: bool - :ivar concurrent_jobs_limit: Maximum concurrent jobs on the integration - runtime node. - :vartype concurrent_jobs_limit: int - :ivar max_concurrent_jobs: The maximum concurrent jobs in this integration - runtime. - :vartype max_concurrent_jobs: int - """ - - _validation = { - 'node_name': {'readonly': True}, - 'machine_name': {'readonly': True}, - 'host_service_uri': {'readonly': True}, - 'status': {'readonly': True}, - 'capabilities': {'readonly': True}, - 'version_status': {'readonly': True}, - 'version': {'readonly': True}, - 'register_time': {'readonly': True}, - 'last_connect_time': {'readonly': True}, - 'expiry_time': {'readonly': True}, - 'last_start_time': {'readonly': True}, - 'last_stop_time': {'readonly': True}, - 'last_update_result': {'readonly': True}, - 'last_start_update_time': {'readonly': True}, - 'last_end_update_time': {'readonly': True}, - 'is_active_dispatcher': {'readonly': True}, - 'concurrent_jobs_limit': {'readonly': True}, - 'max_concurrent_jobs': {'readonly': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'node_name': {'key': 'nodeName', 'type': 'str'}, - 'machine_name': {'key': 'machineName', 'type': 'str'}, - 'host_service_uri': {'key': 'hostServiceUri', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'capabilities': {'key': 'capabilities', 'type': '{str}'}, - 'version_status': {'key': 'versionStatus', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - 'register_time': {'key': 'registerTime', 'type': 'iso-8601'}, - 'last_connect_time': {'key': 'lastConnectTime', 'type': 'iso-8601'}, - 'expiry_time': {'key': 'expiryTime', 'type': 'iso-8601'}, - 'last_start_time': {'key': 'lastStartTime', 'type': 'iso-8601'}, - 'last_stop_time': {'key': 'lastStopTime', 'type': 'iso-8601'}, - 'last_update_result': {'key': 'lastUpdateResult', 'type': 'str'}, - 'last_start_update_time': {'key': 'lastStartUpdateTime', 'type': 'iso-8601'}, - 'last_end_update_time': {'key': 'lastEndUpdateTime', 'type': 'iso-8601'}, - 'is_active_dispatcher': {'key': 'isActiveDispatcher', 'type': 'bool'}, - 'concurrent_jobs_limit': {'key': 'concurrentJobsLimit', 'type': 'int'}, - 'max_concurrent_jobs': {'key': 'maxConcurrentJobs', 'type': 'int'}, + 'state': {'key': 'properties.state', 'type': 'BlobAuditingPolicyState'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, + 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, + 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, + 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, + 'queue_delay_ms': {'key': 'properties.queueDelayMs', 'type': 'int'}, } - def __init__(self, *, additional_properties=None, **kwargs) -> None: - super(SelfHostedIntegrationRuntimeNode, self).__init__(**kwargs) - self.additional_properties = additional_properties - self.node_name = None - self.machine_name = None - self.host_service_uri = None - self.status = None - self.capabilities = None - self.version_status = None - self.version = None - self.register_time = None - self.last_connect_time = None - self.expiry_time = None - self.last_start_time = None - self.last_stop_time = None - self.last_update_result = None - self.last_start_update_time = None - self.last_end_update_time = None - self.is_active_dispatcher = None - self.concurrent_jobs_limit = None - self.max_concurrent_jobs = None + def __init__(self, *, state, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, audit_actions_and_groups=None, storage_account_subscription_id: str=None, is_storage_secondary_key_in_use: bool=None, is_azure_monitor_target_enabled: bool=None, queue_delay_ms: int=None, **kwargs) -> None: + super(ServerBlobAuditingPolicy, self).__init__(**kwargs) + self.state = state + self.storage_endpoint = storage_endpoint + self.storage_account_access_key = storage_account_access_key + self.retention_days = retention_days + self.audit_actions_and_groups = audit_actions_and_groups + self.storage_account_subscription_id = storage_account_subscription_id + self.is_storage_secondary_key_in_use = is_storage_secondary_key_in_use + self.is_azure_monitor_target_enabled = is_azure_monitor_target_enabled + self.queue_delay_ms = queue_delay_ms -class SelfHostedIntegrationRuntimeStatus(IntegrationRuntimeStatus): - """Self-hosted integration runtime status. +class ServerSecurityAlertPolicy(ProxyResource): + """Workspace managed Sql server security alert policy. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :ivar data_factory_name: The workspace name which the integration runtime - belong to. - :vartype data_factory_name: str - :ivar state: The state of integration runtime. Possible values include: - 'Initial', 'Stopped', 'Started', 'Starting', 'Stopping', - 'NeedRegistration', 'Online', 'Limited', 'Offline', 'AccessDenied' - :vartype state: str or ~azure.mgmt.synapse.models.IntegrationRuntimeState - :param type: Required. Constant filled by server. - :type type: str - :ivar create_time: The time at which the integration runtime was created, - in ISO8601 format. - :vartype create_time: datetime - :ivar task_queue_id: The task queue id of the integration runtime. - :vartype task_queue_id: str - :ivar internal_channel_encryption: It is used to set the encryption mode - for node-node communication channel (when more than 2 self-hosted - integration runtime nodes exist). Possible values include: 'NotSet', - 'SslEncrypted', 'NotEncrypted' - :vartype internal_channel_encryption: str or - ~azure.mgmt.synapse.models.IntegrationRuntimeInternalChannelEncryptionMode - :ivar version: Version of the integration runtime. - :vartype version: str - :param nodes: The list of nodes for this integration runtime. - :type nodes: - list[~azure.mgmt.synapse.models.SelfHostedIntegrationRuntimeNode] - :ivar scheduled_update_date: The date at which the integration runtime - will be scheduled to update, in ISO8601 format. - :vartype scheduled_update_date: datetime - :ivar update_delay_offset: The time in the date scheduled by service to - update the integration runtime, e.g., PT03H is 3 hours - :vartype update_delay_offset: str - :ivar local_time_zone_offset: The local time zone offset in hours. - :vartype local_time_zone_offset: str - :ivar capabilities: Object with additional information about integration - runtime capabilities. - :vartype capabilities: dict[str, str] - :ivar service_urls: The URLs for the services used in integration runtime - backend service. - :vartype service_urls: list[str] - :ivar auto_update: Whether Self-hosted integration runtime auto update has - been turned on. Possible values include: 'On', 'Off' - :vartype auto_update: str or - ~azure.mgmt.synapse.models.IntegrationRuntimeAutoUpdate - :ivar version_status: Status of the integration runtime version. - :vartype version_status: str - :param links: The list of linked integration runtimes that are created to - share with this integration runtime. - :type links: list[~azure.mgmt.synapse.models.LinkedIntegrationRuntime] - :ivar pushed_version: The version that the integration runtime is going to - update to. - :vartype pushed_version: str - :ivar latest_version: The latest version on download center. - :vartype latest_version: str - :ivar auto_update_eta: The estimated time when the self-hosted integration - runtime will be updated. - :vartype auto_update_eta: datetime + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + :vartype type: str + :param state: Required. Specifies the state of the policy, whether it is + enabled or disabled or a policy has not been applied yet on the specific + server. Possible values include: 'New', 'Enabled', 'Disabled' + :type state: str or ~azure.mgmt.synapse.models.SecurityAlertPolicyState + :param disabled_alerts: Specifies an array of alerts that are disabled. + Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, + Access_Anomaly, Data_Exfiltration, Unsafe_Action + :type disabled_alerts: list[str] + :param email_addresses: Specifies an array of e-mail addresses to which + the alert is sent. + :type email_addresses: list[str] + :param email_account_admins: Specifies that the alert is sent to the + account administrators. + :type email_account_admins: bool + :param storage_endpoint: Specifies the blob storage endpoint (e.g. + https://MyAccount.blob.core.windows.net). This blob storage will hold all + Threat Detection audit logs. + :type storage_endpoint: str + :param storage_account_access_key: Specifies the identifier key of the + Threat Detection audit storage account. + :type storage_account_access_key: str + :param retention_days: Specifies the number of days to keep in the Threat + Detection audit logs. + :type retention_days: int + :ivar creation_time: Specifies the UTC creation time of the policy. + :vartype creation_time: datetime """ _validation = { - 'data_factory_name': {'readonly': True}, - 'state': {'readonly': True}, - 'type': {'required': True}, - 'create_time': {'readonly': True}, - 'task_queue_id': {'readonly': True}, - 'internal_channel_encryption': {'readonly': True}, - 'version': {'readonly': True}, - 'scheduled_update_date': {'readonly': True}, - 'update_delay_offset': {'readonly': True}, - 'local_time_zone_offset': {'readonly': True}, - 'capabilities': {'readonly': True}, - 'service_urls': {'readonly': True}, - 'auto_update': {'readonly': True}, - 'version_status': {'readonly': True}, - 'pushed_version': {'readonly': True}, - 'latest_version': {'readonly': True}, - 'auto_update_eta': {'readonly': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'state': {'required': True}, + 'creation_time': {'readonly': True}, } _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'data_factory_name': {'key': 'dataFactoryName', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'create_time': {'key': 'typeProperties.createTime', 'type': 'iso-8601'}, - 'task_queue_id': {'key': 'typeProperties.taskQueueId', 'type': 'str'}, - 'internal_channel_encryption': {'key': 'typeProperties.internalChannelEncryption', 'type': 'str'}, - 'version': {'key': 'typeProperties.version', 'type': 'str'}, - 'nodes': {'key': 'typeProperties.nodes', 'type': '[SelfHostedIntegrationRuntimeNode]'}, - 'scheduled_update_date': {'key': 'typeProperties.scheduledUpdateDate', 'type': 'iso-8601'}, - 'update_delay_offset': {'key': 'typeProperties.updateDelayOffset', 'type': 'str'}, - 'local_time_zone_offset': {'key': 'typeProperties.localTimeZoneOffset', 'type': 'str'}, - 'capabilities': {'key': 'typeProperties.capabilities', 'type': '{str}'}, - 'service_urls': {'key': 'typeProperties.serviceUrls', 'type': '[str]'}, - 'auto_update': {'key': 'typeProperties.autoUpdate', 'type': 'str'}, - 'version_status': {'key': 'typeProperties.versionStatus', 'type': 'str'}, - 'links': {'key': 'typeProperties.links', 'type': '[LinkedIntegrationRuntime]'}, - 'pushed_version': {'key': 'typeProperties.pushedVersion', 'type': 'str'}, - 'latest_version': {'key': 'typeProperties.latestVersion', 'type': 'str'}, - 'auto_update_eta': {'key': 'typeProperties.autoUpdateETA', 'type': 'iso-8601'}, + 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, + 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, + 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, + 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, } - def __init__(self, *, additional_properties=None, nodes=None, links=None, **kwargs) -> None: - super(SelfHostedIntegrationRuntimeStatus, self).__init__(additional_properties=additional_properties, **kwargs) - self.create_time = None - self.task_queue_id = None - self.internal_channel_encryption = None - self.version = None - self.nodes = nodes - self.scheduled_update_date = None - self.update_delay_offset = None - self.local_time_zone_offset = None - self.capabilities = None - self.service_urls = None - self.auto_update = None - self.version_status = None - self.links = links - self.pushed_version = None - self.latest_version = None - self.auto_update_eta = None - self.type = 'SelfHosted' + def __init__(self, *, state, disabled_alerts=None, email_addresses=None, email_account_admins: bool=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, **kwargs) -> None: + super(ServerSecurityAlertPolicy, self).__init__(**kwargs) + self.state = state + self.disabled_alerts = disabled_alerts + self.email_addresses = email_addresses + self.email_account_admins = email_account_admins + self.storage_endpoint = storage_endpoint + self.storage_account_access_key = storage_account_access_key + self.retention_days = retention_days + self.creation_time = None -class SensitivityLabel(ProxyResource): - """A sensitivity label. +class ServerUsage(Model): + """Represents server metrics. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Name of the server usage metric. + :vartype name: str + :ivar resource_name: The name of the resource. + :vartype resource_name: str + :ivar display_name: The metric display name. + :vartype display_name: str + :ivar current_value: The current value of the metric. + :vartype current_value: float + :ivar limit: The current limit of the metric. + :vartype limit: float + :ivar unit: The units of the metric. + :vartype unit: str + :ivar next_reset_time: The next reset time for the metric (ISO8601 + format). + :vartype next_reset_time: datetime + """ + + _validation = { + 'name': {'readonly': True}, + 'resource_name': {'readonly': True}, + 'display_name': {'readonly': True}, + 'current_value': {'readonly': True}, + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + 'next_reset_time': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'resource_name': {'key': 'resourceName', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'float'}, + 'limit': {'key': 'limit', 'type': 'float'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'next_reset_time': {'key': 'nextResetTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs) -> None: + super(ServerUsage, self).__init__(**kwargs) + self.name = None + self.resource_name = None + self.display_name = None + self.current_value = None + self.limit = None + self.unit = None + self.next_reset_time = None + + +class ServerVulnerabilityAssessment(ProxyResource): + """A server vulnerability assessment. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str - :param label_name: The label name. - :type label_name: str - :param label_id: The label ID. - :type label_id: str - :param information_type: The information type. - :type information_type: str - :param information_type_id: The information type ID. - :type information_type_id: str - :ivar is_disabled: Is sensitivity recommendation disabled. Applicable for - recommended sensitivity label only. Specifies whether the sensitivity - recommendation on this column is disabled (dismissed) or not. - :vartype is_disabled: bool + :param storage_container_path: Required. A blob storage container path to + hold the scan results (e.g. + https://myStorage.blob.core.windows.net/VaScans/). + :type storage_container_path: str + :param storage_container_sas_key: A shared access signature (SAS Key) that + has read and write access to the blob container specified in + 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't + specified, StorageContainerSasKey is required. + :type storage_container_sas_key: str + :param storage_account_access_key: Specifies the identifier key of the + storage account for vulnerability assessment scan results. If + 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is + required. + :type storage_account_access_key: str + :param recurring_scans: The recurring scans settings + :type recurring_scans: + ~azure.mgmt.synapse.models.VulnerabilityAssessmentRecurringScansProperties """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'is_disabled': {'readonly': True}, + 'storage_container_path': {'required': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'label_name': {'key': 'properties.labelName', 'type': 'str'}, - 'label_id': {'key': 'properties.labelId', 'type': 'str'}, - 'information_type': {'key': 'properties.informationType', 'type': 'str'}, - 'information_type_id': {'key': 'properties.informationTypeId', 'type': 'str'}, - 'is_disabled': {'key': 'properties.isDisabled', 'type': 'bool'}, + 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, + 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, + 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, } - def __init__(self, *, label_name: str=None, label_id: str=None, information_type: str=None, information_type_id: str=None, **kwargs) -> None: - super(SensitivityLabel, self).__init__(**kwargs) - self.label_name = label_name - self.label_id = label_id - self.information_type = information_type - self.information_type_id = information_type_id - self.is_disabled = None + def __init__(self, *, storage_container_path: str, storage_container_sas_key: str=None, storage_account_access_key: str=None, recurring_scans=None, **kwargs) -> None: + super(ServerVulnerabilityAssessment, self).__init__(**kwargs) + self.storage_container_path = storage_container_path + self.storage_container_sas_key = storage_container_sas_key + self.storage_account_access_key = storage_account_access_key + self.recurring_scans = recurring_scans class Sku(Model): @@ -3400,13 +4749,13 @@ class SqlPool(TrackedResource): All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :param tags: Resource tags. :type tags: dict[str, str] @@ -3481,13 +4830,13 @@ class SqlPoolBlobAuditingPolicy(ProxyResource): All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :ivar kind: Resource kind. :vartype kind: str @@ -3634,13 +4983,13 @@ class SqlPoolColumn(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :param column_type: The column data type. Possible values include: 'image', 'text', 'uniqueidentifier', 'date', 'time', 'datetime2', @@ -3676,13 +5025,13 @@ class SqlPoolConnectionPolicy(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :ivar kind: Resource kind. :vartype kind: str @@ -3747,13 +5096,13 @@ class SqlPoolOperation(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :ivar database_name: The name of the Sql pool the operation is being performed on. @@ -3914,13 +5263,13 @@ class SqlPoolSchema(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str """ @@ -3948,13 +5297,13 @@ class SqlPoolSecurityAlertPolicy(ProxyResource): All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :param state: Required. Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific @@ -4024,13 +5373,13 @@ class SqlPoolTable(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str """ @@ -4110,13 +5459,13 @@ class SqlPoolVulnerabilityAssessment(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :param storage_container_path: A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/). It @@ -4169,13 +5518,13 @@ class SqlPoolVulnerabilityAssessmentRuleBaseline(ProxyResource): All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :param baseline_results: Required. The rule baseline result :type baseline_results: @@ -4229,13 +5578,13 @@ class SqlPoolVulnerabilityAssessmentScansExport(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :ivar exported_report_location: Location of the exported report (e.g. https://myStorage.blob.core.windows.net/VaScans/scans/serverName/databaseName/scan_scanId.xlsx). @@ -4741,13 +6090,13 @@ class TransparentDataEncryption(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :ivar location: Resource location. :vartype location: str @@ -4903,13 +6252,13 @@ class VulnerabilityAssessmentScanRecord(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :ivar scan_id: The scan ID. :vartype scan_id: str @@ -4975,6 +6324,131 @@ def __init__(self, **kwargs) -> None: self.number_of_failed_security_checks = None +class WorkloadClassifier(ProxyResource): + """Workload classifier operations for a data warehouse. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + :vartype type: str + :param member_name: Required. The workload classifier member name. + :type member_name: str + :param label: The workload classifier label. + :type label: str + :param context: The workload classifier context. + :type context: str + :param start_time: The workload classifier start time for classification. + :type start_time: str + :param end_time: The workload classifier end time for classification. + :type end_time: str + :param importance: The workload classifier importance. + :type importance: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'member_name': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'member_name': {'key': 'properties.memberName', 'type': 'str'}, + 'label': {'key': 'properties.label', 'type': 'str'}, + 'context': {'key': 'properties.context', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'str'}, + 'end_time': {'key': 'properties.endTime', 'type': 'str'}, + 'importance': {'key': 'properties.importance', 'type': 'str'}, + } + + def __init__(self, *, member_name: str, label: str=None, context: str=None, start_time: str=None, end_time: str=None, importance: str=None, **kwargs) -> None: + super(WorkloadClassifier, self).__init__(**kwargs) + self.member_name = member_name + self.label = label + self.context = context + self.start_time = start_time + self.end_time = end_time + self.importance = importance + + +class WorkloadGroup(ProxyResource): + """Workload group operations for a sql pool. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + :vartype type: str + :param min_resource_percent: Required. The workload group minimum + percentage resource. + :type min_resource_percent: int + :param max_resource_percent: Required. The workload group cap percentage + resource. + :type max_resource_percent: int + :param min_resource_percent_per_request: Required. The workload group + request minimum grant percentage. + :type min_resource_percent_per_request: float + :param max_resource_percent_per_request: The workload group request + maximum grant percentage. + :type max_resource_percent_per_request: float + :param importance: The workload group importance level. + :type importance: str + :param query_execution_timeout: The workload group query execution + timeout. + :type query_execution_timeout: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'min_resource_percent': {'required': True}, + 'max_resource_percent': {'required': True}, + 'min_resource_percent_per_request': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'min_resource_percent': {'key': 'properties.minResourcePercent', 'type': 'int'}, + 'max_resource_percent': {'key': 'properties.maxResourcePercent', 'type': 'int'}, + 'min_resource_percent_per_request': {'key': 'properties.minResourcePercentPerRequest', 'type': 'float'}, + 'max_resource_percent_per_request': {'key': 'properties.maxResourcePercentPerRequest', 'type': 'float'}, + 'importance': {'key': 'properties.importance', 'type': 'str'}, + 'query_execution_timeout': {'key': 'properties.queryExecutionTimeout', 'type': 'int'}, + } + + def __init__(self, *, min_resource_percent: int, max_resource_percent: int, min_resource_percent_per_request: float, max_resource_percent_per_request: float=None, importance: str=None, query_execution_timeout: int=None, **kwargs) -> None: + super(WorkloadGroup, self).__init__(**kwargs) + self.min_resource_percent = min_resource_percent + self.max_resource_percent = max_resource_percent + self.min_resource_percent_per_request = min_resource_percent_per_request + self.max_resource_percent_per_request = max_resource_percent_per_request + self.importance = importance + self.query_execution_timeout = query_execution_timeout + + class Workspace(TrackedResource): """A workspace. @@ -4983,13 +6457,13 @@ class Workspace(TrackedResource): All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :param tags: Resource tags. :type tags: dict[str, str] @@ -5026,8 +6500,21 @@ class Workspace(TrackedResource): workspace :type private_endpoint_connections: list[~azure.mgmt.synapse.models.PrivateEndpointConnection] + :param encryption: The encryption details of the workspace + :type encryption: ~azure.mgmt.synapse.models.EncryptionDetails + :ivar workspace_uid: The workspace unique identifier + :vartype workspace_uid: str :ivar extra_properties: Workspace level configs and feature flags :vartype extra_properties: dict[str, object] + :param managed_virtual_network_settings: Managed Virtual Network Settings + :type managed_virtual_network_settings: + ~azure.mgmt.synapse.models.ManagedVirtualNetworkSettings + :param workspace_repository_configuration: Git integration settings + :type workspace_repository_configuration: + ~azure.mgmt.synapse.models.WorkspaceRepositoryConfiguration + :param babylon_configuration: Babylon Configuration + :type babylon_configuration: + ~azure.mgmt.synapse.models.BabylonConfiguration :param identity: Identity of the workspace :type identity: ~azure.mgmt.synapse.models.ManagedIdentity """ @@ -5038,6 +6525,7 @@ class Workspace(TrackedResource): 'type': {'readonly': True}, 'location': {'required': True}, 'provisioning_state': {'readonly': True}, + 'workspace_uid': {'readonly': True}, 'extra_properties': {'readonly': True}, } @@ -5056,11 +6544,16 @@ class Workspace(TrackedResource): 'connectivity_endpoints': {'key': 'properties.connectivityEndpoints', 'type': '{str}'}, 'managed_virtual_network': {'key': 'properties.managedVirtualNetwork', 'type': 'str'}, 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, + 'encryption': {'key': 'properties.encryption', 'type': 'EncryptionDetails'}, + 'workspace_uid': {'key': 'properties.workspaceUID', 'type': 'str'}, 'extra_properties': {'key': 'properties.extraProperties', 'type': '{object}'}, + 'managed_virtual_network_settings': {'key': 'properties.managedVirtualNetworkSettings', 'type': 'ManagedVirtualNetworkSettings'}, + 'workspace_repository_configuration': {'key': 'properties.workspaceRepositoryConfiguration', 'type': 'WorkspaceRepositoryConfiguration'}, + 'babylon_configuration': {'key': 'properties.babylonConfiguration', 'type': 'BabylonConfiguration'}, 'identity': {'key': 'identity', 'type': 'ManagedIdentity'}, } - def __init__(self, *, location: str, tags=None, default_data_lake_storage=None, sql_administrator_login_password: str=None, managed_resource_group_name: str=None, sql_administrator_login: str=None, virtual_network_profile=None, connectivity_endpoints=None, managed_virtual_network: str=None, private_endpoint_connections=None, identity=None, **kwargs) -> None: + def __init__(self, *, location: str, tags=None, default_data_lake_storage=None, sql_administrator_login_password: str=None, managed_resource_group_name: str=None, sql_administrator_login: str=None, virtual_network_profile=None, connectivity_endpoints=None, managed_virtual_network: str=None, private_endpoint_connections=None, encryption=None, managed_virtual_network_settings=None, workspace_repository_configuration=None, babylon_configuration=None, identity=None, **kwargs) -> None: super(Workspace, self).__init__(tags=tags, location=location, **kwargs) self.default_data_lake_storage = default_data_lake_storage self.sql_administrator_login_password = sql_administrator_login_password @@ -5071,7 +6564,12 @@ def __init__(self, *, location: str, tags=None, default_data_lake_storage=None, self.connectivity_endpoints = connectivity_endpoints self.managed_virtual_network = managed_virtual_network self.private_endpoint_connections = private_endpoint_connections + self.encryption = encryption + self.workspace_uid = None self.extra_properties = None + self.managed_virtual_network_settings = managed_virtual_network_settings + self.workspace_repository_configuration = workspace_repository_configuration + self.babylon_configuration = babylon_configuration self.identity = identity @@ -5081,13 +6579,13 @@ class WorkspaceAadAdminInfo(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :param tenant_id: Tenant ID of the workspace active directory administrator @@ -5124,6 +6622,26 @@ def __init__(self, *, tenant_id: str=None, login: str=None, administrator_type: self.sid = sid +class WorkspaceKeyDetails(Model): + """Details of the customer managed key associated with the workspace. + + :param name: Workspace Key sub-resource name + :type name: str + :param key_vault_url: Workspace Key sub-resource key vault url + :type key_vault_url: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'key_vault_url': {'key': 'keyVaultUrl', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, key_vault_url: str=None, **kwargs) -> None: + super(WorkspaceKeyDetails, self).__init__(**kwargs) + self.name = name + self.key_vault_url = key_vault_url + + class WorkspacePatchInfo(Model): """Workspace patch details. @@ -5136,6 +6654,15 @@ class WorkspacePatchInfo(Model): :type identity: ~azure.mgmt.synapse.models.ManagedIdentity :param sql_administrator_login_password: SQL administrator login password :type sql_administrator_login_password: str + :param managed_virtual_network_settings: Managed Virtual Network Settings + :type managed_virtual_network_settings: + ~azure.mgmt.synapse.models.ManagedVirtualNetworkSettings + :param workspace_repository_configuration: Git integration settings + :type workspace_repository_configuration: + ~azure.mgmt.synapse.models.WorkspaceRepositoryConfiguration + :param babylon_configuration: Babylon Configuration + :type babylon_configuration: + ~azure.mgmt.synapse.models.BabylonConfiguration :ivar provisioning_state: Resource provisioning state :vartype provisioning_state: str """ @@ -5148,12 +6675,60 @@ class WorkspacePatchInfo(Model): 'tags': {'key': 'tags', 'type': '{str}'}, 'identity': {'key': 'identity', 'type': 'ManagedIdentity'}, 'sql_administrator_login_password': {'key': 'properties.sqlAdministratorLoginPassword', 'type': 'str'}, + 'managed_virtual_network_settings': {'key': 'properties.managedVirtualNetworkSettings', 'type': 'ManagedVirtualNetworkSettings'}, + 'workspace_repository_configuration': {'key': 'properties.workspaceRepositoryConfiguration', 'type': 'WorkspaceRepositoryConfiguration'}, + 'babylon_configuration': {'key': 'properties.babylonConfiguration', 'type': 'BabylonConfiguration'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } - def __init__(self, *, tags=None, identity=None, sql_administrator_login_password: str=None, **kwargs) -> None: + def __init__(self, *, tags=None, identity=None, sql_administrator_login_password: str=None, managed_virtual_network_settings=None, workspace_repository_configuration=None, babylon_configuration=None, **kwargs) -> None: super(WorkspacePatchInfo, self).__init__(**kwargs) self.tags = tags self.identity = identity self.sql_administrator_login_password = sql_administrator_login_password + self.managed_virtual_network_settings = managed_virtual_network_settings + self.workspace_repository_configuration = workspace_repository_configuration + self.babylon_configuration = babylon_configuration self.provisioning_state = None + + +class WorkspaceRepositoryConfiguration(Model): + """Git integration settings. + + :param type: Type of workspace repositoryID configuration. Example + WorkspaceVSTSConfiguration, WorkspaceGitHubConfiguration + :type type: str + :param host_name: GitHub Enterprise host name. For example: + https://github.mydomain.com + :type host_name: str + :param account_name: Account name + :type account_name: str + :param project_name: VSTS project name + :type project_name: str + :param repository_name: Repository name + :type repository_name: str + :param collaboration_branch: Collaboration branch + :type collaboration_branch: str + :param root_folder: Root folder to use in the repository + :type root_folder: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'host_name': {'key': 'hostName', 'type': 'str'}, + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'project_name': {'key': 'projectName', 'type': 'str'}, + 'repository_name': {'key': 'repositoryName', 'type': 'str'}, + 'collaboration_branch': {'key': 'collaborationBranch', 'type': 'str'}, + 'root_folder': {'key': 'rootFolder', 'type': 'str'}, + } + + def __init__(self, *, type: str=None, host_name: str=None, account_name: str=None, project_name: str=None, repository_name: str=None, collaboration_branch: str=None, root_folder: str=None, **kwargs) -> None: + super(WorkspaceRepositoryConfiguration, self).__init__(**kwargs) + self.type = type + self.host_name = host_name + self.account_name = account_name + self.project_name = project_name + self.repository_name = repository_name + self.collaboration_branch = collaboration_branch + self.root_folder = root_folder diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/_paged_models.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/_paged_models.py index 707152412f3b..8b67d84fe840 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/_paged_models.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/_paged_models.py @@ -51,6 +51,19 @@ class SqlPoolPaged(Paged): def __init__(self, *args, **kwargs): super(SqlPoolPaged, self).__init__(*args, **kwargs) +class GeoBackupPolicyPaged(Paged): + """ + A paging container for iterating over a list of :class:`GeoBackupPolicy ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[GeoBackupPolicy]'} + } + + def __init__(self, *args, **kwargs): + + super(GeoBackupPolicyPaged, self).__init__(*args, **kwargs) class RestorePointPaged(Paged): """ A paging container for iterating over a list of :class:`RestorePoint ` object @@ -77,6 +90,32 @@ class ReplicationLinkPaged(Paged): def __init__(self, *args, **kwargs): super(ReplicationLinkPaged, self).__init__(*args, **kwargs) +class TransparentDataEncryptionPaged(Paged): + """ + A paging container for iterating over a list of :class:`TransparentDataEncryption ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[TransparentDataEncryption]'} + } + + def __init__(self, *args, **kwargs): + + super(TransparentDataEncryptionPaged, self).__init__(*args, **kwargs) +class SqlPoolBlobAuditingPolicyPaged(Paged): + """ + A paging container for iterating over a list of :class:`SqlPoolBlobAuditingPolicy ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SqlPoolBlobAuditingPolicy]'} + } + + def __init__(self, *args, **kwargs): + + super(SqlPoolBlobAuditingPolicyPaged, self).__init__(*args, **kwargs) class SqlPoolOperationPaged(Paged): """ A paging container for iterating over a list of :class:`SqlPoolOperation ` object @@ -181,6 +220,71 @@ class VulnerabilityAssessmentScanRecordPaged(Paged): def __init__(self, *args, **kwargs): super(VulnerabilityAssessmentScanRecordPaged, self).__init__(*args, **kwargs) +class SqlPoolSecurityAlertPolicyPaged(Paged): + """ + A paging container for iterating over a list of :class:`SqlPoolSecurityAlertPolicy ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SqlPoolSecurityAlertPolicy]'} + } + + def __init__(self, *args, **kwargs): + + super(SqlPoolSecurityAlertPolicyPaged, self).__init__(*args, **kwargs) +class ExtendedSqlPoolBlobAuditingPolicyPaged(Paged): + """ + A paging container for iterating over a list of :class:`ExtendedSqlPoolBlobAuditingPolicy ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ExtendedSqlPoolBlobAuditingPolicy]'} + } + + def __init__(self, *args, **kwargs): + + super(ExtendedSqlPoolBlobAuditingPolicyPaged, self).__init__(*args, **kwargs) +class DataMaskingRulePaged(Paged): + """ + A paging container for iterating over a list of :class:`DataMaskingRule ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DataMaskingRule]'} + } + + def __init__(self, *args, **kwargs): + + super(DataMaskingRulePaged, self).__init__(*args, **kwargs) +class WorkloadGroupPaged(Paged): + """ + A paging container for iterating over a list of :class:`WorkloadGroup ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[WorkloadGroup]'} + } + + def __init__(self, *args, **kwargs): + + super(WorkloadGroupPaged, self).__init__(*args, **kwargs) +class WorkloadClassifierPaged(Paged): + """ + A paging container for iterating over a list of :class:`WorkloadClassifier ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[WorkloadClassifier]'} + } + + def __init__(self, *args, **kwargs): + + super(WorkloadClassifierPaged, self).__init__(*args, **kwargs) class WorkspacePaged(Paged): """ A paging container for iterating over a list of :class:`Workspace ` object @@ -194,6 +298,19 @@ class WorkspacePaged(Paged): def __init__(self, *args, **kwargs): super(WorkspacePaged, self).__init__(*args, **kwargs) +class RestorableDroppedSqlPoolPaged(Paged): + """ + A paging container for iterating over a list of :class:`RestorableDroppedSqlPool ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RestorableDroppedSqlPool]'} + } + + def __init__(self, *args, **kwargs): + + super(RestorableDroppedSqlPoolPaged, self).__init__(*args, **kwargs) class IntegrationRuntimeResourcePaged(Paged): """ A paging container for iterating over a list of :class:`IntegrationRuntimeResource ` object @@ -246,3 +363,120 @@ class PrivateLinkHubPaged(Paged): def __init__(self, *args, **kwargs): super(PrivateLinkHubPaged, self).__init__(*args, **kwargs) +class PrivateEndpointConnectionForPrivateLinkHubPaged(Paged): + """ + A paging container for iterating over a list of :class:`PrivateEndpointConnectionForPrivateLinkHub ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[PrivateEndpointConnectionForPrivateLinkHub]'} + } + + def __init__(self, *args, **kwargs): + + super(PrivateEndpointConnectionForPrivateLinkHubPaged, self).__init__(*args, **kwargs) +class ServerBlobAuditingPolicyPaged(Paged): + """ + A paging container for iterating over a list of :class:`ServerBlobAuditingPolicy ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ServerBlobAuditingPolicy]'} + } + + def __init__(self, *args, **kwargs): + + super(ServerBlobAuditingPolicyPaged, self).__init__(*args, **kwargs) +class ExtendedServerBlobAuditingPolicyPaged(Paged): + """ + A paging container for iterating over a list of :class:`ExtendedServerBlobAuditingPolicy ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ExtendedServerBlobAuditingPolicy]'} + } + + def __init__(self, *args, **kwargs): + + super(ExtendedServerBlobAuditingPolicyPaged, self).__init__(*args, **kwargs) +class ServerSecurityAlertPolicyPaged(Paged): + """ + A paging container for iterating over a list of :class:`ServerSecurityAlertPolicy ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ServerSecurityAlertPolicy]'} + } + + def __init__(self, *args, **kwargs): + + super(ServerSecurityAlertPolicyPaged, self).__init__(*args, **kwargs) +class ServerVulnerabilityAssessmentPaged(Paged): + """ + A paging container for iterating over a list of :class:`ServerVulnerabilityAssessment ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ServerVulnerabilityAssessment]'} + } + + def __init__(self, *args, **kwargs): + + super(ServerVulnerabilityAssessmentPaged, self).__init__(*args, **kwargs) +class EncryptionProtectorPaged(Paged): + """ + A paging container for iterating over a list of :class:`EncryptionProtector ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[EncryptionProtector]'} + } + + def __init__(self, *args, **kwargs): + + super(EncryptionProtectorPaged, self).__init__(*args, **kwargs) +class ServerUsagePaged(Paged): + """ + A paging container for iterating over a list of :class:`ServerUsage ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ServerUsage]'} + } + + def __init__(self, *args, **kwargs): + + super(ServerUsagePaged, self).__init__(*args, **kwargs) +class RecoverableSqlPoolPaged(Paged): + """ + A paging container for iterating over a list of :class:`RecoverableSqlPool ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RecoverableSqlPool]'} + } + + def __init__(self, *args, **kwargs): + + super(RecoverableSqlPoolPaged, self).__init__(*args, **kwargs) +class KeyPaged(Paged): + """ + A paging container for iterating over a list of :class:`Key ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Key]'} + } + + def __init__(self, *args, **kwargs): + + super(KeyPaged, self).__init__(*args, **kwargs) diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/_synapse_management_client_enums.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/_synapse_management_client_enums.py index 1f354d19a474..b4571b0f2403 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/_synapse_management_client_enums.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/_synapse_management_client_enums.py @@ -20,6 +20,7 @@ class NodeSize(str, Enum): large = "Large" xlarge = "XLarge" xx_large = "XXLarge" + xxx_large = "XXXLarge" class NodeSizeFamily(str, Enum): @@ -188,6 +189,28 @@ class SecurityAlertPolicyState(str, Enum): disabled = "Disabled" +class DataMaskingState(str, Enum): + + disabled = "Disabled" + enabled = "Enabled" + + +class DataMaskingRuleState(str, Enum): + + disabled = "Disabled" + enabled = "Enabled" + + +class DataMaskingFunction(str, Enum): + + default = "Default" + ccn = "CCN" + email = "Email" + number = "Number" + ssn = "SSN" + text = "Text" + + class ResourceIdentityType(str, Enum): none = "None" @@ -300,6 +323,18 @@ class SsisObjectMetadataType(str, Enum): environment = "Environment" +class ServerKeyType(str, Enum): + + service_managed = "ServiceManaged" + azure_key_vault = "AzureKeyVault" + + +class SensitivityLabelSource(str, Enum): + + current = "current" + recommended = "recommended" + + class VulnerabilityAssessmentPolicyBaselineName(str, Enum): master = "master" diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/__init__.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/__init__.py index 5c164434e399..72e12f317442 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/__init__.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/__init__.py @@ -32,9 +32,17 @@ from ._sql_pool_vulnerability_assessment_scans_operations import SqlPoolVulnerabilityAssessmentScansOperations from ._sql_pool_security_alert_policies_operations import SqlPoolSecurityAlertPoliciesOperations from ._sql_pool_vulnerability_assessment_rule_baselines_operations import SqlPoolVulnerabilityAssessmentRuleBaselinesOperations +from ._extended_sql_pool_blob_auditing_policies_operations import ExtendedSqlPoolBlobAuditingPoliciesOperations +from ._data_masking_policies_operations import DataMaskingPoliciesOperations +from ._data_masking_rules_operations import DataMaskingRulesOperations +from ._sql_pool_columns_operations import SqlPoolColumnsOperations +from ._sql_pool_workload_group_operations import SqlPoolWorkloadGroupOperations +from ._sql_pool_workload_classifier_operations import SqlPoolWorkloadClassifierOperations from ._workspaces_operations import WorkspacesOperations from ._workspace_aad_admins_operations import WorkspaceAadAdminsOperations +from ._workspace_sql_aad_admins_operations import WorkspaceSqlAadAdminsOperations from ._workspace_managed_identity_sql_control_settings_operations import WorkspaceManagedIdentitySqlControlSettingsOperations +from ._restorable_dropped_sql_pools_operations import RestorableDroppedSqlPoolsOperations from ._integration_runtimes_operations import IntegrationRuntimesOperations from ._integration_runtime_node_ip_address_operations import IntegrationRuntimeNodeIpAddressOperations from ._integration_runtime_object_metadata_operations import IntegrationRuntimeObjectMetadataOperations @@ -47,6 +55,16 @@ from ._private_link_resources_operations import PrivateLinkResourcesOperations from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations from ._private_link_hubs_operations import PrivateLinkHubsOperations +from ._private_endpoint_connections_private_link_hub_operations import PrivateEndpointConnectionsPrivateLinkHubOperations +from ._workspace_managed_sql_server_blob_auditing_policies_operations import WorkspaceManagedSqlServerBlobAuditingPoliciesOperations +from ._workspace_managedql_server_blob_auditing_policies_operations import WorkspaceManagedqlServerBlobAuditingPoliciesOperations +from ._workspace_managed_sql_server_extended_blob_auditing_policies_operations import WorkspaceManagedSqlServerExtendedBlobAuditingPoliciesOperations +from ._workspace_managed_sql_server_security_alert_policy_operations import WorkspaceManagedSqlServerSecurityAlertPolicyOperations +from ._workspace_managed_sql_server_vulnerability_assessments_operations import WorkspaceManagedSqlServerVulnerabilityAssessmentsOperations +from ._workspace_managed_sql_server_encryption_protector_operations import WorkspaceManagedSqlServerEncryptionProtectorOperations +from ._workspace_managed_sql_server_usages_operations import WorkspaceManagedSqlServerUsagesOperations +from ._workspace_managed_sql_server_recoverable_sqlpools_operations import WorkspaceManagedSqlServerRecoverableSqlpoolsOperations +from ._keys_operations import KeysOperations __all__ = [ 'BigDataPoolsOperations', @@ -72,9 +90,17 @@ 'SqlPoolVulnerabilityAssessmentScansOperations', 'SqlPoolSecurityAlertPoliciesOperations', 'SqlPoolVulnerabilityAssessmentRuleBaselinesOperations', + 'ExtendedSqlPoolBlobAuditingPoliciesOperations', + 'DataMaskingPoliciesOperations', + 'DataMaskingRulesOperations', + 'SqlPoolColumnsOperations', + 'SqlPoolWorkloadGroupOperations', + 'SqlPoolWorkloadClassifierOperations', 'WorkspacesOperations', 'WorkspaceAadAdminsOperations', + 'WorkspaceSqlAadAdminsOperations', 'WorkspaceManagedIdentitySqlControlSettingsOperations', + 'RestorableDroppedSqlPoolsOperations', 'IntegrationRuntimesOperations', 'IntegrationRuntimeNodeIpAddressOperations', 'IntegrationRuntimeObjectMetadataOperations', @@ -87,4 +113,14 @@ 'PrivateLinkResourcesOperations', 'PrivateEndpointConnectionsOperations', 'PrivateLinkHubsOperations', + 'PrivateEndpointConnectionsPrivateLinkHubOperations', + 'WorkspaceManagedSqlServerBlobAuditingPoliciesOperations', + 'WorkspaceManagedqlServerBlobAuditingPoliciesOperations', + 'WorkspaceManagedSqlServerExtendedBlobAuditingPoliciesOperations', + 'WorkspaceManagedSqlServerSecurityAlertPolicyOperations', + 'WorkspaceManagedSqlServerVulnerabilityAssessmentsOperations', + 'WorkspaceManagedSqlServerEncryptionProtectorOperations', + 'WorkspaceManagedSqlServerUsagesOperations', + 'WorkspaceManagedSqlServerRecoverableSqlpoolsOperations', + 'KeysOperations', ] diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_big_data_pools_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_big_data_pools_operations.py index 026fb9921e96..9a98a9b674e2 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_big_data_pools_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_big_data_pools_operations.py @@ -11,7 +11,6 @@ import uuid from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError from msrest.polling import LROPoller, NoPolling from msrestazure.polling.arm_polling import ARMPolling @@ -413,7 +412,8 @@ def list_by_workspace( :return: An iterator like instance of BigDataPoolResourceInfo :rtype: ~azure.mgmt.synapse.models.BigDataPoolResourceInfoPaged[~azure.mgmt.synapse.models.BigDataPoolResourceInfo] - :raises: :class:`CloudError` + :raises: + :class:`ErrorContractException` """ def prepare_request(next_link=None): if not next_link: @@ -454,9 +454,7 @@ def internal_paging(next_link=None): response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorContractException(self._deserialize, response) return response diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_data_masking_policies_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_data_masking_policies_operations.py new file mode 100644 index 000000000000..36324449ef68 --- /dev/null +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_data_masking_policies_operations.py @@ -0,0 +1,189 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class DataMaskingPoliciesOperations(object): + """DataMaskingPoliciesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2019-06-01-preview". + :ivar data_masking_policy_name: The name of the data masking policy for which the masking rule applies. Constant value: "Default". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-06-01-preview" + self.data_masking_policy_name = "Default" + + self.config = config + + def create_or_update( + self, resource_group_name, workspace_name, sql_pool_name, data_masking_state, exempt_principals=None, custom_headers=None, raw=False, **operation_config): + """Creates or updates a Sql pool data masking policy. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace + :type workspace_name: str + :param sql_pool_name: SQL pool name + :type sql_pool_name: str + :param data_masking_state: The state of the data masking policy. + Possible values include: 'Disabled', 'Enabled' + :type data_masking_state: str or + ~azure.mgmt.synapse.models.DataMaskingState + :param exempt_principals: The list of the exempt principals. Specifies + the semicolon-separated list of database users for which the data + masking policy does not apply. The specified users receive data + results without masking for all of the database queries. + :type exempt_principals: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DataMaskingPolicy or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.synapse.models.DataMaskingPolicy or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + parameters = models.DataMaskingPolicy(data_masking_state=data_masking_state, exempt_principals=exempt_principals) + + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), + 'dataMaskingPolicyName': self._serialize.url("self.data_masking_policy_name", self.data_masking_policy_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'DataMaskingPolicy') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DataMaskingPolicy', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/dataMaskingPolicies/{dataMaskingPolicyName}'} + + def get( + self, resource_group_name, workspace_name, sql_pool_name, custom_headers=None, raw=False, **operation_config): + """Gets a Sql pool data masking policy. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace + :type workspace_name: str + :param sql_pool_name: SQL pool name + :type sql_pool_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DataMaskingPolicy or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.synapse.models.DataMaskingPolicy or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), + 'dataMaskingPolicyName': self._serialize.url("self.data_masking_policy_name", self.data_masking_policy_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DataMaskingPolicy', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/dataMaskingPolicies/{dataMaskingPolicyName}'} diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_data_masking_rules_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_data_masking_rules_operations.py new file mode 100644 index 000000000000..29593198a344 --- /dev/null +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_data_masking_rules_operations.py @@ -0,0 +1,197 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class DataMaskingRulesOperations(object): + """DataMaskingRulesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2019-06-01-preview". + :ivar data_masking_policy_name: The name of the data masking policy for which the masking rule applies. Constant value: "Default". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-06-01-preview" + self.data_masking_policy_name = "Default" + + self.config = config + + def create_or_update( + self, resource_group_name, workspace_name, sql_pool_name, data_masking_rule_name, parameters, custom_headers=None, raw=False, **operation_config): + """Creates or updates a Sql pool data masking rule. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace + :type workspace_name: str + :param sql_pool_name: SQL pool name + :type sql_pool_name: str + :param data_masking_rule_name: The name of the data masking rule. + :type data_masking_rule_name: str + :param parameters: The required parameters for creating or updating a + data masking rule. + :type parameters: ~azure.mgmt.synapse.models.DataMaskingRule + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DataMaskingRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.synapse.models.DataMaskingRule or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), + 'dataMaskingPolicyName': self._serialize.url("self.data_masking_policy_name", self.data_masking_policy_name, 'str'), + 'dataMaskingRuleName': self._serialize.url("data_masking_rule_name", data_masking_rule_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'DataMaskingRule') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DataMaskingRule', response) + if response.status_code == 201: + deserialized = self._deserialize('DataMaskingRule', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/dataMaskingPolicies/{dataMaskingPolicyName}/rules/{dataMaskingRuleName}'} + + def list_by_sql_pool( + self, resource_group_name, workspace_name, sql_pool_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of Sql pool data masking rules. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace + :type workspace_name: str + :param sql_pool_name: SQL pool name + :type sql_pool_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DataMaskingRule + :rtype: + ~azure.mgmt.synapse.models.DataMaskingRulePaged[~azure.mgmt.synapse.models.DataMaskingRule] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_sql_pool.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), + 'dataMaskingPolicyName': self._serialize.url("self.data_masking_policy_name", self.data_masking_policy_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.DataMaskingRulePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_sql_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/dataMaskingPolicies/{dataMaskingPolicyName}/rules'} diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_extended_sql_pool_blob_auditing_policies_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_extended_sql_pool_blob_auditing_policies_operations.py new file mode 100644 index 000000000000..9e7ddf27809f --- /dev/null +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_extended_sql_pool_blob_auditing_policies_operations.py @@ -0,0 +1,262 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class ExtendedSqlPoolBlobAuditingPoliciesOperations(object): + """ExtendedSqlPoolBlobAuditingPoliciesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2019-06-01-preview". + :ivar blob_auditing_policy_name: The name of the blob auditing policy. Constant value: "default". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-06-01-preview" + self.blob_auditing_policy_name = "default" + + self.config = config + + def get( + self, resource_group_name, workspace_name, sql_pool_name, custom_headers=None, raw=False, **operation_config): + """Gets an extended Sql pool's blob auditing policy. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace + :type workspace_name: str + :param sql_pool_name: SQL pool name + :type sql_pool_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ExtendedSqlPoolBlobAuditingPolicy or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.synapse.models.ExtendedSqlPoolBlobAuditingPolicy + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), + 'blobAuditingPolicyName': self._serialize.url("self.blob_auditing_policy_name", self.blob_auditing_policy_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ExtendedSqlPoolBlobAuditingPolicy', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/extendedAuditingSettings/{blobAuditingPolicyName}'} + + def create_or_update( + self, resource_group_name, workspace_name, sql_pool_name, parameters, custom_headers=None, raw=False, **operation_config): + """Creates or updates an extended Sql pool's blob auditing policy. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace + :type workspace_name: str + :param sql_pool_name: SQL pool name + :type sql_pool_name: str + :param parameters: The extended Sql pool blob auditing policy. + :type parameters: + ~azure.mgmt.synapse.models.ExtendedSqlPoolBlobAuditingPolicy + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ExtendedSqlPoolBlobAuditingPolicy or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.synapse.models.ExtendedSqlPoolBlobAuditingPolicy + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), + 'blobAuditingPolicyName': self._serialize.url("self.blob_auditing_policy_name", self.blob_auditing_policy_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ExtendedSqlPoolBlobAuditingPolicy') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ExtendedSqlPoolBlobAuditingPolicy', response) + if response.status_code == 201: + deserialized = self._deserialize('ExtendedSqlPoolBlobAuditingPolicy', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/extendedAuditingSettings/{blobAuditingPolicyName}'} + + def list_by_sql_pool( + self, resource_group_name, workspace_name, sql_pool_name, custom_headers=None, raw=False, **operation_config): + """Lists extended auditing settings of a Sql pool. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace + :type workspace_name: str + :param sql_pool_name: SQL pool name + :type sql_pool_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of + ExtendedSqlPoolBlobAuditingPolicy + :rtype: + ~azure.mgmt.synapse.models.ExtendedSqlPoolBlobAuditingPolicyPaged[~azure.mgmt.synapse.models.ExtendedSqlPoolBlobAuditingPolicy] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_sql_pool.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ExtendedSqlPoolBlobAuditingPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_sql_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/extendedAuditingSettings'} diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_auth_keys_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_auth_keys_operations.py index 725ceabcb757..e5cd1f383799 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_auth_keys_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_auth_keys_operations.py @@ -48,7 +48,7 @@ def regenerate( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param workspace_name: The name of the workspace + :param workspace_name: The name of the workspace. :type workspace_name: str :param integration_runtime_name: Integration runtime name :type integration_runtime_name: str @@ -125,7 +125,7 @@ def list( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param workspace_name: The name of the workspace + :param workspace_name: The name of the workspace. :type workspace_name: str :param integration_runtime_name: Integration runtime name :type integration_runtime_name: str diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_connection_infos_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_connection_infos_operations.py index 46d62e192ac0..11a08a6d202a 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_connection_infos_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_connection_infos_operations.py @@ -48,7 +48,7 @@ def get( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param workspace_name: The name of the workspace + :param workspace_name: The name of the workspace. :type workspace_name: str :param integration_runtime_name: Integration runtime name :type integration_runtime_name: str diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_credentials_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_credentials_operations.py index 0f0474d8ed7d..cdc6f4b9bed1 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_credentials_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_credentials_operations.py @@ -53,7 +53,7 @@ def sync( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param workspace_name: The name of the workspace + :param workspace_name: The name of the workspace. :type workspace_name: str :param integration_runtime_name: Integration runtime name :type integration_runtime_name: str diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_monitoring_data_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_monitoring_data_operations.py index a4d5954ce6f8..64b03baa3d6a 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_monitoring_data_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_monitoring_data_operations.py @@ -39,7 +39,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config - def get( + def list( self, resource_group_name, workspace_name, integration_runtime_name, custom_headers=None, raw=False, **operation_config): """Get integration runtime monitoring data. @@ -48,7 +48,7 @@ def get( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param workspace_name: The name of the workspace + :param workspace_name: The name of the workspace. :type workspace_name: str :param integration_runtime_name: Integration runtime name :type integration_runtime_name: str @@ -64,7 +64,7 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = self.get.metadata['url'] + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), @@ -105,4 +105,4 @@ def get( return client_raw_response return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/monitoringData'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/monitoringData'} diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_node_ip_address_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_node_ip_address_operations.py index 215358348791..24f1be141338 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_node_ip_address_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_node_ip_address_operations.py @@ -48,7 +48,7 @@ def get( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param workspace_name: The name of the workspace + :param workspace_name: The name of the workspace. :type workspace_name: str :param integration_runtime_name: Integration runtime name :type integration_runtime_name: str diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_nodes_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_nodes_operations.py index 11f3e5b35592..23a9e3e2b06a 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_nodes_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_nodes_operations.py @@ -48,7 +48,7 @@ def get( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param workspace_name: The name of the workspace + :param workspace_name: The name of the workspace. :type workspace_name: str :param integration_runtime_name: Integration runtime name :type integration_runtime_name: str @@ -119,7 +119,7 @@ def update( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param workspace_name: The name of the workspace + :param workspace_name: The name of the workspace. :type workspace_name: str :param integration_runtime_name: Integration runtime name :type integration_runtime_name: str @@ -200,7 +200,7 @@ def delete( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param workspace_name: The name of the workspace + :param workspace_name: The name of the workspace. :type workspace_name: str :param integration_runtime_name: Integration runtime name :type integration_runtime_name: str diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_object_metadata_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_object_metadata_operations.py index 602073bd237e..e8f2b2b79f8b 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_object_metadata_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_object_metadata_operations.py @@ -12,6 +12,8 @@ import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -39,7 +41,7 @@ def __init__(self, client, config, serializer, deserializer): self.config = config - def get( + def list( self, resource_group_name, workspace_name, integration_runtime_name, metadata_path=None, custom_headers=None, raw=False, **operation_config): """Get integration runtime object metadata. @@ -48,7 +50,7 @@ def get( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param workspace_name: The name of the workspace + :param workspace_name: The name of the workspace. :type workspace_name: str :param integration_runtime_name: Integration runtime name :type integration_runtime_name: str @@ -70,7 +72,7 @@ def get( get_metadata_request = models.GetSsisObjectMetadataRequest(metadata_path=metadata_path) # Construct URL - url = self.get.metadata['url'] + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), @@ -118,32 +120,11 @@ def get( return client_raw_response return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/getObjectMetadata'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/getObjectMetadata'} - def refresh( - self, resource_group_name, workspace_name, integration_runtime_name, custom_headers=None, raw=False, **operation_config): - """Refresh integration runtime object metadata. - Refresh the object metadata in an integration runtime. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param workspace_name: The name of the workspace - :type workspace_name: str - :param integration_runtime_name: Integration runtime name - :type integration_runtime_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SsisObjectMetadataStatusResponse or ClientRawResponse if - raw=true - :rtype: ~azure.mgmt.synapse.models.SsisObjectMetadataStatusResponse or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ + def _refresh_initial( + self, resource_group_name, workspace_name, integration_runtime_name, custom_headers=None, raw=False, **operation_config): # Construct URL url = self.refresh.metadata['url'] path_format_arguments = { @@ -178,6 +159,7 @@ def refresh( raise exp deserialized = None + if response.status_code == 200: deserialized = self._deserialize('SsisObjectMetadataStatusResponse', response) @@ -186,4 +168,57 @@ def refresh( return client_raw_response return deserialized + + def refresh( + self, resource_group_name, workspace_name, integration_runtime_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Refresh integration runtime object metadata. + + Refresh the object metadata in an integration runtime. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param integration_runtime_name: Integration runtime name + :type integration_runtime_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + SsisObjectMetadataStatusResponse or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.synapse.models.SsisObjectMetadataStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.synapse.models.SsisObjectMetadataStatusResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._refresh_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + integration_runtime_name=integration_runtime_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('SsisObjectMetadataStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) refresh.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/refreshObjectMetadata'} diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_status_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_status_operations.py index 23519d2bd008..383bdc34fe84 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_status_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtime_status_operations.py @@ -48,7 +48,7 @@ def get( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param workspace_name: The name of the workspace + :param workspace_name: The name of the workspace. :type workspace_name: str :param integration_runtime_name: Integration runtime name :type integration_runtime_name: str diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtimes_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtimes_operations.py index a62304fb3fac..ebf248c486e5 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtimes_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_integration_runtimes_operations.py @@ -50,7 +50,7 @@ def update( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param workspace_name: The name of the workspace + :param workspace_name: The name of the workspace. :type workspace_name: str :param integration_runtime_name: Integration runtime name :type integration_runtime_name: str @@ -133,7 +133,7 @@ def get( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param workspace_name: The name of the workspace + :param workspace_name: The name of the workspace. :type workspace_name: str :param integration_runtime_name: Integration runtime name :type integration_runtime_name: str @@ -261,7 +261,7 @@ def create( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param workspace_name: The name of the workspace + :param workspace_name: The name of the workspace. :type workspace_name: str :param integration_runtime_name: Integration runtime name :type integration_runtime_name: str @@ -362,7 +362,7 @@ def delete( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param workspace_name: The name of the workspace + :param workspace_name: The name of the workspace. :type workspace_name: str :param integration_runtime_name: Integration runtime name :type integration_runtime_name: str @@ -409,7 +409,7 @@ def upgrade( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param workspace_name: The name of the workspace + :param workspace_name: The name of the workspace. :type workspace_name: str :param integration_runtime_name: Integration runtime name :type integration_runtime_name: str @@ -468,7 +468,7 @@ def list_by_workspace( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param workspace_name: The name of the workspace + :param workspace_name: The name of the workspace. :type workspace_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -534,8 +534,55 @@ def internal_paging(next_link=None): return deserialized list_by_workspace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes'} - def start( + + def _start_initial( self, resource_group_name, workspace_name, integration_runtime_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.start.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('IntegrationRuntimeStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def start( + self, resource_group_name, workspace_name, integration_runtime_name, custom_headers=None, raw=False, polling=True, **operation_config): """Start integration runtime. Start an integration runtime. @@ -543,23 +590,56 @@ def start( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param workspace_name: The name of the workspace + :param workspace_name: The name of the workspace. :type workspace_name: str :param integration_runtime_name: Integration runtime name :type integration_runtime_name: str :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: IntegrationRuntimeStatusResponse or ClientRawResponse if - raw=true - :rtype: ~azure.mgmt.synapse.models.IntegrationRuntimeStatusResponse or - ~msrest.pipeline.ClientRawResponse + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + IntegrationRuntimeStatusResponse or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.synapse.models.IntegrationRuntimeStatusResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.synapse.models.IntegrationRuntimeStatusResponse]] :raises: :class:`CloudError` """ + raw_result = self._start_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + integration_runtime_name=integration_runtime_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('IntegrationRuntimeStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/start'} + + + def _stop_initial( + self, resource_group_name, workspace_name, integration_runtime_name, custom_headers=None, raw=False, **operation_config): # Construct URL - url = self.start.metadata['url'] + url = self.stop.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), @@ -574,7 +654,6 @@ def start( # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -591,19 +670,12 @@ def start( exp.request_id = response.headers.get('x-ms-request-id') raise exp - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('IntegrationRuntimeStatusResponse', response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response = ClientRawResponse(None, response) return client_raw_response - return deserialized - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/start'} - def stop( - self, resource_group_name, workspace_name, integration_runtime_name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, workspace_name, integration_runtime_name, custom_headers=None, raw=False, polling=True, **operation_config): """Stop integration runtime. Stop an integration runtime. @@ -611,21 +683,49 @@ def stop( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param workspace_name: The name of the workspace + :param workspace_name: The name of the workspace. :type workspace_name: str :param integration_runtime_name: Integration runtime name :type integration_runtime_name: str :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: :class:`CloudError` """ + raw_result = self._stop_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + integration_runtime_name=integration_runtime_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/stop'} + + + def _enable_interactive_query_initial( + self, resource_group_name, workspace_name, integration_runtime_name, custom_headers=None, raw=False, **operation_config): # Construct URL - url = self.stop.metadata['url'] + url = self.enable_interactive_query.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), @@ -659,4 +759,132 @@ def stop( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/stop'} + + def enable_interactive_query( + self, resource_group_name, workspace_name, integration_runtime_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Enable interactive query in integration runtime. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param integration_runtime_name: Integration runtime name + :type integration_runtime_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._enable_interactive_query_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + integration_runtime_name=integration_runtime_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + enable_interactive_query.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/enableInteractiveQuery'} + + + def _disable_interactive_query_initial( + self, resource_group_name, workspace_name, integration_runtime_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.disable_interactive_query.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'integrationRuntimeName': self._serialize.url("integration_runtime_name", integration_runtime_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def disable_interactive_query( + self, resource_group_name, workspace_name, integration_runtime_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Disable interactive query in integration runtime. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param integration_runtime_name: Integration runtime name + :type integration_runtime_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._disable_interactive_query_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + integration_runtime_name=integration_runtime_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + disable_interactive_query.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/disableInteractiveQuery'} diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_ip_firewall_rules_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_ip_firewall_rules_operations.py index 4a29b0e7bea0..600af9a1bde0 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_ip_firewall_rules_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_ip_firewall_rules_operations.py @@ -11,7 +11,6 @@ import uuid from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError from msrest.polling import LROPoller, NoPolling from msrestazure.polling.arm_polling import ARMPolling @@ -58,7 +57,8 @@ def list_by_workspace( :return: An iterator like instance of IpFirewallRuleInfo :rtype: ~azure.mgmt.synapse.models.IpFirewallRuleInfoPaged[~azure.mgmt.synapse.models.IpFirewallRuleInfo] - :raises: :class:`CloudError` + :raises: + :class:`ErrorContractException` """ def prepare_request(next_link=None): if not next_link: @@ -99,9 +99,7 @@ def internal_paging(next_link=None): response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorContractException(self._deserialize, response) return response @@ -259,9 +257,7 @@ def _delete_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorContractException(self._deserialize, response) deserialized = None @@ -294,7 +290,8 @@ def delete( ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[object] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[object]] - :raises: :class:`CloudError` + :raises: + :class:`ErrorContractException` """ raw_result = self._delete_initial( resource_group_name=resource_group_name, diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_keys_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_keys_operations.py new file mode 100644 index 000000000000..98dec25566de --- /dev/null +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_keys_operations.py @@ -0,0 +1,314 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class KeysOperations(object): + """KeysOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2019-06-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-06-01-preview" + + self.config = config + + def list_by_workspace( + self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): + """Returns a list of keys in a workspace. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace + :type workspace_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Key + :rtype: + ~azure.mgmt.synapse.models.KeyPaged[~azure.mgmt.synapse.models.Key] + :raises: + :class:`ErrorContractException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_workspace.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorContractException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.KeyPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_workspace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/keys'} + + def get( + self, resource_group_name, workspace_name, key_name, custom_headers=None, raw=False, **operation_config): + """Gets a workspace key. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace + :type workspace_name: str + :param key_name: The name of the workspace key + :type key_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Key or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.synapse.models.Key or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorContractException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'keyName': self._serialize.url("key_name", key_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorContractException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Key', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/keys/{keyName}'} + + def create_or_update( + self, resource_group_name, workspace_name, key_name, is_active_cmk=None, key_vault_url=None, custom_headers=None, raw=False, **operation_config): + """Creates or updates a workspace key. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace + :type workspace_name: str + :param key_name: The name of the workspace key + :type key_name: str + :param is_active_cmk: Used to activate the workspace after a customer + managed key is provided. + :type is_active_cmk: bool + :param key_vault_url: The Key Vault Url of the workspace key. + :type key_vault_url: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Key or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.synapse.models.Key or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorContractException` + """ + key_properties = models.Key(is_active_cmk=is_active_cmk, key_vault_url=key_vault_url) + + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'keyName': self._serialize.url("key_name", key_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(key_properties, 'Key') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorContractException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Key', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/keys/{keyName}'} + + def delete( + self, resource_group_name, workspace_name, key_name, custom_headers=None, raw=False, **operation_config): + """Deletes a workspace key. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace + :type workspace_name: str + :param key_name: The name of the workspace key + :type key_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Key or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.synapse.models.Key or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorContractException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'keyName': self._serialize.url("key_name", key_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorContractException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Key', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/keys/{keyName}'} diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_operations.py index 804df34ae7e4..e6bea7ff62ac 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_operations.py @@ -11,7 +11,6 @@ import uuid from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError from .. import models @@ -120,7 +119,8 @@ def list( :return: list or ClientRawResponse if raw=true :rtype: list[~azure.mgmt.synapse.models.AvailableRpOperation] or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`ErrorContractException` """ # Construct URL url = self.list.metadata['url'] @@ -143,9 +143,7 @@ def list( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorContractException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -208,7 +206,7 @@ def get_location_header_result( request = self._client.get(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 204]: + if response.status_code not in [200, 201, 202, 204]: raise models.ErrorContractException(self._deserialize, response) if raw: @@ -234,9 +232,11 @@ def get_azure_async_header_result( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: object or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :return: OperationResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.synapse.models.OperationResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorContractException` """ # Construct URL url = self.get_azure_async_header_result.metadata['url'] @@ -266,16 +266,12 @@ def get_azure_async_header_result( request = self._client.get(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 404, 500]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + if response.status_code not in [200, 404]: + raise models.ErrorContractException(self._deserialize, response) deserialized = None if response.status_code == 200: deserialized = self._deserialize('OperationResource', response) - if response.status_code == 500: - deserialized = self._deserialize('ErrorContract', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_private_endpoint_connections_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_private_endpoint_connections_operations.py index 960ae5865870..1d438ad2bda9 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_private_endpoint_connections_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_private_endpoint_connections_operations.py @@ -47,7 +47,7 @@ def get( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param workspace_name: The name of the workspace + :param workspace_name: The name of the workspace. :type workspace_name: str :param private_endpoint_connection_name: The name of the private endpoint connection. @@ -107,7 +107,9 @@ def get( def _create_initial( - self, resource_group_name, workspace_name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, workspace_name, private_endpoint_connection_name, private_endpoint=None, private_link_service_connection_state=None, custom_headers=None, raw=False, **operation_config): + request = models.PrivateEndpointConnection(private_endpoint=private_endpoint, private_link_service_connection_state=private_link_service_connection_state) + # Construct URL url = self.create.metadata['url'] path_format_arguments = { @@ -125,6 +127,7 @@ def _create_initial( # Construct headers header_parameters = {} header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -132,8 +135,11 @@ def _create_initial( if self.config.accept_language is not None: header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + # Construct body + body_content = self._serialize.body(request, 'PrivateEndpointConnection') + # Construct and send request - request = self._client.put(url, query_parameters, header_parameters) + request = self._client.put(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: @@ -153,17 +159,24 @@ def _create_initial( return deserialized def create( - self, resource_group_name, workspace_name, private_endpoint_connection_name, custom_headers=None, raw=False, polling=True, **operation_config): + self, resource_group_name, workspace_name, private_endpoint_connection_name, private_endpoint=None, private_link_service_connection_state=None, custom_headers=None, raw=False, polling=True, **operation_config): """Approve or reject a private endpoint connection. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param workspace_name: The name of the workspace + :param workspace_name: The name of the workspace. :type workspace_name: str :param private_endpoint_connection_name: The name of the private endpoint connection. :type private_endpoint_connection_name: str + :param private_endpoint: The private endpoint which the connection + belongs to. + :type private_endpoint: ~azure.mgmt.synapse.models.PrivateEndpoint + :param private_link_service_connection_state: Connection state of the + private endpoint connection. + :type private_link_service_connection_state: + ~azure.mgmt.synapse.models.PrivateLinkServiceConnectionState :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the direct response alongside the deserialized response @@ -183,6 +196,8 @@ def create( resource_group_name=resource_group_name, workspace_name=workspace_name, private_endpoint_connection_name=private_endpoint_connection_name, + private_endpoint=private_endpoint, + private_link_service_connection_state=private_link_service_connection_state, custom_headers=custom_headers, raw=True, **operation_config @@ -237,7 +252,7 @@ def _delete_initial( request = self._client.delete(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [202, 204]: + if response.status_code not in [200, 202, 204]: raise models.ErrorContractException(self._deserialize, response) deserialized = None @@ -258,7 +273,7 @@ def delete( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param workspace_name: The name of the workspace + :param workspace_name: The name of the workspace. :type workspace_name: str :param private_endpoint_connection_name: The name of the private endpoint connection. @@ -311,7 +326,7 @@ def list( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param workspace_name: The name of the workspace + :param workspace_name: The name of the workspace. :type workspace_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_private_endpoint_connections_private_link_hub_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_private_endpoint_connections_private_link_hub_operations.py new file mode 100644 index 000000000000..e48100631387 --- /dev/null +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_private_endpoint_connections_private_link_hub_operations.py @@ -0,0 +1,112 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class PrivateEndpointConnectionsPrivateLinkHubOperations(object): + """PrivateEndpointConnectionsPrivateLinkHubOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2019-06-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-06-01-preview" + + self.config = config + + def list( + self, resource_group_name, private_link_hub_name, custom_headers=None, raw=False, **operation_config): + """Get all PrivateEndpointConnections in the PrivateLinkHub. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param private_link_hub_name: Name of the privateLinkHub + :type private_link_hub_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of + PrivateEndpointConnectionForPrivateLinkHub + :rtype: + ~azure.mgmt.synapse.models.PrivateEndpointConnectionForPrivateLinkHubPaged[~azure.mgmt.synapse.models.PrivateEndpointConnectionForPrivateLinkHub] + :raises: + :class:`ErrorContractException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'privateLinkHubName': self._serialize.url("private_link_hub_name", private_link_hub_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorContractException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.PrivateEndpointConnectionForPrivateLinkHubPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/privateLinkHubs/{privateLinkHubName}/privateEndpointConnections'} diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_private_link_hubs_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_private_link_hubs_operations.py index c9d1815e0d7b..8179d6f40335 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_private_link_hubs_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_private_link_hubs_operations.py @@ -11,7 +11,8 @@ import uuid from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -54,7 +55,8 @@ def list_by_resource_group( :return: An iterator like instance of PrivateLinkHub :rtype: ~azure.mgmt.synapse.models.PrivateLinkHubPaged[~azure.mgmt.synapse.models.PrivateLinkHub] - :raises: :class:`CloudError` + :raises: + :class:`ErrorContractException` """ def prepare_request(next_link=None): if not next_link: @@ -94,9 +96,7 @@ def internal_paging(next_link=None): response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorContractException(self._deserialize, response) return response @@ -107,7 +107,7 @@ def internal_paging(next_link=None): deserialized = models.PrivateLinkHubPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/privateLinkHub'} + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/privateLinkHubs'} def get( self, resource_group_name, private_link_hub_name, custom_headers=None, raw=False, **operation_config): @@ -116,7 +116,7 @@ def get( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param private_link_hub_name: The name of the privateLinkHub + :param private_link_hub_name: Name of the privateLinkHub :type private_link_hub_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -177,7 +177,7 @@ def update( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param private_link_hub_name: The name of the privateLinkHub + :param private_link_hub_name: Name of the privateLinkHub :type private_link_hub_name: str :param tags: Resource tags :type tags: dict[str, str] @@ -242,18 +242,17 @@ def update( update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/privateLinkHubs/{privateLinkHubName}'} def create_or_update( - self, resource_group_name, private_link_hub_name, location, tags=None, custom_headers=None, raw=False, **operation_config): + self, private_link_hub_info, resource_group_name, private_link_hub_name, custom_headers=None, raw=False, **operation_config): """Creates or updates a privateLinkHub. + :param private_link_hub_info: PrivateLinkHub create or update request + properties + :type private_link_hub_info: ~azure.mgmt.synapse.models.PrivateLinkHub :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param private_link_hub_name: The name of the privateLinkHub + :param private_link_hub_name: Name of the privateLinkHub :type private_link_hub_name: str - :param location: The geo-location where the resource lives - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -265,8 +264,6 @@ def create_or_update( :raises: :class:`ErrorContractException` """ - private_link_hub_info = models.PrivateLinkHub(tags=tags, location=location) - # Construct URL url = self.create_or_update.metadata['url'] path_format_arguments = { @@ -314,25 +311,9 @@ def create_or_update( return deserialized create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/privateLinkHubs/{privateLinkHubName}'} - def delete( - self, resource_group_name, private_link_hub_name, custom_headers=None, raw=False, **operation_config): - """Deletes a privateLinkHub. - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param private_link_hub_name: The name of the privateLinkHub - :type private_link_hub_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorContractException` - """ + def _delete_initial( + self, resource_group_name, private_link_hub_name, custom_headers=None, raw=False, **operation_config): # Construct URL url = self.delete.metadata['url'] path_format_arguments = { @@ -359,12 +340,54 @@ def delete( request = self._client.delete(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 204]: + if response.status_code not in [200, 202, 204]: raise models.ErrorContractException(self._deserialize, response) if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + + def delete( + self, resource_group_name, private_link_hub_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes a privateLinkHub. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param private_link_hub_name: Name of the privateLinkHub + :type private_link_hub_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`ErrorContractException` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + private_link_hub_name=private_link_hub_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/privateLinkHubs/{privateLinkHubName}'} def list( @@ -379,7 +402,8 @@ def list( :return: An iterator like instance of PrivateLinkHub :rtype: ~azure.mgmt.synapse.models.PrivateLinkHubPaged[~azure.mgmt.synapse.models.PrivateLinkHub] - :raises: :class:`CloudError` + :raises: + :class:`ErrorContractException` """ def prepare_request(next_link=None): if not next_link: @@ -418,9 +442,7 @@ def internal_paging(next_link=None): response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorContractException(self._deserialize, response) return response diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_private_link_resources_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_private_link_resources_operations.py index 4635ad8474ca..7e43c3d860c6 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_private_link_resources_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_private_link_resources_operations.py @@ -11,7 +11,6 @@ import uuid from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError from .. import models @@ -58,7 +57,8 @@ def list( :return: An iterator like instance of PrivateLinkResource :rtype: ~azure.mgmt.synapse.models.PrivateLinkResourcePaged[~azure.mgmt.synapse.models.PrivateLinkResource] - :raises: :class:`CloudError` + :raises: + :class:`ErrorContractException` """ def prepare_request(next_link=None): if not next_link: @@ -99,9 +99,7 @@ def internal_paging(next_link=None): response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorContractException(self._deserialize, response) return response @@ -136,7 +134,8 @@ def get( :return: PrivateLinkResource or ClientRawResponse if raw=true :rtype: ~azure.mgmt.synapse.models.PrivateLinkResource or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`ErrorContractException` """ # Construct URL url = self.get.metadata['url'] @@ -167,9 +166,7 @@ def get( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorContractException(self._deserialize, response) deserialized = None if response.status_code == 200: diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_restorable_dropped_sql_pools_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_restorable_dropped_sql_pools_operations.py new file mode 100644 index 000000000000..72b1b0260f26 --- /dev/null +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_restorable_dropped_sql_pools_operations.py @@ -0,0 +1,176 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class RestorableDroppedSqlPoolsOperations(object): + """RestorableDroppedSqlPoolsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2019-06-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-06-01-preview" + + self.config = config + + def get( + self, resource_group_name, workspace_name, restorable_dropped_sql_pool_id, custom_headers=None, raw=False, **operation_config): + """Gets a deleted sql pool that can be restored. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace + :type workspace_name: str + :param restorable_dropped_sql_pool_id: The id of the deleted Sql Pool + in the form of sqlPoolName,deletionTimeInFileTimeFormat + :type restorable_dropped_sql_pool_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RestorableDroppedSqlPool or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.synapse.models.RestorableDroppedSqlPool or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorContractException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'restorableDroppedSqlPoolId': self._serialize.url("restorable_dropped_sql_pool_id", restorable_dropped_sql_pool_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorContractException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RestorableDroppedSqlPool', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/restorableDroppedSqlPools/{restorableDroppedSqlPoolId}'} + + def list_by_workspace( + self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of deleted Sql pools that can be restored. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace + :type workspace_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of RestorableDroppedSqlPool + :rtype: + ~azure.mgmt.synapse.models.RestorableDroppedSqlPoolPaged[~azure.mgmt.synapse.models.RestorableDroppedSqlPool] + :raises: + :class:`ErrorContractException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_workspace.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorContractException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.RestorableDroppedSqlPoolPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_workspace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/restorableDroppedSqlPools'} diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_blob_auditing_policies_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_blob_auditing_policies_operations.py index 47b9ce352c24..7912ae9c2675 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_blob_auditing_policies_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_blob_auditing_policies_operations.py @@ -184,3 +184,79 @@ def create_or_update( return deserialized create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/auditingSettings/{blobAuditingPolicyName}'} + + def list_by_sql_pool( + self, resource_group_name, workspace_name, sql_pool_name, custom_headers=None, raw=False, **operation_config): + """Lists auditing settings of a Sql pool. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace + :type workspace_name: str + :param sql_pool_name: SQL pool name + :type sql_pool_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SqlPoolBlobAuditingPolicy + :rtype: + ~azure.mgmt.synapse.models.SqlPoolBlobAuditingPolicyPaged[~azure.mgmt.synapse.models.SqlPoolBlobAuditingPolicy] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_sql_pool.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SqlPoolBlobAuditingPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_sql_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/auditingSettings'} diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_columns_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_columns_operations.py new file mode 100644 index 000000000000..fa04c3068dd0 --- /dev/null +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_columns_operations.py @@ -0,0 +1,114 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class SqlPoolColumnsOperations(object): + """SqlPoolColumnsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2019-06-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-06-01-preview" + + self.config = config + + def get( + self, resource_group_name, workspace_name, sql_pool_name, schema_name, table_name, column_name, custom_headers=None, raw=False, **operation_config): + """Get Sql pool column. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace + :type workspace_name: str + :param sql_pool_name: SQL pool name + :type sql_pool_name: str + :param schema_name: The name of the schema. + :type schema_name: str + :param table_name: The name of the table. + :type table_name: str + :param column_name: The name of the column. + :type column_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SqlPoolColumn or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.synapse.models.SqlPoolColumn or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), + 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), + 'tableName': self._serialize.url("table_name", table_name, 'str'), + 'columnName': self._serialize.url("column_name", column_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SqlPoolColumn', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}'} diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_connection_policies_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_connection_policies_operations.py index 25eab5422868..f8ec75f130b6 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_connection_policies_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_connection_policies_operations.py @@ -11,7 +11,6 @@ import uuid from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError from .. import models @@ -62,7 +61,8 @@ def get( :return: SqlPoolConnectionPolicy or ClientRawResponse if raw=true :rtype: ~azure.mgmt.synapse.models.SqlPoolConnectionPolicy or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`ErrorContractException` """ # Construct URL url = self.get.metadata['url'] @@ -94,9 +94,7 @@ def get( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorContractException(self._deserialize, response) deserialized = None if response.status_code == 200: diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_geo_backup_policies_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_geo_backup_policies_operations.py index 9c45397f22fd..e937d5a973b8 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_geo_backup_policies_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_geo_backup_policies_operations.py @@ -11,7 +11,6 @@ import uuid from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError from .. import models @@ -41,6 +40,83 @@ def __init__(self, client, config, serializer, deserializer): self.config = config + def list( + self, resource_group_name, workspace_name, sql_pool_name, custom_headers=None, raw=False, **operation_config): + """List SQL pool geo backup policies. + + Get list of SQL pool geo backup policies. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace + :type workspace_name: str + :param sql_pool_name: SQL pool name + :type sql_pool_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of GeoBackupPolicy + :rtype: + ~azure.mgmt.synapse.models.GeoBackupPolicyPaged[~azure.mgmt.synapse.models.GeoBackupPolicy] + :raises: + :class:`ErrorContractException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorContractException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.GeoBackupPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/geoBackupPolicies'} + def get( self, resource_group_name, workspace_name, sql_pool_name, custom_headers=None, raw=False, **operation_config): """Get a SQL pool geo backup policy. @@ -62,7 +138,8 @@ def get( :return: GeoBackupPolicy or ClientRawResponse if raw=true :rtype: ~azure.mgmt.synapse.models.GeoBackupPolicy or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`ErrorContractException` """ # Construct URL url = self.get.metadata['url'] @@ -94,9 +171,7 @@ def get( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorContractException(self._deserialize, response) deserialized = None if response.status_code == 200: diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_metadata_sync_configs_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_metadata_sync_configs_operations.py index 4567f45b5174..d647045e58cc 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_metadata_sync_configs_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_metadata_sync_configs_operations.py @@ -105,7 +105,7 @@ def get( get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/metadataSync/config'} def create( - self, resource_group_name, workspace_name, sql_pool_name, enabled=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, workspace_name, sql_pool_name, enabled=None, sync_interval_in_minutes=None, custom_headers=None, raw=False, **operation_config): """Set SQL pool metadata sync config. Set the metadata sync configuration for a SQL pool. @@ -120,6 +120,8 @@ def create( :param enabled: Indicates whether the metadata sync is enabled or disabled :type enabled: bool + :param sync_interval_in_minutes: The Sync Interval in minutes. + :type sync_interval_in_minutes: int :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -131,7 +133,7 @@ def create( :raises: :class:`ErrorContractException` """ - metadata_sync_configuration = models.MetadataSyncConfig(enabled=enabled) + metadata_sync_configuration = models.MetadataSyncConfig(enabled=enabled, sync_interval_in_minutes=sync_interval_in_minutes) # Construct URL url = self.create.metadata['url'] diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_operation_results_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_operation_results_operations.py index 29ad42bd76f4..6b1f5176c30b 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_operation_results_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_operation_results_operations.py @@ -11,7 +11,6 @@ import uuid from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError from .. import models @@ -61,7 +60,8 @@ def get_location_header_result( overrides`. :return: object or ClientRawResponse if raw=true :rtype: object or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`ErrorContractException` """ # Construct URL url = self.get_location_header_result.metadata['url'] @@ -92,14 +92,14 @@ def get_location_header_result( request = self._client.get(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + if response.status_code not in [200, 202]: + raise models.ErrorContractException(self._deserialize, response) deserialized = None if response.status_code == 200: deserialized = self._deserialize('object', response) + if response.status_code == 202: + deserialized = self._deserialize('object', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_replication_links_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_replication_links_operations.py index 9beb5a13ba00..0dc97c9a768d 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_replication_links_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_replication_links_operations.py @@ -11,7 +11,6 @@ import uuid from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError from .. import models @@ -60,7 +59,8 @@ def list( :return: An iterator like instance of ReplicationLink :rtype: ~azure.mgmt.synapse.models.ReplicationLinkPaged[~azure.mgmt.synapse.models.ReplicationLink] - :raises: :class:`CloudError` + :raises: + :class:`ErrorContractException` """ def prepare_request(next_link=None): if not next_link: @@ -102,9 +102,7 @@ def internal_paging(next_link=None): response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorContractException(self._deserialize, response) return response @@ -116,3 +114,72 @@ def internal_paging(next_link=None): return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/replicationLinks'} + + def get_by_name( + self, resource_group_name, workspace_name, sql_pool_name, link_id, custom_headers=None, raw=False, **operation_config): + """Get SQL pool replication link by name. + + Get SQL pool replication link by name. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace + :type workspace_name: str + :param sql_pool_name: SQL pool name + :type sql_pool_name: str + :param link_id: The ID of the replication link. + :type link_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ReplicationLink or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.synapse.models.ReplicationLink or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorContractException` + """ + # Construct URL + url = self.get_by_name.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), + 'linkId': self._serialize.url("link_id", link_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorContractException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ReplicationLink', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_by_name.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/replicationLinks/{linkId}'} diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_restore_points_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_restore_points_operations.py index 6968f5cf7a0a..04592cf3adc2 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_restore_points_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_restore_points_operations.py @@ -62,7 +62,8 @@ def list( :return: An iterator like instance of RestorePoint :rtype: ~azure.mgmt.synapse.models.RestorePointPaged[~azure.mgmt.synapse.models.RestorePoint] - :raises: :class:`CloudError` + :raises: + :class:`ErrorContractException` """ def prepare_request(next_link=None): if not next_link: @@ -104,9 +105,7 @@ def internal_paging(next_link=None): response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorContractException(self._deserialize, response) return response @@ -227,3 +226,131 @@ def get_long_running_output(response): else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/restorePoints'} + + def get( + self, resource_group_name, workspace_name, sql_pool_name, restore_point_name, custom_headers=None, raw=False, **operation_config): + """Gets a restore point. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace + :type workspace_name: str + :param sql_pool_name: SQL pool name + :type sql_pool_name: str + :param restore_point_name: The name of the restore point. + :type restore_point_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RestorePoint or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.synapse.models.RestorePoint or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), + 'restorePointName': self._serialize.url("restore_point_name", restore_point_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RestorePoint', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/restorePoints/{restorePointName}'} + + def delete( + self, resource_group_name, workspace_name, sql_pool_name, restore_point_name, custom_headers=None, raw=False, **operation_config): + """Deletes a restore point. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace + :type workspace_name: str + :param sql_pool_name: SQL pool name + :type sql_pool_name: str + :param restore_point_name: The name of the restore point. + :type restore_point_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), + 'restorePointName': self._serialize.url("restore_point_name", restore_point_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/restorePoints/{restorePointName}'} diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_schemas_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_schemas_operations.py index 494a8374b914..cdebb2b74a23 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_schemas_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_schemas_operations.py @@ -121,3 +121,71 @@ def internal_paging(next_link=None): return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/schemas'} + + def get( + self, resource_group_name, workspace_name, sql_pool_name, schema_name, custom_headers=None, raw=False, **operation_config): + """Get Sql Pool schema. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace + :type workspace_name: str + :param sql_pool_name: SQL pool name + :type sql_pool_name: str + :param schema_name: The name of the schema. + :type schema_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SqlPoolSchema or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.synapse.models.SqlPoolSchema or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), + 'schemaName': self._serialize.url("schema_name", schema_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SqlPoolSchema', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/schemas/{schemaName}'} diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_security_alert_policies_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_security_alert_policies_operations.py index 1dfb1ad5c3c6..bccc62bdd332 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_security_alert_policies_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_security_alert_policies_operations.py @@ -41,6 +41,84 @@ def __init__(self, client, config, serializer, deserializer): self.config = config + def list( + self, resource_group_name, workspace_name, sql_pool_name, custom_headers=None, raw=False, **operation_config): + """List Sql pool's security alert policies. + + Get a list of Sql pool's security alert policies. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace + :type workspace_name: str + :param sql_pool_name: SQL pool name + :type sql_pool_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SqlPoolSecurityAlertPolicy + :rtype: + ~azure.mgmt.synapse.models.SqlPoolSecurityAlertPolicyPaged[~azure.mgmt.synapse.models.SqlPoolSecurityAlertPolicy] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SqlPoolSecurityAlertPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/securityAlertPolicies'} + def get( self, resource_group_name, workspace_name, sql_pool_name, custom_headers=None, raw=False, **operation_config): """Get a Sql pool's security alert policy. diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_sensitivity_labels_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_sensitivity_labels_operations.py index 22ac677faa4c..2daf1f254fbd 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_sensitivity_labels_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_sensitivity_labels_operations.py @@ -63,7 +63,8 @@ def list_current( :return: An iterator like instance of SensitivityLabel :rtype: ~azure.mgmt.synapse.models.SensitivityLabelPaged[~azure.mgmt.synapse.models.SensitivityLabel] - :raises: :class:`CloudError` + :raises: + :class:`ErrorContractException` """ def prepare_request(next_link=None): if not next_link: @@ -107,9 +108,7 @@ def internal_paging(next_link=None): response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorContractException(self._deserialize, response) return response @@ -360,7 +359,7 @@ def delete( request = self._client.delete(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200]: + if response.status_code not in [200, 204]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -370,6 +369,85 @@ def delete( return client_raw_response delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}'} + def get( + self, resource_group_name, workspace_name, sql_pool_name, schema_name, table_name, column_name, sensitivity_label_source, custom_headers=None, raw=False, **operation_config): + """Gets the sensitivity label of a given column. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace + :type workspace_name: str + :param sql_pool_name: SQL pool name + :type sql_pool_name: str + :param schema_name: The name of the schema. + :type schema_name: str + :param table_name: The name of the table. + :type table_name: str + :param column_name: The name of the column. + :type column_name: str + :param sensitivity_label_source: The source of the sensitivity label. + Possible values include: 'current', 'recommended' + :type sensitivity_label_source: str or + ~azure.mgmt.synapse.models.SensitivityLabelSource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SensitivityLabel or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.synapse.models.SensitivityLabel or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), + 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), + 'tableName': self._serialize.url("table_name", table_name, 'str'), + 'columnName': self._serialize.url("column_name", column_name, 'str'), + 'sensitivityLabelSource': self._serialize.url("sensitivity_label_source", sensitivity_label_source, 'SensitivityLabelSource') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SensitivityLabel', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}'} + def enable_recommendation( self, resource_group_name, workspace_name, sql_pool_name, schema_name, table_name, column_name, custom_headers=None, raw=False, **operation_config): """Enables sensitivity recommendations on a given column (recommendations diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_tables_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_tables_operations.py index b3c976f2f37e..632988a91303 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_tables_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_tables_operations.py @@ -124,3 +124,74 @@ def internal_paging(next_link=None): return deserialized list_by_schema.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/schemas/{schemaName}/tables'} + + def get( + self, resource_group_name, workspace_name, sql_pool_name, schema_name, table_name, custom_headers=None, raw=False, **operation_config): + """Get Sql pool table. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace + :type workspace_name: str + :param sql_pool_name: SQL pool name + :type sql_pool_name: str + :param schema_name: The name of the schema. + :type schema_name: str + :param table_name: The name of the table. + :type table_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SqlPoolTable or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.synapse.models.SqlPoolTable or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), + 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), + 'tableName': self._serialize.url("table_name", table_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SqlPoolTable', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/schemas/{schemaName}/tables/{tableName}'} diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_transparent_data_encryptions_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_transparent_data_encryptions_operations.py index 2fec55949720..2a0a4c6f7255 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_transparent_data_encryptions_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_transparent_data_encryptions_operations.py @@ -62,7 +62,8 @@ def get( :return: TransparentDataEncryption or ClientRawResponse if raw=true :rtype: ~azure.mgmt.synapse.models.TransparentDataEncryption or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`ErrorContractException` """ # Construct URL url = self.get.metadata['url'] @@ -94,9 +95,7 @@ def get( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorContractException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -136,7 +135,8 @@ def create_or_update( :return: TransparentDataEncryption or ClientRawResponse if raw=true :rtype: ~azure.mgmt.synapse.models.TransparentDataEncryption or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`ErrorContractException` """ parameters = models.TransparentDataEncryption(status=status) @@ -174,9 +174,7 @@ def create_or_update( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorContractException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -190,3 +188,81 @@ def create_or_update( return deserialized create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/transparentDataEncryption/{transparentDataEncryptionName}'} + + def list( + self, resource_group_name, workspace_name, sql_pool_name, custom_headers=None, raw=False, **operation_config): + """SQL pool's transparent data encryption configurations. + + Get list of SQL pool's transparent data encryption configurations. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace + :type workspace_name: str + :param sql_pool_name: SQL pool name + :type sql_pool_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of TransparentDataEncryption + :rtype: + ~azure.mgmt.synapse.models.TransparentDataEncryptionPaged[~azure.mgmt.synapse.models.TransparentDataEncryption] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.TransparentDataEncryptionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/transparentDataEncryption'} diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_usages_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_usages_operations.py index e817cb97c5e4..77e27346ac56 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_usages_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_usages_operations.py @@ -11,7 +11,6 @@ import uuid from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError from .. import models @@ -60,7 +59,8 @@ def list( :return: An iterator like instance of SqlPoolUsage :rtype: ~azure.mgmt.synapse.models.SqlPoolUsagePaged[~azure.mgmt.synapse.models.SqlPoolUsage] - :raises: :class:`CloudError` + :raises: + :class:`ErrorContractException` """ def prepare_request(next_link=None): if not next_link: @@ -102,9 +102,7 @@ def internal_paging(next_link=None): response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorContractException(self._deserialize, response) return response diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_vulnerability_assessment_rule_baselines_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_vulnerability_assessment_rule_baselines_operations.py index d032c532c8d2..67ed59fb57e5 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_vulnerability_assessment_rule_baselines_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_vulnerability_assessment_rule_baselines_operations.py @@ -186,7 +186,7 @@ def delete( request = self._client.delete(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200]: + if response.status_code not in [200, 204]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -195,3 +195,81 @@ def delete( client_raw_response = ClientRawResponse(None, response) return client_raw_response delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}'} + + def get( + self, resource_group_name, workspace_name, sql_pool_name, rule_id, baseline_name, custom_headers=None, raw=False, **operation_config): + """Gets a SqlPool's vulnerability assessment rule baseline. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace + :type workspace_name: str + :param sql_pool_name: SQL pool name + :type sql_pool_name: str + :param rule_id: The vulnerability assessment rule ID. + :type rule_id: str + :param baseline_name: The name of the vulnerability assessment rule + baseline (default implies a baseline on a Sql pool level rule and + master for server level rule). Possible values include: 'master', + 'default' + :type baseline_name: str or + ~azure.mgmt.synapse.models.VulnerabilityAssessmentPolicyBaselineName + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SqlPoolVulnerabilityAssessmentRuleBaseline or + ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.synapse.models.SqlPoolVulnerabilityAssessmentRuleBaseline + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), + 'vulnerabilityAssessmentName': self._serialize.url("self.vulnerability_assessment_name", self.vulnerability_assessment_name, 'str'), + 'ruleId': self._serialize.url("rule_id", rule_id, 'str'), + 'baselineName': self._serialize.url("baseline_name", baseline_name, 'VulnerabilityAssessmentPolicyBaselineName') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SqlPoolVulnerabilityAssessmentRuleBaseline', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}'} diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_vulnerability_assessment_scans_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_vulnerability_assessment_scans_operations.py index 127f1b45b025..60a6e649d562 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_vulnerability_assessment_scans_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_vulnerability_assessment_scans_operations.py @@ -287,3 +287,74 @@ def export( return deserialized export.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/export'} + + def get( + self, resource_group_name, workspace_name, sql_pool_name, scan_id, custom_headers=None, raw=False, **operation_config): + """Gets a vulnerability assessment scan record of a Sql pool. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace + :type workspace_name: str + :param sql_pool_name: SQL pool name + :type sql_pool_name: str + :param scan_id: The vulnerability assessment scan Id of the scan to + retrieve. + :type scan_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VulnerabilityAssessmentScanRecord or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.synapse.models.VulnerabilityAssessmentScanRecord + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), + 'vulnerabilityAssessmentName': self._serialize.url("self.vulnerability_assessment_name", self.vulnerability_assessment_name, 'str'), + 'scanId': self._serialize.url("scan_id", scan_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VulnerabilityAssessmentScanRecord', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}'} diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_vulnerability_assessments_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_vulnerability_assessments_operations.py index 8eae22c5cd15..28a3e2b1b27d 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_vulnerability_assessments_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_vulnerability_assessments_operations.py @@ -316,7 +316,7 @@ def delete( request = self._client.delete(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200]: + if response.status_code not in [200, 204]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_workload_classifier_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_workload_classifier_operations.py new file mode 100644 index 000000000000..f86fddf533a5 --- /dev/null +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_workload_classifier_operations.py @@ -0,0 +1,407 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class SqlPoolWorkloadClassifierOperations(object): + """SqlPoolWorkloadClassifierOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2019-06-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-06-01-preview" + + self.config = config + + def get( + self, resource_group_name, workspace_name, sql_pool_name, workload_group_name, workload_classifier_name, custom_headers=None, raw=False, **operation_config): + """Get workload classifier. + + Get a workload classifier of Sql pool's workload group. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace + :type workspace_name: str + :param sql_pool_name: SQL pool name + :type sql_pool_name: str + :param workload_group_name: The name of the workload group. + :type workload_group_name: str + :param workload_classifier_name: The name of the workload classifier. + :type workload_classifier_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WorkloadClassifier or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.synapse.models.WorkloadClassifier or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), + 'workloadGroupName': self._serialize.url("workload_group_name", workload_group_name, 'str'), + 'workloadClassifierName': self._serialize.url("workload_classifier_name", workload_classifier_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WorkloadClassifier', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/workloadGroups/{workloadGroupName}/workloadClassifiers/{workloadClassifierName}'} + + + def _create_or_update_initial( + self, resource_group_name, workspace_name, sql_pool_name, workload_group_name, workload_classifier_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), + 'workloadGroupName': self._serialize.url("workload_group_name", workload_group_name, 'str'), + 'workloadClassifierName': self._serialize.url("workload_classifier_name", workload_classifier_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'WorkloadClassifier') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('WorkloadClassifier', response) + if response.status_code == 201: + deserialized = self._deserialize('WorkloadClassifier', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, workspace_name, sql_pool_name, workload_group_name, workload_classifier_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Create Or Update workload classifier. + + Create Or Update workload classifier for a Sql pool's workload group. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace + :type workspace_name: str + :param sql_pool_name: SQL pool name + :type sql_pool_name: str + :param workload_group_name: The name of the workload group. + :type workload_group_name: str + :param workload_classifier_name: The name of the workload classifier. + :type workload_classifier_name: str + :param parameters: The properties of the workload classifier. + :type parameters: ~azure.mgmt.synapse.models.WorkloadClassifier + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns WorkloadClassifier or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.synapse.models.WorkloadClassifier] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.synapse.models.WorkloadClassifier]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + sql_pool_name=sql_pool_name, + workload_group_name=workload_group_name, + workload_classifier_name=workload_classifier_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('WorkloadClassifier', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/workloadGroups/{workloadGroupName}/workloadClassifiers/{workloadClassifierName}'} + + + def _delete_initial( + self, resource_group_name, workspace_name, sql_pool_name, workload_group_name, workload_classifier_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), + 'workloadGroupName': self._serialize.url("workload_group_name", workload_group_name, 'str'), + 'workloadClassifierName': self._serialize.url("workload_classifier_name", workload_classifier_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, workspace_name, sql_pool_name, workload_group_name, workload_classifier_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Remove workload classifier. + + Remove workload classifier of a Sql pool's workload group. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace + :type workspace_name: str + :param sql_pool_name: SQL pool name + :type sql_pool_name: str + :param workload_group_name: The name of the workload group. + :type workload_group_name: str + :param workload_classifier_name: The name of the workload classifier. + :type workload_classifier_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + sql_pool_name=sql_pool_name, + workload_group_name=workload_group_name, + workload_classifier_name=workload_classifier_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/workloadGroups/{workloadGroupName}/workloadClassifiers/{workloadClassifierName}'} + + def list( + self, resource_group_name, workspace_name, sql_pool_name, workload_group_name, custom_headers=None, raw=False, **operation_config): + """Sql pool's workload classifier. + + Get list of Sql pool's workload classifier for workload groups. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace + :type workspace_name: str + :param sql_pool_name: SQL pool name + :type sql_pool_name: str + :param workload_group_name: The name of the workload group. + :type workload_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of WorkloadClassifier + :rtype: + ~azure.mgmt.synapse.models.WorkloadClassifierPaged[~azure.mgmt.synapse.models.WorkloadClassifier] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), + 'workloadGroupName': self._serialize.url("workload_group_name", workload_group_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.WorkloadClassifierPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/workloadGroups/{workloadGroupName}/workloadClassifiers'} diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_workload_group_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_workload_group_operations.py new file mode 100644 index 000000000000..25b6974b8890 --- /dev/null +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pool_workload_group_operations.py @@ -0,0 +1,393 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class SqlPoolWorkloadGroupOperations(object): + """SqlPoolWorkloadGroupOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2019-06-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-06-01-preview" + + self.config = config + + def get( + self, resource_group_name, workspace_name, sql_pool_name, workload_group_name, custom_headers=None, raw=False, **operation_config): + """Sql pool's workload group. + + Get a Sql pool's workload group. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace + :type workspace_name: str + :param sql_pool_name: SQL pool name + :type sql_pool_name: str + :param workload_group_name: The name of the workload group. + :type workload_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WorkloadGroup or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.synapse.models.WorkloadGroup or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), + 'workloadGroupName': self._serialize.url("workload_group_name", workload_group_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WorkloadGroup', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/workloadGroups/{workloadGroupName}'} + + + def _create_or_update_initial( + self, resource_group_name, workspace_name, sql_pool_name, workload_group_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), + 'workloadGroupName': self._serialize.url("workload_group_name", workload_group_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'WorkloadGroup') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('WorkloadGroup', response) + if response.status_code == 201: + deserialized = self._deserialize('WorkloadGroup', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, workspace_name, sql_pool_name, workload_group_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Create Or Update workload group. + + Create Or Update a Sql pool's workload group. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace + :type workspace_name: str + :param sql_pool_name: SQL pool name + :type sql_pool_name: str + :param workload_group_name: The name of the workload group. + :type workload_group_name: str + :param parameters: The requested workload group state. + :type parameters: ~azure.mgmt.synapse.models.WorkloadGroup + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns WorkloadGroup or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.synapse.models.WorkloadGroup] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.synapse.models.WorkloadGroup]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + sql_pool_name=sql_pool_name, + workload_group_name=workload_group_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('WorkloadGroup', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/workloadGroups/{workloadGroupName}'} + + + def _delete_initial( + self, resource_group_name, workspace_name, sql_pool_name, workload_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str'), + 'workloadGroupName': self._serialize.url("workload_group_name", workload_group_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, workspace_name, sql_pool_name, workload_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Remove workload group. + + Remove Sql pool's workload group. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace + :type workspace_name: str + :param sql_pool_name: SQL pool name + :type sql_pool_name: str + :param workload_group_name: The name of the workload group. + :type workload_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + sql_pool_name=sql_pool_name, + workload_group_name=workload_group_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/workloadGroups/{workloadGroupName}'} + + def list( + self, resource_group_name, workspace_name, sql_pool_name, custom_headers=None, raw=False, **operation_config): + """Sql pool's workload groups. + + Get list of Sql pool's workload groups. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace + :type workspace_name: str + :param sql_pool_name: SQL pool name + :type sql_pool_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of WorkloadGroup + :rtype: + ~azure.mgmt.synapse.models.WorkloadGroupPaged[~azure.mgmt.synapse.models.WorkloadGroup] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'sqlPoolName': self._serialize.url("sql_pool_name", sql_pool_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.WorkloadGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/workloadGroups'} diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pools_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pools_operations.py index f0516d64e79f..d57651ddb6d7 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pools_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_sql_pools_operations.py @@ -62,7 +62,8 @@ def get( :return: SqlPool or ClientRawResponse if raw=true :rtype: ~azure.mgmt.synapse.models.SqlPool or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`ErrorContractException` """ # Construct URL url = self.get.metadata['url'] @@ -93,9 +94,7 @@ def get( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorContractException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -131,7 +130,8 @@ def update( :return: SqlPool or ClientRawResponse if raw=true :rtype: ~azure.mgmt.synapse.models.SqlPool or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`ErrorContractException` """ # Construct URL url = self.update.metadata['url'] @@ -165,10 +165,8 @@ def update( request = self._client.patch(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + if response.status_code not in [200]: + raise models.ErrorContractException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -405,7 +403,8 @@ def list_by_workspace( :return: An iterator like instance of SqlPool :rtype: ~azure.mgmt.synapse.models.SqlPoolPaged[~azure.mgmt.synapse.models.SqlPool] - :raises: :class:`CloudError` + :raises: + :class:`ErrorContractException` """ def prepare_request(next_link=None): if not next_link: @@ -446,9 +445,7 @@ def internal_paging(next_link=None): response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorContractException(self._deserialize, response) return response @@ -493,9 +490,7 @@ def _pause_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorContractException(self._deserialize, response) deserialized = None @@ -530,7 +525,8 @@ def pause( ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[object] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[object]] - :raises: :class:`CloudError` + :raises: + :class:`ErrorContractException` """ raw_result = self._pause_initial( resource_group_name=resource_group_name, @@ -591,9 +587,7 @@ def _resume_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorContractException(self._deserialize, response) deserialized = None @@ -628,7 +622,8 @@ def resume( ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[object] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[object]] - :raises: :class:`CloudError` + :raises: + :class:`ErrorContractException` """ raw_result = self._resume_initial( resource_group_name=resource_group_name, diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_aad_admins_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_aad_admins_operations.py index 5d7a534ec839..c5c7b882e89f 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_aad_admins_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_aad_admins_operations.py @@ -11,7 +11,6 @@ import uuid from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError from msrest.polling import LROPoller, NoPolling from msrestazure.polling.arm_polling import ARMPolling @@ -58,7 +57,8 @@ def get( :return: WorkspaceAadAdminInfo or ClientRawResponse if raw=true :rtype: ~azure.mgmt.synapse.models.WorkspaceAadAdminInfo or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`ErrorContractException` """ # Construct URL url = self.get.metadata['url'] @@ -88,9 +88,7 @@ def get( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorContractException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -235,7 +233,7 @@ def _delete_initial( request = self._client.delete(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 202]: + if response.status_code not in [200, 202, 204]: raise models.ErrorContractException(self._deserialize, response) if raw: diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_blob_auditing_policies_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_blob_auditing_policies_operations.py new file mode 100644 index 000000000000..3f1c195fa87e --- /dev/null +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_blob_auditing_policies_operations.py @@ -0,0 +1,182 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class WorkspaceManagedSqlServerBlobAuditingPoliciesOperations(object): + """WorkspaceManagedSqlServerBlobAuditingPoliciesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2019-06-01-preview". + :ivar blob_auditing_policy_name: The name of the blob auditing policy. Constant value: "default". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-06-01-preview" + self.blob_auditing_policy_name = "default" + + self.config = config + + def get( + self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): + """Get server's blob auditing policy. + + Get a workspace managed sql server's blob auditing policy. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace + :type workspace_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ServerBlobAuditingPolicy or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.synapse.models.ServerBlobAuditingPolicy or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'blobAuditingPolicyName': self._serialize.url("self.blob_auditing_policy_name", self.blob_auditing_policy_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ServerBlobAuditingPolicy', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/auditingSettings/{blobAuditingPolicyName}'} + + def list_by_workspace( + self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): + """List workspace server's blob auditing policies. + + List workspace managed sql server's blob auditing policies. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace + :type workspace_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ServerBlobAuditingPolicy + :rtype: + ~azure.mgmt.synapse.models.ServerBlobAuditingPolicyPaged[~azure.mgmt.synapse.models.ServerBlobAuditingPolicy] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_workspace.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ServerBlobAuditingPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_workspace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/auditingSettings'} diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_encryption_protector_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_encryption_protector_operations.py new file mode 100644 index 000000000000..1884e347d792 --- /dev/null +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_encryption_protector_operations.py @@ -0,0 +1,379 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class WorkspaceManagedSqlServerEncryptionProtectorOperations(object): + """WorkspaceManagedSqlServerEncryptionProtectorOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2019-06-01-preview". + :ivar encryption_protector_name: The name of the encryption protector. Constant value: "current". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-06-01-preview" + self.encryption_protector_name = "current" + + self.config = config + + def get( + self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): + """Get workspace server's encryption protector. + + Get workspace managed sql server's encryption protector. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace + :type workspace_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: EncryptionProtector or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.synapse.models.EncryptionProtector or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'encryptionProtectorName': self._serialize.url("self.encryption_protector_name", self.encryption_protector_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('EncryptionProtector', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/encryptionProtector/{encryptionProtectorName}'} + + + def _create_or_update_initial( + self, resource_group_name, workspace_name, server_key_type, server_key_name=None, custom_headers=None, raw=False, **operation_config): + parameters = models.EncryptionProtector(server_key_name=server_key_name, server_key_type=server_key_type) + + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'encryptionProtectorName': self._serialize.url("self.encryption_protector_name", self.encryption_protector_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'EncryptionProtector') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('EncryptionProtector', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, workspace_name, server_key_type, server_key_name=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Updates workspace server's encryption protector. + + Updates workspace managed sql server's encryption protector. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace + :type workspace_name: str + :param server_key_type: The encryption protector type like + 'ServiceManaged', 'AzureKeyVault'. Possible values include: + 'ServiceManaged', 'AzureKeyVault' + :type server_key_type: str or ~azure.mgmt.synapse.models.ServerKeyType + :param server_key_name: The name of the server key. + :type server_key_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns EncryptionProtector or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.synapse.models.EncryptionProtector] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.synapse.models.EncryptionProtector]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + server_key_type=server_key_type, + server_key_name=server_key_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('EncryptionProtector', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/encryptionProtector/{encryptionProtectorName}'} + + def list( + self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): + """Get list of encryption protectors for the server. + + Get list of encryption protectors for workspace managed sql server. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace + :type workspace_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of EncryptionProtector + :rtype: + ~azure.mgmt.synapse.models.EncryptionProtectorPaged[~azure.mgmt.synapse.models.EncryptionProtector] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.EncryptionProtectorPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/encryptionProtector'} + + + def _revalidate_initial( + self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.revalidate.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'encryptionProtectorName': self._serialize.url("self.encryption_protector_name", self.encryption_protector_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def revalidate( + self, resource_group_name, workspace_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Revalidates server's existing encryption protector. + + Revalidates workspace managed sql server's existing encryption + protector. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace + :type workspace_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._revalidate_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + revalidate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/encryptionProtector/{encryptionProtectorName}/revalidate'} diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_extended_blob_auditing_policies_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_extended_blob_auditing_policies_operations.py new file mode 100644 index 000000000000..98652de3ef07 --- /dev/null +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_extended_blob_auditing_policies_operations.py @@ -0,0 +1,292 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class WorkspaceManagedSqlServerExtendedBlobAuditingPoliciesOperations(object): + """WorkspaceManagedSqlServerExtendedBlobAuditingPoliciesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2019-06-01-preview". + :ivar blob_auditing_policy_name: The name of the blob auditing policy. Constant value: "default". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-06-01-preview" + self.blob_auditing_policy_name = "default" + + self.config = config + + def get( + self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): + """Get server's extended blob auditing policy. + + Get a workspace SQL server's extended blob auditing policy. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace + :type workspace_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ExtendedServerBlobAuditingPolicy or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.synapse.models.ExtendedServerBlobAuditingPolicy or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'blobAuditingPolicyName': self._serialize.url("self.blob_auditing_policy_name", self.blob_auditing_policy_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ExtendedServerBlobAuditingPolicy', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/extendedAuditingSettings/{blobAuditingPolicyName}'} + + + def _create_or_update_initial( + self, resource_group_name, workspace_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'blobAuditingPolicyName': self._serialize.url("self.blob_auditing_policy_name", self.blob_auditing_policy_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ExtendedServerBlobAuditingPolicy') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ExtendedServerBlobAuditingPolicy', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, workspace_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or Update server's extended blob auditing policy. + + Create or Update a workspace managed sql server's extended blob + auditing policy. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace + :type workspace_name: str + :param parameters: Properties of extended blob auditing policy. + :type parameters: + ~azure.mgmt.synapse.models.ExtendedServerBlobAuditingPolicy + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + ExtendedServerBlobAuditingPolicy or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.synapse.models.ExtendedServerBlobAuditingPolicy] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.synapse.models.ExtendedServerBlobAuditingPolicy]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('ExtendedServerBlobAuditingPolicy', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/extendedAuditingSettings/{blobAuditingPolicyName}'} + + def list_by_workspace( + self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): + """List server's extended blob auditing policies. + + List workspace managed sql server's extended blob auditing policies. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace + :type workspace_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ExtendedServerBlobAuditingPolicy + :rtype: + ~azure.mgmt.synapse.models.ExtendedServerBlobAuditingPolicyPaged[~azure.mgmt.synapse.models.ExtendedServerBlobAuditingPolicy] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_workspace.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ExtendedServerBlobAuditingPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_workspace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/extendedAuditingSettings'} diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_recoverable_sqlpools_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_recoverable_sqlpools_operations.py new file mode 100644 index 000000000000..05e11100f599 --- /dev/null +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_recoverable_sqlpools_operations.py @@ -0,0 +1,182 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class WorkspaceManagedSqlServerRecoverableSqlpoolsOperations(object): + """WorkspaceManagedSqlServerRecoverableSqlpoolsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2019-06-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-06-01-preview" + + self.config = config + + def list( + self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): + """Get list of recoverable sql pools for the server. + + Get list of recoverable sql pools for workspace managed sql server. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace + :type workspace_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of RecoverableSqlPool + :rtype: + ~azure.mgmt.synapse.models.RecoverableSqlPoolPaged[~azure.mgmt.synapse.models.RecoverableSqlPool] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.RecoverableSqlPoolPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/recoverableSqlpools'} + + def get( + self, resource_group_name, workspace_name, sql_compute_name, custom_headers=None, raw=False, **operation_config): + """Get recoverable sql pools for the server. + + Get recoverable sql pools for workspace managed sql server. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace + :type workspace_name: str + :param sql_compute_name: The name of the sql compute + :type sql_compute_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RecoverableSqlPool or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.synapse.models.RecoverableSqlPool or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'sqlComputeName': self._serialize.url("sql_compute_name", sql_compute_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('RecoverableSqlPool', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/recoverableSqlPools/{sqlComputeName}'} diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_security_alert_policy_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_security_alert_policy_operations.py new file mode 100644 index 000000000000..42ad059d72a3 --- /dev/null +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_security_alert_policy_operations.py @@ -0,0 +1,291 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class WorkspaceManagedSqlServerSecurityAlertPolicyOperations(object): + """WorkspaceManagedSqlServerSecurityAlertPolicyOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2019-06-01-preview". + :ivar security_alert_policy_name: The name of the security alert policy. Constant value: "Default". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-06-01-preview" + self.security_alert_policy_name = "Default" + + self.config = config + + def get( + self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): + """Get server's security alert policy. + + Get a workspace managed sql server's security alert policy. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace + :type workspace_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ServerSecurityAlertPolicy or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.synapse.models.ServerSecurityAlertPolicy or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'securityAlertPolicyName': self._serialize.url("self.security_alert_policy_name", self.security_alert_policy_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ServerSecurityAlertPolicy', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/securityAlertPolicies/{securityAlertPolicyName}'} + + + def _create_or_update_initial( + self, resource_group_name, workspace_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'securityAlertPolicyName': self._serialize.url("self.security_alert_policy_name", self.security_alert_policy_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ServerSecurityAlertPolicy') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ServerSecurityAlertPolicy', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, workspace_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or Update server's threat detection policy. + + Create or Update a workspace managed sql server's threat detection + policy. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace + :type workspace_name: str + :param parameters: The workspace managed sql server security alert + policy. + :type parameters: ~azure.mgmt.synapse.models.ServerSecurityAlertPolicy + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + ServerSecurityAlertPolicy or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.synapse.models.ServerSecurityAlertPolicy] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.synapse.models.ServerSecurityAlertPolicy]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('ServerSecurityAlertPolicy', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/securityAlertPolicies/{securityAlertPolicyName}'} + + def list( + self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): + """Get server's threat detection policies. + + Get workspace managed sql server's threat detection policies. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace + :type workspace_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ServerSecurityAlertPolicy + :rtype: + ~azure.mgmt.synapse.models.ServerSecurityAlertPolicyPaged[~azure.mgmt.synapse.models.ServerSecurityAlertPolicy] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ServerSecurityAlertPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/securityAlertPolicies'} diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_usages_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_usages_operations.py new file mode 100644 index 000000000000..c2a7fcb6577e --- /dev/null +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_usages_operations.py @@ -0,0 +1,115 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class WorkspaceManagedSqlServerUsagesOperations(object): + """WorkspaceManagedSqlServerUsagesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2019-06-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-06-01-preview" + + self.config = config + + def list( + self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): + """Get list of usages metric for the server. + + Get list of server usages metric for workspace managed sql server. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace + :type workspace_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ServerUsage + :rtype: + ~azure.mgmt.synapse.models.ServerUsagePaged[~azure.mgmt.synapse.models.ServerUsage] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ServerUsagePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlUsages'} diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_vulnerability_assessments_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_vulnerability_assessments_operations.py new file mode 100644 index 000000000000..f96a81a07fb7 --- /dev/null +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managed_sql_server_vulnerability_assessments_operations.py @@ -0,0 +1,317 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class WorkspaceManagedSqlServerVulnerabilityAssessmentsOperations(object): + """WorkspaceManagedSqlServerVulnerabilityAssessmentsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2019-06-01-preview". + :ivar vulnerability_assessment_name: The name of the vulnerability assessment. Constant value: "default". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-06-01-preview" + self.vulnerability_assessment_name = "default" + + self.config = config + + def get( + self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): + """Get server's vulnerability assessment. + + Get workspace managed sql server's vulnerability assessment. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace + :type workspace_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ServerVulnerabilityAssessment or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.synapse.models.ServerVulnerabilityAssessment or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'vulnerabilityAssessmentName': self._serialize.url("self.vulnerability_assessment_name", self.vulnerability_assessment_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ServerVulnerabilityAssessment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}'} + + def create_or_update( + self, resource_group_name, workspace_name, parameters, custom_headers=None, raw=False, **operation_config): + """Create or Update server's vulnerability assessment. + + Create or Update workspace managed sql server's vulnerability + assessment. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace + :type workspace_name: str + :param parameters: Properties for vulnerability assessment. + :type parameters: + ~azure.mgmt.synapse.models.ServerVulnerabilityAssessment + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ServerVulnerabilityAssessment or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.synapse.models.ServerVulnerabilityAssessment or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'vulnerabilityAssessmentName': self._serialize.url("self.vulnerability_assessment_name", self.vulnerability_assessment_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ServerVulnerabilityAssessment') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ServerVulnerabilityAssessment', response) + if response.status_code == 201: + deserialized = self._deserialize('ServerVulnerabilityAssessment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}'} + + def delete( + self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): + """Remove server's vulnerability assessment. + + Remove workspace managed sql server's vulnerability assessment. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace + :type workspace_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'vulnerabilityAssessmentName': self._serialize.url("self.vulnerability_assessment_name", self.vulnerability_assessment_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}'} + + def list( + self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): + """Lists the vulnerability assessment policies associated with a server. + + Lists the vulnerability assessment policies associated with a workspace + managed sql server. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace + :type workspace_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ServerVulnerabilityAssessment + :rtype: + ~azure.mgmt.synapse.models.ServerVulnerabilityAssessmentPaged[~azure.mgmt.synapse.models.ServerVulnerabilityAssessment] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ServerVulnerabilityAssessmentPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/vulnerabilityAssessments'} diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managedql_server_blob_auditing_policies_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managedql_server_blob_auditing_policies_operations.py new file mode 100644 index 000000000000..1ea7ad2f8cef --- /dev/null +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_managedql_server_blob_auditing_policies_operations.py @@ -0,0 +1,149 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class WorkspaceManagedqlServerBlobAuditingPoliciesOperations(object): + """WorkspaceManagedqlServerBlobAuditingPoliciesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2019-06-01-preview". + :ivar blob_auditing_policy_name: The name of the blob auditing policy. Constant value: "default". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-06-01-preview" + self.blob_auditing_policy_name = "default" + + self.config = config + + + def _create_or_update_initial( + self, resource_group_name, workspace_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'blobAuditingPolicyName': self._serialize.url("self.blob_auditing_policy_name", self.blob_auditing_policy_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ServerBlobAuditingPolicy') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ServerBlobAuditingPolicy', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, workspace_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or Update server's blob auditing policy. + + Create or Update a workspace managed sql server's blob auditing policy. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace + :type workspace_name: str + :param parameters: Properties of extended blob auditing policy. + :type parameters: ~azure.mgmt.synapse.models.ServerBlobAuditingPolicy + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + ServerBlobAuditingPolicy or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.synapse.models.ServerBlobAuditingPolicy] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.synapse.models.ServerBlobAuditingPolicy]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('ServerBlobAuditingPolicy', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/auditingSettings/{blobAuditingPolicyName}'} diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_sql_aad_admins_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_sql_aad_admins_operations.py new file mode 100644 index 000000000000..83cd393bb491 --- /dev/null +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspace_sql_aad_admins_operations.py @@ -0,0 +1,284 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class WorkspaceSqlAadAdminsOperations(object): + """WorkspaceSqlAadAdminsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2019-06-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-06-01-preview" + + self.config = config + + def get( + self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): + """Gets a workspace SQL active directory admin. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace + :type workspace_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WorkspaceAadAdminInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.synapse.models.WorkspaceAadAdminInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorContractException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorContractException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WorkspaceAadAdminInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlAdministrators/activeDirectory'} + + + def _create_or_update_initial( + self, resource_group_name, workspace_name, aad_admin_info, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(aad_admin_info, 'WorkspaceAadAdminInfo') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.ErrorContractException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('WorkspaceAadAdminInfo', response) + if response.status_code == 202: + deserialized = self._deserialize('WorkspaceAadAdminInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, workspace_name, aad_admin_info, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates or updates a workspace SQL active directory admin. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace + :type workspace_name: str + :param aad_admin_info: Workspace active directory administrator + properties + :type aad_admin_info: ~azure.mgmt.synapse.models.WorkspaceAadAdminInfo + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns WorkspaceAadAdminInfo + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.synapse.models.WorkspaceAadAdminInfo] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.synapse.models.WorkspaceAadAdminInfo]] + :raises: + :class:`ErrorContractException` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + aad_admin_info=aad_admin_info, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('WorkspaceAadAdminInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlAdministrators/activeDirectory'} + + + def _delete_initial( + self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + raise models.ErrorContractException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, workspace_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes a workspace SQL active directory admin. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace + :type workspace_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`ErrorContractException` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlAdministrators/activeDirectory'} diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspaces_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspaces_operations.py index 54c4310548e0..9b4aa1c3d02a 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspaces_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_workspaces_operations.py @@ -11,7 +11,6 @@ import uuid from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError from msrest.polling import LROPoller, NoPolling from msrestazure.polling.arm_polling import ARMPolling @@ -56,7 +55,8 @@ def list_by_resource_group( :return: An iterator like instance of Workspace :rtype: ~azure.mgmt.synapse.models.WorkspacePaged[~azure.mgmt.synapse.models.Workspace] - :raises: :class:`CloudError` + :raises: + :class:`ErrorContractException` """ def prepare_request(next_link=None): if not next_link: @@ -96,9 +96,7 @@ def internal_paging(next_link=None): response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorContractException(self._deserialize, response) return response @@ -482,7 +480,8 @@ def list( :return: An iterator like instance of Workspace :rtype: ~azure.mgmt.synapse.models.WorkspacePaged[~azure.mgmt.synapse.models.Workspace] - :raises: :class:`CloudError` + :raises: + :class:`ErrorContractException` """ def prepare_request(next_link=None): if not next_link: @@ -521,9 +520,7 @@ def internal_paging(next_link=None): response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorContractException(self._deserialize, response) return response