diff --git a/sdk/kusto/azure-mgmt-kusto/CHANGELOG.md b/sdk/kusto/azure-mgmt-kusto/CHANGELOG.md index 8051be2782a7..c2fa3704f9d8 100644 --- a/sdk/kusto/azure-mgmt-kusto/CHANGELOG.md +++ b/sdk/kusto/azure-mgmt-kusto/CHANGELOG.md @@ -1,5 +1,81 @@ # Release History +## 3.5.0 (2026-05-28) + +### Features Added + + - Client `KustoManagementClient` added method `send_request` + - Model `AttachedDatabaseConfiguration` added property `system_data` + - Model `AttachedDatabaseConfigurationsCheckNameRequest` added property `type` + - Model `ClusterCheckNameRequest` added property `type` + - Model `ClusterPrincipalAssignment` added property `system_data` + - Model `ClusterPrincipalAssignmentCheckNameRequest` added property `type` + - Model `ClusterUpdate` added property `system_data` + - Model `CosmosDbDataConnection` added property `system_data` + - Model `DataConnection` added property `system_data` + - Model `DataConnectionCheckNameRequest` added property `type` + - Model `Database` added property `system_data` + - Model `DatabasePrincipalAssignment` added property `system_data` + - Model `DatabasePrincipalAssignmentCheckNameRequest` added property `type` + - Model `DatabasePrincipalListResult` added property `next_link` + - Model `EventGridDataConnection` added property `system_data` + - Model `EventGridDataConnectionWithManagedIdentity` added property `system_data` + - Model `EventHubDataConnection` added property `system_data` + - Model `EventHubDataConnectionWithManagedIdentity` added property `system_data` + - Model `IotHubDataConnection` added property `system_data` + - Model `LanguageExtensionsList` added property `next_link` + - Model `ManagedPrivateEndpointsCheckNameRequest` added property `type` + - Model `OperationResult` added property `error` + - Model `OutboundNetworkDependenciesEndpoint` added property `system_data` + - Model `ProxyResource` added property `system_data` + - Model `ReadOnlyFollowingDatabase` added property `system_data` + - Model `ReadWriteDatabase` added property `system_data` + - Model `Resource` added property `system_data` + - Model `SandboxCustomImage` added property `system_data` + - Model `SandboxCustomImagesCheckNameRequest` added property `type` + - Model `ScriptCheckNameRequest` added property `type` + - Model `TrackedResource` added property `system_data` + - Added model `OperationResultErrorProperties` + +### Breaking Changes + + - This version introduces new hybrid models which have dual dictionary and model nature. Please follow https://aka.ms/azsdk/python/migrate/hybrid-models for migration. + - For the method breakings, please refer to https://aka.ms/azsdk/python/migrate/operations for migration. + - Model `ClusterPrincipalAssignment` moved instance variable `principal_id`, `role`, `tenant_id`, `principal_type`, `tenant_name`, `principal_name`, `provisioning_state` and `aad_object_id` under property `properties` whose type is `ClusterPrincipalProperties` + - Model `ClusterUpdate` moved instance variable `state`, `provisioning_state`, `uri`, `data_ingestion_uri`, `state_reason`, `trusted_external_tenants`, `optimized_autoscale`, `enable_disk_encryption`, `enable_streaming_ingest`, `virtual_network_configuration`, `key_vault_properties`, `enable_purge`, `language_extensions`, `enable_double_encryption`, `public_network_access`, `allowed_ip_range_list`, `engine_type`, `accepted_audiences`, `enable_auto_stop`, `restrict_outbound_network_access`, `allowed_fqdn_list`, `callout_policies`, `public_ip_type`, `virtual_cluster_graduation_properties`, `private_endpoint_connections`, `migration_cluster` and `zone_status` under property `properties` whose type is `ClusterProperties` + - Model `DatabasePrincipalAssignment` moved instance variable `principal_id`, `role`, `tenant_id`, `principal_type`, `tenant_name`, `principal_name`, `provisioning_state` and `aad_object_id` under property `properties` whose type is `DatabasePrincipalProperties` + - Model `EventGridDataConnection` moved instance variable `storage_account_resource_id`, `event_grid_resource_id`, `event_hub_resource_id`, `consumer_group`, `table_name`, `mapping_rule_name`, `data_format`, `ignore_first_record`, `blob_storage_event_type`, `managed_identity_resource_id`, `managed_identity_object_id`, `database_routing` and `provisioning_state` under property `properties` whose type is `EventGridConnectionProperties` + - Model `EventGridDataConnectionWithManagedIdentity` moved instance variable `storage_account_resource_id_for_managed_identity`, `event_hub_resource_id_for_managed_identity`, `event_grid_resource_id`, `consumer_group`, `table_name`, `mapping_rule_name`, `data_format`, `ignore_first_record`, `blob_storage_event_type`, `managed_identity_resource_id`, `managed_identity_object_id`, `database_routing` and `provisioning_state` under property `properties` whose type is `EventGridConnectionWithManagedIdentityProperties` + - Model `EventHubDataConnection` moved instance variable `event_hub_resource_id`, `consumer_group`, `table_name`, `mapping_rule_name`, `data_format`, `event_system_properties`, `compression`, `provisioning_state`, `managed_identity_resource_id`, `managed_identity_object_id`, `database_routing` and `retrieval_start_date` under property `properties` whose type is `EventHubConnectionProperties` + - Model `EventHubDataConnectionWithManagedIdentity` moved instance variable `event_hub_resource_id_for_managed_identity`, `consumer_group`, `table_name`, `mapping_rule_name`, `data_format`, `event_system_properties`, `compression`, `provisioning_state`, `managed_identity_resource_id`, `managed_identity_object_id`, `database_routing` and `retrieval_start_date` under property `properties` whose type is `EventHubConnectionWithManagedIdentityProperties` + - Model `FollowerDatabaseDefinitionGet` moved instance variable `cluster_resource_id`, `attached_database_configuration_name`, `database_name`, `table_level_sharing_properties` and `database_share_origin` under property `properties` whose type is `FollowerDatabaseProperties` + - Model `IotHubDataConnection` moved instance variable `iot_hub_resource_id`, `consumer_group`, `table_name`, `mapping_rule_name`, `data_format`, `event_system_properties`, `shared_access_policy_name`, `database_routing`, `retrieval_start_date` and `provisioning_state` under property `properties` whose type is `IotHubConnectionProperties` + - Deleted or renamed model `IssueType` + - Deleted or renamed model `NetworkSecurityPerimeter` + - Deleted or renamed model `NetworkSecurityPerimeterConfiguration` + - Deleted or renamed model `NetworkSecurityPerimeterConfigurationPropertiesProfile` + - Deleted or renamed model `NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation` + - Deleted or renamed model `NetworkSecurityPerimeterConfigurationProvisioningState` + - Deleted or renamed model `NspAccessRule` + - Deleted or renamed model `NspAccessRuleDirection` + - Deleted or renamed model `NspAccessRuleProperties` + - Deleted or renamed model `NspAccessRulePropertiesSubscriptionsItem` + - Deleted or renamed model `ProvisioningIssue` + - Deleted or renamed model `ProvisioningIssueProperties` + - Deleted or renamed model `ResourceAssociationAccessMode` + - Deleted or renamed model `Severity` + - Method `ClustersOperations.begin_create_or_update` replaced positional_or_keyword parameters `if_match`/`if_none_match` with keyword_only parameters `etag`/`match_condition` + - Method `ClustersOperations.begin_update` replaced positional_or_keyword parameter `if_match` with keyword_only parameters `etag`/`match_condition` + - Parameter `caller_role` of method `DatabasesOperations.begin_create_or_update` is now optional + - Method `DatabasesOperations.begin_create_or_update` changed its parameter `caller_role` from `positional_or_keyword` to `keyword_only` + - Parameter `caller_role` of method `DatabasesOperations.begin_update` is now optional + - Method `DatabasesOperations.begin_update` changed its parameter `caller_role` from `positional_or_keyword` to `keyword_only` + - Method `DatabasesOperations.list_by_cluster` changed its parameter `skiptoken` from `positional_or_keyword` to `keyword_only` + +### Other Changes + + - Deleted model `FollowerDatabaseListResultGet`/`ListResourceSkusResult`/`NetworkSecurityPerimeterConfigurationList`/`SkuDescriptionList` which actually were not used by SDK users + ## 3.4.0 (2024-01-24) ### Features Added diff --git a/sdk/kusto/azure-mgmt-kusto/MANIFEST.in b/sdk/kusto/azure-mgmt-kusto/MANIFEST.in index 402c06eaea27..0ff23cd66586 100644 --- a/sdk/kusto/azure-mgmt-kusto/MANIFEST.in +++ b/sdk/kusto/azure-mgmt-kusto/MANIFEST.in @@ -1,8 +1,7 @@ -include _meta.json -recursive-include tests *.py *.json -recursive-include samples *.py *.md include *.md -include azure/__init__.py -include azure/mgmt/__init__.py include LICENSE include azure/mgmt/kusto/py.typed +recursive-include tests *.py +recursive-include samples *.py *.md +include azure/__init__.py +include azure/mgmt/__init__.py diff --git a/sdk/kusto/azure-mgmt-kusto/README.md b/sdk/kusto/azure-mgmt-kusto/README.md index b1d6aa215636..ff15cc784c7b 100644 --- a/sdk/kusto/azure-mgmt-kusto/README.md +++ b/sdk/kusto/azure-mgmt-kusto/README.md @@ -1,7 +1,7 @@ # Microsoft Azure SDK for Python This is the Microsoft Azure Kusto Management Client Library. -This package has been tested with Python 3.8+. +This package has been tested with Python 3.10+. For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all). ## _Disclaimer_ @@ -12,7 +12,7 @@ _Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For ### Prerequisites -- Python 3.8+ is required to use this package. +- Python 3.10+ is required to use this package. - [Azure subscription](https://azure.microsoft.com/free/) ### Install the package @@ -24,7 +24,7 @@ pip install azure-identity ### Authentication -By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configure of following environment variables. +By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configuration of the following environment variables. - `AZURE_CLIENT_ID` for Azure client ID. - `AZURE_TENANT_ID` for Azure tenant ID. diff --git a/sdk/kusto/azure-mgmt-kusto/_meta.json b/sdk/kusto/azure-mgmt-kusto/_meta.json deleted file mode 100644 index 2bce43c3b79a..000000000000 --- a/sdk/kusto/azure-mgmt-kusto/_meta.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "commit": "63d36000794ed89006cda8588861a2ae7ed96bdc", - "repository_url": "https://github.com/Azure/azure-rest-api-specs", - "autorest": "3.10.2", - "use": [ - "@autorest/python@6.27.4", - "@autorest/modelerfour@4.27.0" - ], - "autorest_command": "autorest specification/azure-kusto/resource-manager/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.27.4 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False", - "readme": "specification/azure-kusto/resource-manager/readme.md" -} \ No newline at end of file diff --git a/sdk/kusto/azure-mgmt-kusto/_metadata.json b/sdk/kusto/azure-mgmt-kusto/_metadata.json new file mode 100644 index 000000000000..1e7dc6d39e96 --- /dev/null +++ b/sdk/kusto/azure-mgmt-kusto/_metadata.json @@ -0,0 +1,10 @@ +{ + "apiVersion": "2025-02-14", + "apiVersions": { + "Microsoft.Kusto": "2025-02-14" + }, + "commit": "7089f3d2a4ed7e765d66f5f5e3be0b8b1eed6c1a", + "repository_url": "https://github.com/Azure/azure-rest-api-specs", + "typespec_src": "specification/azure-kusto/resource-manager/Microsoft.Kusto/Kusto", + "emitterVersion": "0.62.1" +} \ No newline at end of file diff --git a/sdk/kusto/azure-mgmt-kusto/apiview-properties.json b/sdk/kusto/azure-mgmt-kusto/apiview-properties.json new file mode 100644 index 000000000000..3e6f35a4f645 --- /dev/null +++ b/sdk/kusto/azure-mgmt-kusto/apiview-properties.json @@ -0,0 +1,313 @@ +{ + "CrossLanguagePackageId": "Microsoft.Kusto", + "CrossLanguageDefinitionId": { + "azure.mgmt.kusto.models.AcceptedAudiences": "Microsoft.Kusto.AcceptedAudiences", + "azure.mgmt.kusto.models.Resource": "Azure.ResourceManager.CommonTypes.Resource", + "azure.mgmt.kusto.models.ProxyResource": "Azure.ResourceManager.CommonTypes.ProxyResource", + "azure.mgmt.kusto.models.AttachedDatabaseConfiguration": "Microsoft.Kusto.AttachedDatabaseConfiguration", + "azure.mgmt.kusto.models.AttachedDatabaseConfigurationProperties": "Microsoft.Kusto.AttachedDatabaseConfigurationProperties", + "azure.mgmt.kusto.models.AttachedDatabaseConfigurationsCheckNameRequest": "Microsoft.Kusto.AttachedDatabaseConfigurationsCheckNameRequest", + "azure.mgmt.kusto.models.AzureCapacity": "Microsoft.Kusto.AzureCapacity", + "azure.mgmt.kusto.models.AzureResourceSku": "Microsoft.Kusto.AzureResourceSku", + "azure.mgmt.kusto.models.AzureSku": "Microsoft.Kusto.AzureSku", + "azure.mgmt.kusto.models.CalloutPoliciesList": "Microsoft.Kusto.CalloutPoliciesList", + "azure.mgmt.kusto.models.CalloutPolicy": "Microsoft.Kusto.CalloutPolicy", + "azure.mgmt.kusto.models.CalloutPolicyToRemove": "Microsoft.Kusto.CalloutPolicyToRemove", + "azure.mgmt.kusto.models.CheckNameRequest": "Microsoft.Kusto.CheckNameRequest", + "azure.mgmt.kusto.models.CheckNameResult": "Microsoft.Kusto.CheckNameResult", + "azure.mgmt.kusto.models.TrackedResource": "Azure.ResourceManager.CommonTypes.TrackedResource", + "azure.mgmt.kusto.models.Cluster": "Microsoft.Kusto.Cluster", + "azure.mgmt.kusto.models.ClusterCheckNameRequest": "Microsoft.Kusto.ClusterCheckNameRequest", + "azure.mgmt.kusto.models.ClusterMigrateRequest": "Microsoft.Kusto.ClusterMigrateRequest", + "azure.mgmt.kusto.models.ClusterPrincipalAssignment": "Microsoft.Kusto.ClusterPrincipalAssignment", + "azure.mgmt.kusto.models.ClusterPrincipalAssignmentCheckNameRequest": "Microsoft.Kusto.ClusterPrincipalAssignmentCheckNameRequest", + "azure.mgmt.kusto.models.ClusterPrincipalProperties": "Microsoft.Kusto.ClusterPrincipalProperties", + "azure.mgmt.kusto.models.ClusterProperties": "Microsoft.Kusto.ClusterProperties", + "azure.mgmt.kusto.models.ClusterUpdate": "Microsoft.Kusto.ClusterUpdate", + "azure.mgmt.kusto.models.ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties": "Microsoft.Kusto.ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties", + "azure.mgmt.kusto.models.DataConnection": "Microsoft.Kusto.DataConnection", + "azure.mgmt.kusto.models.CosmosDbDataConnection": "Microsoft.Kusto.CosmosDbDataConnection", + "azure.mgmt.kusto.models.CosmosDbDataConnectionProperties": "Microsoft.Kusto.CosmosDbDataConnectionProperties", + "azure.mgmt.kusto.models.Database": "Microsoft.Kusto.Database", + "azure.mgmt.kusto.models.DatabaseInviteFollowerRequest": "Microsoft.Kusto.DatabaseInviteFollowerRequest", + "azure.mgmt.kusto.models.DatabaseInviteFollowerResult": "Microsoft.Kusto.DatabaseInviteFollowerResult", + "azure.mgmt.kusto.models.DatabasePrincipal": "Microsoft.Kusto.DatabasePrincipal", + "azure.mgmt.kusto.models.DatabasePrincipalAssignment": "Microsoft.Kusto.DatabasePrincipalAssignment", + "azure.mgmt.kusto.models.DatabasePrincipalAssignmentCheckNameRequest": "Microsoft.Kusto.DatabasePrincipalAssignmentCheckNameRequest", + "azure.mgmt.kusto.models.DatabasePrincipalListRequest": "Microsoft.Kusto.DatabasePrincipalListRequest", + "azure.mgmt.kusto.models.DatabasePrincipalListResult": "Microsoft.Kusto.DatabasePrincipalListResult", + "azure.mgmt.kusto.models.DatabasePrincipalProperties": "Microsoft.Kusto.DatabasePrincipalProperties", + "azure.mgmt.kusto.models.DatabaseStatistics": "Microsoft.Kusto.DatabaseStatistics", + "azure.mgmt.kusto.models.DataConnectionCheckNameRequest": "Microsoft.Kusto.DataConnectionCheckNameRequest", + "azure.mgmt.kusto.models.DataConnectionValidation": "Microsoft.Kusto.DataConnectionValidation", + "azure.mgmt.kusto.models.DataConnectionValidationListResult": "Microsoft.Kusto.DataConnectionValidationListResult", + "azure.mgmt.kusto.models.DataConnectionValidationResult": "Microsoft.Kusto.DataConnectionValidationResult", + "azure.mgmt.kusto.models.DiagnoseVirtualNetworkResult": "Microsoft.Kusto.DiagnoseVirtualNetworkResult", + "azure.mgmt.kusto.models.EndpointDependency": "Microsoft.Kusto.EndpointDependency", + "azure.mgmt.kusto.models.EndpointDetail": "Microsoft.Kusto.EndpointDetail", + "azure.mgmt.kusto.models.ErrorAdditionalInfo": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo", + "azure.mgmt.kusto.models.ErrorDetail": "Azure.ResourceManager.CommonTypes.ErrorDetail", + "azure.mgmt.kusto.models.ErrorResponse": "Azure.ResourceManager.CommonTypes.ErrorResponse", + "azure.mgmt.kusto.models.EventGridConnectionProperties": "Microsoft.Kusto.EventGridConnectionProperties", + "azure.mgmt.kusto.models.EventGridConnectionWithManagedIdentityProperties": "Microsoft.Kusto.EventGridConnectionWithManagedIdentityProperties", + "azure.mgmt.kusto.models.EventGridDataConnection": "Microsoft.Kusto.EventGridDataConnection", + "azure.mgmt.kusto.models.EventGridDataConnectionWithManagedIdentity": "Microsoft.Kusto.EventGridDataConnectionWithManagedIdentity", + "azure.mgmt.kusto.models.EventHubConnectionProperties": "Microsoft.Kusto.EventHubConnectionProperties", + "azure.mgmt.kusto.models.EventHubConnectionWithManagedIdentityProperties": "Microsoft.Kusto.EventHubConnectionWithManagedIdentityProperties", + "azure.mgmt.kusto.models.EventHubDataConnection": "Microsoft.Kusto.EventHubDataConnection", + "azure.mgmt.kusto.models.EventHubDataConnectionWithManagedIdentity": "Microsoft.Kusto.EventHubDataConnectionWithManagedIdentity", + "azure.mgmt.kusto.models.FollowerDatabaseDefinition": "Microsoft.Kusto.FollowerDatabaseDefinition", + "azure.mgmt.kusto.models.FollowerDatabaseDefinitionGet": "Microsoft.Kusto.FollowerDatabaseDefinitionGet", + "azure.mgmt.kusto.models.FollowerDatabaseProperties": "Microsoft.Kusto.FollowerDatabaseProperties", + "azure.mgmt.kusto.models.Identity": "Microsoft.Kusto.Identity", + "azure.mgmt.kusto.models.IotHubConnectionProperties": "Microsoft.Kusto.IotHubConnectionProperties", + "azure.mgmt.kusto.models.IotHubDataConnection": "Microsoft.Kusto.IotHubDataConnection", + "azure.mgmt.kusto.models.KeyVaultProperties": "Microsoft.Kusto.KeyVaultProperties", + "azure.mgmt.kusto.models.LanguageExtension": "Microsoft.Kusto.LanguageExtension", + "azure.mgmt.kusto.models.LanguageExtensionsList": "Microsoft.Kusto.LanguageExtensionsList", + "azure.mgmt.kusto.models.ManagedPrivateEndpoint": "Microsoft.Kusto.ManagedPrivateEndpoint", + "azure.mgmt.kusto.models.ManagedPrivateEndpointProperties": "Microsoft.Kusto.ManagedPrivateEndpointProperties", + "azure.mgmt.kusto.models.ManagedPrivateEndpointsCheckNameRequest": "Microsoft.Kusto.ManagedPrivateEndpointsCheckNameRequest", + "azure.mgmt.kusto.models.MigrationClusterProperties": "Microsoft.Kusto.MigrationClusterProperties", + "azure.mgmt.kusto.models.Operation": "Microsoft.Kusto.Operation", + "azure.mgmt.kusto.models.OperationDisplay": "Microsoft.Kusto.OperationDisplay", + "azure.mgmt.kusto.models.OperationResult": "Microsoft.Kusto.OperationResult", + "azure.mgmt.kusto.models.OperationResultErrorProperties": "Microsoft.Kusto.OperationResultErrorProperties", + "azure.mgmt.kusto.models.OperationResultProperties": "Microsoft.Kusto.OperationResultProperties", + "azure.mgmt.kusto.models.OptimizedAutoscale": "Microsoft.Kusto.OptimizedAutoscale", + "azure.mgmt.kusto.models.OutboundNetworkDependenciesEndpoint": "Microsoft.Kusto.OutboundNetworkDependenciesEndpoint", + "azure.mgmt.kusto.models.OutboundNetworkDependenciesEndpointProperties": "Microsoft.Kusto.OutboundNetworkDependenciesEndpointProperties", + "azure.mgmt.kusto.models.PrivateEndpointConnection": "Microsoft.Kusto.PrivateEndpointConnection", + "azure.mgmt.kusto.models.PrivateEndpointConnectionProperties": "Microsoft.Kusto.PrivateEndpointConnectionProperties", + "azure.mgmt.kusto.models.PrivateEndpointProperty": "Microsoft.Kusto.PrivateEndpointProperty", + "azure.mgmt.kusto.models.PrivateLinkResource": "Microsoft.Kusto.PrivateLinkResource", + "azure.mgmt.kusto.models.PrivateLinkResourceProperties": "Microsoft.Kusto.PrivateLinkResourceProperties", + "azure.mgmt.kusto.models.PrivateLinkServiceConnectionStateProperty": "Microsoft.Kusto.PrivateLinkServiceConnectionStateProperty", + "azure.mgmt.kusto.models.ReadOnlyFollowingDatabase": "Microsoft.Kusto.ReadOnlyFollowingDatabase", + "azure.mgmt.kusto.models.ReadOnlyFollowingDatabaseProperties": "Microsoft.Kusto.ReadOnlyFollowingDatabaseProperties", + "azure.mgmt.kusto.models.ReadWriteDatabase": "Microsoft.Kusto.ReadWriteDatabase", + "azure.mgmt.kusto.models.ReadWriteDatabaseProperties": "Microsoft.Kusto.ReadWriteDatabaseProperties", + "azure.mgmt.kusto.models.ResourceSkuCapabilities": "Microsoft.Kusto.ResourceSkuCapabilities", + "azure.mgmt.kusto.models.ResourceSkuZoneDetails": "Microsoft.Kusto.ResourceSkuZoneDetails", + "azure.mgmt.kusto.models.SandboxCustomImage": "Microsoft.Kusto.SandboxCustomImage", + "azure.mgmt.kusto.models.SandboxCustomImageProperties": "Microsoft.Kusto.SandboxCustomImageProperties", + "azure.mgmt.kusto.models.SandboxCustomImagesCheckNameRequest": "Microsoft.Kusto.SandboxCustomImagesCheckNameRequest", + "azure.mgmt.kusto.models.Script": "Microsoft.Kusto.Script", + "azure.mgmt.kusto.models.ScriptCheckNameRequest": "Microsoft.Kusto.ScriptCheckNameRequest", + "azure.mgmt.kusto.models.ScriptProperties": "Microsoft.Kusto.ScriptProperties", + "azure.mgmt.kusto.models.SkuDescription": "Microsoft.Kusto.SkuDescription", + "azure.mgmt.kusto.models.SkuLocationInfoItem": "Microsoft.Kusto.SkuLocationInfoItem", + "azure.mgmt.kusto.models.SuspensionDetails": "Microsoft.Kusto.SuspensionDetails", + "azure.mgmt.kusto.models.SystemData": "Azure.ResourceManager.CommonTypes.SystemData", + "azure.mgmt.kusto.models.TableLevelSharingProperties": "Microsoft.Kusto.TableLevelSharingProperties", + "azure.mgmt.kusto.models.TrustedExternalTenant": "Microsoft.Kusto.TrustedExternalTenant", + "azure.mgmt.kusto.models.VirtualNetworkConfiguration": "Microsoft.Kusto.VirtualNetworkConfiguration", + "azure.mgmt.kusto.models.CreatedByType": "Azure.ResourceManager.CommonTypes.createdByType", + "azure.mgmt.kusto.models.ClusterPrincipalRole": "Microsoft.Kusto.ClusterPrincipalRole", + "azure.mgmt.kusto.models.PrincipalType": "Microsoft.Kusto.PrincipalType", + "azure.mgmt.kusto.models.ProvisioningState": "Microsoft.Kusto.ProvisioningState", + "azure.mgmt.kusto.models.Reason": "Microsoft.Kusto.Reason", + "azure.mgmt.kusto.models.DatabasePrincipalRole": "Microsoft.Kusto.DatabasePrincipalRole", + "azure.mgmt.kusto.models.ScriptLevel": "Microsoft.Kusto.ScriptLevel", + "azure.mgmt.kusto.models.PrincipalPermissionsAction": "Microsoft.Kusto.PrincipalPermissionsAction", + "azure.mgmt.kusto.models.DataConnectionKind": "Microsoft.Kusto.DataConnectionKind", + "azure.mgmt.kusto.models.EventGridDataFormat": "Microsoft.Kusto.EventGridDataFormat", + "azure.mgmt.kusto.models.BlobStorageEventType": "Microsoft.Kusto.BlobStorageEventType", + "azure.mgmt.kusto.models.DatabaseRouting": "Microsoft.Kusto.DatabaseRouting", + "azure.mgmt.kusto.models.EventHubDataFormat": "Microsoft.Kusto.EventHubDataFormat", + "azure.mgmt.kusto.models.Compression": "Microsoft.Kusto.Compression", + "azure.mgmt.kusto.models.IotHubDataFormat": "Microsoft.Kusto.IotHubDataFormat", + "azure.mgmt.kusto.models.Kind": "Microsoft.Kusto.Kind", + "azure.mgmt.kusto.models.PrincipalsModificationKind": "Microsoft.Kusto.PrincipalsModificationKind", + "azure.mgmt.kusto.models.DatabaseShareOrigin": "Microsoft.Kusto.DatabaseShareOrigin", + "azure.mgmt.kusto.models.CallerRole": "Microsoft.Kusto.CallerRole", + "azure.mgmt.kusto.models.DatabasePrincipalType": "Microsoft.Kusto.DatabasePrincipalType", + "azure.mgmt.kusto.models.Type": "Microsoft.Kusto.Type", + "azure.mgmt.kusto.models.DefaultPrincipalsModificationKind": "Microsoft.Kusto.DefaultPrincipalsModificationKind", + "azure.mgmt.kusto.models.Language": "Microsoft.Kusto.Language", + "azure.mgmt.kusto.models.State": "Microsoft.Kusto.State", + "azure.mgmt.kusto.models.VnetState": "Microsoft.Kusto.VnetState", + "azure.mgmt.kusto.models.LanguageExtensionName": "Microsoft.Kusto.LanguageExtensionName", + "azure.mgmt.kusto.models.LanguageExtensionImageName": "Microsoft.Kusto.LanguageExtensionImageName", + "azure.mgmt.kusto.models.PublicNetworkAccess": "Microsoft.Kusto.PublicNetworkAccess", + "azure.mgmt.kusto.models.EngineType": "Microsoft.Kusto.EngineType", + "azure.mgmt.kusto.models.ClusterNetworkAccessFlag": "Microsoft.Kusto.ClusterNetworkAccessFlag", + "azure.mgmt.kusto.models.CalloutType": "Microsoft.Kusto.CalloutType", + "azure.mgmt.kusto.models.OutboundAccess": "Microsoft.Kusto.OutboundAccess", + "azure.mgmt.kusto.models.PublicIPType": "Microsoft.Kusto.PublicIPType", + "azure.mgmt.kusto.models.MigrationClusterRole": "Microsoft.Kusto.MigrationClusterRole", + "azure.mgmt.kusto.models.ZoneStatus": "Microsoft.Kusto.ZoneStatus", + "azure.mgmt.kusto.models.AzureSkuName": "Microsoft.Kusto.AzureSkuName", + "azure.mgmt.kusto.models.AzureSkuTier": "Microsoft.Kusto.AzureSkuTier", + "azure.mgmt.kusto.models.IdentityType": "Microsoft.Kusto.IdentityType", + "azure.mgmt.kusto.models.AzureScaleType": "Microsoft.Kusto.AzureScaleType", + "azure.mgmt.kusto.models.Status": "Microsoft.Kusto.Status", + "azure.mgmt.kusto.operations.Operations.list": "Azure.ResourceManager.Legacy.Operations.list", + "azure.mgmt.kusto.aio.operations.Operations.list": "Azure.ResourceManager.Legacy.Operations.list", + "azure.mgmt.kusto.operations.ClusterPrincipalAssignmentsOperations.get": "Microsoft.Kusto.ClusterPrincipalAssignments.get", + "azure.mgmt.kusto.aio.operations.ClusterPrincipalAssignmentsOperations.get": "Microsoft.Kusto.ClusterPrincipalAssignments.get", + "azure.mgmt.kusto.operations.ClusterPrincipalAssignmentsOperations.begin_create_or_update": "Microsoft.Kusto.ClusterPrincipalAssignments.createOrUpdate", + "azure.mgmt.kusto.aio.operations.ClusterPrincipalAssignmentsOperations.begin_create_or_update": "Microsoft.Kusto.ClusterPrincipalAssignments.createOrUpdate", + "azure.mgmt.kusto.operations.ClusterPrincipalAssignmentsOperations.begin_delete": "Microsoft.Kusto.ClusterPrincipalAssignments.delete", + "azure.mgmt.kusto.aio.operations.ClusterPrincipalAssignmentsOperations.begin_delete": "Microsoft.Kusto.ClusterPrincipalAssignments.delete", + "azure.mgmt.kusto.operations.ClusterPrincipalAssignmentsOperations.list": "Microsoft.Kusto.ClusterPrincipalAssignments.list", + "azure.mgmt.kusto.aio.operations.ClusterPrincipalAssignmentsOperations.list": "Microsoft.Kusto.ClusterPrincipalAssignments.list", + "azure.mgmt.kusto.operations.ClusterPrincipalAssignmentsOperations.check_name_availability": "Microsoft.Kusto.Clusters.checkNameAvailability", + "azure.mgmt.kusto.aio.operations.ClusterPrincipalAssignmentsOperations.check_name_availability": "Microsoft.Kusto.Clusters.checkNameAvailability", + "azure.mgmt.kusto.operations.DatabasePrincipalAssignmentsOperations.get": "Microsoft.Kusto.DatabasePrincipalAssignments.get", + "azure.mgmt.kusto.aio.operations.DatabasePrincipalAssignmentsOperations.get": "Microsoft.Kusto.DatabasePrincipalAssignments.get", + "azure.mgmt.kusto.operations.DatabasePrincipalAssignmentsOperations.begin_create_or_update": "Microsoft.Kusto.DatabasePrincipalAssignments.createOrUpdate", + "azure.mgmt.kusto.aio.operations.DatabasePrincipalAssignmentsOperations.begin_create_or_update": "Microsoft.Kusto.DatabasePrincipalAssignments.createOrUpdate", + "azure.mgmt.kusto.operations.DatabasePrincipalAssignmentsOperations.begin_delete": "Microsoft.Kusto.DatabasePrincipalAssignments.delete", + "azure.mgmt.kusto.aio.operations.DatabasePrincipalAssignmentsOperations.begin_delete": "Microsoft.Kusto.DatabasePrincipalAssignments.delete", + "azure.mgmt.kusto.operations.DatabasePrincipalAssignmentsOperations.list": "Microsoft.Kusto.DatabasePrincipalAssignments.list", + "azure.mgmt.kusto.aio.operations.DatabasePrincipalAssignmentsOperations.list": "Microsoft.Kusto.DatabasePrincipalAssignments.list", + "azure.mgmt.kusto.operations.DatabasePrincipalAssignmentsOperations.check_name_availability": "Microsoft.Kusto.Databases.checkNameAvailability", + "azure.mgmt.kusto.aio.operations.DatabasePrincipalAssignmentsOperations.check_name_availability": "Microsoft.Kusto.Databases.checkNameAvailability", + "azure.mgmt.kusto.operations.ScriptsOperations.get": "Microsoft.Kusto.Scripts.get", + "azure.mgmt.kusto.aio.operations.ScriptsOperations.get": "Microsoft.Kusto.Scripts.get", + "azure.mgmt.kusto.operations.ScriptsOperations.begin_create_or_update": "Microsoft.Kusto.Scripts.createOrUpdate", + "azure.mgmt.kusto.aio.operations.ScriptsOperations.begin_create_or_update": "Microsoft.Kusto.Scripts.createOrUpdate", + "azure.mgmt.kusto.operations.ScriptsOperations.begin_update": "Microsoft.Kusto.Scripts.update", + "azure.mgmt.kusto.aio.operations.ScriptsOperations.begin_update": "Microsoft.Kusto.Scripts.update", + "azure.mgmt.kusto.operations.ScriptsOperations.begin_delete": "Microsoft.Kusto.Scripts.delete", + "azure.mgmt.kusto.aio.operations.ScriptsOperations.begin_delete": "Microsoft.Kusto.Scripts.delete", + "azure.mgmt.kusto.operations.ScriptsOperations.list_by_database": "Microsoft.Kusto.Scripts.listByDatabase", + "azure.mgmt.kusto.aio.operations.ScriptsOperations.list_by_database": "Microsoft.Kusto.Scripts.listByDatabase", + "azure.mgmt.kusto.operations.ScriptsOperations.check_name_availability": "Microsoft.Kusto.Databases.scriptsCheckNameAvailability", + "azure.mgmt.kusto.aio.operations.ScriptsOperations.check_name_availability": "Microsoft.Kusto.Databases.scriptsCheckNameAvailability", + "azure.mgmt.kusto.operations.DataConnectionsOperations.get": "Microsoft.Kusto.DataConnections.get", + "azure.mgmt.kusto.aio.operations.DataConnectionsOperations.get": "Microsoft.Kusto.DataConnections.get", + "azure.mgmt.kusto.operations.DataConnectionsOperations.begin_create_or_update": "Microsoft.Kusto.DataConnections.createOrUpdate", + "azure.mgmt.kusto.aio.operations.DataConnectionsOperations.begin_create_or_update": "Microsoft.Kusto.DataConnections.createOrUpdate", + "azure.mgmt.kusto.operations.DataConnectionsOperations.begin_update": "Microsoft.Kusto.DataConnections.update", + "azure.mgmt.kusto.aio.operations.DataConnectionsOperations.begin_update": "Microsoft.Kusto.DataConnections.update", + "azure.mgmt.kusto.operations.DataConnectionsOperations.begin_delete": "Microsoft.Kusto.DataConnections.delete", + "azure.mgmt.kusto.aio.operations.DataConnectionsOperations.begin_delete": "Microsoft.Kusto.DataConnections.delete", + "azure.mgmt.kusto.operations.DataConnectionsOperations.list_by_database": "Microsoft.Kusto.DataConnections.listByDatabase", + "azure.mgmt.kusto.aio.operations.DataConnectionsOperations.list_by_database": "Microsoft.Kusto.DataConnections.listByDatabase", + "azure.mgmt.kusto.operations.DataConnectionsOperations.begin_data_connection_validation": "Microsoft.Kusto.Databases.dataConnectionValidation", + "azure.mgmt.kusto.aio.operations.DataConnectionsOperations.begin_data_connection_validation": "Microsoft.Kusto.Databases.dataConnectionValidation", + "azure.mgmt.kusto.operations.DataConnectionsOperations.check_name_availability": "Microsoft.Kusto.Databases.dataConnectionsCheckNameAvailability", + "azure.mgmt.kusto.aio.operations.DataConnectionsOperations.check_name_availability": "Microsoft.Kusto.Databases.dataConnectionsCheckNameAvailability", + "azure.mgmt.kusto.operations.DatabasesOperations.get": "Microsoft.Kusto.Databases.get", + "azure.mgmt.kusto.aio.operations.DatabasesOperations.get": "Microsoft.Kusto.Databases.get", + "azure.mgmt.kusto.operations.DatabasesOperations.begin_create_or_update": "Microsoft.Kusto.Databases.createOrUpdate", + "azure.mgmt.kusto.aio.operations.DatabasesOperations.begin_create_or_update": "Microsoft.Kusto.Databases.createOrUpdate", + "azure.mgmt.kusto.operations.DatabasesOperations.begin_update": "Microsoft.Kusto.Databases.update", + "azure.mgmt.kusto.aio.operations.DatabasesOperations.begin_update": "Microsoft.Kusto.Databases.update", + "azure.mgmt.kusto.operations.DatabasesOperations.begin_delete": "Microsoft.Kusto.Databases.delete", + "azure.mgmt.kusto.aio.operations.DatabasesOperations.begin_delete": "Microsoft.Kusto.Databases.delete", + "azure.mgmt.kusto.operations.DatabasesOperations.list_by_cluster": "Microsoft.Kusto.Databases.listByCluster", + "azure.mgmt.kusto.aio.operations.DatabasesOperations.list_by_cluster": "Microsoft.Kusto.Databases.listByCluster", + "azure.mgmt.kusto.operations.DatabasesOperations.list_principals": "Microsoft.Kusto.Databases.listPrincipals", + "azure.mgmt.kusto.aio.operations.DatabasesOperations.list_principals": "Microsoft.Kusto.Databases.listPrincipals", + "azure.mgmt.kusto.operations.DatabasesOperations.add_principals": "Microsoft.Kusto.Databases.addPrincipals", + "azure.mgmt.kusto.aio.operations.DatabasesOperations.add_principals": "Microsoft.Kusto.Databases.addPrincipals", + "azure.mgmt.kusto.operations.DatabasesOperations.remove_principals": "Microsoft.Kusto.Databases.removePrincipals", + "azure.mgmt.kusto.aio.operations.DatabasesOperations.remove_principals": "Microsoft.Kusto.Databases.removePrincipals", + "azure.mgmt.kusto.operations.DatabasesOperations.check_name_availability": "Microsoft.Kusto.Clusters.databasesCheckNameAvailability", + "azure.mgmt.kusto.aio.operations.DatabasesOperations.check_name_availability": "Microsoft.Kusto.Clusters.databasesCheckNameAvailability", + "azure.mgmt.kusto.operations.AttachedDatabaseConfigurationsOperations.get": "Microsoft.Kusto.AttachedDatabaseConfigurations.get", + "azure.mgmt.kusto.aio.operations.AttachedDatabaseConfigurationsOperations.get": "Microsoft.Kusto.AttachedDatabaseConfigurations.get", + "azure.mgmt.kusto.operations.AttachedDatabaseConfigurationsOperations.begin_create_or_update": "Microsoft.Kusto.AttachedDatabaseConfigurations.createOrUpdate", + "azure.mgmt.kusto.aio.operations.AttachedDatabaseConfigurationsOperations.begin_create_or_update": "Microsoft.Kusto.AttachedDatabaseConfigurations.createOrUpdate", + "azure.mgmt.kusto.operations.AttachedDatabaseConfigurationsOperations.begin_delete": "Microsoft.Kusto.AttachedDatabaseConfigurations.delete", + "azure.mgmt.kusto.aio.operations.AttachedDatabaseConfigurationsOperations.begin_delete": "Microsoft.Kusto.AttachedDatabaseConfigurations.delete", + "azure.mgmt.kusto.operations.AttachedDatabaseConfigurationsOperations.list_by_cluster": "Microsoft.Kusto.AttachedDatabaseConfigurations.listByCluster", + "azure.mgmt.kusto.aio.operations.AttachedDatabaseConfigurationsOperations.list_by_cluster": "Microsoft.Kusto.AttachedDatabaseConfigurations.listByCluster", + "azure.mgmt.kusto.operations.AttachedDatabaseConfigurationsOperations.check_name_availability": "Microsoft.Kusto.Clusters.attachedDatabaseConfigurationsCheckNameAvailability", + "azure.mgmt.kusto.aio.operations.AttachedDatabaseConfigurationsOperations.check_name_availability": "Microsoft.Kusto.Clusters.attachedDatabaseConfigurationsCheckNameAvailability", + "azure.mgmt.kusto.operations.ManagedPrivateEndpointsOperations.get": "Microsoft.Kusto.ManagedPrivateEndpoints.get", + "azure.mgmt.kusto.aio.operations.ManagedPrivateEndpointsOperations.get": "Microsoft.Kusto.ManagedPrivateEndpoints.get", + "azure.mgmt.kusto.operations.ManagedPrivateEndpointsOperations.begin_create_or_update": "Microsoft.Kusto.ManagedPrivateEndpoints.createOrUpdate", + "azure.mgmt.kusto.aio.operations.ManagedPrivateEndpointsOperations.begin_create_or_update": "Microsoft.Kusto.ManagedPrivateEndpoints.createOrUpdate", + "azure.mgmt.kusto.operations.ManagedPrivateEndpointsOperations.begin_update": "Microsoft.Kusto.ManagedPrivateEndpoints.update", + "azure.mgmt.kusto.aio.operations.ManagedPrivateEndpointsOperations.begin_update": "Microsoft.Kusto.ManagedPrivateEndpoints.update", + "azure.mgmt.kusto.operations.ManagedPrivateEndpointsOperations.begin_delete": "Microsoft.Kusto.ManagedPrivateEndpoints.delete", + "azure.mgmt.kusto.aio.operations.ManagedPrivateEndpointsOperations.begin_delete": "Microsoft.Kusto.ManagedPrivateEndpoints.delete", + "azure.mgmt.kusto.operations.ManagedPrivateEndpointsOperations.list": "Microsoft.Kusto.ManagedPrivateEndpoints.list", + "azure.mgmt.kusto.aio.operations.ManagedPrivateEndpointsOperations.list": "Microsoft.Kusto.ManagedPrivateEndpoints.list", + "azure.mgmt.kusto.operations.ManagedPrivateEndpointsOperations.check_name_availability": "Microsoft.Kusto.Clusters.managedPrivateEndpointsCheckNameAvailability", + "azure.mgmt.kusto.aio.operations.ManagedPrivateEndpointsOperations.check_name_availability": "Microsoft.Kusto.Clusters.managedPrivateEndpointsCheckNameAvailability", + "azure.mgmt.kusto.operations.SandboxCustomImagesOperations.get": "Microsoft.Kusto.SandboxCustomImages.get", + "azure.mgmt.kusto.aio.operations.SandboxCustomImagesOperations.get": "Microsoft.Kusto.SandboxCustomImages.get", + "azure.mgmt.kusto.operations.SandboxCustomImagesOperations.begin_create_or_update": "Microsoft.Kusto.SandboxCustomImages.createOrUpdate", + "azure.mgmt.kusto.aio.operations.SandboxCustomImagesOperations.begin_create_or_update": "Microsoft.Kusto.SandboxCustomImages.createOrUpdate", + "azure.mgmt.kusto.operations.SandboxCustomImagesOperations.begin_update": "Microsoft.Kusto.SandboxCustomImages.update", + "azure.mgmt.kusto.aio.operations.SandboxCustomImagesOperations.begin_update": "Microsoft.Kusto.SandboxCustomImages.update", + "azure.mgmt.kusto.operations.SandboxCustomImagesOperations.begin_delete": "Microsoft.Kusto.SandboxCustomImages.delete", + "azure.mgmt.kusto.aio.operations.SandboxCustomImagesOperations.begin_delete": "Microsoft.Kusto.SandboxCustomImages.delete", + "azure.mgmt.kusto.operations.SandboxCustomImagesOperations.list_by_cluster": "Microsoft.Kusto.SandboxCustomImages.listByCluster", + "azure.mgmt.kusto.aio.operations.SandboxCustomImagesOperations.list_by_cluster": "Microsoft.Kusto.SandboxCustomImages.listByCluster", + "azure.mgmt.kusto.operations.SandboxCustomImagesOperations.check_name_availability": "Microsoft.Kusto.Clusters.sandboxCustomImagesCheckNameAvailability", + "azure.mgmt.kusto.aio.operations.SandboxCustomImagesOperations.check_name_availability": "Microsoft.Kusto.Clusters.sandboxCustomImagesCheckNameAvailability", + "azure.mgmt.kusto.operations.ClustersOperations.get": "Microsoft.Kusto.Clusters.get", + "azure.mgmt.kusto.aio.operations.ClustersOperations.get": "Microsoft.Kusto.Clusters.get", + "azure.mgmt.kusto.operations.ClustersOperations.begin_create_or_update": "Microsoft.Kusto.Clusters.createOrUpdate", + "azure.mgmt.kusto.aio.operations.ClustersOperations.begin_create_or_update": "Microsoft.Kusto.Clusters.createOrUpdate", + "azure.mgmt.kusto.operations.ClustersOperations.begin_update": "Microsoft.Kusto.Clusters.update", + "azure.mgmt.kusto.aio.operations.ClustersOperations.begin_update": "Microsoft.Kusto.Clusters.update", + "azure.mgmt.kusto.operations.ClustersOperations.begin_delete": "Microsoft.Kusto.Clusters.delete", + "azure.mgmt.kusto.aio.operations.ClustersOperations.begin_delete": "Microsoft.Kusto.Clusters.delete", + "azure.mgmt.kusto.operations.ClustersOperations.list_by_resource_group": "Microsoft.Kusto.Clusters.listByResourceGroup", + "azure.mgmt.kusto.aio.operations.ClustersOperations.list_by_resource_group": "Microsoft.Kusto.Clusters.listByResourceGroup", + "azure.mgmt.kusto.operations.ClustersOperations.list": "Microsoft.Kusto.Clusters.list", + "azure.mgmt.kusto.aio.operations.ClustersOperations.list": "Microsoft.Kusto.Clusters.list", + "azure.mgmt.kusto.operations.ClustersOperations.begin_stop": "Microsoft.Kusto.Clusters.stop", + "azure.mgmt.kusto.aio.operations.ClustersOperations.begin_stop": "Microsoft.Kusto.Clusters.stop", + "azure.mgmt.kusto.operations.ClustersOperations.begin_start": "Microsoft.Kusto.Clusters.start", + "azure.mgmt.kusto.aio.operations.ClustersOperations.begin_start": "Microsoft.Kusto.Clusters.start", + "azure.mgmt.kusto.operations.ClustersOperations.begin_migrate": "Microsoft.Kusto.Clusters.migrate", + "azure.mgmt.kusto.aio.operations.ClustersOperations.begin_migrate": "Microsoft.Kusto.Clusters.migrate", + "azure.mgmt.kusto.operations.ClustersOperations.list_follower_databases_get": "Microsoft.Kusto.Clusters.listFollowerDatabasesGet", + "azure.mgmt.kusto.aio.operations.ClustersOperations.list_follower_databases_get": "Microsoft.Kusto.Clusters.listFollowerDatabasesGet", + "azure.mgmt.kusto.operations.ClustersOperations.list_follower_databases": "Microsoft.Kusto.Clusters.listFollowerDatabases", + "azure.mgmt.kusto.aio.operations.ClustersOperations.list_follower_databases": "Microsoft.Kusto.Clusters.listFollowerDatabases", + "azure.mgmt.kusto.operations.ClustersOperations.begin_detach_follower_databases": "Microsoft.Kusto.Clusters.detachFollowerDatabases", + "azure.mgmt.kusto.aio.operations.ClustersOperations.begin_detach_follower_databases": "Microsoft.Kusto.Clusters.detachFollowerDatabases", + "azure.mgmt.kusto.operations.ClustersOperations.begin_diagnose_virtual_network": "Microsoft.Kusto.Clusters.diagnoseVirtualNetwork", + "azure.mgmt.kusto.aio.operations.ClustersOperations.begin_diagnose_virtual_network": "Microsoft.Kusto.Clusters.diagnoseVirtualNetwork", + "azure.mgmt.kusto.operations.ClustersOperations.list_skus_by_resource": "Microsoft.Kusto.Clusters.listSkusByResource", + "azure.mgmt.kusto.aio.operations.ClustersOperations.list_skus_by_resource": "Microsoft.Kusto.Clusters.listSkusByResource", + "azure.mgmt.kusto.operations.ClustersOperations.list_outbound_network_dependencies_endpoints": "Microsoft.Kusto.Clusters.listOutboundNetworkDependenciesEndpoints", + "azure.mgmt.kusto.aio.operations.ClustersOperations.list_outbound_network_dependencies_endpoints": "Microsoft.Kusto.Clusters.listOutboundNetworkDependenciesEndpoints", + "azure.mgmt.kusto.operations.ClustersOperations.begin_add_callout_policies": "Microsoft.Kusto.Clusters.addCalloutPolicies", + "azure.mgmt.kusto.aio.operations.ClustersOperations.begin_add_callout_policies": "Microsoft.Kusto.Clusters.addCalloutPolicies", + "azure.mgmt.kusto.operations.ClustersOperations.begin_remove_callout_policy": "Microsoft.Kusto.Clusters.removeCalloutPolicy", + "azure.mgmt.kusto.aio.operations.ClustersOperations.begin_remove_callout_policy": "Microsoft.Kusto.Clusters.removeCalloutPolicy", + "azure.mgmt.kusto.operations.ClustersOperations.list_callout_policies": "Microsoft.Kusto.Clusters.listCalloutPolicies", + "azure.mgmt.kusto.aio.operations.ClustersOperations.list_callout_policies": "Microsoft.Kusto.Clusters.listCalloutPolicies", + "azure.mgmt.kusto.operations.ClustersOperations.list_language_extensions": "Microsoft.Kusto.Clusters.listLanguageExtensions", + "azure.mgmt.kusto.aio.operations.ClustersOperations.list_language_extensions": "Microsoft.Kusto.Clusters.listLanguageExtensions", + "azure.mgmt.kusto.operations.ClustersOperations.begin_add_language_extensions": "Microsoft.Kusto.Clusters.addLanguageExtensions", + "azure.mgmt.kusto.aio.operations.ClustersOperations.begin_add_language_extensions": "Microsoft.Kusto.Clusters.addLanguageExtensions", + "azure.mgmt.kusto.operations.ClustersOperations.begin_remove_language_extensions": "Microsoft.Kusto.Clusters.removeLanguageExtensions", + "azure.mgmt.kusto.aio.operations.ClustersOperations.begin_remove_language_extensions": "Microsoft.Kusto.Clusters.removeLanguageExtensions", + "azure.mgmt.kusto.operations.ClustersOperations.list_skus": "Microsoft.Kusto.ClustersOperationGroup.listSkus", + "azure.mgmt.kusto.aio.operations.ClustersOperations.list_skus": "Microsoft.Kusto.ClustersOperationGroup.listSkus", + "azure.mgmt.kusto.operations.ClustersOperations.check_name_availability": "Microsoft.Kusto.ClustersOperationGroup.checkNameAvailability", + "azure.mgmt.kusto.aio.operations.ClustersOperations.check_name_availability": "Microsoft.Kusto.ClustersOperationGroup.checkNameAvailability", + "azure.mgmt.kusto.operations.PrivateEndpointConnectionsOperations.get": "Microsoft.Kusto.PrivateEndpointConnections.get", + "azure.mgmt.kusto.aio.operations.PrivateEndpointConnectionsOperations.get": "Microsoft.Kusto.PrivateEndpointConnections.get", + "azure.mgmt.kusto.operations.PrivateEndpointConnectionsOperations.begin_create_or_update": "Microsoft.Kusto.PrivateEndpointConnections.createOrUpdate", + "azure.mgmt.kusto.aio.operations.PrivateEndpointConnectionsOperations.begin_create_or_update": "Microsoft.Kusto.PrivateEndpointConnections.createOrUpdate", + "azure.mgmt.kusto.operations.PrivateEndpointConnectionsOperations.begin_delete": "Microsoft.Kusto.PrivateEndpointConnections.delete", + "azure.mgmt.kusto.aio.operations.PrivateEndpointConnectionsOperations.begin_delete": "Microsoft.Kusto.PrivateEndpointConnections.delete", + "azure.mgmt.kusto.operations.PrivateEndpointConnectionsOperations.list": "Microsoft.Kusto.PrivateEndpointConnections.list", + "azure.mgmt.kusto.aio.operations.PrivateEndpointConnectionsOperations.list": "Microsoft.Kusto.PrivateEndpointConnections.list", + "azure.mgmt.kusto.operations.PrivateLinkResourcesOperations.get": "Microsoft.Kusto.PrivateLinkResources.get", + "azure.mgmt.kusto.aio.operations.PrivateLinkResourcesOperations.get": "Microsoft.Kusto.PrivateLinkResources.get", + "azure.mgmt.kusto.operations.PrivateLinkResourcesOperations.list": "Microsoft.Kusto.PrivateLinkResources.list", + "azure.mgmt.kusto.aio.operations.PrivateLinkResourcesOperations.list": "Microsoft.Kusto.PrivateLinkResources.list", + "azure.mgmt.kusto.operations.DatabaseOperations.invite_follower": "Microsoft.Kusto.Databases.inviteFollower", + "azure.mgmt.kusto.aio.operations.DatabaseOperations.invite_follower": "Microsoft.Kusto.Databases.inviteFollower", + "azure.mgmt.kusto.operations.SkusOperations.list": "Microsoft.Kusto.SkusOperationGroup.list", + "azure.mgmt.kusto.aio.operations.SkusOperations.list": "Microsoft.Kusto.SkusOperationGroup.list", + "azure.mgmt.kusto.operations.OperationsResultsOperations.get": "Microsoft.Kusto.OperationsResultsOperationGroup.get", + "azure.mgmt.kusto.aio.operations.OperationsResultsOperations.get": "Microsoft.Kusto.OperationsResultsOperationGroup.get", + "azure.mgmt.kusto.operations.OperationsResultsLocationOperations.get": "Microsoft.Kusto.OperationsResultsOperationGroup.getLocation", + "azure.mgmt.kusto.aio.operations.OperationsResultsLocationOperations.get": "Microsoft.Kusto.OperationsResultsOperationGroup.getLocation" + }, + "CrossLanguageVersion": "f7e9ae0c60a2" +} \ No newline at end of file diff --git a/sdk/kusto/azure-mgmt-kusto/azure/__init__.py b/sdk/kusto/azure-mgmt-kusto/azure/__init__.py index 8db66d3d0f0f..d55ccad1f573 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/__init__.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/__init__.py @@ -1 +1 @@ -__path__ = __import__("pkgutil").extend_path(__path__, __name__) +__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/__init__.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/__init__.py index 8db66d3d0f0f..d55ccad1f573 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/__init__.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/__init__.py @@ -1 +1 @@ -__path__ = __import__("pkgutil").extend_path(__path__, __name__) +__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/__init__.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/__init__.py index 3765af34dc63..981ad45b36da 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/__init__.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/__init__.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # pylint: disable=wrong-import-position @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._kusto_management_client import KustoManagementClient # type: ignore +from ._client import KustoManagementClient # type: ignore from ._version import VERSION __version__ = VERSION diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_kusto_management_client.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_client.py similarity index 80% rename from sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_kusto_management_client.py rename to sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_client.py index 7feba3c9f178..8d6f838d7049 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_kusto_management_client.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_client.py @@ -2,22 +2,23 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from copy import deepcopy -from typing import Any, TYPE_CHECKING -from typing_extensions import Self +import sys +from typing import Any, Optional, TYPE_CHECKING, cast from azure.core.pipeline import policies from azure.core.rest import HttpRequest, HttpResponse +from azure.core.settings import settings from azure.mgmt.core import ARMPipelineClient from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy +from azure.mgmt.core.tools import get_arm_endpoints -from . import models as _models from ._configuration import KustoManagementClientConfiguration -from ._serialization import Deserializer, Serializer +from ._utils.serialization import Deserializer, Serializer from .operations import ( AttachedDatabaseConfigurationsOperations, ClusterPrincipalAssignmentsOperations, @@ -37,7 +38,13 @@ SkusOperations, ) +if sys.version_info >= (3, 11): + from typing import Self +else: + from typing_extensions import Self # type: ignore + if TYPE_CHECKING: + from azure.core import AzureClouds from azure.core.credentials import TokenCredential @@ -46,13 +53,18 @@ class KustoManagementClient: # pylint: disable=too-many-instance-attributes Kusto services to manage your clusters and databases. The API enables you to create, update, and delete clusters and databases. - :ivar clusters: ClustersOperations operations - :vartype clusters: azure.mgmt.kusto.operations.ClustersOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.kusto.operations.Operations :ivar cluster_principal_assignments: ClusterPrincipalAssignmentsOperations operations :vartype cluster_principal_assignments: azure.mgmt.kusto.operations.ClusterPrincipalAssignmentsOperations - :ivar skus: SkusOperations operations - :vartype skus: azure.mgmt.kusto.operations.SkusOperations + :ivar database_principal_assignments: DatabasePrincipalAssignmentsOperations operations + :vartype database_principal_assignments: + azure.mgmt.kusto.operations.DatabasePrincipalAssignmentsOperations + :ivar scripts: ScriptsOperations operations + :vartype scripts: azure.mgmt.kusto.operations.ScriptsOperations + :ivar data_connections: DataConnectionsOperations operations + :vartype data_connections: azure.mgmt.kusto.operations.DataConnectionsOperations :ivar databases: DatabasesOperations operations :vartype databases: azure.mgmt.kusto.operations.DatabasesOperations :ivar attached_database_configurations: AttachedDatabaseConfigurationsOperations operations @@ -61,37 +73,36 @@ class KustoManagementClient: # pylint: disable=too-many-instance-attributes :ivar managed_private_endpoints: ManagedPrivateEndpointsOperations operations :vartype managed_private_endpoints: azure.mgmt.kusto.operations.ManagedPrivateEndpointsOperations - :ivar database: DatabaseOperations operations - :vartype database: azure.mgmt.kusto.operations.DatabaseOperations - :ivar database_principal_assignments: DatabasePrincipalAssignmentsOperations operations - :vartype database_principal_assignments: - azure.mgmt.kusto.operations.DatabasePrincipalAssignmentsOperations - :ivar scripts: ScriptsOperations operations - :vartype scripts: azure.mgmt.kusto.operations.ScriptsOperations :ivar sandbox_custom_images: SandboxCustomImagesOperations operations :vartype sandbox_custom_images: azure.mgmt.kusto.operations.SandboxCustomImagesOperations + :ivar clusters: ClustersOperations operations + :vartype clusters: azure.mgmt.kusto.operations.ClustersOperations :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations :vartype private_endpoint_connections: azure.mgmt.kusto.operations.PrivateEndpointConnectionsOperations :ivar private_link_resources: PrivateLinkResourcesOperations operations :vartype private_link_resources: azure.mgmt.kusto.operations.PrivateLinkResourcesOperations - :ivar data_connections: DataConnectionsOperations operations - :vartype data_connections: azure.mgmt.kusto.operations.DataConnectionsOperations - :ivar operations: Operations operations - :vartype operations: azure.mgmt.kusto.operations.Operations + :ivar database: DatabaseOperations operations + :vartype database: azure.mgmt.kusto.operations.DatabaseOperations + :ivar skus: SkusOperations operations + :vartype skus: azure.mgmt.kusto.operations.SkusOperations :ivar operations_results: OperationsResultsOperations operations :vartype operations_results: azure.mgmt.kusto.operations.OperationsResultsOperations :ivar operations_results_location: OperationsResultsLocationOperations operations :vartype operations_results_location: azure.mgmt.kusto.operations.OperationsResultsLocationOperations - :param credential: Credential needed for the client to connect to Azure. Required. + :param credential: Credential used to authenticate requests to the service. Required. :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: The ID of the target subscription. Required. + :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. :type subscription_id: str - :param base_url: Service URL. Default value is "https://management.azure.com". + :param base_url: Service host. Default value is None. :type base_url: str - :keyword api_version: Api Version. Default value is "2024-04-13". Note that overriding this - default value may result in unsupported behavior. + :keyword cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is + None. + :paramtype cloud_setting: ~azure.core.AzureClouds + :keyword api_version: The API version to use for this operation. Known values are "2025-02-14" + and None. Default value is None. If not set, the operation's default API version will be used. + Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. @@ -101,12 +112,26 @@ def __init__( self, credential: "TokenCredential", subscription_id: str, - base_url: str = "https://management.azure.com", + base_url: Optional[str] = None, + *, + cloud_setting: Optional["AzureClouds"] = None, **kwargs: Any ) -> None: + _endpoint = "{endpoint}" + _cloud = cloud_setting or settings.current.azure_cloud # type: ignore + _endpoints = get_arm_endpoints(_cloud) + if not base_url: + base_url = _endpoints["resource_manager"] + credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"]) self._config = KustoManagementClientConfiguration( - credential=credential, subscription_id=subscription_id, **kwargs + credential=credential, + subscription_id=subscription_id, + base_url=cast(str, base_url), + cloud_setting=cloud_setting, + credential_scopes=credential_scopes, + **kwargs ) + _policies = kwargs.pop("policies", None) if _policies is None: _policies = [ @@ -125,17 +150,22 @@ def __init__( policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None, self._config.http_logging_policy, ] - self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, policies=_policies, **kwargs) + self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, _endpoint), policies=_policies, **kwargs) - client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) + self._serialize = Serializer() + self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.clusters = ClustersOperations(self._client, self._config, self._serialize, self._deserialize) + self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) self.cluster_principal_assignments = ClusterPrincipalAssignmentsOperations( self._client, self._config, self._serialize, self._deserialize ) - self.skus = SkusOperations(self._client, self._config, self._serialize, self._deserialize) + self.database_principal_assignments = DatabasePrincipalAssignmentsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.scripts = ScriptsOperations(self._client, self._config, self._serialize, self._deserialize) + self.data_connections = DataConnectionsOperations( + self._client, self._config, self._serialize, self._deserialize + ) self.databases = DatabasesOperations(self._client, self._config, self._serialize, self._deserialize) self.attached_database_configurations = AttachedDatabaseConfigurationsOperations( self._client, self._config, self._serialize, self._deserialize @@ -143,24 +173,18 @@ def __init__( self.managed_private_endpoints = ManagedPrivateEndpointsOperations( self._client, self._config, self._serialize, self._deserialize ) - self.database = DatabaseOperations(self._client, self._config, self._serialize, self._deserialize) - self.database_principal_assignments = DatabasePrincipalAssignmentsOperations( - self._client, self._config, self._serialize, self._deserialize - ) - self.scripts = ScriptsOperations(self._client, self._config, self._serialize, self._deserialize) self.sandbox_custom_images = SandboxCustomImagesOperations( self._client, self._config, self._serialize, self._deserialize ) + self.clusters = ClustersOperations(self._client, self._config, self._serialize, self._deserialize) self.private_endpoint_connections = PrivateEndpointConnectionsOperations( self._client, self._config, self._serialize, self._deserialize ) self.private_link_resources = PrivateLinkResourcesOperations( self._client, self._config, self._serialize, self._deserialize ) - self.data_connections = DataConnectionsOperations( - self._client, self._config, self._serialize, self._deserialize - ) - self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) + self.database = DatabaseOperations(self._client, self._config, self._serialize, self._deserialize) + self.skus = SkusOperations(self._client, self._config, self._serialize, self._deserialize) self.operations_results = OperationsResultsOperations( self._client, self._config, self._serialize, self._deserialize ) @@ -168,13 +192,13 @@ def __init__( self._client, self._config, self._serialize, self._deserialize ) - def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: + def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. >>> from azure.core.rest import HttpRequest >>> request = HttpRequest("GET", "https://www.example.org/") - >>> response = client._send_request(request) + >>> response = client.send_request(request) For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request @@ -187,7 +211,11 @@ def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: """ request_copy = deepcopy(request) - request_copy.url = self._client.format_url(request_copy.url) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore def close(self) -> None: diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_configuration.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_configuration.py index 23e72aeb2937..a1fbb3ca1fdd 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_configuration.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_configuration.py @@ -2,11 +2,11 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, TYPE_CHECKING +from typing import Any, Optional, TYPE_CHECKING from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy @@ -14,6 +14,7 @@ from ._version import VERSION if TYPE_CHECKING: + from azure.core import AzureClouds from azure.core.credentials import TokenCredential @@ -23,17 +24,30 @@ class KustoManagementClientConfiguration: # pylint: disable=too-many-instance-a Note that all parameters used to create this instance are saved as instance attributes. - :param credential: Credential needed for the client to connect to Azure. Required. + :param credential: Credential used to authenticate requests to the service. Required. :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: The ID of the target subscription. Required. + :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. :type subscription_id: str - :keyword api_version: Api Version. Default value is "2024-04-13". Note that overriding this - default value may result in unsupported behavior. + :param base_url: Service host. Default value is "https://management.azure.com". + :type base_url: str + :param cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is + None. + :type cloud_setting: ~azure.core.AzureClouds + :keyword api_version: The API version to use for this operation. Known values are "2025-02-14" + and None. Default value is None. If not set, the operation's default API version will be used. + Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str """ - def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: - api_version: str = kwargs.pop("api_version", "2024-04-13") + def __init__( + self, + credential: "TokenCredential", + subscription_id: str, + base_url: str = "https://management.azure.com", + cloud_setting: Optional["AzureClouds"] = None, + **kwargs: Any + ) -> None: + api_version: str = kwargs.pop("api_version", "2025-02-14") if credential is None: raise ValueError("Parameter 'credential' must not be None.") @@ -42,6 +56,8 @@ def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs self.credential = credential self.subscription_id = subscription_id + self.base_url = base_url + self.cloud_setting = cloud_setting self.api_version = api_version self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"]) kwargs.setdefault("sdk_moniker", "mgmt-kusto/{}".format(VERSION)) diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_patch.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_patch.py index 17dbc073e01b..ea765788358a 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_patch.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_patch.py @@ -1,32 +1,20 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# # Copyright (c) Microsoft Corporation. All rights reserved. -# -# The MIT License (MIT) -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the ""Software""), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -# IN THE SOFTWARE. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------- +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" + +__all__: list[str] = [] # Add all objects you want publicly available to users at this package level -# This file is used for handwritten extensions to the generated code. Example: -# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md def patch_sdk(): - pass + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_utils/__init__.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_utils/__init__.py new file mode 100644 index 000000000000..8026245c2abc --- /dev/null +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_utils/__init__.py @@ -0,0 +1,6 @@ +# -------------------------------------------------------------------------- +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_utils/model_base.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_utils/model_base.py new file mode 100644 index 000000000000..d725c55906d3 --- /dev/null +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_utils/model_base.py @@ -0,0 +1,1737 @@ +# pylint: disable=line-too-long,useless-suppression,too-many-lines +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=protected-access, broad-except + +import copy +import calendar +import decimal +import functools +import sys +import logging +import base64 +import re +import typing +import enum +import email.utils +from datetime import datetime, date, time, timedelta, timezone +from json import JSONEncoder +import xml.etree.ElementTree as ET +from collections.abc import MutableMapping +import isodate +from azure.core.exceptions import DeserializationError +from azure.core import CaseInsensitiveEnumMeta +from azure.core.pipeline import PipelineResponse +from azure.core.serialization import _Null + +from azure.core.rest import HttpResponse + +if sys.version_info >= (3, 11): + from typing import Self +else: + from typing_extensions import Self + +_LOGGER = logging.getLogger(__name__) + +__all__ = ["SdkJSONEncoder", "Model", "rest_field", "rest_discriminator"] + +TZ_UTC = timezone.utc +_T = typing.TypeVar("_T") +_NONE_TYPE = type(None) + + +def _timedelta_as_isostr(td: timedelta) -> str: + """Converts a datetime.timedelta object into an ISO 8601 formatted string, e.g. 'P4DT12H30M05S' + + Function adapted from the Tin Can Python project: https://github.com/RusticiSoftware/TinCanPython + + :param timedelta td: The timedelta to convert + :rtype: str + :return: ISO8601 version of this timedelta + """ + + # Split seconds to larger units + seconds = td.total_seconds() + minutes, seconds = divmod(seconds, 60) + hours, minutes = divmod(minutes, 60) + days, hours = divmod(hours, 24) + + days, hours, minutes = list(map(int, (days, hours, minutes))) + seconds = round(seconds, 6) + + # Build date + date_str = "" + if days: + date_str = "%sD" % days + + if hours or minutes or seconds: + # Build time + time_str = "T" + + # Hours + bigger_exists = date_str or hours + if bigger_exists: + time_str += "{:02}H".format(hours) + + # Minutes + bigger_exists = bigger_exists or minutes + if bigger_exists: + time_str += "{:02}M".format(minutes) + + # Seconds + try: + if seconds.is_integer(): + seconds_string = "{:02}".format(int(seconds)) + else: + # 9 chars long w/ leading 0, 6 digits after decimal + seconds_string = "%09.6f" % seconds + # Remove trailing zeros + seconds_string = seconds_string.rstrip("0") + except AttributeError: # int.is_integer() raises + seconds_string = "{:02}".format(seconds) + + time_str += "{}S".format(seconds_string) + else: + time_str = "" + + return "P" + date_str + time_str + + +def _serialize_bytes(o, format: typing.Optional[str] = None) -> str: + encoded = base64.b64encode(o).decode() + if format == "base64url": + return encoded.strip("=").replace("+", "-").replace("/", "_") + return encoded + + +def _serialize_datetime(o, format: typing.Optional[str] = None): + if hasattr(o, "year") and hasattr(o, "hour"): + if format == "rfc7231": + return email.utils.format_datetime(o, usegmt=True) + if format == "unix-timestamp": + return int(calendar.timegm(o.utctimetuple())) + + # astimezone() fails for naive times in Python 2.7, so make make sure o is aware (tzinfo is set) + if not o.tzinfo: + iso_formatted = o.replace(tzinfo=TZ_UTC).isoformat() + else: + iso_formatted = o.astimezone(TZ_UTC).isoformat() + # Replace the trailing "+00:00" UTC offset with "Z" (RFC 3339: https://www.ietf.org/rfc/rfc3339.txt) + return iso_formatted.replace("+00:00", "Z") + # Next try datetime.date or datetime.time + return o.isoformat() + + +def _is_readonly(p): + try: + return p._visibility == ["read"] + except AttributeError: + return False + + +class SdkJSONEncoder(JSONEncoder): + """A JSON encoder that's capable of serializing datetime objects and bytes.""" + + def __init__(self, *args, exclude_readonly: bool = False, format: typing.Optional[str] = None, **kwargs): + super().__init__(*args, **kwargs) + self.exclude_readonly = exclude_readonly + self.format = format + + def default(self, o): # pylint: disable=too-many-return-statements + if _is_model(o): + if self.exclude_readonly: + readonly_props = [p._rest_name for p in o._attr_to_rest_field.values() if _is_readonly(p)] + return {k: v for k, v in o.items() if k not in readonly_props} + return dict(o.items()) + try: + return super(SdkJSONEncoder, self).default(o) + except TypeError: + if isinstance(o, _Null): + return None + if isinstance(o, decimal.Decimal): + return float(o) + if isinstance(o, (bytes, bytearray)): + return _serialize_bytes(o, self.format) + try: + # First try datetime.datetime + return _serialize_datetime(o, self.format) + except AttributeError: + pass + # Last, try datetime.timedelta + try: + return _timedelta_as_isostr(o) + except AttributeError: + # This will be raised when it hits value.total_seconds in the method above + pass + return super(SdkJSONEncoder, self).default(o) + + +_VALID_DATE = re.compile(r"\d{4}[-]\d{2}[-]\d{2}T\d{2}:\d{2}:\d{2}" + r"\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?") +_VALID_RFC7231 = re.compile( + r"(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s\d{2}\s" + r"(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s\d{4}\s\d{2}:\d{2}:\d{2}\sGMT" +) + +_ARRAY_ENCODE_MAPPING = { + "pipeDelimited": "|", + "spaceDelimited": " ", + "commaDelimited": ",", + "newlineDelimited": "\n", +} + + +def _deserialize_array_encoded(delimit: str, attr): + if isinstance(attr, str): + if attr == "": + return [] + return attr.split(delimit) + return attr + + +def _deserialize_datetime(attr: typing.Union[str, datetime]) -> datetime: + """Deserialize ISO-8601 formatted string into Datetime object. + + :param str attr: response string to be deserialized. + :rtype: ~datetime.datetime + :returns: The datetime object from that input + """ + if isinstance(attr, datetime): + # i'm already deserialized + return attr + attr = attr.upper() + match = _VALID_DATE.match(attr) + if not match: + raise ValueError("Invalid datetime string: " + attr) + + check_decimal = attr.split(".") + if len(check_decimal) > 1: + decimal_str = "" + for digit in check_decimal[1]: + if digit.isdigit(): + decimal_str += digit + else: + break + if len(decimal_str) > 6: + attr = attr.replace(decimal_str, decimal_str[0:6]) + + date_obj = isodate.parse_datetime(attr) + test_utc = date_obj.utctimetuple() + if test_utc.tm_year > 9999 or test_utc.tm_year < 1: + raise OverflowError("Hit max or min date") + return date_obj # type: ignore[no-any-return] + + +def _deserialize_datetime_rfc7231(attr: typing.Union[str, datetime]) -> datetime: + """Deserialize RFC7231 formatted string into Datetime object. + + :param str attr: response string to be deserialized. + :rtype: ~datetime.datetime + :returns: The datetime object from that input + """ + if isinstance(attr, datetime): + # i'm already deserialized + return attr + match = _VALID_RFC7231.match(attr) + if not match: + raise ValueError("Invalid datetime string: " + attr) + + return email.utils.parsedate_to_datetime(attr) + + +def _deserialize_datetime_unix_timestamp(attr: typing.Union[float, datetime]) -> datetime: + """Deserialize unix timestamp into Datetime object. + + :param str attr: response string to be deserialized. + :rtype: ~datetime.datetime + :returns: The datetime object from that input + """ + if isinstance(attr, datetime): + # i'm already deserialized + return attr + return datetime.fromtimestamp(attr, TZ_UTC) + + +def _deserialize_date(attr: typing.Union[str, date]) -> date: + """Deserialize ISO-8601 formatted string into Date object. + :param str attr: response string to be deserialized. + :rtype: date + :returns: The date object from that input + """ + # This must NOT use defaultmonth/defaultday. Using None ensure this raises an exception. + if isinstance(attr, date): + return attr + return isodate.parse_date(attr, defaultmonth=None, defaultday=None) # type: ignore + + +def _deserialize_time(attr: typing.Union[str, time]) -> time: + """Deserialize ISO-8601 formatted string into time object. + + :param str attr: response string to be deserialized. + :rtype: datetime.time + :returns: The time object from that input + """ + if isinstance(attr, time): + return attr + return isodate.parse_time(attr) # type: ignore[no-any-return] + + +def _deserialize_bytes(attr): + if isinstance(attr, (bytes, bytearray)): + return attr + return bytes(base64.b64decode(attr)) + + +def _deserialize_bytes_base64(attr): + if isinstance(attr, (bytes, bytearray)): + return attr + padding = "=" * (3 - (len(attr) + 3) % 4) # type: ignore + attr = attr + padding # type: ignore + encoded = attr.replace("-", "+").replace("_", "/") + return bytes(base64.b64decode(encoded)) + + +def _deserialize_duration(attr): + if isinstance(attr, timedelta): + return attr + return isodate.parse_duration(attr) + + +def _deserialize_decimal(attr): + if isinstance(attr, decimal.Decimal): + return attr + return decimal.Decimal(str(attr)) + + +def _deserialize_int_as_str(attr): + if isinstance(attr, int): + return attr + return int(attr) + + +_DESERIALIZE_MAPPING = { + datetime: _deserialize_datetime, + date: _deserialize_date, + time: _deserialize_time, + bytes: _deserialize_bytes, + bytearray: _deserialize_bytes, + timedelta: _deserialize_duration, + typing.Any: lambda x: x, + decimal.Decimal: _deserialize_decimal, +} + +_DESERIALIZE_MAPPING_WITHFORMAT = { + "rfc3339": _deserialize_datetime, + "rfc7231": _deserialize_datetime_rfc7231, + "unix-timestamp": _deserialize_datetime_unix_timestamp, + "base64": _deserialize_bytes, + "base64url": _deserialize_bytes_base64, +} + + +def get_deserializer(annotation: typing.Any, rf: typing.Optional["_RestField"] = None): + if annotation is int and rf and rf._format == "str": + return _deserialize_int_as_str + if annotation is str and rf and rf._format in _ARRAY_ENCODE_MAPPING: + return functools.partial(_deserialize_array_encoded, _ARRAY_ENCODE_MAPPING[rf._format]) + if rf and rf._format: + return _DESERIALIZE_MAPPING_WITHFORMAT.get(rf._format) + return _DESERIALIZE_MAPPING.get(annotation) # pyright: ignore + + +def _get_type_alias_type(module_name: str, alias_name: str): + types = { + k: v + for k, v in sys.modules[module_name].__dict__.items() + if isinstance(v, typing._GenericAlias) # type: ignore + } + if alias_name not in types: + return alias_name + return types[alias_name] + + +def _get_model(module_name: str, model_name: str): + models = {k: v for k, v in sys.modules[module_name].__dict__.items() if isinstance(v, type)} + module_end = module_name.rsplit(".", 1)[0] + models.update({k: v for k, v in sys.modules[module_end].__dict__.items() if isinstance(v, type)}) + if isinstance(model_name, str): + model_name = model_name.split(".")[-1] + if model_name not in models: + return model_name + return models[model_name] + + +_UNSET = object() + + +class _MyMutableMapping(MutableMapping[str, typing.Any]): + def __init__(self, data: dict[str, typing.Any]) -> None: + self._data = data + + def __contains__(self, key: typing.Any) -> bool: + return key in self._data + + def __getitem__(self, key: str) -> typing.Any: + # If this key has been deserialized (for mutable types), we need to handle serialization + if hasattr(self, "_attr_to_rest_field"): + cache_attr = f"_deserialized_{key}" + if hasattr(self, cache_attr): + rf = _get_rest_field(getattr(self, "_attr_to_rest_field"), key) + if rf: + value = self._data.get(key) + if isinstance(value, (dict, list, set)): + # For mutable types, serialize and return + # But also update _data with serialized form and clear flag + # so mutations via this returned value affect _data + serialized = _serialize(value, rf._format) + # If serialized form is same type (no transformation needed), + # return _data directly so mutations work + if isinstance(serialized, type(value)) and serialized == value: + return self._data.get(key) + # Otherwise return serialized copy and clear flag + try: + object.__delattr__(self, cache_attr) + except AttributeError: + pass + # Store serialized form back + self._data[key] = serialized + return serialized + return self._data.__getitem__(key) + + def __setitem__(self, key: str, value: typing.Any) -> None: + # Clear any cached deserialized value when setting through dictionary access + cache_attr = f"_deserialized_{key}" + try: + object.__delattr__(self, cache_attr) + except AttributeError: + pass + self._data.__setitem__(key, value) + + def __delitem__(self, key: str) -> None: + self._data.__delitem__(key) + + def __iter__(self) -> typing.Iterator[typing.Any]: + return self._data.__iter__() + + def __len__(self) -> int: + return self._data.__len__() + + def __ne__(self, other: typing.Any) -> bool: + return not self.__eq__(other) + + def keys(self) -> typing.KeysView[str]: + """ + :returns: a set-like object providing a view on D's keys + :rtype: ~typing.KeysView + """ + return self._data.keys() + + def values(self) -> typing.ValuesView[typing.Any]: + """ + :returns: an object providing a view on D's values + :rtype: ~typing.ValuesView + """ + return self._data.values() + + def items(self) -> typing.ItemsView[str, typing.Any]: + """ + :returns: set-like object providing a view on D's items + :rtype: ~typing.ItemsView + """ + return self._data.items() + + def get(self, key: str, default: typing.Any = None) -> typing.Any: + """ + Get the value for key if key is in the dictionary, else default. + :param str key: The key to look up. + :param any default: The value to return if key is not in the dictionary. Defaults to None + :returns: D[k] if k in D, else d. + :rtype: any + """ + try: + return self[key] + except KeyError: + return default + + @typing.overload + def pop(self, key: str) -> typing.Any: ... # pylint: disable=arguments-differ + + @typing.overload + def pop(self, key: str, default: _T) -> _T: ... # pylint: disable=signature-differs + + @typing.overload + def pop(self, key: str, default: typing.Any) -> typing.Any: ... # pylint: disable=signature-differs + + def pop(self, key: str, default: typing.Any = _UNSET) -> typing.Any: + """ + Removes specified key and return the corresponding value. + :param str key: The key to pop. + :param any default: The value to return if key is not in the dictionary + :returns: The value corresponding to the key. + :rtype: any + :raises KeyError: If key is not found and default is not given. + """ + if default is _UNSET: + return self._data.pop(key) + return self._data.pop(key, default) + + def popitem(self) -> tuple[str, typing.Any]: + """ + Removes and returns some (key, value) pair + :returns: The (key, value) pair. + :rtype: tuple + :raises KeyError: if D is empty. + """ + return self._data.popitem() + + def clear(self) -> None: + """ + Remove all items from D. + """ + self._data.clear() + + def update(self, *args: typing.Any, **kwargs: typing.Any) -> None: # pylint: disable=arguments-differ + """ + Updates D from mapping/iterable E and F. + :param any args: Either a mapping object or an iterable of key-value pairs. + """ + self._data.update(*args, **kwargs) + + @typing.overload + def setdefault(self, key: str, default: None = None) -> None: ... + + @typing.overload + def setdefault(self, key: str, default: typing.Any) -> typing.Any: ... # pylint: disable=signature-differs + + def setdefault(self, key: str, default: typing.Any = _UNSET) -> typing.Any: + """ + Same as calling D.get(k, d), and setting D[k]=d if k not found + :param str key: The key to look up. + :param any default: The value to set if key is not in the dictionary + :returns: D[k] if k in D, else d. + :rtype: any + """ + if default is _UNSET: + return self._data.setdefault(key) + return self._data.setdefault(key, default) + + def __eq__(self, other: typing.Any) -> bool: + if isinstance(other, _MyMutableMapping): + return self._data == other._data + try: + other_model = self.__class__(other) + except Exception: + return False + return self._data == other_model._data + + def __repr__(self) -> str: + return str(self._data) + + +def _is_model(obj: typing.Any) -> bool: + return getattr(obj, "_is_model", False) + + +def _serialize(o, format: typing.Optional[str] = None): # pylint: disable=too-many-return-statements + if isinstance(o, list): + if format in _ARRAY_ENCODE_MAPPING and all(isinstance(x, str) for x in o): + return _ARRAY_ENCODE_MAPPING[format].join(o) + return [_serialize(x, format) for x in o] + if isinstance(o, dict): + return {k: _serialize(v, format) for k, v in o.items()} + if isinstance(o, set): + return {_serialize(x, format) for x in o} + if isinstance(o, tuple): + return tuple(_serialize(x, format) for x in o) + if isinstance(o, (bytes, bytearray)): + return _serialize_bytes(o, format) + if isinstance(o, decimal.Decimal): + return float(o) + if isinstance(o, enum.Enum): + return o.value + if isinstance(o, int): + if format == "str": + return str(o) + return o + try: + # First try datetime.datetime + return _serialize_datetime(o, format) + except AttributeError: + pass + # Last, try datetime.timedelta + try: + return _timedelta_as_isostr(o) + except AttributeError: + # This will be raised when it hits value.total_seconds in the method above + pass + return o + + +def _get_rest_field(attr_to_rest_field: dict[str, "_RestField"], rest_name: str) -> typing.Optional["_RestField"]: + try: + return next(rf for rf in attr_to_rest_field.values() if rf._rest_name == rest_name) + except StopIteration: + return None + + +def _create_value(rf: typing.Optional["_RestField"], value: typing.Any) -> typing.Any: + if not rf: + return _serialize(value, None) + if rf._is_multipart_file_input: + return value + if rf._is_model: + return _deserialize(rf._type, value) + if isinstance(value, ET.Element): + value = _deserialize(rf._type, value) + return _serialize(value, rf._format) + + +# ============================================================================ +# Fast-path scalar deserializer functions for rest_field(deserializer=...) +# These are referenced from rest_field declarations to bypass the generic +# _deserialize -> _deserialize_with_callable chain. +# Only simple/primitive types — no models or container types. +# ============================================================================ + + +def _xml_deser_str(value): + if isinstance(value, ET.Element): + return value.text or "" + return str(value) if value is not None else None + + +def _xml_deser_int(value): + if isinstance(value, ET.Element): + return int(value.text) if value.text else None + return int(value) if value is not None else None + + +def _xml_deser_float(value): + if isinstance(value, ET.Element): + return float(value.text) if value.text else None + return float(value) if value is not None else None + + +def _xml_deser_bool(value): + if isinstance(value, ET.Element): + text = value.text + else: + text = value + if text is None: + return None + if text in (True, False): + return text + return text.lower() == "true" + + +# pylint: disable=docstring-missing-param +def _xml_deser_bytes(value): + """Deserialize bytes from XML (base64).""" + if isinstance(value, ET.Element): + text = value.text + else: + text = value + if text is None: + return None + return _deserialize_bytes(text) + + +def _xml_deser_bytes_base64url(value): + """Deserialize bytes from XML (base64url).""" + if isinstance(value, ET.Element): + text = value.text + else: + text = value + if text is None: + return None + return _deserialize_bytes_base64(text) + + +def _xml_deser_datetime(value): + """Deserialize a datetime from XML (ISO 8601 / rfc3339).""" + if isinstance(value, ET.Element): + text = value.text + else: + text = value + if text is None: + return None + return _deserialize_datetime(text) + + +def _xml_deser_datetime_rfc7231(value): + """Deserialize a datetime from XML (RFC7231 format).""" + if isinstance(value, ET.Element): + text = value.text + else: + text = value + if text is None: + return None + return _deserialize_datetime_rfc7231(text) + + +def _xml_deser_datetime_unix_timestamp(value): + """Deserialize a datetime from XML (Unix timestamp).""" + if isinstance(value, ET.Element): + text = value.text + else: + text = value + if text is None: + return None + return _deserialize_datetime_unix_timestamp(float(text)) + + +def _xml_deser_date(value): + """Deserialize a date from XML (ISO 8601).""" + if isinstance(value, ET.Element): + text = value.text + else: + text = value + if text is None: + return None + return _deserialize_date(text) + + +def _xml_deser_time(value): + """Deserialize a time from XML (ISO 8601).""" + if isinstance(value, ET.Element): + text = value.text + else: + text = value + if text is None: + return None + return _deserialize_time(text) + + +def _xml_deser_duration(value): + """Deserialize a timedelta from XML (ISO 8601 duration).""" + if isinstance(value, ET.Element): + text = value.text + else: + text = value + if text is None: + return None + return _deserialize_duration(text) + + +def _xml_deser_decimal(value): + """Deserialize a Decimal from XML.""" + if isinstance(value, ET.Element): + text = value.text + else: + text = value + if text is None: + return None + return _deserialize_decimal(text) + + +def _xml_deser_enum_or_str(enum_cls, value): + """Deserialize a Union[EnumType, str] from XML.""" + text = value.text if isinstance(value, ET.Element) else value + if text is None: + return None + try: + return enum_cls(text) + except ValueError: + return text + + +def _extract_xml_model_type(rf_type): + """Extract the concrete Model class from a resolved rf._type partial chain. + + Unwraps ``Optional[Model]`` and ``_deserialize_model(Model, ...)`` + wrappers. Only handles Model and Optional[Model] — other composite + types (List, Dict, Union, etc.) return None and fall through to the + generic ``_deserialize`` path at runtime. + """ + if rf_type is None: + return None + if isinstance(rf_type, type) and _is_model(rf_type): + return rf_type + if not isinstance(rf_type, functools.partial): + return None + func = rf_type.func + args = rf_type.args + if func is _deserialize_with_optional and args: + return _extract_xml_model_type(args[0]) + if func is _deserialize_model and args: + cls = args[0] + return cls if isinstance(cls, type) and _is_model(cls) else None + return None + + +def _build_xml_field_plan( # pylint: disable=docstring-missing-return, docstring-missing-rtype, unused-variable + cls, attr_to_rest_field: dict +) -> list: + """Build a precomputed XML field plan for fast _init_from_xml iteration. + + Called once per model class in __new__. Returns a list of tuples: + (rest_name, xml_name, kind, deser, rf_type, is_optional, items_name) + + kind: 0=wrapped, 1=attribute, 2=unwrapped, 3=text + + For Model and Optional[Model] fields that lack a scalar + ``_deserializer``, this function precomputes the Model class as the + deserializer so ``_init_from_xml`` can call ``ModelClass(element)`` + directly instead of going through the expensive + ``_get_deserialize_callable_from_annotation`` chain at runtime. + """ + model_meta = getattr(cls, "_xml", {}) + model_ns = model_meta.get("ns") or model_meta.get("namespace") + plan = [] + + for rf in attr_to_rest_field.values(): + prop_meta = getattr(rf, "_xml", {}) + deser = rf._deserializer + + xml_name = prop_meta.get("name", rf._rest_name) + xml_ns = _resolve_xml_ns(prop_meta, model_meta) + if xml_ns: + xml_name = "{" + xml_ns + "}" + xml_name + + is_optional = rf._is_optional + + # For Model / Optional[Model] fields without a scalar deserializer, + # precompute the Model class as the deserializer. + if deser is None and rf._type is not None: + model_cls = _extract_xml_model_type(rf._type) + if model_cls is not None: + deser = model_cls + + if prop_meta.get("attribute", False): + plan.append((rf._rest_name, xml_name, 1, deser, rf._type, is_optional, None)) + elif prop_meta.get("unwrapped", False): + items_name = prop_meta.get("itemsName") + if items_name: + items_ns = prop_meta.get("itemsNs") + if items_ns is not None: + xml_ns = items_ns + if xml_ns: + items_name = "{" + xml_ns + "}" + items_name + else: + items_name = xml_name + plan.append((rf._rest_name, xml_name, 2, deser, rf._type, is_optional, items_name)) + elif prop_meta.get("text", False): + plan.append((rf._rest_name, xml_name, 3, deser, rf._type, is_optional, None)) + else: + plan.append((rf._rest_name, xml_name, 0, deser, rf._type, is_optional, None)) + + return plan + + +# pylint: enable=docstring-missing-param +class Model(_MyMutableMapping): + _is_model = True + # label whether current class's _attr_to_rest_field has been calculated + # could not see _attr_to_rest_field directly because subclass inherits it from parent class + _calculated: set[str] = set() + + def __init__(self, *args: typing.Any, **kwargs: typing.Any) -> None: + class_name = self.__class__.__name__ + if len(args) > 1: + raise TypeError(f"{class_name}.__init__() takes 2 positional arguments but {len(args) + 1} were given") + dict_to_pass: dict[str, typing.Any] = {} + if args: + if isinstance(args[0], ET.Element): + dict_to_pass.update(self._init_from_xml(args[0])) + else: + dict_to_pass.update( + {k: _create_value(_get_rest_field(self._attr_to_rest_field, k), v) for k, v in args[0].items()} + ) + else: + non_attr_kwargs = [k for k in kwargs if k not in self._attr_to_rest_field] + if non_attr_kwargs: + # actual type errors only throw the first wrong keyword arg they see, so following that. + raise TypeError(f"{class_name}.__init__() got an unexpected keyword argument '{non_attr_kwargs[0]}'") + dict_to_pass.update( + { + self._attr_to_rest_field[k]._rest_name: _create_value(self._attr_to_rest_field[k], v) + for k, v in kwargs.items() + if v is not None + } + ) + # Apply client default values for fields the caller didn't set so that + # defaults are part of `_data` and therefore included during serialization. + for rf in self._attr_to_rest_field.values(): + if rf._default is _UNSET: + continue + if rf._rest_name in dict_to_pass: + continue + dict_to_pass[rf._rest_name] = _create_value(rf, rf._default) + super().__init__(dict_to_pass) + + def _init_from_xml( # pylint: disable=too-many-branches, too-many-statements + self, element: ET.Element + ) -> dict[str, typing.Any]: + """Deserialize an XML element into a dict mapping rest field names to values. + + :param ET.Element element: The XML element to deserialize from. + :returns: A dictionary of rest_name to deserialized value pairs. + :rtype: dict + """ + result: dict[str, typing.Any] = {} + existed_attr_keys: list[str] = [] + + field_plan = getattr(self, "_xml_field_plan", None) + if field_plan: + for rest_name, xml_name, kind, deser, rf_type, is_optional, items_name in field_plan: + if kind == 0: # wrapped element (most common) + item = element.find(xml_name) + if item is not None: + existed_attr_keys.append(xml_name) + if deser: + result[rest_name] = deser(item) + else: + result[rest_name] = _deserialize(rf_type, item) + elif kind == 1: # attribute + attr_val = element.get(xml_name) + if attr_val is not None: + existed_attr_keys.append(xml_name) + if deser: + result[rest_name] = deser(attr_val) + else: + result[rest_name] = attr_val + elif kind == 2: # unwrapped array + items = element.findall(items_name) # pyright: ignore + if len(items) > 0: + existed_attr_keys.append(items_name) + if deser: + result[rest_name] = deser(items) + else: + result[rest_name] = _deserialize(rf_type, items) + elif not is_optional: + existed_attr_keys.append(items_name) + result[rest_name] = [] + elif kind == 3: # text + if element.text is not None: + if deser: + result[rest_name] = deser(element.text) + else: + result[rest_name] = element.text + else: + model_meta = getattr(self, "_xml", {}) + for rf in self._attr_to_rest_field.values(): + prop_meta = getattr(rf, "_xml", {}) + xml_name = prop_meta.get("name", rf._rest_name) + xml_ns = _resolve_xml_ns(prop_meta, model_meta) + if xml_ns: + xml_name = "{" + xml_ns + "}" + xml_name + + # attribute + if prop_meta.get("attribute", False) and element.get(xml_name) is not None: + existed_attr_keys.append(xml_name) + result[rf._rest_name] = _deserialize(rf._type, element.get(xml_name)) + continue + + # unwrapped element is array + if prop_meta.get("unwrapped", False): + _items_name = prop_meta.get("itemsName") + if _items_name: + xml_name = _items_name + _items_ns = prop_meta.get("itemsNs") + if _items_ns is not None: + xml_ns = _items_ns + if xml_ns: + xml_name = "{" + xml_ns + "}" + xml_name + items = element.findall(xml_name) # pyright: ignore + if len(items) > 0: + existed_attr_keys.append(xml_name) + result[rf._rest_name] = _deserialize(rf._type, items) + elif not rf._is_optional: + existed_attr_keys.append(xml_name) + result[rf._rest_name] = [] + continue + + # text element is primitive type + if prop_meta.get("text", False): + if element.text is not None: + result[rf._rest_name] = _deserialize(rf._type, element.text) + continue + + # wrapped element could be normal property or array + item = element.find(xml_name) + if item is not None: + existed_attr_keys.append(xml_name) + result[rf._rest_name] = _deserialize(rf._type, item) + + # rest thing is additional properties + for e in element: + if e.tag not in existed_attr_keys: + result[e.tag] = _convert_element(e) + + return result + + def copy(self) -> "Model": + return Model(self.__dict__) + + def __new__(cls, *args: typing.Any, **kwargs: typing.Any) -> Self: + if f"{cls.__module__}.{cls.__qualname__}" not in cls._calculated: + # we know the last nine classes in mro are going to be 'Model', '_MyMutableMapping', 'MutableMapping', + # 'Mapping', 'Collection', 'Sized', 'Iterable', 'Container' and 'object' + mros = cls.__mro__[:-9][::-1] # ignore parents, and reverse the mro order + attr_to_rest_field: dict[str, _RestField] = { # map attribute name to rest_field property + k: v for mro_class in mros for k, v in mro_class.__dict__.items() if k[0] != "_" and hasattr(v, "_type") + } + annotations = { + k: v + for mro_class in mros + if hasattr(mro_class, "__annotations__") + for k, v in mro_class.__annotations__.items() + } + for attr, rf in attr_to_rest_field.items(): + rf._module = cls.__module__ + if not rf._type: + rf._type = rf._get_deserialize_callable_from_annotation(annotations.get(attr, None)) + if not rf._rest_name_input: + rf._rest_name_input = attr + cls._attr_to_rest_field: dict[str, _RestField] = dict(attr_to_rest_field.items()) + # Build XML field plan for fast _init_from_xml (only for XML models) + if getattr(cls, "_xml", None): + cls._xml_field_plan = _build_xml_field_plan(cls, attr_to_rest_field) + cls._calculated.add(f"{cls.__module__}.{cls.__qualname__}") + + return super().__new__(cls) + + def __init_subclass__(cls, discriminator: typing.Optional[str] = None) -> None: + for base in cls.__bases__: + if hasattr(base, "__mapping__"): + base.__mapping__[discriminator or cls.__name__] = cls # type: ignore + + @classmethod + def _get_discriminator(cls, exist_discriminators) -> typing.Optional["_RestField"]: + for v in cls.__dict__.values(): + if isinstance(v, _RestField) and v._is_discriminator and v._rest_name not in exist_discriminators: + return v + return None + + @classmethod + def _deserialize(cls, data, exist_discriminators): + if not hasattr(cls, "__mapping__"): + return cls(data) + discriminator = cls._get_discriminator(exist_discriminators) + if discriminator is None: + return cls(data) + exist_discriminators.append(discriminator._rest_name) + if isinstance(data, ET.Element): + model_meta = getattr(cls, "_xml", {}) + prop_meta = getattr(discriminator, "_xml", {}) + xml_name = prop_meta.get("name", discriminator._rest_name) + xml_ns = _resolve_xml_ns(prop_meta, model_meta) + if xml_ns: + xml_name = "{" + xml_ns + "}" + xml_name + + if data.get(xml_name) is not None: + discriminator_value = data.get(xml_name) + else: + discriminator_value = data.find(xml_name).text # pyright: ignore + else: + discriminator_value = data.get(discriminator._rest_name) + mapped_cls = cls.__mapping__.get(discriminator_value, cls) # pyright: ignore # pylint: disable=no-member + return mapped_cls._deserialize(data, exist_discriminators) + + def as_dict(self, *, exclude_readonly: bool = False) -> dict[str, typing.Any]: + """Return a dict that can be turned into json using json.dump. + + :keyword bool exclude_readonly: Whether to remove the readonly properties. + :returns: A dict JSON compatible object + :rtype: dict + """ + + result = {} + readonly_props = [] + if exclude_readonly: + readonly_props = [p._rest_name for p in self._attr_to_rest_field.values() if _is_readonly(p)] + for k, v in self.items(): + if exclude_readonly and k in readonly_props: # pyright: ignore + continue + is_multipart_file_input = False + try: + is_multipart_file_input = next( + rf for rf in self._attr_to_rest_field.values() if rf._rest_name == k + )._is_multipart_file_input + except StopIteration: + pass + result[k] = v if is_multipart_file_input else Model._as_dict_value(v, exclude_readonly=exclude_readonly) + return result + + @staticmethod + def _as_dict_value(v: typing.Any, exclude_readonly: bool = False) -> typing.Any: + if v is None or isinstance(v, _Null): + return None + if isinstance(v, (list, tuple, set)): + return type(v)(Model._as_dict_value(x, exclude_readonly=exclude_readonly) for x in v) + if isinstance(v, dict): + return {dk: Model._as_dict_value(dv, exclude_readonly=exclude_readonly) for dk, dv in v.items()} + return v.as_dict(exclude_readonly=exclude_readonly) if hasattr(v, "as_dict") else v + + +def _deserialize_model(model_deserializer: typing.Optional[typing.Callable], obj): + if _is_model(obj): + return obj + return _deserialize(model_deserializer, obj) + + +def _deserialize_with_optional(if_obj_deserializer: typing.Optional[typing.Callable], obj): + if obj is None: + return obj + return _deserialize_with_callable(if_obj_deserializer, obj) + + +def _deserialize_with_union(deserializers, obj): + for deserializer in deserializers: + try: + return _deserialize(deserializer, obj) + except DeserializationError: + pass + raise DeserializationError() + + +def _deserialize_dict( + value_deserializer: typing.Optional[typing.Callable], + module: typing.Optional[str], + obj: dict[typing.Any, typing.Any], +): + if obj is None: + return obj + if isinstance(obj, ET.Element): + obj = {child.tag: child for child in obj} + return {k: _deserialize(value_deserializer, v, module) for k, v in obj.items()} + + +def _deserialize_multiple_sequence( + entry_deserializers: list[typing.Optional[typing.Callable]], + module: typing.Optional[str], + obj, +): + if obj is None: + return obj + return type(obj)(_deserialize(deserializer, entry, module) for entry, deserializer in zip(obj, entry_deserializers)) + + +def _is_array_encoded_deserializer(deserializer: functools.partial) -> bool: + return ( + isinstance(deserializer, functools.partial) + and isinstance(deserializer.args[0], functools.partial) + and deserializer.args[0].func == _deserialize_array_encoded # pylint: disable=comparison-with-callable + ) + + +def _deserialize_sequence( + deserializer: typing.Optional[typing.Callable], + module: typing.Optional[str], + obj, +): + if obj is None: + return obj + if isinstance(obj, ET.Element): + obj = list(obj) + + # encoded string may be deserialized to sequence + if isinstance(obj, str) and isinstance(deserializer, functools.partial): + # for list[str] + if _is_array_encoded_deserializer(deserializer): + return deserializer(obj) + + # for list[Union[...]] + if isinstance(deserializer.args[0], list): + for sub_deserializer in deserializer.args[0]: + if _is_array_encoded_deserializer(sub_deserializer): + return sub_deserializer(obj) + + return type(obj)(_deserialize(deserializer, entry, module) for entry in obj) + + +def _sorted_annotations(types: list[typing.Any]) -> list[typing.Any]: + return sorted( + types, + key=lambda x: hasattr(x, "__name__") and x.__name__.lower() in ("str", "float", "int", "bool"), + ) + + +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-statements, too-many-branches + annotation: typing.Any, + module: typing.Optional[str], + rf: typing.Optional["_RestField"] = None, +) -> typing.Optional[typing.Callable[[typing.Any], typing.Any]]: + if not annotation: + return None + + # is it a type alias? + if isinstance(annotation, str): + if module is not None: + annotation = _get_type_alias_type(module, annotation) + + # is it a forward ref / in quotes? + if isinstance(annotation, (str, typing.ForwardRef)): + try: + model_name = annotation.__forward_arg__ # type: ignore + except AttributeError: + model_name = annotation + if module is not None: + annotation = _get_model(module, model_name) # type: ignore + + try: + if module and _is_model(annotation): + if rf: + rf._is_model = True + + return functools.partial(_deserialize_model, annotation) # pyright: ignore + except Exception: + pass + + # is it a literal? + try: + if annotation.__origin__ is typing.Literal: # pyright: ignore + return None + except AttributeError: + pass + + # is it optional? + try: + if any(a is _NONE_TYPE for a in annotation.__args__): # pyright: ignore + if rf: + rf._is_optional = True + if len(annotation.__args__) <= 2: # pyright: ignore + if_obj_deserializer = _get_deserialize_callable_from_annotation( + next(a for a in annotation.__args__ if a is not _NONE_TYPE), module, rf # pyright: ignore + ) + + return functools.partial(_deserialize_with_optional, if_obj_deserializer) + # the type is Optional[Union[...]], we need to remove the None type from the Union + annotation_copy = copy.copy(annotation) + annotation_copy.__args__ = [a for a in annotation_copy.__args__ if a is not _NONE_TYPE] # pyright: ignore + return _get_deserialize_callable_from_annotation(annotation_copy, module, rf) + except AttributeError: + pass + + # is it union? + if getattr(annotation, "__origin__", None) is typing.Union: + # initial ordering is we make `string` the last deserialization option, because it is often them most generic + deserializers = [ + _get_deserialize_callable_from_annotation(arg, module, rf) + for arg in _sorted_annotations(annotation.__args__) # pyright: ignore + ] + + return functools.partial(_deserialize_with_union, deserializers) + + try: + annotation_name = ( + annotation.__name__ if hasattr(annotation, "__name__") else annotation._name # pyright: ignore + ) + if annotation_name.lower() == "dict": + value_deserializer = _get_deserialize_callable_from_annotation( + annotation.__args__[1], module, rf # pyright: ignore + ) + + return functools.partial( + _deserialize_dict, + value_deserializer, + module, + ) + except (AttributeError, IndexError): + pass + try: + annotation_name = ( + annotation.__name__ if hasattr(annotation, "__name__") else annotation._name # pyright: ignore + ) + if annotation_name.lower() in ["list", "set", "tuple", "sequence"]: + if len(annotation.__args__) > 1: # pyright: ignore + entry_deserializers = [ + _get_deserialize_callable_from_annotation(dt, module, rf) + for dt in annotation.__args__ # pyright: ignore + ] + return functools.partial(_deserialize_multiple_sequence, entry_deserializers, module) + deserializer = _get_deserialize_callable_from_annotation( + annotation.__args__[0], module, rf # pyright: ignore + ) + + return functools.partial(_deserialize_sequence, deserializer, module) + except (TypeError, IndexError, AttributeError, SyntaxError): + pass + + def _deserialize_default( + deserializer, + obj, + ): + if obj is None: + return obj + try: + return _deserialize_with_callable(deserializer, obj) + except Exception: + pass + return obj + + if get_deserializer(annotation, rf): + return functools.partial(_deserialize_default, get_deserializer(annotation, rf)) + + return functools.partial(_deserialize_default, annotation) + + +def _deserialize_with_callable( + deserializer: typing.Optional[typing.Callable[[typing.Any], typing.Any]], + value: typing.Any, +): # pylint: disable=too-many-return-statements + try: + if value is None or isinstance(value, _Null): + return None + if isinstance(value, ET.Element): + if deserializer is str: + return value.text or "" + if deserializer is int: + return int(value.text) if value.text else None + if deserializer is float: + return float(value.text) if value.text else None + if deserializer is bool: + return value.text == "true" if value.text else None + if deserializer and deserializer in _DESERIALIZE_MAPPING.values(): + return deserializer(value.text) if value.text else None + if deserializer and deserializer in _DESERIALIZE_MAPPING_WITHFORMAT.values(): + return deserializer(value.text) if value.text else None + if deserializer is None: + return value + if deserializer in [int, float, bool]: + return deserializer(value) + if isinstance(deserializer, CaseInsensitiveEnumMeta): + try: + return deserializer(value.text if isinstance(value, ET.Element) else value) + except ValueError: + # for unknown value, return raw value + return value.text if isinstance(value, ET.Element) else value + if isinstance(deserializer, type) and issubclass(deserializer, Model): + return deserializer._deserialize(value, []) + return typing.cast(typing.Callable[[typing.Any], typing.Any], deserializer)(value) + except Exception as e: + raise DeserializationError() from e + + +def _deserialize( + deserializer: typing.Any, + value: typing.Any, + module: typing.Optional[str] = None, + rf: typing.Optional["_RestField"] = None, + format: typing.Optional[str] = None, +) -> typing.Any: + if isinstance(value, PipelineResponse): + value = value.http_response.json() + if rf is None and format: + rf = _RestField(format=format) + if not isinstance(deserializer, functools.partial): + deserializer = _get_deserialize_callable_from_annotation(deserializer, module, rf) + return _deserialize_with_callable(deserializer, value) + + +def _failsafe_deserialize( + deserializer: typing.Any, + response: HttpResponse, + module: typing.Optional[str] = None, + rf: typing.Optional["_RestField"] = None, + format: typing.Optional[str] = None, +) -> typing.Any: + try: + return _deserialize(deserializer, response.json(), module, rf, format) + except Exception: # pylint: disable=broad-except + _LOGGER.warning( + "Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True + ) + return None + + +def _failsafe_deserialize_xml( + deserializer: typing.Any, + response: HttpResponse, +) -> typing.Any: + try: + return _deserialize_xml(deserializer, response.text()) + except Exception: # pylint: disable=broad-except + _LOGGER.warning( + "Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True + ) + return None + + +# pylint: disable=too-many-instance-attributes +class _RestField: + def __init__( + self, + *, + name: typing.Optional[str] = None, + type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + is_discriminator: bool = False, + visibility: typing.Optional[list[str]] = None, + default: typing.Any = _UNSET, + format: typing.Optional[str] = None, + is_multipart_file_input: bool = False, + xml: typing.Optional[dict[str, typing.Any]] = None, + deserializer: typing.Optional[typing.Callable] = None, + ): + self._type = type + self._rest_name_input = name + self._module: typing.Optional[str] = None + self._is_discriminator = is_discriminator + self._visibility = visibility + self._is_model = False + self._is_optional = False + self._default = default + self._format = format + self._is_multipart_file_input = is_multipart_file_input + self._xml = xml if xml is not None else {} + self._deserializer = deserializer + + @property + def _class_type(self) -> typing.Any: + result = getattr(self._type, "args", [None])[0] + # type may be wrapped by nested functools.partial so we need to check for that + if isinstance(result, functools.partial): + return getattr(result, "args", [None])[0] + return result + + @property + def _rest_name(self) -> str: + if self._rest_name_input is None: + raise ValueError("Rest name was never set") + return self._rest_name_input + + def __get__(self, obj: Model, type=None): # pylint: disable=redefined-builtin + # by this point, type and rest_name will have a value bc we default + # them in __new__ of the Model class + # Use _data.get() directly to avoid triggering __getitem__ which clears the cache + item = obj._data.get(self._rest_name, _UNSET) + if item is _UNSET: + # Field not set by user; return the client default if one exists, otherwise None + return self._default if self._default is not _UNSET else None + if item is None: + return item + if self._is_model: + return item + + # For mutable types, we want mutations to directly affect _data + # Check if we've already deserialized this value + cache_attr = f"_deserialized_{self._rest_name}" + if hasattr(obj, cache_attr): + # Return the value from _data directly (it's been deserialized in place) + return obj._data.get(self._rest_name) + + # Fast path: use _deserializer directly (avoids _serialize/_deserialize chain) + if self._deserializer: + deserialized = self._deserializer(item) + else: + deserialized = _deserialize(self._type, _serialize(item, self._format), rf=self) + + # For mutable types, store the deserialized value back in _data + # so mutations directly affect _data + if isinstance(deserialized, (dict, list, set)): + obj._data[self._rest_name] = deserialized + object.__setattr__(obj, cache_attr, True) # Mark as deserialized + return deserialized + + return deserialized + + def __set__(self, obj: Model, value) -> None: + # Clear the cached deserialized object when setting a new value + cache_attr = f"_deserialized_{self._rest_name}" + if hasattr(obj, cache_attr): + object.__delattr__(obj, cache_attr) + + if value is None: + # we want to wipe out entries if users set attr to None + try: + obj.__delitem__(self._rest_name) + except KeyError: + pass + return + if self._is_model: + if not _is_model(value): + value = _deserialize(self._type, value) + obj.__setitem__(self._rest_name, value) + return + obj.__setitem__(self._rest_name, _serialize(value, self._format)) + + def _get_deserialize_callable_from_annotation( + self, annotation: typing.Any + ) -> typing.Optional[typing.Callable[[typing.Any], typing.Any]]: + return _get_deserialize_callable_from_annotation(annotation, self._module, self) + + +def rest_field( + *, + name: typing.Optional[str] = None, + type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[list[str]] = None, + default: typing.Any = _UNSET, + format: typing.Optional[str] = None, + is_multipart_file_input: bool = False, + xml: typing.Optional[dict[str, typing.Any]] = None, + deserializer: typing.Optional[typing.Callable] = None, +) -> typing.Any: + return _RestField( + name=name, + type=type, + visibility=visibility, + default=default, + format=format, + is_multipart_file_input=is_multipart_file_input, + xml=xml, + deserializer=deserializer, + ) + + +def rest_discriminator( + *, + name: typing.Optional[str] = None, + type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin + visibility: typing.Optional[list[str]] = None, + xml: typing.Optional[dict[str, typing.Any]] = None, +) -> typing.Any: + return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility, xml=xml) + + +def serialize_xml(model: Model, exclude_readonly: bool = False) -> str: + """Serialize a model to XML. + + :param Model model: The model to serialize. + :param bool exclude_readonly: Whether to exclude readonly properties. + :returns: The XML representation of the model. + :rtype: str + """ + return ET.tostring(_get_element(model, exclude_readonly), encoding="unicode") # type: ignore + + +def _get_xml_ns(meta: dict[str, typing.Any]) -> typing.Optional[str]: + """Return the XML namespace from a metadata dict, checking both 'ns' (old-style) and 'namespace' (DPG) keys. + + :param dict meta: The metadata dictionary to extract namespace from. + :returns: The namespace string if 'ns' or 'namespace' key is present, None otherwise. + :rtype: str or None + """ + ns = meta.get("ns") + if ns is None: + ns = meta.get("namespace") + return ns + + +def _resolve_xml_ns( + prop_meta: dict[str, typing.Any], model_meta: typing.Optional[dict[str, typing.Any]] = None +) -> typing.Optional[str]: + """Resolve XML namespace for a property, falling back to model namespace when appropriate. + + Checks the property metadata first; if no namespace is found and the model does not declare + an explicit prefix, falls back to the model-level namespace. + + :param dict prop_meta: The property metadata dictionary. + :param dict model_meta: The model metadata dictionary, used as fallback. + :returns: The resolved namespace string, or None. + :rtype: str or None + """ + ns = _get_xml_ns(prop_meta) + if ns is None and model_meta is not None and not model_meta.get("prefix"): + ns = _get_xml_ns(model_meta) + return ns + + +def _set_xml_attribute(element: ET.Element, name: str, value: typing.Any, prop_meta: dict[str, typing.Any]) -> None: + """Set an XML attribute on an element, handling namespace prefix registration. + + :param ET.Element element: The element to set the attribute on. + :param str name: The default attribute name (wire name). + :param any value: The attribute value. + :param dict prop_meta: The property metadata dictionary. + """ + xml_name = prop_meta.get("name", name) + _attr_ns = _get_xml_ns(prop_meta) + if _attr_ns: + _attr_prefix = prop_meta.get("prefix") + if _attr_prefix: + _safe_register_namespace(_attr_prefix, _attr_ns) + xml_name = "{" + _attr_ns + "}" + xml_name + element.set(xml_name, _get_primitive_type_value(value)) + + +def _get_element( + o: typing.Any, + exclude_readonly: bool = False, + parent_meta: typing.Optional[dict[str, typing.Any]] = None, + wrapped_element: typing.Optional[ET.Element] = None, +) -> typing.Union[ET.Element, list[ET.Element]]: + if _is_model(o): + model_meta = getattr(o, "_xml", {}) + + # if prop is a model, then use the prop element directly, else generate a wrapper of model + if wrapped_element is None: + # When serializing as an array item (parent_meta is set), check if the parent has an + # explicit itemsName. This ensures correct element names for unwrapped arrays (where + # the element tag is the property/items name, not the model type name). + _items_name = parent_meta.get("itemsName") if parent_meta is not None else None + element_name = _items_name if _items_name else (model_meta.get("name") or o.__class__.__name__) + _model_ns = _get_xml_ns(model_meta) + wrapped_element = _create_xml_element( + element_name, + model_meta.get("prefix"), + _model_ns, + ) + + readonly_props = [] + if exclude_readonly: + readonly_props = [p._rest_name for p in o._attr_to_rest_field.values() if _is_readonly(p)] + + for k, v in o.items(): + # do not serialize readonly properties + if exclude_readonly and k in readonly_props: + continue + + prop_rest_field = _get_rest_field(o._attr_to_rest_field, k) + if prop_rest_field: + prop_meta = getattr(prop_rest_field, "_xml").copy() + # use the wire name as xml name if no specific name is set + if prop_meta.get("name") is None: + prop_meta["name"] = k + else: + # additional properties will not have rest field, use the wire name as xml name + prop_meta = {"name": k} + + # Propagate model namespace to properties only for old-style "ns"-keyed models. + # DPG-generated models use the "namespace" key and explicitly declare namespace on + # each property that needs it, so propagation is intentionally skipped for them. + if prop_meta.get("ns") is None and model_meta.get("ns"): + prop_meta["ns"] = model_meta.get("ns") + prop_meta["prefix"] = model_meta.get("prefix") + + if prop_meta.get("unwrapped", False): + # unwrapped could only set on array + wrapped_element.extend(_get_element(v, exclude_readonly, prop_meta)) + elif prop_meta.get("text", False): + # text could only set on primitive type + wrapped_element.text = _get_primitive_type_value(v) + elif prop_meta.get("attribute", False): + _set_xml_attribute(wrapped_element, k, v, prop_meta) + else: + # other wrapped prop element + wrapped_element.append(_get_wrapped_element(v, exclude_readonly, prop_meta)) + return wrapped_element + if isinstance(o, list): + return [_get_element(x, exclude_readonly, parent_meta) for x in o] # type: ignore + if isinstance(o, dict): + result = [] + _dict_ns = _get_xml_ns(parent_meta) if parent_meta else None + for k, v in o.items(): + result.append( + _get_wrapped_element( + v, + exclude_readonly, + { + "name": k, + "ns": _dict_ns, + "prefix": parent_meta.get("prefix") if parent_meta else None, + }, + ) + ) + return result + + # primitive case need to create element based on parent_meta + if parent_meta: + _items_ns = parent_meta.get("itemsNs") + if _items_ns is None: + _items_ns = _get_xml_ns(parent_meta) + return _get_wrapped_element( + o, + exclude_readonly, + { + "name": parent_meta.get("itemsName", parent_meta.get("name")), + "prefix": parent_meta.get("itemsPrefix", parent_meta.get("prefix")), + "ns": _items_ns, + }, + ) + + raise ValueError("Could not serialize value into xml: " + o) + + +def _get_wrapped_element( + v: typing.Any, + exclude_readonly: bool, + meta: typing.Optional[dict[str, typing.Any]], +) -> ET.Element: + _meta_ns = _get_xml_ns(meta) if meta else None + wrapped_element = _create_xml_element( + meta.get("name") if meta else None, meta.get("prefix") if meta else None, _meta_ns + ) + if isinstance(v, (dict, list)): + wrapped_element.extend(_get_element(v, exclude_readonly, meta)) + elif _is_model(v): + _get_element(v, exclude_readonly, meta, wrapped_element) + else: + wrapped_element.text = _get_primitive_type_value(v) + return wrapped_element # type: ignore[no-any-return] + + +def _get_primitive_type_value(v) -> str: + if v is True: + return "true" + if v is False: + return "false" + if isinstance(v, _Null): + return "" + return str(v) + + +def _safe_register_namespace(prefix: str, ns: str) -> None: + """Register an XML namespace prefix, handling reserved prefix patterns. + + Some prefixes (e.g. 'ns2') match Python's reserved 'ns\\d+' pattern used for + auto-generated prefixes, causing register_namespace to raise ValueError. + Falls back to directly registering in the internal namespace map. + + :param str prefix: The namespace prefix to register. + :param str ns: The namespace URI. + """ + try: + ET.register_namespace(prefix, ns) + except ValueError: + _ns_map = getattr(ET, "_namespace_map", None) + if _ns_map is not None: + _ns_map[ns] = prefix + + +def _create_xml_element( + tag: typing.Any, prefix: typing.Optional[str] = None, ns: typing.Optional[str] = None +) -> ET.Element: + if prefix and ns: + _safe_register_namespace(prefix, ns) + if ns: + return ET.Element("{" + ns + "}" + tag) + return ET.Element(tag) + + +def _deserialize_xml( + deserializer: typing.Any, + value: str, +) -> typing.Any: + element = ET.fromstring(value) # nosec + if _is_model(deserializer): + return deserializer._deserialize(element, []) + return _deserialize(deserializer, element) + + +def _convert_element(e: ET.Element): + # dict case + if len(e.attrib) > 0 or len({child.tag for child in e}) > 1: + dict_result: dict[str, typing.Any] = {} + for child in e: + if dict_result.get(child.tag) is not None: + if isinstance(dict_result[child.tag], list): + dict_result[child.tag].append(_convert_element(child)) + else: + dict_result[child.tag] = [dict_result[child.tag], _convert_element(child)] + else: + dict_result[child.tag] = _convert_element(child) + dict_result.update(e.attrib) + return dict_result + # array case + if len(e) > 0: + array_result: list[typing.Any] = [] + for child in e: + array_result.append(_convert_element(child)) + return array_result + # primitive case + return e.text diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_serialization.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_utils/serialization.py similarity index 92% rename from sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_serialization.py rename to sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_utils/serialization.py index b24ab2885450..a088671e9c51 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_serialization.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_utils/serialization.py @@ -1,28 +1,10 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines +# coding=utf-8 # -------------------------------------------------------------------------- -# # Copyright (c) Microsoft Corporation. All rights reserved. -# -# The MIT License (MIT) -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the ""Software""), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -# IN THE SOFTWARE. -# +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # pyright: reportUnnecessaryTypeIgnoreComment=false @@ -39,7 +21,6 @@ import sys import codecs from typing import ( - Dict, Any, cast, Optional, @@ -48,10 +29,7 @@ IO, Mapping, Callable, - TypeVar, MutableMapping, - Type, - List, ) try: @@ -65,9 +43,13 @@ from azure.core.exceptions import DeserializationError, SerializationError from azure.core.serialization import NULL as CoreNull +if sys.version_info >= (3, 11): + from typing import Self +else: + from typing_extensions import Self + _BOM = codecs.BOM_UTF8.decode(encoding="utf-8") -ModelType = TypeVar("ModelType", bound="Model") JSON = MutableMapping[str, Any] @@ -185,73 +167,7 @@ def deserialize_from_http_generics(cls, body_bytes: Optional[Union[AnyStr, IO]], except NameError: _long_type = int - -class UTC(datetime.tzinfo): - """Time Zone info for handling UTC""" - - def utcoffset(self, dt): - """UTF offset for UTC is 0. - - :param datetime.datetime dt: The datetime - :returns: The offset - :rtype: datetime.timedelta - """ - return datetime.timedelta(0) - - def tzname(self, dt): - """Timestamp representation. - - :param datetime.datetime dt: The datetime - :returns: The timestamp representation - :rtype: str - """ - return "Z" - - def dst(self, dt): - """No daylight saving for UTC. - - :param datetime.datetime dt: The datetime - :returns: The daylight saving time - :rtype: datetime.timedelta - """ - return datetime.timedelta(hours=1) - - -try: - from datetime import timezone as _FixedOffset # type: ignore -except ImportError: # Python 2.7 - - class _FixedOffset(datetime.tzinfo): # type: ignore - """Fixed offset in minutes east from UTC. - Copy/pasted from Python doc - :param datetime.timedelta offset: offset in timedelta format - """ - - def __init__(self, offset) -> None: - self.__offset = offset - - def utcoffset(self, dt): - return self.__offset - - def tzname(self, dt): - return str(self.__offset.total_seconds() / 3600) - - def __repr__(self): - return "".format(self.tzname(None)) - - def dst(self, dt): - return datetime.timedelta(0) - - def __getinitargs__(self): - return (self.__offset,) - - -try: - from datetime import timezone - - TZ_UTC = timezone.utc -except ImportError: - TZ_UTC = UTC() # type: ignore +TZ_UTC = datetime.timezone.utc _FLATTEN = re.compile(r"(? None: - self.additional_properties: Optional[Dict[str, Any]] = {} + self.additional_properties: Optional[dict[str, Any]] = {} for k in kwargs: # pylint: disable=consider-using-dict-items if k not in self._attribute_map: _LOGGER.warning("%s is not a known attribute of class %s and will be ignored", k, self.__class__) @@ -397,7 +313,7 @@ def serialize(self, keep_readonly: bool = False, **kwargs: Any) -> JSON: def as_dict( self, keep_readonly: bool = True, - key_transformer: Callable[[str, Dict[str, Any], Any], Any] = attribute_transformer, + key_transformer: Callable[[str, dict[str, Any], Any], Any] = attribute_transformer, **kwargs: Any ) -> JSON: """Return a dict that can be serialized using json.dump. @@ -450,25 +366,25 @@ def _infer_class_models(cls): return client_models @classmethod - def deserialize(cls: Type[ModelType], data: Any, content_type: Optional[str] = None) -> ModelType: + def deserialize(cls, data: Any, content_type: Optional[str] = None) -> Self: """Parse a str using the RestAPI syntax and return a model. :param str data: A str using RestAPI structure. JSON by default. :param str content_type: JSON by default, set application/xml if XML. :returns: An instance of this model - :raises: DeserializationError if something went wrong - :rtype: ModelType + :raises DeserializationError: if something went wrong + :rtype: Self """ deserializer = Deserializer(cls._infer_class_models()) return deserializer(cls.__name__, data, content_type=content_type) # type: ignore @classmethod def from_dict( - cls: Type[ModelType], + cls, data: Any, - key_extractors: Optional[Callable[[str, Dict[str, Any], Any], Any]] = None, + key_extractors: Optional[Callable[[str, dict[str, Any], Any], Any]] = None, content_type: Optional[str] = None, - ) -> ModelType: + ) -> Self: """Parse a dict using given key extractor return a model. By default consider key @@ -479,8 +395,8 @@ def from_dict( :param function key_extractors: A key extractor function. :param str content_type: JSON by default, set application/xml if XML. :returns: An instance of this model - :raises: DeserializationError if something went wrong - :rtype: ModelType + :raises DeserializationError: if something went wrong + :rtype: Self """ deserializer = Deserializer(cls._infer_class_models()) deserializer.key_extractors = ( # type: ignore @@ -500,7 +416,7 @@ def _flatten_subtype(cls, key, objects): return {} result = dict(cls._subtype_map[key]) for valuetype in cls._subtype_map[key].values(): - result.update(objects[valuetype]._flatten_subtype(key, objects)) # pylint: disable=protected-access + result |= objects[valuetype]._flatten_subtype(key, objects) # pylint: disable=protected-access return result @classmethod @@ -614,7 +530,7 @@ def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None: "[]": self.serialize_iter, "{}": self.serialize_dict, } - self.dependencies: Dict[str, type] = dict(classes) if classes else {} + self.dependencies: dict[str, type] = dict(classes) if classes else {} self.key_transformer = full_restapi_key_transformer self.client_side_validation = True @@ -626,7 +542,7 @@ def _serialize( # pylint: disable=too-many-nested-blocks, too-many-branches, to :param object target_obj: The data to be serialized. :param str data_type: The type to be serialized from. :rtype: str, dict - :raises: SerializationError if serialization fails. + :raises SerializationError: if serialization fails. :returns: The serialized data. """ key_transformer = kwargs.get("key_transformer", self.key_transformer) @@ -665,7 +581,7 @@ def _serialize( # pylint: disable=too-many-nested-blocks, too-many-branches, to if attr_name == "additional_properties" and attr_desc["key"] == "": if target_obj.additional_properties is not None: - serialized.update(target_obj.additional_properties) + serialized |= target_obj.additional_properties continue try: @@ -736,8 +652,8 @@ def body(self, data, data_type, **kwargs): :param object data: The data to be serialized. :param str data_type: The type to be serialized from. :rtype: dict - :raises: SerializationError if serialization fails. - :raises: ValueError if data is None + :raises SerializationError: if serialization fails. + :raises ValueError: if data is None :returns: The serialized request body """ @@ -781,8 +697,8 @@ def url(self, name, data, data_type, **kwargs): :param str data_type: The type to be serialized from. :rtype: str :returns: The serialized URL path - :raises: TypeError if serialization fails. - :raises: ValueError if data is None + :raises TypeError: if serialization fails. + :raises ValueError: if data is None """ try: output = self.serialize_data(data, data_type, **kwargs) @@ -805,8 +721,8 @@ def query(self, name, data, data_type, **kwargs): :param object data: The data to be serialized. :param str data_type: The type to be serialized from. :rtype: str, list - :raises: TypeError if serialization fails. - :raises: ValueError if data is None + :raises TypeError: if serialization fails. + :raises ValueError: if data is None :returns: The serialized query parameter """ try: @@ -835,8 +751,8 @@ def header(self, name, data, data_type, **kwargs): :param object data: The data to be serialized. :param str data_type: The type to be serialized from. :rtype: str - :raises: TypeError if serialization fails. - :raises: ValueError if data is None + :raises TypeError: if serialization fails. + :raises ValueError: if data is None :returns: The serialized header """ try: @@ -855,9 +771,9 @@ def serialize_data(self, data, data_type, **kwargs): :param object data: The data to be serialized. :param str data_type: The type to be serialized from. - :raises: AttributeError if required data is None. - :raises: ValueError if data is None - :raises: SerializationError if serialization fails. + :raises AttributeError: if required data is None. + :raises ValueError: if data is None + :raises SerializationError: if serialization fails. :returns: The serialized data. :rtype: str, int, float, bool, dict, list """ @@ -875,7 +791,7 @@ def serialize_data(self, data, data_type, **kwargs): # If dependencies is empty, try with current data class # It has to be a subclass of Enum anyway - enum_type = self.dependencies.get(data_type, data.__class__) + enum_type = self.dependencies.get(data_type, cast(type, data.__class__)) if issubclass(enum_type, Enum): return Serializer.serialize_enum(data, enum_obj=enum_type) @@ -909,13 +825,20 @@ def serialize_basic(cls, data, data_type, **kwargs): :param str data_type: Type of object in the iterable. :rtype: str, int, float, bool :return: serialized object + :raises TypeError: raise if data_type is not one of str, int, float, bool. """ custom_serializer = cls._get_custom_serializers(data_type, **kwargs) if custom_serializer: return custom_serializer(data) if data_type == "str": return cls.serialize_unicode(data) - return eval(data_type)(data) # nosec # pylint: disable=eval-used + if data_type == "int": + return int(data) + if data_type == "float": + return float(data) + if data_type == "bool": + return bool(data) + raise TypeError("Unknown basic data type: {}".format(data_type)) @classmethod def serialize_unicode(cls, data): @@ -1192,7 +1115,7 @@ def serialize_rfc(attr, **kwargs): # pylint: disable=unused-argument :param Datetime attr: Object to be serialized. :rtype: str - :raises: TypeError if format invalid. + :raises TypeError: if format invalid. :return: serialized rfc """ try: @@ -1218,7 +1141,7 @@ def serialize_iso(attr, **kwargs): # pylint: disable=unused-argument :param Datetime attr: Object to be serialized. :rtype: str - :raises: SerializationError if format invalid. + :raises SerializationError: if format invalid. :return: serialized iso """ if isinstance(attr, str): @@ -1251,7 +1174,7 @@ def serialize_unix(attr, **kwargs): # pylint: disable=unused-argument :param Datetime attr: Object to be serialized. :rtype: int - :raises: SerializationError if format invalid + :raises SerializationError: if format invalid :return: serialied unix """ if isinstance(attr, int): @@ -1270,7 +1193,7 @@ def rest_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argumen while "." in key: # Need the cast, as for some reasons "split" is typed as list[str | Any] - dict_keys = cast(List[str], _FLATTEN.split(key)) + dict_keys = cast(list[str], _FLATTEN.split(key)) if len(dict_keys) == 1: key = _decode_attribute_map_key(dict_keys[0]) break @@ -1429,7 +1352,7 @@ def xml_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument # Iter and wrapped, should have found one node only (the wrap one) if len(children) != 1: raise DeserializationError( - "Tried to deserialize an array not wrapped, and found several nodes '{}'. Maybe you should declare this array as wrapped?".format( # pylint: disable=line-too-long + "Tried to deserialize an array not wrapped, and found several nodes '{}'. Maybe you should declare this array as wrapped?".format( xml_name ) ) @@ -1472,7 +1395,7 @@ def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None: "duration": (isodate.Duration, datetime.timedelta), "iso-8601": (datetime.datetime), } - self.dependencies: Dict[str, type] = dict(classes) if classes else {} + self.dependencies: dict[str, type] = dict(classes) if classes else {} self.key_extractors = [rest_key_extractor, xml_key_extractor] # Additional properties only works if the "rest_key_extractor" is used to # extract the keys. Making it to work whatever the key extractor is too much @@ -1482,16 +1405,37 @@ def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None: # Otherwise, result are unexpected self.additional_properties_detection = True - def __call__(self, target_obj, response_data, content_type=None): + def __call__(self, target_obj, response_data, content_type=None): # pylint: disable=too-many-return-statements """Call the deserializer to process a REST response. :param str target_obj: Target data type to deserialize to. :param requests.Response response_data: REST response object. :param str content_type: Swagger "produces" if available. - :raises: DeserializationError if deserialization fails. + :raises DeserializationError: if deserialization fails. :return: Deserialized object. :rtype: object """ + # Fast path for header deserialization: response_data is a plain str or None + # and target_obj is a simple scalar type. This avoids the expensive + # _unpack_content → _deserialize → _classify_target → deserialize_data chain. + if response_data is None: + return None + if target_obj == "str" and isinstance(response_data, str): + return response_data + if isinstance(response_data, str): + if target_obj == "int": + return int(response_data) + if target_obj == "bool": + if response_data in ("true", "1", "True"): + return True + if response_data in ("false", "0", "False"): + return False + return bool(response_data) + if target_obj == "rfc-1123": + return Deserializer.deserialize_rfc(response_data) + if target_obj == "bytearray": + return Deserializer.deserialize_bytearray(response_data) + data = self._unpack_content(response_data, content_type) return self._deserialize(target_obj, data) @@ -1502,7 +1446,7 @@ def _deserialize(self, target_obj, data): # pylint: disable=inconsistent-return :param str target_obj: Target data type to deserialize to. :param object data: Object to deserialize. - :raises: DeserializationError if deserialization fails. + :raises DeserializationError: if deserialization fails. :return: Deserialized object. :rtype: object """ @@ -1717,7 +1661,7 @@ def deserialize_data(self, data, data_type): # pylint: disable=too-many-return- :param str data: The response string to be deserialized. :param str data_type: The type to deserialize to. - :raises: DeserializationError if deserialization fails. + :raises DeserializationError: if deserialization fails. :return: Deserialized object. :rtype: object """ @@ -1799,7 +1743,7 @@ def deserialize_object(self, attr, **kwargs): # pylint: disable=too-many-return :param dict attr: Dictionary to be deserialized. :return: Deserialized object. :rtype: dict - :raises: TypeError if non-builtin datatype encountered. + :raises TypeError: if non-builtin datatype encountered. """ if attr is None: return None @@ -1845,7 +1789,7 @@ def deserialize_basic(self, attr, data_type): # pylint: disable=too-many-return :param str data_type: deserialization data type. :return: Deserialized basic type. :rtype: str, int, float or bool - :raises: TypeError if string format is not valid. + :raises TypeError: if string format is not valid or data_type is not one of str, int, float, bool. """ # If we're here, data is supposed to be a basic type. # If it's still an XML node, take the text @@ -1871,7 +1815,11 @@ def deserialize_basic(self, attr, data_type): # pylint: disable=too-many-return if data_type == "str": return self.deserialize_unicode(attr) - return eval(data_type)(attr) # nosec # pylint: disable=eval-used + if data_type == "int": + return int(attr) + if data_type == "float": + return float(attr) + raise TypeError("Unknown basic data type: {}".format(data_type)) @staticmethod def deserialize_unicode(data): @@ -1936,7 +1884,7 @@ def deserialize_bytearray(attr): :param str attr: response string to be deserialized. :return: Deserialized bytearray :rtype: bytearray - :raises: TypeError if string format invalid. + :raises TypeError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -1949,7 +1897,7 @@ def deserialize_base64(attr): :param str attr: response string to be deserialized. :return: Deserialized base64 string :rtype: bytearray - :raises: TypeError if string format invalid. + :raises TypeError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -1964,7 +1912,7 @@ def deserialize_decimal(attr): :param str attr: response string to be deserialized. :return: Deserialized decimal - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. :rtype: decimal """ if isinstance(attr, ET.Element): @@ -1982,7 +1930,7 @@ def deserialize_long(attr): :param str attr: response string to be deserialized. :return: Deserialized int :rtype: long or int - :raises: ValueError if string format invalid. + :raises ValueError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -1995,7 +1943,7 @@ def deserialize_duration(attr): :param str attr: response string to be deserialized. :return: Deserialized duration :rtype: TimeDelta - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -2013,7 +1961,7 @@ def deserialize_date(attr): :param str attr: response string to be deserialized. :return: Deserialized date :rtype: Date - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -2029,7 +1977,7 @@ def deserialize_time(attr): :param str attr: response string to be deserialized. :return: Deserialized time :rtype: datetime.time - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -2044,14 +1992,14 @@ def deserialize_rfc(attr): :param str attr: response string to be deserialized. :return: Deserialized RFC datetime :rtype: Datetime - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text try: parsed_date = email.utils.parsedate_tz(attr) # type: ignore date_obj = datetime.datetime( - *parsed_date[:6], tzinfo=_FixedOffset(datetime.timedelta(minutes=(parsed_date[9] or 0) / 60)) + *parsed_date[:6], tzinfo=datetime.timezone(datetime.timedelta(minutes=(parsed_date[9] or 0) / 60)) ) if not date_obj.tzinfo: date_obj = date_obj.astimezone(tz=TZ_UTC) @@ -2067,7 +2015,7 @@ def deserialize_iso(attr): :param str attr: response string to be deserialized. :return: Deserialized ISO datetime :rtype: Datetime - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -2105,7 +2053,7 @@ def deserialize_unix(attr): :param int attr: Object to be serialized. :return: Deserialized datetime :rtype: Datetime - :raises: DeserializationError if format invalid + :raises DeserializationError: if format invalid """ if isinstance(attr, ET.Element): attr = int(attr.text) # type: ignore diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_utils/utils.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_utils/utils.py new file mode 100644 index 000000000000..cbaa624660e4 --- /dev/null +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_utils/utils.py @@ -0,0 +1,40 @@ +# -------------------------------------------------------------------------- +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Optional + +from azure.core import MatchConditions + + +def quote_etag(etag: Optional[str]) -> Optional[str]: + if not etag or etag == "*": + return etag + if etag.startswith("W/"): + return etag + if etag.startswith('"') and etag.endswith('"'): + return etag + if etag.startswith("'") and etag.endswith("'"): + return etag + return '"' + etag + '"' + + +def prep_if_match(etag: Optional[str], match_condition: Optional[MatchConditions]) -> Optional[str]: + if match_condition == MatchConditions.IfNotModified: + if_match = quote_etag(etag) if etag else None + return if_match + if match_condition == MatchConditions.IfPresent: + return "*" + return None + + +def prep_if_none_match(etag: Optional[str], match_condition: Optional[MatchConditions]) -> Optional[str]: + if match_condition == MatchConditions.IfModified: + if_none_match = quote_etag(etag) if etag else None + return if_none_match + if match_condition == MatchConditions.IfMissing: + return "*" + return None diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_version.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_version.py index 4e7803b46b5b..d8104af596a5 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_version.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/_version.py @@ -2,8 +2,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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "3.4.0" +VERSION = "3.5.0" diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/__init__.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/__init__.py index b3a09dea7e35..6480afc12e38 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/__init__.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/__init__.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # pylint: disable=wrong-import-position @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._kusto_management_client import KustoManagementClient # type: ignore +from ._client import KustoManagementClient # type: ignore try: from ._patch import __all__ as _patch_all diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/_kusto_management_client.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/_client.py similarity index 80% rename from sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/_kusto_management_client.py rename to sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/_client.py index 9c883495c3d4..885e2ffb6262 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/_kusto_management_client.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/_client.py @@ -2,21 +2,22 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from copy import deepcopy -from typing import Any, Awaitable, TYPE_CHECKING -from typing_extensions import Self +import sys +from typing import Any, Awaitable, Optional, TYPE_CHECKING, cast from azure.core.pipeline import policies from azure.core.rest import AsyncHttpResponse, HttpRequest +from azure.core.settings import settings from azure.mgmt.core import AsyncARMPipelineClient from azure.mgmt.core.policies import AsyncARMAutoResourceProviderRegistrationPolicy +from azure.mgmt.core.tools import get_arm_endpoints -from .. import models as _models -from .._serialization import Deserializer, Serializer +from .._utils.serialization import Deserializer, Serializer from ._configuration import KustoManagementClientConfiguration from .operations import ( AttachedDatabaseConfigurationsOperations, @@ -37,7 +38,13 @@ SkusOperations, ) +if sys.version_info >= (3, 11): + from typing import Self +else: + from typing_extensions import Self # type: ignore + if TYPE_CHECKING: + from azure.core import AzureClouds from azure.core.credentials_async import AsyncTokenCredential @@ -46,13 +53,18 @@ class KustoManagementClient: # pylint: disable=too-many-instance-attributes Kusto services to manage your clusters and databases. The API enables you to create, update, and delete clusters and databases. - :ivar clusters: ClustersOperations operations - :vartype clusters: azure.mgmt.kusto.aio.operations.ClustersOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.kusto.aio.operations.Operations :ivar cluster_principal_assignments: ClusterPrincipalAssignmentsOperations operations :vartype cluster_principal_assignments: azure.mgmt.kusto.aio.operations.ClusterPrincipalAssignmentsOperations - :ivar skus: SkusOperations operations - :vartype skus: azure.mgmt.kusto.aio.operations.SkusOperations + :ivar database_principal_assignments: DatabasePrincipalAssignmentsOperations operations + :vartype database_principal_assignments: + azure.mgmt.kusto.aio.operations.DatabasePrincipalAssignmentsOperations + :ivar scripts: ScriptsOperations operations + :vartype scripts: azure.mgmt.kusto.aio.operations.ScriptsOperations + :ivar data_connections: DataConnectionsOperations operations + :vartype data_connections: azure.mgmt.kusto.aio.operations.DataConnectionsOperations :ivar databases: DatabasesOperations operations :vartype databases: azure.mgmt.kusto.aio.operations.DatabasesOperations :ivar attached_database_configurations: AttachedDatabaseConfigurationsOperations operations @@ -61,37 +73,36 @@ class KustoManagementClient: # pylint: disable=too-many-instance-attributes :ivar managed_private_endpoints: ManagedPrivateEndpointsOperations operations :vartype managed_private_endpoints: azure.mgmt.kusto.aio.operations.ManagedPrivateEndpointsOperations - :ivar database: DatabaseOperations operations - :vartype database: azure.mgmt.kusto.aio.operations.DatabaseOperations - :ivar database_principal_assignments: DatabasePrincipalAssignmentsOperations operations - :vartype database_principal_assignments: - azure.mgmt.kusto.aio.operations.DatabasePrincipalAssignmentsOperations - :ivar scripts: ScriptsOperations operations - :vartype scripts: azure.mgmt.kusto.aio.operations.ScriptsOperations :ivar sandbox_custom_images: SandboxCustomImagesOperations operations :vartype sandbox_custom_images: azure.mgmt.kusto.aio.operations.SandboxCustomImagesOperations + :ivar clusters: ClustersOperations operations + :vartype clusters: azure.mgmt.kusto.aio.operations.ClustersOperations :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations :vartype private_endpoint_connections: azure.mgmt.kusto.aio.operations.PrivateEndpointConnectionsOperations :ivar private_link_resources: PrivateLinkResourcesOperations operations :vartype private_link_resources: azure.mgmt.kusto.aio.operations.PrivateLinkResourcesOperations - :ivar data_connections: DataConnectionsOperations operations - :vartype data_connections: azure.mgmt.kusto.aio.operations.DataConnectionsOperations - :ivar operations: Operations operations - :vartype operations: azure.mgmt.kusto.aio.operations.Operations + :ivar database: DatabaseOperations operations + :vartype database: azure.mgmt.kusto.aio.operations.DatabaseOperations + :ivar skus: SkusOperations operations + :vartype skus: azure.mgmt.kusto.aio.operations.SkusOperations :ivar operations_results: OperationsResultsOperations operations :vartype operations_results: azure.mgmt.kusto.aio.operations.OperationsResultsOperations :ivar operations_results_location: OperationsResultsLocationOperations operations :vartype operations_results_location: azure.mgmt.kusto.aio.operations.OperationsResultsLocationOperations - :param credential: Credential needed for the client to connect to Azure. Required. + :param credential: Credential used to authenticate requests to the service. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: The ID of the target subscription. Required. + :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. :type subscription_id: str - :param base_url: Service URL. Default value is "https://management.azure.com". + :param base_url: Service host. Default value is None. :type base_url: str - :keyword api_version: Api Version. Default value is "2024-04-13". Note that overriding this - default value may result in unsupported behavior. + :keyword cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is + None. + :paramtype cloud_setting: ~azure.core.AzureClouds + :keyword api_version: The API version to use for this operation. Known values are "2025-02-14" + and None. Default value is None. If not set, the operation's default API version will be used. + Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. @@ -101,12 +112,26 @@ def __init__( self, credential: "AsyncTokenCredential", subscription_id: str, - base_url: str = "https://management.azure.com", + base_url: Optional[str] = None, + *, + cloud_setting: Optional["AzureClouds"] = None, **kwargs: Any ) -> None: + _endpoint = "{endpoint}" + _cloud = cloud_setting or settings.current.azure_cloud # type: ignore + _endpoints = get_arm_endpoints(_cloud) + if not base_url: + base_url = _endpoints["resource_manager"] + credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"]) self._config = KustoManagementClientConfiguration( - credential=credential, subscription_id=subscription_id, **kwargs + credential=credential, + subscription_id=subscription_id, + base_url=cast(str, base_url), + cloud_setting=cloud_setting, + credential_scopes=credential_scopes, + **kwargs ) + _policies = kwargs.pop("policies", None) if _policies is None: _policies = [ @@ -125,17 +150,24 @@ def __init__( policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None, self._config.http_logging_policy, ] - self._client: AsyncARMPipelineClient = AsyncARMPipelineClient(base_url=base_url, policies=_policies, **kwargs) + self._client: AsyncARMPipelineClient = AsyncARMPipelineClient( + base_url=cast(str, _endpoint), policies=_policies, **kwargs + ) - client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) + self._serialize = Serializer() + self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.clusters = ClustersOperations(self._client, self._config, self._serialize, self._deserialize) + self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) self.cluster_principal_assignments = ClusterPrincipalAssignmentsOperations( self._client, self._config, self._serialize, self._deserialize ) - self.skus = SkusOperations(self._client, self._config, self._serialize, self._deserialize) + self.database_principal_assignments = DatabasePrincipalAssignmentsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.scripts = ScriptsOperations(self._client, self._config, self._serialize, self._deserialize) + self.data_connections = DataConnectionsOperations( + self._client, self._config, self._serialize, self._deserialize + ) self.databases = DatabasesOperations(self._client, self._config, self._serialize, self._deserialize) self.attached_database_configurations = AttachedDatabaseConfigurationsOperations( self._client, self._config, self._serialize, self._deserialize @@ -143,24 +175,18 @@ def __init__( self.managed_private_endpoints = ManagedPrivateEndpointsOperations( self._client, self._config, self._serialize, self._deserialize ) - self.database = DatabaseOperations(self._client, self._config, self._serialize, self._deserialize) - self.database_principal_assignments = DatabasePrincipalAssignmentsOperations( - self._client, self._config, self._serialize, self._deserialize - ) - self.scripts = ScriptsOperations(self._client, self._config, self._serialize, self._deserialize) self.sandbox_custom_images = SandboxCustomImagesOperations( self._client, self._config, self._serialize, self._deserialize ) + self.clusters = ClustersOperations(self._client, self._config, self._serialize, self._deserialize) self.private_endpoint_connections = PrivateEndpointConnectionsOperations( self._client, self._config, self._serialize, self._deserialize ) self.private_link_resources = PrivateLinkResourcesOperations( self._client, self._config, self._serialize, self._deserialize ) - self.data_connections = DataConnectionsOperations( - self._client, self._config, self._serialize, self._deserialize - ) - self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) + self.database = DatabaseOperations(self._client, self._config, self._serialize, self._deserialize) + self.skus = SkusOperations(self._client, self._config, self._serialize, self._deserialize) self.operations_results = OperationsResultsOperations( self._client, self._config, self._serialize, self._deserialize ) @@ -168,7 +194,7 @@ def __init__( self._client, self._config, self._serialize, self._deserialize ) - def _send_request( + def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any ) -> Awaitable[AsyncHttpResponse]: """Runs the network request through the client's chained policies. @@ -176,7 +202,7 @@ def _send_request( >>> from azure.core.rest import HttpRequest >>> request = HttpRequest("GET", "https://www.example.org/") - >>> response = await client._send_request(request) + >>> response = await client.send_request(request) For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request @@ -189,7 +215,11 @@ def _send_request( """ request_copy = deepcopy(request) - request_copy.url = self._client.format_url(request_copy.url) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore async def close(self) -> None: diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/_configuration.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/_configuration.py index af2b7619049f..3966ab073746 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/_configuration.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/_configuration.py @@ -2,11 +2,11 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, TYPE_CHECKING +from typing import Any, Optional, TYPE_CHECKING from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy @@ -14,6 +14,7 @@ from .._version import VERSION if TYPE_CHECKING: + from azure.core import AzureClouds from azure.core.credentials_async import AsyncTokenCredential @@ -23,17 +24,30 @@ class KustoManagementClientConfiguration: # pylint: disable=too-many-instance-a Note that all parameters used to create this instance are saved as instance attributes. - :param credential: Credential needed for the client to connect to Azure. Required. + :param credential: Credential used to authenticate requests to the service. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: The ID of the target subscription. Required. + :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. :type subscription_id: str - :keyword api_version: Api Version. Default value is "2024-04-13". Note that overriding this - default value may result in unsupported behavior. + :param base_url: Service host. Default value is "https://management.azure.com". + :type base_url: str + :param cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is + None. + :type cloud_setting: ~azure.core.AzureClouds + :keyword api_version: The API version to use for this operation. Known values are "2025-02-14" + and None. Default value is None. If not set, the operation's default API version will be used. + Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str """ - def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: - api_version: str = kwargs.pop("api_version", "2024-04-13") + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + base_url: str = "https://management.azure.com", + cloud_setting: Optional["AzureClouds"] = None, + **kwargs: Any + ) -> None: + api_version: str = kwargs.pop("api_version", "2025-02-14") if credential is None: raise ValueError("Parameter 'credential' must not be None.") @@ -42,6 +56,8 @@ def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **k self.credential = credential self.subscription_id = subscription_id + self.base_url = base_url + self.cloud_setting = cloud_setting self.api_version = api_version self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"]) kwargs.setdefault("sdk_moniker", "mgmt-kusto/{}".format(VERSION)) diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/_patch.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/_patch.py index 17dbc073e01b..ea765788358a 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/_patch.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/_patch.py @@ -1,32 +1,20 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# # Copyright (c) Microsoft Corporation. All rights reserved. -# -# The MIT License (MIT) -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the ""Software""), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -# IN THE SOFTWARE. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------- +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" + +__all__: list[str] = [] # Add all objects you want publicly available to users at this package level -# This file is used for handwritten extensions to the generated code. Example: -# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md def patch_sdk(): - pass + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/__init__.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/__init__.py index e2da7c0b4ba8..4b17e5aede88 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/__init__.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/__init__.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # pylint: disable=wrong-import-position @@ -12,42 +12,42 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._clusters_operations import ClustersOperations # type: ignore -from ._cluster_principal_assignments_operations import ClusterPrincipalAssignmentsOperations # type: ignore -from ._skus_operations import SkusOperations # type: ignore -from ._databases_operations import DatabasesOperations # type: ignore -from ._attached_database_configurations_operations import AttachedDatabaseConfigurationsOperations # type: ignore -from ._managed_private_endpoints_operations import ManagedPrivateEndpointsOperations # type: ignore -from ._database_operations import DatabaseOperations # type: ignore -from ._database_principal_assignments_operations import DatabasePrincipalAssignmentsOperations # type: ignore -from ._scripts_operations import ScriptsOperations # type: ignore -from ._sandbox_custom_images_operations import SandboxCustomImagesOperations # type: ignore -from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations # type: ignore -from ._private_link_resources_operations import PrivateLinkResourcesOperations # type: ignore -from ._data_connections_operations import DataConnectionsOperations # type: ignore from ._operations import Operations # type: ignore -from ._operations_results_operations import OperationsResultsOperations # type: ignore -from ._operations_results_location_operations import OperationsResultsLocationOperations # type: ignore +from ._operations import ClusterPrincipalAssignmentsOperations # type: ignore +from ._operations import DatabasePrincipalAssignmentsOperations # type: ignore +from ._operations import ScriptsOperations # type: ignore +from ._operations import DataConnectionsOperations # type: ignore +from ._operations import DatabasesOperations # type: ignore +from ._operations import AttachedDatabaseConfigurationsOperations # type: ignore +from ._operations import ManagedPrivateEndpointsOperations # type: ignore +from ._operations import SandboxCustomImagesOperations # type: ignore +from ._operations import ClustersOperations # type: ignore +from ._operations import PrivateEndpointConnectionsOperations # type: ignore +from ._operations import PrivateLinkResourcesOperations # type: ignore +from ._operations import DatabaseOperations # type: ignore +from ._operations import SkusOperations # type: ignore +from ._operations import OperationsResultsOperations # type: ignore +from ._operations import OperationsResultsLocationOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "ClustersOperations", + "Operations", "ClusterPrincipalAssignmentsOperations", - "SkusOperations", + "DatabasePrincipalAssignmentsOperations", + "ScriptsOperations", + "DataConnectionsOperations", "DatabasesOperations", "AttachedDatabaseConfigurationsOperations", "ManagedPrivateEndpointsOperations", - "DatabaseOperations", - "DatabasePrincipalAssignmentsOperations", - "ScriptsOperations", "SandboxCustomImagesOperations", + "ClustersOperations", "PrivateEndpointConnectionsOperations", "PrivateLinkResourcesOperations", - "DataConnectionsOperations", - "Operations", + "DatabaseOperations", + "SkusOperations", "OperationsResultsOperations", "OperationsResultsLocationOperations", ] diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_attached_database_configurations_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_attached_database_configurations_operations.py deleted file mode 100644 index 04939b64b87b..000000000000 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_attached_database_configurations_operations.py +++ /dev/null @@ -1,685 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from io import IOBase -import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ...operations._attached_database_configurations_operations import ( - build_check_name_availability_request, - build_create_or_update_request, - build_delete_request, - build_get_request, - build_list_by_cluster_request, -) - -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - - -class AttachedDatabaseConfigurationsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.kusto.aio.KustoManagementClient`'s - :attr:`attached_database_configurations` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @overload - async def check_name_availability( - self, - resource_group_name: str, - cluster_name: str, - resource_name: _models.AttachedDatabaseConfigurationsCheckNameRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CheckNameResult: - """Checks that the attached database configuration resource name is valid and is not already in - use. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param resource_name: The name of the resource. Required. - :type resource_name: ~azure.mgmt.kusto.models.AttachedDatabaseConfigurationsCheckNameRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: CheckNameResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.CheckNameResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def check_name_availability( - self, - resource_group_name: str, - cluster_name: str, - resource_name: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CheckNameResult: - """Checks that the attached database configuration resource name is valid and is not already in - use. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param resource_name: The name of the resource. Required. - :type resource_name: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: CheckNameResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.CheckNameResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def check_name_availability( - self, - resource_group_name: str, - cluster_name: str, - resource_name: Union[_models.AttachedDatabaseConfigurationsCheckNameRequest, IO[bytes]], - **kwargs: Any - ) -> _models.CheckNameResult: - """Checks that the attached database configuration resource name is valid and is not already in - use. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param resource_name: The name of the resource. Is either a - AttachedDatabaseConfigurationsCheckNameRequest type or a IO[bytes] type. Required. - :type resource_name: ~azure.mgmt.kusto.models.AttachedDatabaseConfigurationsCheckNameRequest or - IO[bytes] - :return: CheckNameResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.CheckNameResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CheckNameResult] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(resource_name, (IOBase, bytes)): - _content = resource_name - else: - _json = self._serialize.body(resource_name, "AttachedDatabaseConfigurationsCheckNameRequest") - - _request = build_check_name_availability_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("CheckNameResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def list_by_cluster( - self, resource_group_name: str, cluster_name: str, **kwargs: Any - ) -> AsyncIterable["_models.AttachedDatabaseConfiguration"]: - """Returns the list of attached database configurations of the given Kusto cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :return: An iterator like instance of either AttachedDatabaseConfiguration or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.kusto.models.AttachedDatabaseConfiguration] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.AttachedDatabaseConfigurationListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_cluster_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("AttachedDatabaseConfigurationListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get( - self, resource_group_name: str, cluster_name: str, attached_database_configuration_name: str, **kwargs: Any - ) -> _models.AttachedDatabaseConfiguration: - """Returns an attached database configuration. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param attached_database_configuration_name: The name of the attached database configuration. - Required. - :type attached_database_configuration_name: str - :return: AttachedDatabaseConfiguration or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.AttachedDatabaseConfiguration - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.AttachedDatabaseConfiguration] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - attached_database_configuration_name=attached_database_configuration_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("AttachedDatabaseConfiguration", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _create_or_update_initial( - self, - resource_group_name: str, - cluster_name: str, - attached_database_configuration_name: str, - parameters: Union[_models.AttachedDatabaseConfiguration, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "AttachedDatabaseConfiguration") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - attached_database_configuration_name=attached_database_configuration_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - cluster_name: str, - attached_database_configuration_name: str, - parameters: _models.AttachedDatabaseConfiguration, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.AttachedDatabaseConfiguration]: - """Creates or updates an attached database configuration. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param attached_database_configuration_name: The name of the attached database configuration. - Required. - :type attached_database_configuration_name: str - :param parameters: The database parameters supplied to the CreateOrUpdate operation. Required. - :type parameters: ~azure.mgmt.kusto.models.AttachedDatabaseConfiguration - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either AttachedDatabaseConfiguration or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.AttachedDatabaseConfiguration] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - cluster_name: str, - attached_database_configuration_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.AttachedDatabaseConfiguration]: - """Creates or updates an attached database configuration. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param attached_database_configuration_name: The name of the attached database configuration. - Required. - :type attached_database_configuration_name: str - :param parameters: The database parameters supplied to the CreateOrUpdate operation. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either AttachedDatabaseConfiguration or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.AttachedDatabaseConfiguration] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create_or_update( - self, - resource_group_name: str, - cluster_name: str, - attached_database_configuration_name: str, - parameters: Union[_models.AttachedDatabaseConfiguration, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.AttachedDatabaseConfiguration]: - """Creates or updates an attached database configuration. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param attached_database_configuration_name: The name of the attached database configuration. - Required. - :type attached_database_configuration_name: str - :param parameters: The database parameters supplied to the CreateOrUpdate operation. Is either - a AttachedDatabaseConfiguration type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.kusto.models.AttachedDatabaseConfiguration or IO[bytes] - :return: An instance of AsyncLROPoller that returns either AttachedDatabaseConfiguration or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.AttachedDatabaseConfiguration] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.AttachedDatabaseConfiguration] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_or_update_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - attached_database_configuration_name=attached_database_configuration_name, - parameters=parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("AttachedDatabaseConfiguration", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.AttachedDatabaseConfiguration].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.AttachedDatabaseConfiguration]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, resource_group_name: str, cluster_name: str, attached_database_configuration_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - attached_database_configuration_name=attached_database_configuration_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, resource_group_name: str, cluster_name: str, attached_database_configuration_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes the attached database configuration with the given name. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param attached_database_configuration_name: The name of the attached database configuration. - Required. - :type attached_database_configuration_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - attached_database_configuration_name=attached_database_configuration_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_cluster_principal_assignments_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_cluster_principal_assignments_operations.py deleted file mode 100644 index 08eb7aad647b..000000000000 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_cluster_principal_assignments_operations.py +++ /dev/null @@ -1,671 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from io import IOBase -import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ...operations._cluster_principal_assignments_operations import ( - build_check_name_availability_request, - build_create_or_update_request, - build_delete_request, - build_get_request, - build_list_request, -) - -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - - -class ClusterPrincipalAssignmentsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.kusto.aio.KustoManagementClient`'s - :attr:`cluster_principal_assignments` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @overload - async def check_name_availability( - self, - resource_group_name: str, - cluster_name: str, - principal_assignment_name: _models.ClusterPrincipalAssignmentCheckNameRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CheckNameResult: - """Checks that the principal assignment name is valid and is not already in use. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param principal_assignment_name: The name of the principal assignment. Required. - :type principal_assignment_name: - ~azure.mgmt.kusto.models.ClusterPrincipalAssignmentCheckNameRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: CheckNameResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.CheckNameResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def check_name_availability( - self, - resource_group_name: str, - cluster_name: str, - principal_assignment_name: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CheckNameResult: - """Checks that the principal assignment name is valid and is not already in use. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param principal_assignment_name: The name of the principal assignment. Required. - :type principal_assignment_name: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: CheckNameResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.CheckNameResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def check_name_availability( - self, - resource_group_name: str, - cluster_name: str, - principal_assignment_name: Union[_models.ClusterPrincipalAssignmentCheckNameRequest, IO[bytes]], - **kwargs: Any - ) -> _models.CheckNameResult: - """Checks that the principal assignment name is valid and is not already in use. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param principal_assignment_name: The name of the principal assignment. Is either a - ClusterPrincipalAssignmentCheckNameRequest type or a IO[bytes] type. Required. - :type principal_assignment_name: - ~azure.mgmt.kusto.models.ClusterPrincipalAssignmentCheckNameRequest or IO[bytes] - :return: CheckNameResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.CheckNameResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CheckNameResult] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(principal_assignment_name, (IOBase, bytes)): - _content = principal_assignment_name - else: - _json = self._serialize.body(principal_assignment_name, "ClusterPrincipalAssignmentCheckNameRequest") - - _request = build_check_name_availability_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("CheckNameResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def get( - self, resource_group_name: str, cluster_name: str, principal_assignment_name: str, **kwargs: Any - ) -> _models.ClusterPrincipalAssignment: - """Gets a Kusto cluster principalAssignment. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param principal_assignment_name: The name of the Kusto principalAssignment. Required. - :type principal_assignment_name: str - :return: ClusterPrincipalAssignment or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.ClusterPrincipalAssignment - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ClusterPrincipalAssignment] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - principal_assignment_name=principal_assignment_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ClusterPrincipalAssignment", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _create_or_update_initial( - self, - resource_group_name: str, - cluster_name: str, - principal_assignment_name: str, - parameters: Union[_models.ClusterPrincipalAssignment, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ClusterPrincipalAssignment") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - principal_assignment_name=principal_assignment_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - cluster_name: str, - principal_assignment_name: str, - parameters: _models.ClusterPrincipalAssignment, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ClusterPrincipalAssignment]: - """Create a Kusto cluster principalAssignment. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param principal_assignment_name: The name of the Kusto principalAssignment. Required. - :type principal_assignment_name: str - :param parameters: The Kusto cluster principalAssignment's parameters supplied for the - operation. Required. - :type parameters: ~azure.mgmt.kusto.models.ClusterPrincipalAssignment - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either ClusterPrincipalAssignment or the - result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.ClusterPrincipalAssignment] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - cluster_name: str, - principal_assignment_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ClusterPrincipalAssignment]: - """Create a Kusto cluster principalAssignment. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param principal_assignment_name: The name of the Kusto principalAssignment. Required. - :type principal_assignment_name: str - :param parameters: The Kusto cluster principalAssignment's parameters supplied for the - operation. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either ClusterPrincipalAssignment or the - result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.ClusterPrincipalAssignment] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create_or_update( - self, - resource_group_name: str, - cluster_name: str, - principal_assignment_name: str, - parameters: Union[_models.ClusterPrincipalAssignment, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.ClusterPrincipalAssignment]: - """Create a Kusto cluster principalAssignment. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param principal_assignment_name: The name of the Kusto principalAssignment. Required. - :type principal_assignment_name: str - :param parameters: The Kusto cluster principalAssignment's parameters supplied for the - operation. Is either a ClusterPrincipalAssignment type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.kusto.models.ClusterPrincipalAssignment or IO[bytes] - :return: An instance of AsyncLROPoller that returns either ClusterPrincipalAssignment or the - result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.ClusterPrincipalAssignment] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ClusterPrincipalAssignment] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_or_update_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - principal_assignment_name=principal_assignment_name, - parameters=parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ClusterPrincipalAssignment", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.ClusterPrincipalAssignment].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.ClusterPrincipalAssignment]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, resource_group_name: str, cluster_name: str, principal_assignment_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - principal_assignment_name=principal_assignment_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, resource_group_name: str, cluster_name: str, principal_assignment_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes a Kusto cluster principalAssignment. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param principal_assignment_name: The name of the Kusto principalAssignment. Required. - :type principal_assignment_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - principal_assignment_name=principal_assignment_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list( - self, resource_group_name: str, cluster_name: str, **kwargs: Any - ) -> AsyncIterable["_models.ClusterPrincipalAssignment"]: - """Lists all Kusto cluster principalAssignments. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :return: An iterator like instance of either ClusterPrincipalAssignment or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.kusto.models.ClusterPrincipalAssignment] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ClusterPrincipalAssignmentListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("ClusterPrincipalAssignmentListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_clusters_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_clusters_operations.py deleted file mode 100644 index dae18ba717e3..000000000000 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_clusters_operations.py +++ /dev/null @@ -1,3055 +0,0 @@ -# pylint: disable=too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from io import IOBase -import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ...operations._clusters_operations import ( - build_add_callout_policies_request, - build_add_language_extensions_request, - build_check_name_availability_request, - build_create_or_update_request, - build_delete_request, - build_detach_follower_databases_request, - build_diagnose_virtual_network_request, - build_get_request, - build_list_by_resource_group_request, - build_list_callout_policies_request, - build_list_follower_databases_get_request, - build_list_follower_databases_request, - build_list_language_extensions_request, - build_list_outbound_network_dependencies_endpoints_request, - build_list_request, - build_list_skus_by_resource_request, - build_list_skus_request, - build_migrate_request, - build_remove_callout_policy_request, - build_remove_language_extensions_request, - build_start_request, - build_stop_request, - build_update_request, -) - -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - - -class ClustersOperations: # pylint: disable=too-many-public-methods - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.kusto.aio.KustoManagementClient`'s - :attr:`clusters` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - async def get(self, resource_group_name: str, cluster_name: str, **kwargs: Any) -> _models.Cluster: - """Gets a Kusto cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :return: Cluster or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.Cluster - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.Cluster] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("Cluster", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _create_or_update_initial( - self, - resource_group_name: str, - cluster_name: str, - parameters: Union[_models.Cluster, IO[bytes]], - if_match: Optional[str] = None, - if_none_match: Optional[str] = None, - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "Cluster") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - subscription_id=self._config.subscription_id, - if_match=if_match, - if_none_match=if_none_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - cluster_name: str, - parameters: _models.Cluster, - if_match: Optional[str] = None, - if_none_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.Cluster]: - """Create or update a Kusto cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param parameters: The Kusto cluster parameters supplied to the CreateOrUpdate operation. - Required. - :type parameters: ~azure.mgmt.kusto.models.Cluster - :param if_match: The ETag of the cluster. Omit this value to always overwrite the current - cluster. Specify the last-seen ETag value to prevent accidentally overwriting concurrent - changes. Default value is None. - :type if_match: str - :param if_none_match: Set to '*' to allow a new cluster to be created, but to prevent updating - an existing cluster. Other values will result in a 412 Pre-condition Failed response. Default - value is None. - :type if_none_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either Cluster or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.Cluster] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - cluster_name: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - if_none_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.Cluster]: - """Create or update a Kusto cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param parameters: The Kusto cluster parameters supplied to the CreateOrUpdate operation. - Required. - :type parameters: IO[bytes] - :param if_match: The ETag of the cluster. Omit this value to always overwrite the current - cluster. Specify the last-seen ETag value to prevent accidentally overwriting concurrent - changes. Default value is None. - :type if_match: str - :param if_none_match: Set to '*' to allow a new cluster to be created, but to prevent updating - an existing cluster. Other values will result in a 412 Pre-condition Failed response. Default - value is None. - :type if_none_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either Cluster or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.Cluster] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create_or_update( - self, - resource_group_name: str, - cluster_name: str, - parameters: Union[_models.Cluster, IO[bytes]], - if_match: Optional[str] = None, - if_none_match: Optional[str] = None, - **kwargs: Any - ) -> AsyncLROPoller[_models.Cluster]: - """Create or update a Kusto cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param parameters: The Kusto cluster parameters supplied to the CreateOrUpdate operation. Is - either a Cluster type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.kusto.models.Cluster or IO[bytes] - :param if_match: The ETag of the cluster. Omit this value to always overwrite the current - cluster. Specify the last-seen ETag value to prevent accidentally overwriting concurrent - changes. Default value is None. - :type if_match: str - :param if_none_match: Set to '*' to allow a new cluster to be created, but to prevent updating - an existing cluster. Other values will result in a 412 Pre-condition Failed response. Default - value is None. - :type if_none_match: str - :return: An instance of AsyncLROPoller that returns either Cluster or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.Cluster] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Cluster] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_or_update_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - parameters=parameters, - if_match=if_match, - if_none_match=if_none_match, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Cluster", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.Cluster].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.Cluster]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _update_initial( - self, - resource_group_name: str, - cluster_name: str, - parameters: Union[_models.ClusterUpdate, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ClusterUpdate") - - _request = build_update_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 201: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update( - self, - resource_group_name: str, - cluster_name: str, - parameters: _models.ClusterUpdate, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.Cluster]: - """Update a Kusto cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param parameters: The Kusto cluster parameters supplied to the Update operation. Required. - :type parameters: ~azure.mgmt.kusto.models.ClusterUpdate - :param if_match: The ETag of the cluster. Omit this value to always overwrite the current - cluster. Specify the last-seen ETag value to prevent accidentally overwriting concurrent - changes. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either Cluster or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.Cluster] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update( - self, - resource_group_name: str, - cluster_name: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.Cluster]: - """Update a Kusto cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param parameters: The Kusto cluster parameters supplied to the Update operation. Required. - :type parameters: IO[bytes] - :param if_match: The ETag of the cluster. Omit this value to always overwrite the current - cluster. Specify the last-seen ETag value to prevent accidentally overwriting concurrent - changes. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either Cluster or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.Cluster] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_update( - self, - resource_group_name: str, - cluster_name: str, - parameters: Union[_models.ClusterUpdate, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> AsyncLROPoller[_models.Cluster]: - """Update a Kusto cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param parameters: The Kusto cluster parameters supplied to the Update operation. Is either a - ClusterUpdate type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.kusto.models.ClusterUpdate or IO[bytes] - :param if_match: The ETag of the cluster. Omit this value to always overwrite the current - cluster. Specify the last-seen ETag value to prevent accidentally overwriting concurrent - changes. Default value is None. - :type if_match: str - :return: An instance of AsyncLROPoller that returns either Cluster or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.Cluster] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Cluster] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - parameters=parameters, - if_match=if_match, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Cluster", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.Cluster].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.Cluster]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial(self, resource_group_name: str, cluster_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete(self, resource_group_name: str, cluster_name: str, **kwargs: Any) -> AsyncLROPoller[None]: - """Deletes a Kusto cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - async def _stop_initial(self, resource_group_name: str, cluster_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_stop_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_stop(self, resource_group_name: str, cluster_name: str, **kwargs: Any) -> AsyncLROPoller[None]: - """Stops a Kusto cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._stop_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - async def _start_initial(self, resource_group_name: str, cluster_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_start_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_start(self, resource_group_name: str, cluster_name: str, **kwargs: Any) -> AsyncLROPoller[None]: - """Starts a Kusto cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._start_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - async def _migrate_initial( - self, - resource_group_name: str, - cluster_name: str, - cluster_migrate_request: Union[_models.ClusterMigrateRequest, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(cluster_migrate_request, (IOBase, bytes)): - _content = cluster_migrate_request - else: - _json = self._serialize.body(cluster_migrate_request, "ClusterMigrateRequest") - - _request = build_migrate_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_migrate( - self, - resource_group_name: str, - cluster_name: str, - cluster_migrate_request: _models.ClusterMigrateRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Migrate data from a Kusto cluster to another cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param cluster_migrate_request: The cluster migrate request parameters. Required. - :type cluster_migrate_request: ~azure.mgmt.kusto.models.ClusterMigrateRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_migrate( - self, - resource_group_name: str, - cluster_name: str, - cluster_migrate_request: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Migrate data from a Kusto cluster to another cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param cluster_migrate_request: The cluster migrate request parameters. Required. - :type cluster_migrate_request: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_migrate( - self, - resource_group_name: str, - cluster_name: str, - cluster_migrate_request: Union[_models.ClusterMigrateRequest, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Migrate data from a Kusto cluster to another cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param cluster_migrate_request: The cluster migrate request parameters. Is either a - ClusterMigrateRequest type or a IO[bytes] type. Required. - :type cluster_migrate_request: ~azure.mgmt.kusto.models.ClusterMigrateRequest or IO[bytes] - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._migrate_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - cluster_migrate_request=cluster_migrate_request, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list_follower_databases_get( - self, resource_group_name: str, cluster_name: str, **kwargs: Any - ) -> AsyncIterable["_models.FollowerDatabaseDefinitionGet"]: - """Returns a list of databases that are owned by this cluster and were followed by another - cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :return: An iterator like instance of either FollowerDatabaseDefinitionGet or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.kusto.models.FollowerDatabaseDefinitionGet] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.FollowerDatabaseListResultGet] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_follower_databases_get_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("FollowerDatabaseListResultGet", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace - def list_follower_databases( - self, resource_group_name: str, cluster_name: str, **kwargs: Any - ) -> AsyncIterable["_models.FollowerDatabaseDefinition"]: - """Returns a list of databases that are owned by this cluster and were followed by another - cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :return: An iterator like instance of either FollowerDatabaseDefinition or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.kusto.models.FollowerDatabaseDefinition] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.FollowerDatabaseListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_follower_databases_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("FollowerDatabaseListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - async def _detach_follower_databases_initial( - self, - resource_group_name: str, - cluster_name: str, - follower_database_to_remove: Union[_models.FollowerDatabaseDefinition, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(follower_database_to_remove, (IOBase, bytes)): - _content = follower_database_to_remove - else: - _json = self._serialize.body(follower_database_to_remove, "FollowerDatabaseDefinition") - - _request = build_detach_follower_databases_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_detach_follower_databases( - self, - resource_group_name: str, - cluster_name: str, - follower_database_to_remove: _models.FollowerDatabaseDefinition, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Detaches all followers of a database owned by this cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param follower_database_to_remove: The follower databases properties to remove. Required. - :type follower_database_to_remove: ~azure.mgmt.kusto.models.FollowerDatabaseDefinition - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_detach_follower_databases( - self, - resource_group_name: str, - cluster_name: str, - follower_database_to_remove: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Detaches all followers of a database owned by this cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param follower_database_to_remove: The follower databases properties to remove. Required. - :type follower_database_to_remove: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_detach_follower_databases( - self, - resource_group_name: str, - cluster_name: str, - follower_database_to_remove: Union[_models.FollowerDatabaseDefinition, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Detaches all followers of a database owned by this cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param follower_database_to_remove: The follower databases properties to remove. Is either a - FollowerDatabaseDefinition type or a IO[bytes] type. Required. - :type follower_database_to_remove: ~azure.mgmt.kusto.models.FollowerDatabaseDefinition or - IO[bytes] - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._detach_follower_databases_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - follower_database_to_remove=follower_database_to_remove, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - async def _diagnose_virtual_network_initial( - self, resource_group_name: str, cluster_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_diagnose_virtual_network_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_diagnose_virtual_network( - self, resource_group_name: str, cluster_name: str, **kwargs: Any - ) -> AsyncLROPoller[_models.DiagnoseVirtualNetworkResult]: - """Diagnoses network connectivity status for external resources on which the service is dependent - on. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :return: An instance of AsyncLROPoller that returns either DiagnoseVirtualNetworkResult or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.DiagnoseVirtualNetworkResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.DiagnoseVirtualNetworkResult] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._diagnose_virtual_network_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("DiagnoseVirtualNetworkResult", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.DiagnoseVirtualNetworkResult].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.DiagnoseVirtualNetworkResult]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace - def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_models.Cluster"]: - """Lists all Kusto clusters within a resource group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :return: An iterator like instance of either Cluster or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.kusto.models.Cluster] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ClusterListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_resource_group_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("ClusterListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace - def list(self, **kwargs: Any) -> AsyncIterable["_models.Cluster"]: - """Lists all Kusto clusters within a subscription. - - :return: An iterator like instance of either Cluster or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.kusto.models.Cluster] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ClusterListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("ClusterListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace - def list_skus(self, **kwargs: Any) -> AsyncIterable["_models.SkuDescription"]: - """Lists eligible SKUs for Kusto resource provider. - - :return: An iterator like instance of either SkuDescription or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.kusto.models.SkuDescription] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.SkuDescriptionList] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_skus_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("SkuDescriptionList", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @overload - async def check_name_availability( - self, - location: str, - cluster_name: _models.ClusterCheckNameRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CheckNameResult: - """Checks that the cluster name is valid and is not already in use. - - :param location: The name of Azure region. Required. - :type location: str - :param cluster_name: The name of the cluster. Required. - :type cluster_name: ~azure.mgmt.kusto.models.ClusterCheckNameRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: CheckNameResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.CheckNameResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def check_name_availability( - self, location: str, cluster_name: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> _models.CheckNameResult: - """Checks that the cluster name is valid and is not already in use. - - :param location: The name of Azure region. Required. - :type location: str - :param cluster_name: The name of the cluster. Required. - :type cluster_name: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: CheckNameResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.CheckNameResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def check_name_availability( - self, location: str, cluster_name: Union[_models.ClusterCheckNameRequest, IO[bytes]], **kwargs: Any - ) -> _models.CheckNameResult: - """Checks that the cluster name is valid and is not already in use. - - :param location: The name of Azure region. Required. - :type location: str - :param cluster_name: The name of the cluster. Is either a ClusterCheckNameRequest type or a - IO[bytes] type. Required. - :type cluster_name: ~azure.mgmt.kusto.models.ClusterCheckNameRequest or IO[bytes] - :return: CheckNameResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.CheckNameResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CheckNameResult] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(cluster_name, (IOBase, bytes)): - _content = cluster_name - else: - _json = self._serialize.body(cluster_name, "ClusterCheckNameRequest") - - _request = build_check_name_availability_request( - location=location, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("CheckNameResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def list_skus_by_resource( - self, resource_group_name: str, cluster_name: str, **kwargs: Any - ) -> AsyncIterable["_models.AzureResourceSku"]: - """Returns the SKUs available for the provided resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :return: An iterator like instance of either AzureResourceSku or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.kusto.models.AzureResourceSku] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ListResourceSkusResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_skus_by_resource_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("ListResourceSkusResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace - def list_outbound_network_dependencies_endpoints( # pylint: disable=name-too-long - self, resource_group_name: str, cluster_name: str, **kwargs: Any - ) -> AsyncIterable["_models.OutboundNetworkDependenciesEndpoint"]: - """Gets the network endpoints of all outbound dependencies of a Kusto cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :return: An iterator like instance of either OutboundNetworkDependenciesEndpoint or the result - of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.kusto.models.OutboundNetworkDependenciesEndpoint] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.OutboundNetworkDependenciesEndpointListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_outbound_network_dependencies_endpoints_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("OutboundNetworkDependenciesEndpointListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - async def _add_callout_policies_initial( - self, - resource_group_name: str, - cluster_name: str, - callout_policies: Union[_models.CalloutPoliciesList, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(callout_policies, (IOBase, bytes)): - _content = callout_policies - else: - _json = self._serialize.body(callout_policies, "CalloutPoliciesList") - - _request = build_add_callout_policies_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_add_callout_policies( - self, - resource_group_name: str, - cluster_name: str, - callout_policies: _models.CalloutPoliciesList, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Adds a list of callout policies for engine services. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param callout_policies: The callout policies to add. Required. - :type callout_policies: ~azure.mgmt.kusto.models.CalloutPoliciesList - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_add_callout_policies( - self, - resource_group_name: str, - cluster_name: str, - callout_policies: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Adds a list of callout policies for engine services. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param callout_policies: The callout policies to add. Required. - :type callout_policies: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_add_callout_policies( - self, - resource_group_name: str, - cluster_name: str, - callout_policies: Union[_models.CalloutPoliciesList, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Adds a list of callout policies for engine services. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param callout_policies: The callout policies to add. Is either a CalloutPoliciesList type or a - IO[bytes] type. Required. - :type callout_policies: ~azure.mgmt.kusto.models.CalloutPoliciesList or IO[bytes] - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._add_callout_policies_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - callout_policies=callout_policies, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - async def _remove_callout_policy_initial( - self, - resource_group_name: str, - cluster_name: str, - callout_policy: Union[_models.CalloutPolicyToRemove, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(callout_policy, (IOBase, bytes)): - _content = callout_policy - else: - _json = self._serialize.body(callout_policy, "CalloutPolicyToRemove") - - _request = build_remove_callout_policy_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_remove_callout_policy( - self, - resource_group_name: str, - cluster_name: str, - callout_policy: _models.CalloutPolicyToRemove, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Removes callout policy for engine services. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param callout_policy: The callout policies to remove. Required. - :type callout_policy: ~azure.mgmt.kusto.models.CalloutPolicyToRemove - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_remove_callout_policy( - self, - resource_group_name: str, - cluster_name: str, - callout_policy: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Removes callout policy for engine services. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param callout_policy: The callout policies to remove. Required. - :type callout_policy: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_remove_callout_policy( - self, - resource_group_name: str, - cluster_name: str, - callout_policy: Union[_models.CalloutPolicyToRemove, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Removes callout policy for engine services. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param callout_policy: The callout policies to remove. Is either a CalloutPolicyToRemove type - or a IO[bytes] type. Required. - :type callout_policy: ~azure.mgmt.kusto.models.CalloutPolicyToRemove or IO[bytes] - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._remove_callout_policy_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - callout_policy=callout_policy, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list_callout_policies( - self, resource_group_name: str, cluster_name: str, **kwargs: Any - ) -> AsyncIterable["_models.CalloutPolicy"]: - """Returns the allowed callout policies for the specified service. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :return: An iterator like instance of either CalloutPolicy or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.kusto.models.CalloutPolicy] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CalloutPoliciesList] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_callout_policies_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("CalloutPoliciesList", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace - def list_language_extensions( - self, resource_group_name: str, cluster_name: str, **kwargs: Any - ) -> AsyncIterable["_models.LanguageExtension"]: - """Returns a list of language extensions that can run within KQL queries. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :return: An iterator like instance of either LanguageExtension or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.kusto.models.LanguageExtension] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.LanguageExtensionsList] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_language_extensions_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("LanguageExtensionsList", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - async def _add_language_extensions_initial( - self, - resource_group_name: str, - cluster_name: str, - language_extensions_to_add: Union[_models.LanguageExtensionsList, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(language_extensions_to_add, (IOBase, bytes)): - _content = language_extensions_to_add - else: - _json = self._serialize.body(language_extensions_to_add, "LanguageExtensionsList") - - _request = build_add_language_extensions_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_add_language_extensions( - self, - resource_group_name: str, - cluster_name: str, - language_extensions_to_add: _models.LanguageExtensionsList, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Add a list of language extensions that can run within KQL queries. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param language_extensions_to_add: The language extensions to add. Required. - :type language_extensions_to_add: ~azure.mgmt.kusto.models.LanguageExtensionsList - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_add_language_extensions( - self, - resource_group_name: str, - cluster_name: str, - language_extensions_to_add: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Add a list of language extensions that can run within KQL queries. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param language_extensions_to_add: The language extensions to add. Required. - :type language_extensions_to_add: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_add_language_extensions( - self, - resource_group_name: str, - cluster_name: str, - language_extensions_to_add: Union[_models.LanguageExtensionsList, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Add a list of language extensions that can run within KQL queries. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param language_extensions_to_add: The language extensions to add. Is either a - LanguageExtensionsList type or a IO[bytes] type. Required. - :type language_extensions_to_add: ~azure.mgmt.kusto.models.LanguageExtensionsList or IO[bytes] - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._add_language_extensions_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - language_extensions_to_add=language_extensions_to_add, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - async def _remove_language_extensions_initial( - self, - resource_group_name: str, - cluster_name: str, - language_extensions_to_remove: Union[_models.LanguageExtensionsList, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(language_extensions_to_remove, (IOBase, bytes)): - _content = language_extensions_to_remove - else: - _json = self._serialize.body(language_extensions_to_remove, "LanguageExtensionsList") - - _request = build_remove_language_extensions_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_remove_language_extensions( - self, - resource_group_name: str, - cluster_name: str, - language_extensions_to_remove: _models.LanguageExtensionsList, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Remove a list of language extensions that can run within KQL queries. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param language_extensions_to_remove: The language extensions to remove. Required. - :type language_extensions_to_remove: ~azure.mgmt.kusto.models.LanguageExtensionsList - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_remove_language_extensions( - self, - resource_group_name: str, - cluster_name: str, - language_extensions_to_remove: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Remove a list of language extensions that can run within KQL queries. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param language_extensions_to_remove: The language extensions to remove. Required. - :type language_extensions_to_remove: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_remove_language_extensions( - self, - resource_group_name: str, - cluster_name: str, - language_extensions_to_remove: Union[_models.LanguageExtensionsList, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Remove a list of language extensions that can run within KQL queries. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param language_extensions_to_remove: The language extensions to remove. Is either a - LanguageExtensionsList type or a IO[bytes] type. Required. - :type language_extensions_to_remove: ~azure.mgmt.kusto.models.LanguageExtensionsList or - IO[bytes] - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._remove_language_extensions_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - language_extensions_to_remove=language_extensions_to_remove, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_data_connections_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_data_connections_operations.py deleted file mode 100644 index b70e9f1d7f61..000000000000 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_data_connections_operations.py +++ /dev/null @@ -1,1156 +0,0 @@ -# pylint: disable=too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from io import IOBase -import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ...operations._data_connections_operations import ( - build_check_name_availability_request, - build_create_or_update_request, - build_data_connection_validation_request, - build_delete_request, - build_get_request, - build_list_by_database_request, - build_update_request, -) - -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - - -class DataConnectionsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.kusto.aio.KustoManagementClient`'s - :attr:`data_connections` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_database( - self, resource_group_name: str, cluster_name: str, database_name: str, **kwargs: Any - ) -> AsyncIterable["_models.DataConnection"]: - """Returns the list of data connections of the given Kusto database. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :return: An iterator like instance of either DataConnection or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.kusto.models.DataConnection] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.DataConnectionListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_database_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("DataConnectionListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - async def _data_connection_validation_initial( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - parameters: Union[_models.DataConnectionValidation, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "DataConnectionValidation") - - _request = build_data_connection_validation_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_data_connection_validation( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - parameters: _models.DataConnectionValidation, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.DataConnectionValidationListResult]: - """Checks that the data connection parameters are valid. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param parameters: The data connection parameters supplied to the CreateOrUpdate operation. - Required. - :type parameters: ~azure.mgmt.kusto.models.DataConnectionValidation - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either DataConnectionValidationListResult - or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.DataConnectionValidationListResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_data_connection_validation( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.DataConnectionValidationListResult]: - """Checks that the data connection parameters are valid. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param parameters: The data connection parameters supplied to the CreateOrUpdate operation. - Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either DataConnectionValidationListResult - or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.DataConnectionValidationListResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_data_connection_validation( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - parameters: Union[_models.DataConnectionValidation, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.DataConnectionValidationListResult]: - """Checks that the data connection parameters are valid. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param parameters: The data connection parameters supplied to the CreateOrUpdate operation. Is - either a DataConnectionValidation type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.kusto.models.DataConnectionValidation or IO[bytes] - :return: An instance of AsyncLROPoller that returns either DataConnectionValidationListResult - or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.DataConnectionValidationListResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.DataConnectionValidationListResult] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._data_connection_validation_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - parameters=parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("DataConnectionValidationListResult", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.DataConnectionValidationListResult].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.DataConnectionValidationListResult]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @overload - async def check_name_availability( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - data_connection_name: _models.DataConnectionCheckNameRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CheckNameResult: - """Checks that the data connection name is valid and is not already in use. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param data_connection_name: The name of the data connection. Required. - :type data_connection_name: ~azure.mgmt.kusto.models.DataConnectionCheckNameRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: CheckNameResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.CheckNameResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def check_name_availability( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - data_connection_name: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CheckNameResult: - """Checks that the data connection name is valid and is not already in use. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param data_connection_name: The name of the data connection. Required. - :type data_connection_name: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: CheckNameResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.CheckNameResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def check_name_availability( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - data_connection_name: Union[_models.DataConnectionCheckNameRequest, IO[bytes]], - **kwargs: Any - ) -> _models.CheckNameResult: - """Checks that the data connection name is valid and is not already in use. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param data_connection_name: The name of the data connection. Is either a - DataConnectionCheckNameRequest type or a IO[bytes] type. Required. - :type data_connection_name: ~azure.mgmt.kusto.models.DataConnectionCheckNameRequest or - IO[bytes] - :return: CheckNameResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.CheckNameResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CheckNameResult] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(data_connection_name, (IOBase, bytes)): - _content = data_connection_name - else: - _json = self._serialize.body(data_connection_name, "DataConnectionCheckNameRequest") - - _request = build_check_name_availability_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("CheckNameResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def get( - self, resource_group_name: str, cluster_name: str, database_name: str, data_connection_name: str, **kwargs: Any - ) -> _models.DataConnection: - """Returns a data connection. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param data_connection_name: The name of the data connection. Required. - :type data_connection_name: str - :return: DataConnection or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.DataConnection - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.DataConnection] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - data_connection_name=data_connection_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("DataConnection", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _create_or_update_initial( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - data_connection_name: str, - parameters: Union[_models.DataConnection, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "DataConnection") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - data_connection_name=data_connection_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - data_connection_name: str, - parameters: _models.DataConnection, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.DataConnection]: - """Creates or updates a data connection. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param data_connection_name: The name of the data connection. Required. - :type data_connection_name: str - :param parameters: The data connection parameters supplied to the CreateOrUpdate operation. - Required. - :type parameters: ~azure.mgmt.kusto.models.DataConnection - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either DataConnection or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.DataConnection] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - data_connection_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.DataConnection]: - """Creates or updates a data connection. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param data_connection_name: The name of the data connection. Required. - :type data_connection_name: str - :param parameters: The data connection parameters supplied to the CreateOrUpdate operation. - Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either DataConnection or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.DataConnection] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create_or_update( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - data_connection_name: str, - parameters: Union[_models.DataConnection, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.DataConnection]: - """Creates or updates a data connection. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param data_connection_name: The name of the data connection. Required. - :type data_connection_name: str - :param parameters: The data connection parameters supplied to the CreateOrUpdate operation. Is - either a DataConnection type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.kusto.models.DataConnection or IO[bytes] - :return: An instance of AsyncLROPoller that returns either DataConnection or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.DataConnection] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.DataConnection] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_or_update_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - data_connection_name=data_connection_name, - parameters=parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("DataConnection", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.DataConnection].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.DataConnection]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _update_initial( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - data_connection_name: str, - parameters: Union[_models.DataConnection, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "DataConnection") - - _request = build_update_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - data_connection_name=data_connection_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 201: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - data_connection_name: str, - parameters: _models.DataConnection, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.DataConnection]: - """Updates a data connection. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param data_connection_name: The name of the data connection. Required. - :type data_connection_name: str - :param parameters: The data connection parameters supplied to the Update operation. Required. - :type parameters: ~azure.mgmt.kusto.models.DataConnection - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either DataConnection or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.DataConnection] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - data_connection_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.DataConnection]: - """Updates a data connection. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param data_connection_name: The name of the data connection. Required. - :type data_connection_name: str - :param parameters: The data connection parameters supplied to the Update operation. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either DataConnection or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.DataConnection] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_update( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - data_connection_name: str, - parameters: Union[_models.DataConnection, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.DataConnection]: - """Updates a data connection. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param data_connection_name: The name of the data connection. Required. - :type data_connection_name: str - :param parameters: The data connection parameters supplied to the Update operation. Is either a - DataConnection type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.kusto.models.DataConnection or IO[bytes] - :return: An instance of AsyncLROPoller that returns either DataConnection or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.DataConnection] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.DataConnection] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - data_connection_name=data_connection_name, - parameters=parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("DataConnection", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.DataConnection].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.DataConnection]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, resource_group_name: str, cluster_name: str, database_name: str, data_connection_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - data_connection_name=data_connection_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, resource_group_name: str, cluster_name: str, database_name: str, data_connection_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes the data connection with the given name. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param data_connection_name: The name of the data connection. Required. - :type data_connection_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - data_connection_name=data_connection_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_database_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_database_operations.py deleted file mode 100644 index e66a81f18fd7..000000000000 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_database_operations.py +++ /dev/null @@ -1,195 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload - -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ...operations._database_operations import build_invite_follower_request - -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - - -class DatabaseOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.kusto.aio.KustoManagementClient`'s - :attr:`database` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @overload - async def invite_follower( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - parameters: _models.DatabaseInviteFollowerRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.DatabaseInviteFollowerResult: - """Generates an invitation token that allows attaching a follower database to this database. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param parameters: The follower invitation request parameters. Required. - :type parameters: ~azure.mgmt.kusto.models.DatabaseInviteFollowerRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: DatabaseInviteFollowerResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.DatabaseInviteFollowerResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def invite_follower( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.DatabaseInviteFollowerResult: - """Generates an invitation token that allows attaching a follower database to this database. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param parameters: The follower invitation request parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: DatabaseInviteFollowerResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.DatabaseInviteFollowerResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def invite_follower( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - parameters: Union[_models.DatabaseInviteFollowerRequest, IO[bytes]], - **kwargs: Any - ) -> _models.DatabaseInviteFollowerResult: - """Generates an invitation token that allows attaching a follower database to this database. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param parameters: The follower invitation request parameters. Is either a - DatabaseInviteFollowerRequest type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.kusto.models.DatabaseInviteFollowerRequest or IO[bytes] - :return: DatabaseInviteFollowerResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.DatabaseInviteFollowerResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.DatabaseInviteFollowerResult] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "DatabaseInviteFollowerRequest") - - _request = build_invite_follower_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("DatabaseInviteFollowerResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_database_principal_assignments_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_database_principal_assignments_operations.py deleted file mode 100644 index 4aea2ee35df9..000000000000 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_database_principal_assignments_operations.py +++ /dev/null @@ -1,721 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from io import IOBase -import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ...operations._database_principal_assignments_operations import ( - build_check_name_availability_request, - build_create_or_update_request, - build_delete_request, - build_get_request, - build_list_request, -) - -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - - -class DatabasePrincipalAssignmentsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.kusto.aio.KustoManagementClient`'s - :attr:`database_principal_assignments` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @overload - async def check_name_availability( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - principal_assignment_name: _models.DatabasePrincipalAssignmentCheckNameRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CheckNameResult: - """Checks that the database principal assignment is valid and is not already in use. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param principal_assignment_name: The name of the resource. Required. - :type principal_assignment_name: - ~azure.mgmt.kusto.models.DatabasePrincipalAssignmentCheckNameRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: CheckNameResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.CheckNameResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def check_name_availability( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - principal_assignment_name: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CheckNameResult: - """Checks that the database principal assignment is valid and is not already in use. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param principal_assignment_name: The name of the resource. Required. - :type principal_assignment_name: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: CheckNameResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.CheckNameResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def check_name_availability( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - principal_assignment_name: Union[_models.DatabasePrincipalAssignmentCheckNameRequest, IO[bytes]], - **kwargs: Any - ) -> _models.CheckNameResult: - """Checks that the database principal assignment is valid and is not already in use. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param principal_assignment_name: The name of the resource. Is either a - DatabasePrincipalAssignmentCheckNameRequest type or a IO[bytes] type. Required. - :type principal_assignment_name: - ~azure.mgmt.kusto.models.DatabasePrincipalAssignmentCheckNameRequest or IO[bytes] - :return: CheckNameResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.CheckNameResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CheckNameResult] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(principal_assignment_name, (IOBase, bytes)): - _content = principal_assignment_name - else: - _json = self._serialize.body(principal_assignment_name, "DatabasePrincipalAssignmentCheckNameRequest") - - _request = build_check_name_availability_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("CheckNameResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def get( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - principal_assignment_name: str, - **kwargs: Any - ) -> _models.DatabasePrincipalAssignment: - """Gets a Kusto cluster database principalAssignment. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param principal_assignment_name: The name of the Kusto principalAssignment. Required. - :type principal_assignment_name: str - :return: DatabasePrincipalAssignment or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.DatabasePrincipalAssignment - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.DatabasePrincipalAssignment] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - principal_assignment_name=principal_assignment_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("DatabasePrincipalAssignment", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _create_or_update_initial( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - principal_assignment_name: str, - parameters: Union[_models.DatabasePrincipalAssignment, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "DatabasePrincipalAssignment") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - principal_assignment_name=principal_assignment_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - principal_assignment_name: str, - parameters: _models.DatabasePrincipalAssignment, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.DatabasePrincipalAssignment]: - """Creates a Kusto cluster database principalAssignment. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param principal_assignment_name: The name of the Kusto principalAssignment. Required. - :type principal_assignment_name: str - :param parameters: The Kusto principalAssignments parameters supplied for the operation. - Required. - :type parameters: ~azure.mgmt.kusto.models.DatabasePrincipalAssignment - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either DatabasePrincipalAssignment or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.DatabasePrincipalAssignment] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - principal_assignment_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.DatabasePrincipalAssignment]: - """Creates a Kusto cluster database principalAssignment. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param principal_assignment_name: The name of the Kusto principalAssignment. Required. - :type principal_assignment_name: str - :param parameters: The Kusto principalAssignments parameters supplied for the operation. - Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either DatabasePrincipalAssignment or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.DatabasePrincipalAssignment] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create_or_update( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - principal_assignment_name: str, - parameters: Union[_models.DatabasePrincipalAssignment, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.DatabasePrincipalAssignment]: - """Creates a Kusto cluster database principalAssignment. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param principal_assignment_name: The name of the Kusto principalAssignment. Required. - :type principal_assignment_name: str - :param parameters: The Kusto principalAssignments parameters supplied for the operation. Is - either a DatabasePrincipalAssignment type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.kusto.models.DatabasePrincipalAssignment or IO[bytes] - :return: An instance of AsyncLROPoller that returns either DatabasePrincipalAssignment or the - result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.DatabasePrincipalAssignment] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.DatabasePrincipalAssignment] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_or_update_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - principal_assignment_name=principal_assignment_name, - parameters=parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("DatabasePrincipalAssignment", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.DatabasePrincipalAssignment].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.DatabasePrincipalAssignment]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - principal_assignment_name: str, - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - principal_assignment_name=principal_assignment_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - principal_assignment_name: str, - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes a Kusto principalAssignment. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param principal_assignment_name: The name of the Kusto principalAssignment. Required. - :type principal_assignment_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - principal_assignment_name=principal_assignment_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list( - self, resource_group_name: str, cluster_name: str, database_name: str, **kwargs: Any - ) -> AsyncIterable["_models.DatabasePrincipalAssignment"]: - """Lists all Kusto cluster database principalAssignments. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :return: An iterator like instance of either DatabasePrincipalAssignment or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.kusto.models.DatabasePrincipalAssignment] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.DatabasePrincipalAssignmentListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("DatabasePrincipalAssignmentListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_databases_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_databases_operations.py deleted file mode 100644 index 3eee71c68d63..000000000000 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_databases_operations.py +++ /dev/null @@ -1,1315 +0,0 @@ -# pylint: disable=too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from io import IOBase -import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ...operations._databases_operations import ( - build_add_principals_request, - build_check_name_availability_request, - build_create_or_update_request, - build_delete_request, - build_get_request, - build_list_by_cluster_request, - build_list_principals_request, - build_remove_principals_request, - build_update_request, -) - -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - - -class DatabasesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.kusto.aio.KustoManagementClient`'s - :attr:`databases` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @overload - async def check_name_availability( - self, - resource_group_name: str, - cluster_name: str, - resource_name: _models.CheckNameRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CheckNameResult: - """Checks that the databases resource name is valid and is not already in use. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param resource_name: The name of the resource. Required. - :type resource_name: ~azure.mgmt.kusto.models.CheckNameRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: CheckNameResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.CheckNameResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def check_name_availability( - self, - resource_group_name: str, - cluster_name: str, - resource_name: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CheckNameResult: - """Checks that the databases resource name is valid and is not already in use. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param resource_name: The name of the resource. Required. - :type resource_name: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: CheckNameResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.CheckNameResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def check_name_availability( - self, - resource_group_name: str, - cluster_name: str, - resource_name: Union[_models.CheckNameRequest, IO[bytes]], - **kwargs: Any - ) -> _models.CheckNameResult: - """Checks that the databases resource name is valid and is not already in use. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param resource_name: The name of the resource. Is either a CheckNameRequest type or a - IO[bytes] type. Required. - :type resource_name: ~azure.mgmt.kusto.models.CheckNameRequest or IO[bytes] - :return: CheckNameResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.CheckNameResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CheckNameResult] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(resource_name, (IOBase, bytes)): - _content = resource_name - else: - _json = self._serialize.body(resource_name, "CheckNameRequest") - - _request = build_check_name_availability_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("CheckNameResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def list_by_cluster( - self, - resource_group_name: str, - cluster_name: str, - top: Optional[int] = None, - skiptoken: Optional[str] = None, - **kwargs: Any - ) -> AsyncIterable["_models.Database"]: - """Returns the list of databases of the given Kusto cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param top: limit the number of results. Default value is None. - :type top: int - :param skiptoken: Skiptoken is only used if a previous operation returned a partial result. If - a previous response contains a nextLink element, the value of the nextLink element will include - a skiptoken parameter that specifies a starting point to use for subsequent calls. Default - value is None. - :type skiptoken: str - :return: An iterator like instance of either Database or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.kusto.models.Database] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.DatabaseListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_cluster_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - subscription_id=self._config.subscription_id, - top=top, - skiptoken=skiptoken, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("DatabaseListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get( - self, resource_group_name: str, cluster_name: str, database_name: str, **kwargs: Any - ) -> _models.Database: - """Returns a database. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :return: Database or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.Database - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.Database] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("Database", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _create_or_update_initial( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - parameters: Union[_models.Database, IO[bytes]], - caller_role: Union[str, _models.CallerRole] = "Admin", - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "Database") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - subscription_id=self._config.subscription_id, - caller_role=caller_role, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - parameters: _models.Database, - caller_role: Union[str, _models.CallerRole] = "Admin", - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.Database]: - """Creates or updates a database. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param parameters: The database parameters supplied to the CreateOrUpdate operation. Required. - :type parameters: ~azure.mgmt.kusto.models.Database - :param caller_role: By default, any user who run operation on a database become an Admin on it. - This property allows the caller to exclude the caller from Admins list. Known values are: - "Admin" and "None". Default value is "Admin". - :type caller_role: str or ~azure.mgmt.kusto.models.CallerRole - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either Database or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.Database] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - parameters: IO[bytes], - caller_role: Union[str, _models.CallerRole] = "Admin", - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.Database]: - """Creates or updates a database. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param parameters: The database parameters supplied to the CreateOrUpdate operation. Required. - :type parameters: IO[bytes] - :param caller_role: By default, any user who run operation on a database become an Admin on it. - This property allows the caller to exclude the caller from Admins list. Known values are: - "Admin" and "None". Default value is "Admin". - :type caller_role: str or ~azure.mgmt.kusto.models.CallerRole - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either Database or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.Database] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create_or_update( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - parameters: Union[_models.Database, IO[bytes]], - caller_role: Union[str, _models.CallerRole] = "Admin", - **kwargs: Any - ) -> AsyncLROPoller[_models.Database]: - """Creates or updates a database. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param parameters: The database parameters supplied to the CreateOrUpdate operation. Is either - a Database type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.kusto.models.Database or IO[bytes] - :param caller_role: By default, any user who run operation on a database become an Admin on it. - This property allows the caller to exclude the caller from Admins list. Known values are: - "Admin" and "None". Default value is "Admin". - :type caller_role: str or ~azure.mgmt.kusto.models.CallerRole - :return: An instance of AsyncLROPoller that returns either Database or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.Database] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Database] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_or_update_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - parameters=parameters, - caller_role=caller_role, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Database", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.Database].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.Database]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _update_initial( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - parameters: Union[_models.Database, IO[bytes]], - caller_role: Union[str, _models.CallerRole] = "Admin", - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "Database") - - _request = build_update_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - subscription_id=self._config.subscription_id, - caller_role=caller_role, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 201: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - parameters: _models.Database, - caller_role: Union[str, _models.CallerRole] = "Admin", - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.Database]: - """Updates a database. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param parameters: The database parameters supplied to the Update operation. Required. - :type parameters: ~azure.mgmt.kusto.models.Database - :param caller_role: By default, any user who run operation on a database become an Admin on it. - This property allows the caller to exclude the caller from Admins list. Known values are: - "Admin" and "None". Default value is "Admin". - :type caller_role: str or ~azure.mgmt.kusto.models.CallerRole - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either Database or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.Database] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - parameters: IO[bytes], - caller_role: Union[str, _models.CallerRole] = "Admin", - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.Database]: - """Updates a database. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param parameters: The database parameters supplied to the Update operation. Required. - :type parameters: IO[bytes] - :param caller_role: By default, any user who run operation on a database become an Admin on it. - This property allows the caller to exclude the caller from Admins list. Known values are: - "Admin" and "None". Default value is "Admin". - :type caller_role: str or ~azure.mgmt.kusto.models.CallerRole - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either Database or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.Database] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_update( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - parameters: Union[_models.Database, IO[bytes]], - caller_role: Union[str, _models.CallerRole] = "Admin", - **kwargs: Any - ) -> AsyncLROPoller[_models.Database]: - """Updates a database. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param parameters: The database parameters supplied to the Update operation. Is either a - Database type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.kusto.models.Database or IO[bytes] - :param caller_role: By default, any user who run operation on a database become an Admin on it. - This property allows the caller to exclude the caller from Admins list. Known values are: - "Admin" and "None". Default value is "Admin". - :type caller_role: str or ~azure.mgmt.kusto.models.CallerRole - :return: An instance of AsyncLROPoller that returns either Database or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.Database] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Database] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - parameters=parameters, - caller_role=caller_role, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Database", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.Database].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.Database]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, resource_group_name: str, cluster_name: str, database_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, resource_group_name: str, cluster_name: str, database_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes the database with the given name. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list_principals( - self, resource_group_name: str, cluster_name: str, database_name: str, **kwargs: Any - ) -> AsyncIterable["_models.DatabasePrincipal"]: - """Returns a list of database principals of the given Kusto cluster and database. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :return: An iterator like instance of either DatabasePrincipal or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.kusto.models.DatabasePrincipal] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.DatabasePrincipalListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_principals_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("DatabasePrincipalListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @overload - async def add_principals( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - database_principals_to_add: _models.DatabasePrincipalListRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.DatabasePrincipalListResult: - """Add Database principals permissions. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param database_principals_to_add: List of database principals to add. Required. - :type database_principals_to_add: ~azure.mgmt.kusto.models.DatabasePrincipalListRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: DatabasePrincipalListResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.DatabasePrincipalListResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def add_principals( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - database_principals_to_add: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.DatabasePrincipalListResult: - """Add Database principals permissions. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param database_principals_to_add: List of database principals to add. Required. - :type database_principals_to_add: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: DatabasePrincipalListResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.DatabasePrincipalListResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def add_principals( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - database_principals_to_add: Union[_models.DatabasePrincipalListRequest, IO[bytes]], - **kwargs: Any - ) -> _models.DatabasePrincipalListResult: - """Add Database principals permissions. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param database_principals_to_add: List of database principals to add. Is either a - DatabasePrincipalListRequest type or a IO[bytes] type. Required. - :type database_principals_to_add: ~azure.mgmt.kusto.models.DatabasePrincipalListRequest or - IO[bytes] - :return: DatabasePrincipalListResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.DatabasePrincipalListResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.DatabasePrincipalListResult] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(database_principals_to_add, (IOBase, bytes)): - _content = database_principals_to_add - else: - _json = self._serialize.body(database_principals_to_add, "DatabasePrincipalListRequest") - - _request = build_add_principals_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("DatabasePrincipalListResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def remove_principals( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - database_principals_to_remove: _models.DatabasePrincipalListRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.DatabasePrincipalListResult: - """Remove Database principals permissions. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param database_principals_to_remove: List of database principals to remove. Required. - :type database_principals_to_remove: ~azure.mgmt.kusto.models.DatabasePrincipalListRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: DatabasePrincipalListResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.DatabasePrincipalListResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def remove_principals( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - database_principals_to_remove: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.DatabasePrincipalListResult: - """Remove Database principals permissions. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param database_principals_to_remove: List of database principals to remove. Required. - :type database_principals_to_remove: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: DatabasePrincipalListResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.DatabasePrincipalListResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def remove_principals( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - database_principals_to_remove: Union[_models.DatabasePrincipalListRequest, IO[bytes]], - **kwargs: Any - ) -> _models.DatabasePrincipalListResult: - """Remove Database principals permissions. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param database_principals_to_remove: List of database principals to remove. Is either a - DatabasePrincipalListRequest type or a IO[bytes] type. Required. - :type database_principals_to_remove: ~azure.mgmt.kusto.models.DatabasePrincipalListRequest or - IO[bytes] - :return: DatabasePrincipalListResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.DatabasePrincipalListResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.DatabasePrincipalListResult] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(database_principals_to_remove, (IOBase, bytes)): - _content = database_principals_to_remove - else: - _json = self._serialize.body(database_principals_to_remove, "DatabasePrincipalListRequest") - - _request = build_remove_principals_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("DatabasePrincipalListResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_managed_private_endpoints_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_managed_private_endpoints_operations.py deleted file mode 100644 index c53a2a9b2bce..000000000000 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_managed_private_endpoints_operations.py +++ /dev/null @@ -1,887 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from io import IOBase -import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ...operations._managed_private_endpoints_operations import ( - build_check_name_availability_request, - build_create_or_update_request, - build_delete_request, - build_get_request, - build_list_request, - build_update_request, -) - -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - - -class ManagedPrivateEndpointsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.kusto.aio.KustoManagementClient`'s - :attr:`managed_private_endpoints` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @overload - async def check_name_availability( - self, - resource_group_name: str, - cluster_name: str, - resource_name: _models.ManagedPrivateEndpointsCheckNameRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CheckNameResult: - """Checks that the managed private endpoints resource name is valid and is not already in use. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param resource_name: The name of the resource. Required. - :type resource_name: ~azure.mgmt.kusto.models.ManagedPrivateEndpointsCheckNameRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: CheckNameResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.CheckNameResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def check_name_availability( - self, - resource_group_name: str, - cluster_name: str, - resource_name: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CheckNameResult: - """Checks that the managed private endpoints resource name is valid and is not already in use. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param resource_name: The name of the resource. Required. - :type resource_name: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: CheckNameResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.CheckNameResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def check_name_availability( - self, - resource_group_name: str, - cluster_name: str, - resource_name: Union[_models.ManagedPrivateEndpointsCheckNameRequest, IO[bytes]], - **kwargs: Any - ) -> _models.CheckNameResult: - """Checks that the managed private endpoints resource name is valid and is not already in use. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param resource_name: The name of the resource. Is either a - ManagedPrivateEndpointsCheckNameRequest type or a IO[bytes] type. Required. - :type resource_name: ~azure.mgmt.kusto.models.ManagedPrivateEndpointsCheckNameRequest or - IO[bytes] - :return: CheckNameResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.CheckNameResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CheckNameResult] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(resource_name, (IOBase, bytes)): - _content = resource_name - else: - _json = self._serialize.body(resource_name, "ManagedPrivateEndpointsCheckNameRequest") - - _request = build_check_name_availability_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("CheckNameResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def list( - self, resource_group_name: str, cluster_name: str, **kwargs: Any - ) -> AsyncIterable["_models.ManagedPrivateEndpoint"]: - """Returns the list of managed private endpoints. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :return: An iterator like instance of either ManagedPrivateEndpoint or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.kusto.models.ManagedPrivateEndpoint] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ManagedPrivateEndpointListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("ManagedPrivateEndpointListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get( - self, resource_group_name: str, cluster_name: str, managed_private_endpoint_name: str, **kwargs: Any - ) -> _models.ManagedPrivateEndpoint: - """Gets a managed private endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param managed_private_endpoint_name: The name of the managed private endpoint. Required. - :type managed_private_endpoint_name: str - :return: ManagedPrivateEndpoint or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.ManagedPrivateEndpoint - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ManagedPrivateEndpoint] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - managed_private_endpoint_name=managed_private_endpoint_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ManagedPrivateEndpoint", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _create_or_update_initial( - self, - resource_group_name: str, - cluster_name: str, - managed_private_endpoint_name: str, - parameters: Union[_models.ManagedPrivateEndpoint, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ManagedPrivateEndpoint") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - managed_private_endpoint_name=managed_private_endpoint_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - cluster_name: str, - managed_private_endpoint_name: str, - parameters: _models.ManagedPrivateEndpoint, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ManagedPrivateEndpoint]: - """Creates a managed private endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param managed_private_endpoint_name: The name of the managed private endpoint. Required. - :type managed_private_endpoint_name: str - :param parameters: The managed private endpoint parameters. Required. - :type parameters: ~azure.mgmt.kusto.models.ManagedPrivateEndpoint - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either ManagedPrivateEndpoint or the result - of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.ManagedPrivateEndpoint] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - cluster_name: str, - managed_private_endpoint_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ManagedPrivateEndpoint]: - """Creates a managed private endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param managed_private_endpoint_name: The name of the managed private endpoint. Required. - :type managed_private_endpoint_name: str - :param parameters: The managed private endpoint parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either ManagedPrivateEndpoint or the result - of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.ManagedPrivateEndpoint] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create_or_update( - self, - resource_group_name: str, - cluster_name: str, - managed_private_endpoint_name: str, - parameters: Union[_models.ManagedPrivateEndpoint, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.ManagedPrivateEndpoint]: - """Creates a managed private endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param managed_private_endpoint_name: The name of the managed private endpoint. Required. - :type managed_private_endpoint_name: str - :param parameters: The managed private endpoint parameters. Is either a ManagedPrivateEndpoint - type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.kusto.models.ManagedPrivateEndpoint or IO[bytes] - :return: An instance of AsyncLROPoller that returns either ManagedPrivateEndpoint or the result - of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.ManagedPrivateEndpoint] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ManagedPrivateEndpoint] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_or_update_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - managed_private_endpoint_name=managed_private_endpoint_name, - parameters=parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ManagedPrivateEndpoint", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.ManagedPrivateEndpoint].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.ManagedPrivateEndpoint]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _update_initial( - self, - resource_group_name: str, - cluster_name: str, - managed_private_endpoint_name: str, - parameters: Union[_models.ManagedPrivateEndpoint, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ManagedPrivateEndpoint") - - _request = build_update_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - managed_private_endpoint_name=managed_private_endpoint_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update( - self, - resource_group_name: str, - cluster_name: str, - managed_private_endpoint_name: str, - parameters: _models.ManagedPrivateEndpoint, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ManagedPrivateEndpoint]: - """Updates a managed private endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param managed_private_endpoint_name: The name of the managed private endpoint. Required. - :type managed_private_endpoint_name: str - :param parameters: The managed private endpoint parameters. Required. - :type parameters: ~azure.mgmt.kusto.models.ManagedPrivateEndpoint - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either ManagedPrivateEndpoint or the result - of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.ManagedPrivateEndpoint] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update( - self, - resource_group_name: str, - cluster_name: str, - managed_private_endpoint_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ManagedPrivateEndpoint]: - """Updates a managed private endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param managed_private_endpoint_name: The name of the managed private endpoint. Required. - :type managed_private_endpoint_name: str - :param parameters: The managed private endpoint parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either ManagedPrivateEndpoint or the result - of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.ManagedPrivateEndpoint] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_update( - self, - resource_group_name: str, - cluster_name: str, - managed_private_endpoint_name: str, - parameters: Union[_models.ManagedPrivateEndpoint, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.ManagedPrivateEndpoint]: - """Updates a managed private endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param managed_private_endpoint_name: The name of the managed private endpoint. Required. - :type managed_private_endpoint_name: str - :param parameters: The managed private endpoint parameters. Is either a ManagedPrivateEndpoint - type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.kusto.models.ManagedPrivateEndpoint or IO[bytes] - :return: An instance of AsyncLROPoller that returns either ManagedPrivateEndpoint or the result - of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.ManagedPrivateEndpoint] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ManagedPrivateEndpoint] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - managed_private_endpoint_name=managed_private_endpoint_name, - parameters=parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ManagedPrivateEndpoint", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.ManagedPrivateEndpoint].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.ManagedPrivateEndpoint]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, resource_group_name: str, cluster_name: str, managed_private_endpoint_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - managed_private_endpoint_name=managed_private_endpoint_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, resource_group_name: str, cluster_name: str, managed_private_endpoint_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes a managed private endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param managed_private_endpoint_name: The name of the managed private endpoint. Required. - :type managed_private_endpoint_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - managed_private_endpoint_name=managed_private_endpoint_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_operations.py index e87a49e56ead..77cf82a14511 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_operations.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_operations.py @@ -1,38 +1,133 @@ +# pylint: disable=line-too-long,useless-suppression,too-many-lines # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar +from collections.abc import MutableMapping +from io import IOBase +import json +from typing import Any, AsyncIterator, Callable, IO, Literal, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import AsyncPipelineClient, MatchConditions from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, ResourceExistsError, + ResourceModifiedError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.pipeline import PipelineResponse +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models -from ...operations._operations import build_list_request +from ..._utils.model_base import SdkJSONEncoder, _deserialize, _failsafe_deserialize +from ..._utils.serialization import Deserializer, Serializer +from ...operations._operations import ( + build_attached_database_configurations_check_name_availability_request, + build_attached_database_configurations_create_or_update_request, + build_attached_database_configurations_delete_request, + build_attached_database_configurations_get_request, + build_attached_database_configurations_list_by_cluster_request, + build_cluster_principal_assignments_check_name_availability_request, + build_cluster_principal_assignments_create_or_update_request, + build_cluster_principal_assignments_delete_request, + build_cluster_principal_assignments_get_request, + build_cluster_principal_assignments_list_request, + build_clusters_add_callout_policies_request, + build_clusters_add_language_extensions_request, + build_clusters_check_name_availability_request, + build_clusters_create_or_update_request, + build_clusters_delete_request, + build_clusters_detach_follower_databases_request, + build_clusters_diagnose_virtual_network_request, + build_clusters_get_request, + build_clusters_list_by_resource_group_request, + build_clusters_list_callout_policies_request, + build_clusters_list_follower_databases_get_request, + build_clusters_list_follower_databases_request, + build_clusters_list_language_extensions_request, + build_clusters_list_outbound_network_dependencies_endpoints_request, + build_clusters_list_request, + build_clusters_list_skus_by_resource_request, + build_clusters_list_skus_request, + build_clusters_migrate_request, + build_clusters_remove_callout_policy_request, + build_clusters_remove_language_extensions_request, + build_clusters_start_request, + build_clusters_stop_request, + build_clusters_update_request, + build_data_connections_check_name_availability_request, + build_data_connections_create_or_update_request, + build_data_connections_data_connection_validation_request, + build_data_connections_delete_request, + build_data_connections_get_request, + build_data_connections_list_by_database_request, + build_data_connections_update_request, + build_database_invite_follower_request, + build_database_principal_assignments_check_name_availability_request, + build_database_principal_assignments_create_or_update_request, + build_database_principal_assignments_delete_request, + build_database_principal_assignments_get_request, + build_database_principal_assignments_list_request, + build_databases_add_principals_request, + build_databases_check_name_availability_request, + build_databases_create_or_update_request, + build_databases_delete_request, + build_databases_get_request, + build_databases_list_by_cluster_request, + build_databases_list_principals_request, + build_databases_remove_principals_request, + build_databases_update_request, + build_managed_private_endpoints_check_name_availability_request, + build_managed_private_endpoints_create_or_update_request, + build_managed_private_endpoints_delete_request, + build_managed_private_endpoints_get_request, + build_managed_private_endpoints_list_request, + build_managed_private_endpoints_update_request, + build_operations_list_request, + build_operations_results_get_request, + build_operations_results_location_get_request, + build_private_endpoint_connections_create_or_update_request, + build_private_endpoint_connections_delete_request, + build_private_endpoint_connections_get_request, + build_private_endpoint_connections_list_request, + build_private_link_resources_get_request, + build_private_link_resources_list_request, + build_sandbox_custom_images_check_name_availability_request, + build_sandbox_custom_images_create_or_update_request, + build_sandbox_custom_images_delete_request, + build_sandbox_custom_images_get_request, + build_sandbox_custom_images_list_by_cluster_request, + build_sandbox_custom_images_update_request, + build_scripts_check_name_availability_request, + build_scripts_create_or_update_request, + build_scripts_delete_request, + build_scripts_get_request, + build_scripts_list_by_database_request, + build_scripts_update_request, + build_skus_list_request, +) +from .._configuration import KustoManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +JSON = MutableMapping[str, Any] +List = list class Operations: @@ -45,28 +140,598 @@ class Operations: :attr:`operations` attribute. """ - models = _models - def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: KustoManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - def list(self, **kwargs: Any) -> AsyncIterable["_models.Operation"]: - """Lists available operations for the Microsoft.Kusto provider. + def list(self, **kwargs: Any) -> AsyncItemPaged["_models.Operation"]: + """List the operations for the provider. - :return: An iterator like instance of either Operation or the result of cls(response) + :return: An iterator like instance of Operation :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.kusto.models.Operation] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.Operation]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_operations_list_request( + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.Operation], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class ClusterPrincipalAssignmentsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.kusto.aio.KustoManagementClient`'s + :attr:`cluster_principal_assignments` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: KustoManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, cluster_name: str, principal_assignment_name: str, **kwargs: Any + ) -> _models.ClusterPrincipalAssignment: + """Gets a Kusto cluster principalAssignment. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param principal_assignment_name: The name of the Kusto principalAssignment. Required. + :type principal_assignment_name: str + :return: ClusterPrincipalAssignment. The ClusterPrincipalAssignment is compatible with + MutableMapping + :rtype: ~azure.mgmt.kusto.models.ClusterPrincipalAssignment + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ClusterPrincipalAssignment] = kwargs.pop("cls", None) + + _request = build_cluster_principal_assignments_get_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + principal_assignment_name=principal_assignment_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ClusterPrincipalAssignment, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + cluster_name: str, + principal_assignment_name: str, + parameters: Union[_models.ClusterPrincipalAssignment, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_cluster_principal_assignments_create_or_update_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + principal_assignment_name=principal_assignment_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + principal_assignment_name: str, + parameters: _models.ClusterPrincipalAssignment, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ClusterPrincipalAssignment]: + """Create a Kusto cluster principalAssignment. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param principal_assignment_name: The name of the Kusto principalAssignment. Required. + :type principal_assignment_name: str + :param parameters: The Kusto cluster principalAssignment's parameters supplied for the + operation. Required. + :type parameters: ~azure.mgmt.kusto.models.ClusterPrincipalAssignment + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ClusterPrincipalAssignment. The + ClusterPrincipalAssignment is compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.ClusterPrincipalAssignment] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + principal_assignment_name: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ClusterPrincipalAssignment]: + """Create a Kusto cluster principalAssignment. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param principal_assignment_name: The name of the Kusto principalAssignment. Required. + :type principal_assignment_name: str + :param parameters: The Kusto cluster principalAssignment's parameters supplied for the + operation. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ClusterPrincipalAssignment. The + ClusterPrincipalAssignment is compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.ClusterPrincipalAssignment] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + principal_assignment_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ClusterPrincipalAssignment]: + """Create a Kusto cluster principalAssignment. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param principal_assignment_name: The name of the Kusto principalAssignment. Required. + :type principal_assignment_name: str + :param parameters: The Kusto cluster principalAssignment's parameters supplied for the + operation. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ClusterPrincipalAssignment. The + ClusterPrincipalAssignment is compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.ClusterPrincipalAssignment] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + principal_assignment_name: str, + parameters: Union[_models.ClusterPrincipalAssignment, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.ClusterPrincipalAssignment]: + """Create a Kusto cluster principalAssignment. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param principal_assignment_name: The name of the Kusto principalAssignment. Required. + :type principal_assignment_name: str + :param parameters: The Kusto cluster principalAssignment's parameters supplied for the + operation. Is one of the following types: ClusterPrincipalAssignment, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.kusto.models.ClusterPrincipalAssignment or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns ClusterPrincipalAssignment. The + ClusterPrincipalAssignment is compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.ClusterPrincipalAssignment] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ClusterPrincipalAssignment] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + principal_assignment_name=principal_assignment_name, + parameters=parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.ClusterPrincipalAssignment, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.ClusterPrincipalAssignment].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.ClusterPrincipalAssignment]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, resource_group_name: str, cluster_name: str, principal_assignment_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_cluster_principal_assignments_delete_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + principal_assignment_name=principal_assignment_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, resource_group_name: str, cluster_name: str, principal_assignment_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a Kusto cluster principalAssignment. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param principal_assignment_name: The name of the Kusto principalAssignment. Required. + :type principal_assignment_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + principal_assignment_name=principal_assignment_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list( + self, resource_group_name: str, cluster_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.ClusterPrincipalAssignment"]: + """Lists all Kusto cluster principalAssignments. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :return: An iterator like instance of ClusterPrincipalAssignment + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.kusto.models.ClusterPrincipalAssignment] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) + cls: ClsType[List[_models.ClusterPrincipalAssignment]] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -79,12 +744,20 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Operation"]: def prepare_request(next_link=None): if not next_link: - _request = build_list_request( - api_version=api_version, + _request = build_cluster_principal_assignments_list_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, headers=_headers, params=_params, ) - _request.url = self._client.format_url(_request.url) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) else: # make call to next link with the client's api-version @@ -97,18 +770,29 @@ def prepare_request(next_link=None): ) _next_request_params["api-version"] = self._config.api_version _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + return _request async def extract_data(pipeline_response): - deserialized = self._deserialize("OperationListResult", pipeline_response) - list_of_elem = deserialized.value + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ClusterPrincipalAssignment], + deserialized.get("value", []), + ) if cls: list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) async def get_next(next_link=None): _request = prepare_request(next_link) @@ -121,9 +805,12496 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged(get_next, extract_data) + + @overload + async def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + principal_assignment_name: _models.ClusterPrincipalAssignmentCheckNameRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the principal assignment name is valid and is not already in use. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param principal_assignment_name: The name of the principal assignment. Required. + :type principal_assignment_name: + ~azure.mgmt.kusto.models.ClusterPrincipalAssignmentCheckNameRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + principal_assignment_name: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the principal assignment name is valid and is not already in use. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param principal_assignment_name: The name of the principal assignment. Required. + :type principal_assignment_name: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + principal_assignment_name: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the principal assignment name is valid and is not already in use. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param principal_assignment_name: The name of the principal assignment. Required. + :type principal_assignment_name: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + principal_assignment_name: Union[_models.ClusterPrincipalAssignmentCheckNameRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the principal assignment name is valid and is not already in use. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param principal_assignment_name: The name of the principal assignment. Is one of the following + types: ClusterPrincipalAssignmentCheckNameRequest, JSON, IO[bytes] Required. + :type principal_assignment_name: + ~azure.mgmt.kusto.models.ClusterPrincipalAssignmentCheckNameRequest or JSON or IO[bytes] + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CheckNameResult] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(principal_assignment_name, (IOBase, bytes)): + _content = principal_assignment_name + else: + _content = json.dumps(principal_assignment_name, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_cluster_principal_assignments_check_name_availability_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CheckNameResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class DatabasePrincipalAssignmentsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.kusto.aio.KustoManagementClient`'s + :attr:`database_principal_assignments` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: KustoManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + principal_assignment_name: str, + **kwargs: Any + ) -> _models.DatabasePrincipalAssignment: + """Gets a Kusto cluster database principalAssignment. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param principal_assignment_name: The name of the Kusto principalAssignment. Required. + :type principal_assignment_name: str + :return: DatabasePrincipalAssignment. The DatabasePrincipalAssignment is compatible with + MutableMapping + :rtype: ~azure.mgmt.kusto.models.DatabasePrincipalAssignment + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.DatabasePrincipalAssignment] = kwargs.pop("cls", None) + + _request = build_database_principal_assignments_get_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + principal_assignment_name=principal_assignment_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.DatabasePrincipalAssignment, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + principal_assignment_name: str, + parameters: Union[_models.DatabasePrincipalAssignment, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_database_principal_assignments_create_or_update_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + principal_assignment_name=principal_assignment_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + principal_assignment_name: str, + parameters: _models.DatabasePrincipalAssignment, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.DatabasePrincipalAssignment]: + """Creates a Kusto cluster database principalAssignment. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param principal_assignment_name: The name of the Kusto principalAssignment. Required. + :type principal_assignment_name: str + :param parameters: The Kusto principalAssignments parameters supplied for the operation. + Required. + :type parameters: ~azure.mgmt.kusto.models.DatabasePrincipalAssignment + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns DatabasePrincipalAssignment. The + DatabasePrincipalAssignment is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.DatabasePrincipalAssignment] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + principal_assignment_name: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.DatabasePrincipalAssignment]: + """Creates a Kusto cluster database principalAssignment. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param principal_assignment_name: The name of the Kusto principalAssignment. Required. + :type principal_assignment_name: str + :param parameters: The Kusto principalAssignments parameters supplied for the operation. + Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns DatabasePrincipalAssignment. The + DatabasePrincipalAssignment is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.DatabasePrincipalAssignment] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + principal_assignment_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.DatabasePrincipalAssignment]: + """Creates a Kusto cluster database principalAssignment. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param principal_assignment_name: The name of the Kusto principalAssignment. Required. + :type principal_assignment_name: str + :param parameters: The Kusto principalAssignments parameters supplied for the operation. + Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns DatabasePrincipalAssignment. The + DatabasePrincipalAssignment is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.DatabasePrincipalAssignment] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + principal_assignment_name: str, + parameters: Union[_models.DatabasePrincipalAssignment, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.DatabasePrincipalAssignment]: + """Creates a Kusto cluster database principalAssignment. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param principal_assignment_name: The name of the Kusto principalAssignment. Required. + :type principal_assignment_name: str + :param parameters: The Kusto principalAssignments parameters supplied for the operation. Is one + of the following types: DatabasePrincipalAssignment, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.kusto.models.DatabasePrincipalAssignment or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns DatabasePrincipalAssignment. The + DatabasePrincipalAssignment is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.DatabasePrincipalAssignment] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.DatabasePrincipalAssignment] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + principal_assignment_name=principal_assignment_name, + parameters=parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.DatabasePrincipalAssignment, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.DatabasePrincipalAssignment].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.DatabasePrincipalAssignment]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + principal_assignment_name: str, + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_database_principal_assignments_delete_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + principal_assignment_name=principal_assignment_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + principal_assignment_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a Kusto principalAssignment. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param principal_assignment_name: The name of the Kusto principalAssignment. Required. + :type principal_assignment_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + principal_assignment_name=principal_assignment_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list( + self, resource_group_name: str, cluster_name: str, database_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.DatabasePrincipalAssignment"]: + """Lists all Kusto cluster database principalAssignments. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :return: An iterator like instance of DatabasePrincipalAssignment + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.kusto.models.DatabasePrincipalAssignment] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.DatabasePrincipalAssignment]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_database_principal_assignments_list_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.DatabasePrincipalAssignment], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @overload + async def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + principal_assignment_name: _models.DatabasePrincipalAssignmentCheckNameRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the database principal assignment is valid and is not already in use. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param principal_assignment_name: The name of the resource. Required. + :type principal_assignment_name: + ~azure.mgmt.kusto.models.DatabasePrincipalAssignmentCheckNameRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + principal_assignment_name: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the database principal assignment is valid and is not already in use. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param principal_assignment_name: The name of the resource. Required. + :type principal_assignment_name: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + principal_assignment_name: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the database principal assignment is valid and is not already in use. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param principal_assignment_name: The name of the resource. Required. + :type principal_assignment_name: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + principal_assignment_name: Union[_models.DatabasePrincipalAssignmentCheckNameRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the database principal assignment is valid and is not already in use. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param principal_assignment_name: The name of the resource. Is one of the following types: + DatabasePrincipalAssignmentCheckNameRequest, JSON, IO[bytes] Required. + :type principal_assignment_name: + ~azure.mgmt.kusto.models.DatabasePrincipalAssignmentCheckNameRequest or JSON or IO[bytes] + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CheckNameResult] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(principal_assignment_name, (IOBase, bytes)): + _content = principal_assignment_name + else: + _content = json.dumps(principal_assignment_name, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_database_principal_assignments_check_name_availability_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CheckNameResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class ScriptsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.kusto.aio.KustoManagementClient`'s + :attr:`scripts` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: KustoManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, cluster_name: str, database_name: str, script_name: str, **kwargs: Any + ) -> _models.Script: + """Gets a Kusto cluster database script. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param script_name: The name of the Kusto database script. Required. + :type script_name: str + :return: Script. The Script is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.Script + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.Script] = kwargs.pop("cls", None) + + _request = build_scripts_get_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + script_name=script_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.Script, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + script_name: str, + parameters: Union[_models.Script, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_scripts_create_or_update_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + script_name=script_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + script_name: str, + parameters: _models.Script, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Script]: + """Creates a Kusto database script. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param script_name: The name of the Kusto database script. Required. + :type script_name: str + :param parameters: The Kusto Script parameters contains the KQL to run. Required. + :type parameters: ~azure.mgmt.kusto.models.Script + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Script. The Script is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.Script] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + script_name: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Script]: + """Creates a Kusto database script. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param script_name: The name of the Kusto database script. Required. + :type script_name: str + :param parameters: The Kusto Script parameters contains the KQL to run. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Script. The Script is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.Script] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + script_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Script]: + """Creates a Kusto database script. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param script_name: The name of the Kusto database script. Required. + :type script_name: str + :param parameters: The Kusto Script parameters contains the KQL to run. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Script. The Script is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.Script] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + script_name: str, + parameters: Union[_models.Script, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.Script]: + """Creates a Kusto database script. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param script_name: The name of the Kusto database script. Required. + :type script_name: str + :param parameters: The Kusto Script parameters contains the KQL to run. Is one of the following + types: Script, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.kusto.models.Script or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns Script. The Script is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.Script] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Script] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + script_name=script_name, + parameters=parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.Script, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.Script].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.Script]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _update_initial( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + script_name: str, + parameters: Union[_models.Script, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_scripts_update_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + script_name=script_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + script_name: str, + parameters: _models.Script, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Script]: + """Updates a database script. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param script_name: The name of the Kusto database script. Required. + :type script_name: str + :param parameters: The Kusto Script parameters contains to the KQL to run. Required. + :type parameters: ~azure.mgmt.kusto.models.Script + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Script. The Script is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.Script] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + script_name: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Script]: + """Updates a database script. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param script_name: The name of the Kusto database script. Required. + :type script_name: str + :param parameters: The Kusto Script parameters contains to the KQL to run. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Script. The Script is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.Script] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + script_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Script]: + """Updates a database script. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param script_name: The name of the Kusto database script. Required. + :type script_name: str + :param parameters: The Kusto Script parameters contains to the KQL to run. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Script. The Script is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.Script] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_update( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + script_name: str, + parameters: Union[_models.Script, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.Script]: + """Updates a database script. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param script_name: The name of the Kusto database script. Required. + :type script_name: str + :param parameters: The Kusto Script parameters contains to the KQL to run. Is one of the + following types: Script, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.kusto.models.Script or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns Script. The Script is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.Script] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Script] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + script_name=script_name, + parameters=parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.Script, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.Script].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.Script]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, resource_group_name: str, cluster_name: str, database_name: str, script_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_scripts_delete_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + script_name=script_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, resource_group_name: str, cluster_name: str, database_name: str, script_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a Kusto database script. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param script_name: The name of the Kusto database script. Required. + :type script_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + script_name=script_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_database( + self, resource_group_name: str, cluster_name: str, database_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.Script"]: + """Returns the list of database scripts for given database. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :return: An iterator like instance of Script + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.kusto.models.Script] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.Script]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_scripts_list_by_database_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.Script], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @overload + async def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + script_name: _models.ScriptCheckNameRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the script name is valid and is not already in use. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param script_name: The name of the script. Required. + :type script_name: ~azure.mgmt.kusto.models.ScriptCheckNameRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + script_name: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the script name is valid and is not already in use. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param script_name: The name of the script. Required. + :type script_name: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + script_name: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the script name is valid and is not already in use. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param script_name: The name of the script. Required. + :type script_name: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + script_name: Union[_models.ScriptCheckNameRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the script name is valid and is not already in use. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param script_name: The name of the script. Is one of the following types: + ScriptCheckNameRequest, JSON, IO[bytes] Required. + :type script_name: ~azure.mgmt.kusto.models.ScriptCheckNameRequest or JSON or IO[bytes] + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CheckNameResult] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(script_name, (IOBase, bytes)): + _content = script_name + else: + _content = json.dumps(script_name, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_scripts_check_name_availability_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CheckNameResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class DataConnectionsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.kusto.aio.KustoManagementClient`'s + :attr:`data_connections` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: KustoManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, cluster_name: str, database_name: str, data_connection_name: str, **kwargs: Any + ) -> _models.DataConnection: + """Returns a data connection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param data_connection_name: The name of the data connection. Required. + :type data_connection_name: str + :return: DataConnection. The DataConnection is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.DataConnection + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.DataConnection] = kwargs.pop("cls", None) + + _request = build_data_connections_get_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + data_connection_name=data_connection_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.DataConnection, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + data_connection_name: str, + parameters: Union[_models.DataConnection, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_data_connections_create_or_update_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + data_connection_name=data_connection_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + data_connection_name: str, + parameters: _models.DataConnection, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.DataConnection]: + """Creates or updates a data connection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param data_connection_name: The name of the data connection. Required. + :type data_connection_name: str + :param parameters: The data connection parameters supplied to the CreateOrUpdate operation. + Required. + :type parameters: ~azure.mgmt.kusto.models.DataConnection + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns DataConnection. The DataConnection is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.DataConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + data_connection_name: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.DataConnection]: + """Creates or updates a data connection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param data_connection_name: The name of the data connection. Required. + :type data_connection_name: str + :param parameters: The data connection parameters supplied to the CreateOrUpdate operation. + Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns DataConnection. The DataConnection is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.DataConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + data_connection_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.DataConnection]: + """Creates or updates a data connection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param data_connection_name: The name of the data connection. Required. + :type data_connection_name: str + :param parameters: The data connection parameters supplied to the CreateOrUpdate operation. + Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns DataConnection. The DataConnection is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.DataConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + data_connection_name: str, + parameters: Union[_models.DataConnection, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.DataConnection]: + """Creates or updates a data connection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param data_connection_name: The name of the data connection. Required. + :type data_connection_name: str + :param parameters: The data connection parameters supplied to the CreateOrUpdate operation. Is + one of the following types: DataConnection, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.kusto.models.DataConnection or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns DataConnection. The DataConnection is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.DataConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.DataConnection] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + data_connection_name=data_connection_name, + parameters=parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.DataConnection, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.DataConnection].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.DataConnection]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _update_initial( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + data_connection_name: str, + parameters: Union[_models.DataConnection, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_data_connections_update_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + data_connection_name=data_connection_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + data_connection_name: str, + parameters: _models.DataConnection, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.DataConnection]: + """Updates a data connection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param data_connection_name: The name of the data connection. Required. + :type data_connection_name: str + :param parameters: The data connection parameters supplied to the Update operation. Required. + :type parameters: ~azure.mgmt.kusto.models.DataConnection + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns DataConnection. The DataConnection is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.DataConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + data_connection_name: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.DataConnection]: + """Updates a data connection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param data_connection_name: The name of the data connection. Required. + :type data_connection_name: str + :param parameters: The data connection parameters supplied to the Update operation. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns DataConnection. The DataConnection is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.DataConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + data_connection_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.DataConnection]: + """Updates a data connection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param data_connection_name: The name of the data connection. Required. + :type data_connection_name: str + :param parameters: The data connection parameters supplied to the Update operation. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns DataConnection. The DataConnection is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.DataConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_update( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + data_connection_name: str, + parameters: Union[_models.DataConnection, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.DataConnection]: + """Updates a data connection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param data_connection_name: The name of the data connection. Required. + :type data_connection_name: str + :param parameters: The data connection parameters supplied to the Update operation. Is one of + the following types: DataConnection, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.kusto.models.DataConnection or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns DataConnection. The DataConnection is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.DataConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.DataConnection] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + data_connection_name=data_connection_name, + parameters=parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.DataConnection, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.DataConnection].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.DataConnection]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, resource_group_name: str, cluster_name: str, database_name: str, data_connection_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_data_connections_delete_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + data_connection_name=data_connection_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, resource_group_name: str, cluster_name: str, database_name: str, data_connection_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the data connection with the given name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param data_connection_name: The name of the data connection. Required. + :type data_connection_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + data_connection_name=data_connection_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_database( + self, resource_group_name: str, cluster_name: str, database_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.DataConnection"]: + """Returns the list of data connections of the given Kusto database. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :return: An iterator like instance of DataConnection + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.kusto.models.DataConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.DataConnection]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_data_connections_list_by_database_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.DataConnection], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + async def _data_connection_validation_initial( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + parameters: Union[_models.DataConnectionValidation, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_data_connections_data_connection_validation_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_data_connection_validation( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + parameters: _models.DataConnectionValidation, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.DataConnectionValidationListResult]: + """Checks that the data connection parameters are valid. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param parameters: The data connection parameters supplied to the CreateOrUpdate operation. + Required. + :type parameters: ~azure.mgmt.kusto.models.DataConnectionValidation + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns DataConnectionValidationListResult. The + DataConnectionValidationListResult is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.DataConnectionValidationListResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_data_connection_validation( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.DataConnectionValidationListResult]: + """Checks that the data connection parameters are valid. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param parameters: The data connection parameters supplied to the CreateOrUpdate operation. + Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns DataConnectionValidationListResult. The + DataConnectionValidationListResult is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.DataConnectionValidationListResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_data_connection_validation( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.DataConnectionValidationListResult]: + """Checks that the data connection parameters are valid. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param parameters: The data connection parameters supplied to the CreateOrUpdate operation. + Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns DataConnectionValidationListResult. The + DataConnectionValidationListResult is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.DataConnectionValidationListResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_data_connection_validation( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + parameters: Union[_models.DataConnectionValidation, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.DataConnectionValidationListResult]: + """Checks that the data connection parameters are valid. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param parameters: The data connection parameters supplied to the CreateOrUpdate operation. Is + one of the following types: DataConnectionValidation, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.kusto.models.DataConnectionValidation or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns DataConnectionValidationListResult. The + DataConnectionValidationListResult is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.DataConnectionValidationListResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.DataConnectionValidationListResult] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._data_connection_validation_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + parameters=parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = _deserialize(_models.DataConnectionValidationListResult, response.json()) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.DataConnectionValidationListResult].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.DataConnectionValidationListResult]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @overload + async def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + data_connection_name: _models.DataConnectionCheckNameRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the data connection name is valid and is not already in use. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param data_connection_name: The name of the data connection. Required. + :type data_connection_name: ~azure.mgmt.kusto.models.DataConnectionCheckNameRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + data_connection_name: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the data connection name is valid and is not already in use. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param data_connection_name: The name of the data connection. Required. + :type data_connection_name: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + data_connection_name: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the data connection name is valid and is not already in use. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param data_connection_name: The name of the data connection. Required. + :type data_connection_name: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + data_connection_name: Union[_models.DataConnectionCheckNameRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the data connection name is valid and is not already in use. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param data_connection_name: The name of the data connection. Is one of the following types: + DataConnectionCheckNameRequest, JSON, IO[bytes] Required. + :type data_connection_name: ~azure.mgmt.kusto.models.DataConnectionCheckNameRequest or JSON or + IO[bytes] + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CheckNameResult] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(data_connection_name, (IOBase, bytes)): + _content = data_connection_name + else: + _content = json.dumps(data_connection_name, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_data_connections_check_name_availability_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CheckNameResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class DatabasesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.kusto.aio.KustoManagementClient`'s + :attr:`databases` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: KustoManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, cluster_name: str, database_name: str, **kwargs: Any + ) -> _models.Database: + """Returns a database. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :return: Database. The Database is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.Database + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.Database] = kwargs.pop("cls", None) + + _request = build_databases_get_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.Database, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + parameters: Union[_models.Database, JSON, IO[bytes]], + *, + caller_role: Optional[Union[str, _models.CallerRole]] = None, + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_databases_create_or_update_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + subscription_id=self._config.subscription_id, + caller_role=caller_role, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + parameters: _models.Database, + *, + caller_role: Optional[Union[str, _models.CallerRole]] = None, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Database]: + """Creates or updates a database. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param parameters: The database parameters supplied to the CreateOrUpdate operation. Required. + :type parameters: ~azure.mgmt.kusto.models.Database + :keyword caller_role: By default, any user who run operation on a database become an Admin on + it. This property allows the caller to exclude the caller from Admins list. Known values are: + "Admin" and "None". Default value is None. + :paramtype caller_role: str or ~azure.mgmt.kusto.models.CallerRole + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Database. The Database is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.Database] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + parameters: JSON, + *, + caller_role: Optional[Union[str, _models.CallerRole]] = None, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Database]: + """Creates or updates a database. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param parameters: The database parameters supplied to the CreateOrUpdate operation. Required. + :type parameters: JSON + :keyword caller_role: By default, any user who run operation on a database become an Admin on + it. This property allows the caller to exclude the caller from Admins list. Known values are: + "Admin" and "None". Default value is None. + :paramtype caller_role: str or ~azure.mgmt.kusto.models.CallerRole + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Database. The Database is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.Database] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + parameters: IO[bytes], + *, + caller_role: Optional[Union[str, _models.CallerRole]] = None, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Database]: + """Creates or updates a database. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param parameters: The database parameters supplied to the CreateOrUpdate operation. Required. + :type parameters: IO[bytes] + :keyword caller_role: By default, any user who run operation on a database become an Admin on + it. This property allows the caller to exclude the caller from Admins list. Known values are: + "Admin" and "None". Default value is None. + :paramtype caller_role: str or ~azure.mgmt.kusto.models.CallerRole + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Database. The Database is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.Database] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + parameters: Union[_models.Database, JSON, IO[bytes]], + *, + caller_role: Optional[Union[str, _models.CallerRole]] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.Database]: + """Creates or updates a database. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param parameters: The database parameters supplied to the CreateOrUpdate operation. Is one of + the following types: Database, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.kusto.models.Database or JSON or IO[bytes] + :keyword caller_role: By default, any user who run operation on a database become an Admin on + it. This property allows the caller to exclude the caller from Admins list. Known values are: + "Admin" and "None". Default value is None. + :paramtype caller_role: str or ~azure.mgmt.kusto.models.CallerRole + :return: An instance of AsyncLROPoller that returns Database. The Database is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.Database] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Database] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + parameters=parameters, + caller_role=caller_role, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.Database, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.Database].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.Database]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _update_initial( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + parameters: Union[_models.Database, JSON, IO[bytes]], + *, + caller_role: Optional[Union[str, _models.CallerRole]] = None, + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_databases_update_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + subscription_id=self._config.subscription_id, + caller_role=caller_role, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + parameters: _models.Database, + *, + caller_role: Optional[Union[str, _models.CallerRole]] = None, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Database]: + """Updates a database. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param parameters: The database parameters supplied to the Update operation. Required. + :type parameters: ~azure.mgmt.kusto.models.Database + :keyword caller_role: By default, any user who run operation on a database become an Admin on + it. This property allows the caller to exclude the caller from Admins list. Known values are: + "Admin" and "None". Default value is None. + :paramtype caller_role: str or ~azure.mgmt.kusto.models.CallerRole + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Database. The Database is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.Database] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + parameters: JSON, + *, + caller_role: Optional[Union[str, _models.CallerRole]] = None, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Database]: + """Updates a database. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param parameters: The database parameters supplied to the Update operation. Required. + :type parameters: JSON + :keyword caller_role: By default, any user who run operation on a database become an Admin on + it. This property allows the caller to exclude the caller from Admins list. Known values are: + "Admin" and "None". Default value is None. + :paramtype caller_role: str or ~azure.mgmt.kusto.models.CallerRole + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Database. The Database is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.Database] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + parameters: IO[bytes], + *, + caller_role: Optional[Union[str, _models.CallerRole]] = None, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Database]: + """Updates a database. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param parameters: The database parameters supplied to the Update operation. Required. + :type parameters: IO[bytes] + :keyword caller_role: By default, any user who run operation on a database become an Admin on + it. This property allows the caller to exclude the caller from Admins list. Known values are: + "Admin" and "None". Default value is None. + :paramtype caller_role: str or ~azure.mgmt.kusto.models.CallerRole + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns Database. The Database is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.Database] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_update( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + parameters: Union[_models.Database, JSON, IO[bytes]], + *, + caller_role: Optional[Union[str, _models.CallerRole]] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.Database]: + """Updates a database. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param parameters: The database parameters supplied to the Update operation. Is one of the + following types: Database, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.kusto.models.Database or JSON or IO[bytes] + :keyword caller_role: By default, any user who run operation on a database become an Admin on + it. This property allows the caller to exclude the caller from Admins list. Known values are: + "Admin" and "None". Default value is None. + :paramtype caller_role: str or ~azure.mgmt.kusto.models.CallerRole + :return: An instance of AsyncLROPoller that returns Database. The Database is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.Database] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Database] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + parameters=parameters, + caller_role=caller_role, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.Database, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.Database].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.Database]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, resource_group_name: str, cluster_name: str, database_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_databases_delete_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, resource_group_name: str, cluster_name: str, database_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the database with the given name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_cluster( + self, + resource_group_name: str, + cluster_name: str, + *, + top: Optional[int] = None, + skiptoken: Optional[str] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.Database"]: + """Returns the list of databases of the given Kusto cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :keyword top: limit the number of results. Default value is None. + :paramtype top: int + :keyword skiptoken: Skiptoken is only used if a previous operation returned a partial result. + If a previous response contains a nextLink element, the value of the nextLink element will + include a skiptoken parameter that specifies a starting point to use for subsequent calls. + Default value is None. + :paramtype skiptoken: str + :return: An iterator like instance of Database + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.kusto.models.Database] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.Database]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_databases_list_by_cluster_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + subscription_id=self._config.subscription_id, + top=top, + skiptoken=skiptoken, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.Database], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace + def list_principals( + self, resource_group_name: str, cluster_name: str, database_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.DatabasePrincipal"]: + """Returns a list of database principals of the given Kusto cluster and database. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :return: An iterator like instance of DatabasePrincipal + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.kusto.models.DatabasePrincipal] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.DatabasePrincipal]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_databases_list_principals_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.DatabasePrincipal], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @overload + async def add_principals( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + database_principals_to_add: _models.DatabasePrincipalListRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DatabasePrincipalListResult: + """Add Database principals permissions. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param database_principals_to_add: List of database principals to add. Required. + :type database_principals_to_add: ~azure.mgmt.kusto.models.DatabasePrincipalListRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: DatabasePrincipalListResult. The DatabasePrincipalListResult is compatible with + MutableMapping + :rtype: ~azure.mgmt.kusto.models.DatabasePrincipalListResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def add_principals( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + database_principals_to_add: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DatabasePrincipalListResult: + """Add Database principals permissions. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param database_principals_to_add: List of database principals to add. Required. + :type database_principals_to_add: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: DatabasePrincipalListResult. The DatabasePrincipalListResult is compatible with + MutableMapping + :rtype: ~azure.mgmt.kusto.models.DatabasePrincipalListResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def add_principals( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + database_principals_to_add: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DatabasePrincipalListResult: + """Add Database principals permissions. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param database_principals_to_add: List of database principals to add. Required. + :type database_principals_to_add: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: DatabasePrincipalListResult. The DatabasePrincipalListResult is compatible with + MutableMapping + :rtype: ~azure.mgmt.kusto.models.DatabasePrincipalListResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def add_principals( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + database_principals_to_add: Union[_models.DatabasePrincipalListRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.DatabasePrincipalListResult: + """Add Database principals permissions. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param database_principals_to_add: List of database principals to add. Is one of the following + types: DatabasePrincipalListRequest, JSON, IO[bytes] Required. + :type database_principals_to_add: ~azure.mgmt.kusto.models.DatabasePrincipalListRequest or JSON + or IO[bytes] + :return: DatabasePrincipalListResult. The DatabasePrincipalListResult is compatible with + MutableMapping + :rtype: ~azure.mgmt.kusto.models.DatabasePrincipalListResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.DatabasePrincipalListResult] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(database_principals_to_add, (IOBase, bytes)): + _content = database_principals_to_add + else: + _content = json.dumps(database_principals_to_add, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_databases_add_principals_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.DatabasePrincipalListResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def remove_principals( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + database_principals_to_remove: _models.DatabasePrincipalListRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DatabasePrincipalListResult: + """Remove Database principals permissions. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param database_principals_to_remove: List of database principals to remove. Required. + :type database_principals_to_remove: ~azure.mgmt.kusto.models.DatabasePrincipalListRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: DatabasePrincipalListResult. The DatabasePrincipalListResult is compatible with + MutableMapping + :rtype: ~azure.mgmt.kusto.models.DatabasePrincipalListResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def remove_principals( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + database_principals_to_remove: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DatabasePrincipalListResult: + """Remove Database principals permissions. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param database_principals_to_remove: List of database principals to remove. Required. + :type database_principals_to_remove: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: DatabasePrincipalListResult. The DatabasePrincipalListResult is compatible with + MutableMapping + :rtype: ~azure.mgmt.kusto.models.DatabasePrincipalListResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def remove_principals( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + database_principals_to_remove: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DatabasePrincipalListResult: + """Remove Database principals permissions. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param database_principals_to_remove: List of database principals to remove. Required. + :type database_principals_to_remove: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: DatabasePrincipalListResult. The DatabasePrincipalListResult is compatible with + MutableMapping + :rtype: ~azure.mgmt.kusto.models.DatabasePrincipalListResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def remove_principals( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + database_principals_to_remove: Union[_models.DatabasePrincipalListRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.DatabasePrincipalListResult: + """Remove Database principals permissions. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param database_principals_to_remove: List of database principals to remove. Is one of the + following types: DatabasePrincipalListRequest, JSON, IO[bytes] Required. + :type database_principals_to_remove: ~azure.mgmt.kusto.models.DatabasePrincipalListRequest or + JSON or IO[bytes] + :return: DatabasePrincipalListResult. The DatabasePrincipalListResult is compatible with + MutableMapping + :rtype: ~azure.mgmt.kusto.models.DatabasePrincipalListResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.DatabasePrincipalListResult] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(database_principals_to_remove, (IOBase, bytes)): + _content = database_principals_to_remove + else: + _content = json.dumps(database_principals_to_remove, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_databases_remove_principals_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.DatabasePrincipalListResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + resource_name: _models.CheckNameRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the databases resource name is valid and is not already in use. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param resource_name: The name of the resource. Required. + :type resource_name: ~azure.mgmt.kusto.models.CheckNameRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + resource_name: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the databases resource name is valid and is not already in use. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param resource_name: The name of the resource. Required. + :type resource_name: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + resource_name: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the databases resource name is valid and is not already in use. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param resource_name: The name of the resource. Required. + :type resource_name: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + resource_name: Union[_models.CheckNameRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the databases resource name is valid and is not already in use. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param resource_name: The name of the resource. Is one of the following types: + CheckNameRequest, JSON, IO[bytes] Required. + :type resource_name: ~azure.mgmt.kusto.models.CheckNameRequest or JSON or IO[bytes] + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CheckNameResult] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(resource_name, (IOBase, bytes)): + _content = resource_name + else: + _content = json.dumps(resource_name, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_databases_check_name_availability_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CheckNameResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class AttachedDatabaseConfigurationsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.kusto.aio.KustoManagementClient`'s + :attr:`attached_database_configurations` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: KustoManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, cluster_name: str, attached_database_configuration_name: str, **kwargs: Any + ) -> _models.AttachedDatabaseConfiguration: + """Returns an attached database configuration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param attached_database_configuration_name: The name of the attached database configuration. + Required. + :type attached_database_configuration_name: str + :return: AttachedDatabaseConfiguration. The AttachedDatabaseConfiguration is compatible with + MutableMapping + :rtype: ~azure.mgmt.kusto.models.AttachedDatabaseConfiguration + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.AttachedDatabaseConfiguration] = kwargs.pop("cls", None) + + _request = build_attached_database_configurations_get_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + attached_database_configuration_name=attached_database_configuration_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.AttachedDatabaseConfiguration, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + cluster_name: str, + attached_database_configuration_name: str, + parameters: Union[_models.AttachedDatabaseConfiguration, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_attached_database_configurations_create_or_update_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + attached_database_configuration_name=attached_database_configuration_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + attached_database_configuration_name: str, + parameters: _models.AttachedDatabaseConfiguration, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.AttachedDatabaseConfiguration]: + """Creates or updates an attached database configuration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param attached_database_configuration_name: The name of the attached database configuration. + Required. + :type attached_database_configuration_name: str + :param parameters: The database parameters supplied to the CreateOrUpdate operation. Required. + :type parameters: ~azure.mgmt.kusto.models.AttachedDatabaseConfiguration + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns AttachedDatabaseConfiguration. The + AttachedDatabaseConfiguration is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.AttachedDatabaseConfiguration] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + attached_database_configuration_name: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.AttachedDatabaseConfiguration]: + """Creates or updates an attached database configuration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param attached_database_configuration_name: The name of the attached database configuration. + Required. + :type attached_database_configuration_name: str + :param parameters: The database parameters supplied to the CreateOrUpdate operation. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns AttachedDatabaseConfiguration. The + AttachedDatabaseConfiguration is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.AttachedDatabaseConfiguration] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + attached_database_configuration_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.AttachedDatabaseConfiguration]: + """Creates or updates an attached database configuration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param attached_database_configuration_name: The name of the attached database configuration. + Required. + :type attached_database_configuration_name: str + :param parameters: The database parameters supplied to the CreateOrUpdate operation. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns AttachedDatabaseConfiguration. The + AttachedDatabaseConfiguration is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.AttachedDatabaseConfiguration] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + attached_database_configuration_name: str, + parameters: Union[_models.AttachedDatabaseConfiguration, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.AttachedDatabaseConfiguration]: + """Creates or updates an attached database configuration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param attached_database_configuration_name: The name of the attached database configuration. + Required. + :type attached_database_configuration_name: str + :param parameters: The database parameters supplied to the CreateOrUpdate operation. Is one of + the following types: AttachedDatabaseConfiguration, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.kusto.models.AttachedDatabaseConfiguration or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns AttachedDatabaseConfiguration. The + AttachedDatabaseConfiguration is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.AttachedDatabaseConfiguration] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.AttachedDatabaseConfiguration] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + attached_database_configuration_name=attached_database_configuration_name, + parameters=parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.AttachedDatabaseConfiguration, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.AttachedDatabaseConfiguration].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.AttachedDatabaseConfiguration]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, resource_group_name: str, cluster_name: str, attached_database_configuration_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_attached_database_configurations_delete_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + attached_database_configuration_name=attached_database_configuration_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, resource_group_name: str, cluster_name: str, attached_database_configuration_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the attached database configuration with the given name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param attached_database_configuration_name: The name of the attached database configuration. + Required. + :type attached_database_configuration_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + attached_database_configuration_name=attached_database_configuration_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_cluster( + self, resource_group_name: str, cluster_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.AttachedDatabaseConfiguration"]: + """Returns the list of attached database configurations of the given Kusto cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :return: An iterator like instance of AttachedDatabaseConfiguration + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.kusto.models.AttachedDatabaseConfiguration] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.AttachedDatabaseConfiguration]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_attached_database_configurations_list_by_cluster_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.AttachedDatabaseConfiguration], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @overload + async def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + resource_name: _models.AttachedDatabaseConfigurationsCheckNameRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the attached database configuration resource name is valid and is not already in + use. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param resource_name: The name of the resource. Required. + :type resource_name: ~azure.mgmt.kusto.models.AttachedDatabaseConfigurationsCheckNameRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + resource_name: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the attached database configuration resource name is valid and is not already in + use. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param resource_name: The name of the resource. Required. + :type resource_name: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + resource_name: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the attached database configuration resource name is valid and is not already in + use. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param resource_name: The name of the resource. Required. + :type resource_name: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + resource_name: Union[_models.AttachedDatabaseConfigurationsCheckNameRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the attached database configuration resource name is valid and is not already in + use. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param resource_name: The name of the resource. Is one of the following types: + AttachedDatabaseConfigurationsCheckNameRequest, JSON, IO[bytes] Required. + :type resource_name: ~azure.mgmt.kusto.models.AttachedDatabaseConfigurationsCheckNameRequest or + JSON or IO[bytes] + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CheckNameResult] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(resource_name, (IOBase, bytes)): + _content = resource_name + else: + _content = json.dumps(resource_name, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_attached_database_configurations_check_name_availability_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CheckNameResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class ManagedPrivateEndpointsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.kusto.aio.KustoManagementClient`'s + :attr:`managed_private_endpoints` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: KustoManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, cluster_name: str, managed_private_endpoint_name: str, **kwargs: Any + ) -> _models.ManagedPrivateEndpoint: + """Gets a managed private endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param managed_private_endpoint_name: The name of the managed private endpoint. Required. + :type managed_private_endpoint_name: str + :return: ManagedPrivateEndpoint. The ManagedPrivateEndpoint is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.ManagedPrivateEndpoint + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ManagedPrivateEndpoint] = kwargs.pop("cls", None) + + _request = build_managed_private_endpoints_get_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + managed_private_endpoint_name=managed_private_endpoint_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ManagedPrivateEndpoint, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + cluster_name: str, + managed_private_endpoint_name: str, + parameters: Union[_models.ManagedPrivateEndpoint, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_managed_private_endpoints_create_or_update_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + managed_private_endpoint_name=managed_private_endpoint_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + managed_private_endpoint_name: str, + parameters: _models.ManagedPrivateEndpoint, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ManagedPrivateEndpoint]: + """Creates a managed private endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param managed_private_endpoint_name: The name of the managed private endpoint. Required. + :type managed_private_endpoint_name: str + :param parameters: The managed private endpoint parameters. Required. + :type parameters: ~azure.mgmt.kusto.models.ManagedPrivateEndpoint + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ManagedPrivateEndpoint. The + ManagedPrivateEndpoint is compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.ManagedPrivateEndpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + managed_private_endpoint_name: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ManagedPrivateEndpoint]: + """Creates a managed private endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param managed_private_endpoint_name: The name of the managed private endpoint. Required. + :type managed_private_endpoint_name: str + :param parameters: The managed private endpoint parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ManagedPrivateEndpoint. The + ManagedPrivateEndpoint is compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.ManagedPrivateEndpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + managed_private_endpoint_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ManagedPrivateEndpoint]: + """Creates a managed private endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param managed_private_endpoint_name: The name of the managed private endpoint. Required. + :type managed_private_endpoint_name: str + :param parameters: The managed private endpoint parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ManagedPrivateEndpoint. The + ManagedPrivateEndpoint is compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.ManagedPrivateEndpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + managed_private_endpoint_name: str, + parameters: Union[_models.ManagedPrivateEndpoint, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.ManagedPrivateEndpoint]: + """Creates a managed private endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param managed_private_endpoint_name: The name of the managed private endpoint. Required. + :type managed_private_endpoint_name: str + :param parameters: The managed private endpoint parameters. Is one of the following types: + ManagedPrivateEndpoint, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.kusto.models.ManagedPrivateEndpoint or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns ManagedPrivateEndpoint. The + ManagedPrivateEndpoint is compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.ManagedPrivateEndpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ManagedPrivateEndpoint] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + managed_private_endpoint_name=managed_private_endpoint_name, + parameters=parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.ManagedPrivateEndpoint, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.ManagedPrivateEndpoint].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.ManagedPrivateEndpoint]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _update_initial( + self, + resource_group_name: str, + cluster_name: str, + managed_private_endpoint_name: str, + parameters: Union[_models.ManagedPrivateEndpoint, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_managed_private_endpoints_update_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + managed_private_endpoint_name=managed_private_endpoint_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update( + self, + resource_group_name: str, + cluster_name: str, + managed_private_endpoint_name: str, + parameters: _models.ManagedPrivateEndpoint, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ManagedPrivateEndpoint]: + """Updates a managed private endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param managed_private_endpoint_name: The name of the managed private endpoint. Required. + :type managed_private_endpoint_name: str + :param parameters: The managed private endpoint parameters. Required. + :type parameters: ~azure.mgmt.kusto.models.ManagedPrivateEndpoint + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ManagedPrivateEndpoint. The + ManagedPrivateEndpoint is compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.ManagedPrivateEndpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + cluster_name: str, + managed_private_endpoint_name: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ManagedPrivateEndpoint]: + """Updates a managed private endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param managed_private_endpoint_name: The name of the managed private endpoint. Required. + :type managed_private_endpoint_name: str + :param parameters: The managed private endpoint parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ManagedPrivateEndpoint. The + ManagedPrivateEndpoint is compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.ManagedPrivateEndpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + cluster_name: str, + managed_private_endpoint_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ManagedPrivateEndpoint]: + """Updates a managed private endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param managed_private_endpoint_name: The name of the managed private endpoint. Required. + :type managed_private_endpoint_name: str + :param parameters: The managed private endpoint parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ManagedPrivateEndpoint. The + ManagedPrivateEndpoint is compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.ManagedPrivateEndpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_update( + self, + resource_group_name: str, + cluster_name: str, + managed_private_endpoint_name: str, + parameters: Union[_models.ManagedPrivateEndpoint, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.ManagedPrivateEndpoint]: + """Updates a managed private endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param managed_private_endpoint_name: The name of the managed private endpoint. Required. + :type managed_private_endpoint_name: str + :param parameters: The managed private endpoint parameters. Is one of the following types: + ManagedPrivateEndpoint, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.kusto.models.ManagedPrivateEndpoint or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns ManagedPrivateEndpoint. The + ManagedPrivateEndpoint is compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.ManagedPrivateEndpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ManagedPrivateEndpoint] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + managed_private_endpoint_name=managed_private_endpoint_name, + parameters=parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.ManagedPrivateEndpoint, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.ManagedPrivateEndpoint].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.ManagedPrivateEndpoint]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, resource_group_name: str, cluster_name: str, managed_private_endpoint_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_managed_private_endpoints_delete_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + managed_private_endpoint_name=managed_private_endpoint_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, resource_group_name: str, cluster_name: str, managed_private_endpoint_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a managed private endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param managed_private_endpoint_name: The name of the managed private endpoint. Required. + :type managed_private_endpoint_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + managed_private_endpoint_name=managed_private_endpoint_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list( + self, resource_group_name: str, cluster_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.ManagedPrivateEndpoint"]: + """Returns the list of managed private endpoints. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :return: An iterator like instance of ManagedPrivateEndpoint + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.kusto.models.ManagedPrivateEndpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ManagedPrivateEndpoint]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_managed_private_endpoints_list_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ManagedPrivateEndpoint], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @overload + async def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + resource_name: _models.ManagedPrivateEndpointsCheckNameRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the managed private endpoints resource name is valid and is not already in use. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param resource_name: The name of the resource. Required. + :type resource_name: ~azure.mgmt.kusto.models.ManagedPrivateEndpointsCheckNameRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + resource_name: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the managed private endpoints resource name is valid and is not already in use. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param resource_name: The name of the resource. Required. + :type resource_name: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + resource_name: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the managed private endpoints resource name is valid and is not already in use. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param resource_name: The name of the resource. Required. + :type resource_name: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + resource_name: Union[_models.ManagedPrivateEndpointsCheckNameRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the managed private endpoints resource name is valid and is not already in use. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param resource_name: The name of the resource. Is one of the following types: + ManagedPrivateEndpointsCheckNameRequest, JSON, IO[bytes] Required. + :type resource_name: ~azure.mgmt.kusto.models.ManagedPrivateEndpointsCheckNameRequest or JSON + or IO[bytes] + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CheckNameResult] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(resource_name, (IOBase, bytes)): + _content = resource_name + else: + _content = json.dumps(resource_name, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_managed_private_endpoints_check_name_availability_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CheckNameResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class SandboxCustomImagesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.kusto.aio.KustoManagementClient`'s + :attr:`sandbox_custom_images` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: KustoManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, cluster_name: str, sandbox_custom_image_name: str, **kwargs: Any + ) -> _models.SandboxCustomImage: + """Returns a sandbox custom image. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param sandbox_custom_image_name: The name of the sandbox custom image. Required. + :type sandbox_custom_image_name: str + :return: SandboxCustomImage. The SandboxCustomImage is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.SandboxCustomImage + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.SandboxCustomImage] = kwargs.pop("cls", None) + + _request = build_sandbox_custom_images_get_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + sandbox_custom_image_name=sandbox_custom_image_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.SandboxCustomImage, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + cluster_name: str, + sandbox_custom_image_name: str, + parameters: Union[_models.SandboxCustomImage, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_sandbox_custom_images_create_or_update_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + sandbox_custom_image_name=sandbox_custom_image_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + sandbox_custom_image_name: str, + parameters: _models.SandboxCustomImage, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.SandboxCustomImage]: + """Creates or updates a sandbox custom image. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param sandbox_custom_image_name: The name of the sandbox custom image. Required. + :type sandbox_custom_image_name: str + :param parameters: The sandbox custom image parameters. Required. + :type parameters: ~azure.mgmt.kusto.models.SandboxCustomImage + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns SandboxCustomImage. The SandboxCustomImage + is compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.SandboxCustomImage] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + sandbox_custom_image_name: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.SandboxCustomImage]: + """Creates or updates a sandbox custom image. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param sandbox_custom_image_name: The name of the sandbox custom image. Required. + :type sandbox_custom_image_name: str + :param parameters: The sandbox custom image parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns SandboxCustomImage. The SandboxCustomImage + is compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.SandboxCustomImage] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + sandbox_custom_image_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.SandboxCustomImage]: + """Creates or updates a sandbox custom image. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param sandbox_custom_image_name: The name of the sandbox custom image. Required. + :type sandbox_custom_image_name: str + :param parameters: The sandbox custom image parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns SandboxCustomImage. The SandboxCustomImage + is compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.SandboxCustomImage] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + sandbox_custom_image_name: str, + parameters: Union[_models.SandboxCustomImage, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.SandboxCustomImage]: + """Creates or updates a sandbox custom image. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param sandbox_custom_image_name: The name of the sandbox custom image. Required. + :type sandbox_custom_image_name: str + :param parameters: The sandbox custom image parameters. Is one of the following types: + SandboxCustomImage, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.kusto.models.SandboxCustomImage or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns SandboxCustomImage. The SandboxCustomImage + is compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.SandboxCustomImage] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.SandboxCustomImage] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + sandbox_custom_image_name=sandbox_custom_image_name, + parameters=parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.SandboxCustomImage, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.SandboxCustomImage].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.SandboxCustomImage]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _update_initial( + self, + resource_group_name: str, + cluster_name: str, + sandbox_custom_image_name: str, + parameters: Union[_models.SandboxCustomImage, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_sandbox_custom_images_update_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + sandbox_custom_image_name=sandbox_custom_image_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update( + self, + resource_group_name: str, + cluster_name: str, + sandbox_custom_image_name: str, + parameters: _models.SandboxCustomImage, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.SandboxCustomImage]: + """Updates a sandbox custom image. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param sandbox_custom_image_name: The name of the sandbox custom image. Required. + :type sandbox_custom_image_name: str + :param parameters: The sandbox custom image parameters. Required. + :type parameters: ~azure.mgmt.kusto.models.SandboxCustomImage + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns SandboxCustomImage. The SandboxCustomImage + is compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.SandboxCustomImage] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + cluster_name: str, + sandbox_custom_image_name: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.SandboxCustomImage]: + """Updates a sandbox custom image. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param sandbox_custom_image_name: The name of the sandbox custom image. Required. + :type sandbox_custom_image_name: str + :param parameters: The sandbox custom image parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns SandboxCustomImage. The SandboxCustomImage + is compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.SandboxCustomImage] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + cluster_name: str, + sandbox_custom_image_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.SandboxCustomImage]: + """Updates a sandbox custom image. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param sandbox_custom_image_name: The name of the sandbox custom image. Required. + :type sandbox_custom_image_name: str + :param parameters: The sandbox custom image parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns SandboxCustomImage. The SandboxCustomImage + is compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.SandboxCustomImage] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_update( + self, + resource_group_name: str, + cluster_name: str, + sandbox_custom_image_name: str, + parameters: Union[_models.SandboxCustomImage, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.SandboxCustomImage]: + """Updates a sandbox custom image. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param sandbox_custom_image_name: The name of the sandbox custom image. Required. + :type sandbox_custom_image_name: str + :param parameters: The sandbox custom image parameters. Is one of the following types: + SandboxCustomImage, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.kusto.models.SandboxCustomImage or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns SandboxCustomImage. The SandboxCustomImage + is compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.SandboxCustomImage] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.SandboxCustomImage] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + sandbox_custom_image_name=sandbox_custom_image_name, + parameters=parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.SandboxCustomImage, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.SandboxCustomImage].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.SandboxCustomImage]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, resource_group_name: str, cluster_name: str, sandbox_custom_image_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_sandbox_custom_images_delete_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + sandbox_custom_image_name=sandbox_custom_image_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, resource_group_name: str, cluster_name: str, sandbox_custom_image_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a sandbox custom image. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param sandbox_custom_image_name: The name of the sandbox custom image. Required. + :type sandbox_custom_image_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + sandbox_custom_image_name=sandbox_custom_image_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_cluster( + self, resource_group_name: str, cluster_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.SandboxCustomImage"]: + """Returns the list of the existing sandbox custom images of the given Kusto cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :return: An iterator like instance of SandboxCustomImage + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.kusto.models.SandboxCustomImage] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.SandboxCustomImage]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_sandbox_custom_images_list_by_cluster_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.SandboxCustomImage], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @overload + async def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + resource_name: _models.SandboxCustomImagesCheckNameRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the sandbox custom image resource name is valid and is not already in use. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param resource_name: The name of the resource. Required. + :type resource_name: ~azure.mgmt.kusto.models.SandboxCustomImagesCheckNameRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + resource_name: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the sandbox custom image resource name is valid and is not already in use. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param resource_name: The name of the resource. Required. + :type resource_name: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + resource_name: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the sandbox custom image resource name is valid and is not already in use. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param resource_name: The name of the resource. Required. + :type resource_name: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + resource_name: Union[_models.SandboxCustomImagesCheckNameRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the sandbox custom image resource name is valid and is not already in use. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param resource_name: The name of the resource. Is one of the following types: + SandboxCustomImagesCheckNameRequest, JSON, IO[bytes] Required. + :type resource_name: ~azure.mgmt.kusto.models.SandboxCustomImagesCheckNameRequest or JSON or + IO[bytes] + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CheckNameResult] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(resource_name, (IOBase, bytes)): + _content = resource_name + else: + _content = json.dumps(resource_name, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_sandbox_custom_images_check_name_availability_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CheckNameResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class ClustersOperations: # pylint: disable=too-many-public-methods + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.kusto.aio.KustoManagementClient`'s + :attr:`clusters` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: KustoManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get(self, resource_group_name: str, cluster_name: str, **kwargs: Any) -> _models.Cluster: + """Gets a Kusto cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :return: Cluster. The Cluster is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.Cluster + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.Cluster] = kwargs.pop("cls", None) + + _request = build_clusters_get_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.Cluster, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + cluster_name: str, + parameters: Union[_models.Cluster, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_clusters_create_or_update_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + parameters: _models.Cluster, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.Cluster]: + """Create or update a Kusto cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param parameters: The Kusto cluster parameters supplied to the CreateOrUpdate operation. + Required. + :type parameters: ~azure.mgmt.kusto.models.Cluster + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns Cluster. The Cluster is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.Cluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.Cluster]: + """Create or update a Kusto cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param parameters: The Kusto cluster parameters supplied to the CreateOrUpdate operation. + Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns Cluster. The Cluster is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.Cluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.Cluster]: + """Create or update a Kusto cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param parameters: The Kusto cluster parameters supplied to the CreateOrUpdate operation. + Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns Cluster. The Cluster is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.Cluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + parameters: Union[_models.Cluster, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.Cluster]: + """Create or update a Kusto cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param parameters: The Kusto cluster parameters supplied to the CreateOrUpdate operation. Is + one of the following types: Cluster, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.kusto.models.Cluster or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns Cluster. The Cluster is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.Cluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Cluster] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + parameters=parameters, + etag=etag, + match_condition=match_condition, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.Cluster, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.Cluster].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.Cluster]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _update_initial( + self, + resource_group_name: str, + cluster_name: str, + parameters: Union[_models.ClusterUpdate, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_clusters_update_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_update( + self, + resource_group_name: str, + cluster_name: str, + parameters: _models.ClusterUpdate, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.Cluster]: + """Update a Kusto cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param parameters: The Kusto cluster parameters supplied to the Update operation. Required. + :type parameters: ~azure.mgmt.kusto.models.ClusterUpdate + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns Cluster. The Cluster is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.Cluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + cluster_name: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.Cluster]: + """Update a Kusto cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param parameters: The Kusto cluster parameters supplied to the Update operation. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns Cluster. The Cluster is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.Cluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_update( + self, + resource_group_name: str, + cluster_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.Cluster]: + """Update a Kusto cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param parameters: The Kusto cluster parameters supplied to the Update operation. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns Cluster. The Cluster is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.Cluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_update( + self, + resource_group_name: str, + cluster_name: str, + parameters: Union[_models.ClusterUpdate, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> AsyncLROPoller[_models.Cluster]: + """Update a Kusto cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param parameters: The Kusto cluster parameters supplied to the Update operation. Is one of the + following types: ClusterUpdate, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.kusto.models.ClusterUpdate or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of AsyncLROPoller that returns Cluster. The Cluster is compatible with + MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.Cluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Cluster] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + parameters=parameters, + etag=etag, + match_condition=match_condition, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.Cluster, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.Cluster].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.Cluster]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial(self, resource_group_name: str, cluster_name: str, **kwargs: Any) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_clusters_delete_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete(self, resource_group_name: str, cluster_name: str, **kwargs: Any) -> AsyncLROPoller[None]: + """Deletes a Kusto cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> AsyncItemPaged["_models.Cluster"]: + """Lists all Kusto clusters within a resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of Cluster + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.kusto.models.Cluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.Cluster]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_clusters_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.Cluster], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace + def list(self, **kwargs: Any) -> AsyncItemPaged["_models.Cluster"]: + """Lists all Kusto clusters within a subscription. + + :return: An iterator like instance of Cluster + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.kusto.models.Cluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.Cluster]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_clusters_list_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.Cluster], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + async def _stop_initial(self, resource_group_name: str, cluster_name: str, **kwargs: Any) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_clusters_stop_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_stop(self, resource_group_name: str, cluster_name: str, **kwargs: Any) -> AsyncLROPoller[None]: + """Stops a Kusto cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._stop_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + async def _start_initial(self, resource_group_name: str, cluster_name: str, **kwargs: Any) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_clusters_start_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_start(self, resource_group_name: str, cluster_name: str, **kwargs: Any) -> AsyncLROPoller[None]: + """Starts a Kusto cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._start_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + async def _migrate_initial( + self, + resource_group_name: str, + cluster_name: str, + cluster_migrate_request: Union[_models.ClusterMigrateRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(cluster_migrate_request, (IOBase, bytes)): + _content = cluster_migrate_request + else: + _content = json.dumps(cluster_migrate_request, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_clusters_migrate_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_migrate( + self, + resource_group_name: str, + cluster_name: str, + cluster_migrate_request: _models.ClusterMigrateRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Migrate data from a Kusto cluster to another cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param cluster_migrate_request: The cluster migrate request parameters. Required. + :type cluster_migrate_request: ~azure.mgmt.kusto.models.ClusterMigrateRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_migrate( + self, + resource_group_name: str, + cluster_name: str, + cluster_migrate_request: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Migrate data from a Kusto cluster to another cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param cluster_migrate_request: The cluster migrate request parameters. Required. + :type cluster_migrate_request: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_migrate( + self, + resource_group_name: str, + cluster_name: str, + cluster_migrate_request: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Migrate data from a Kusto cluster to another cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param cluster_migrate_request: The cluster migrate request parameters. Required. + :type cluster_migrate_request: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_migrate( + self, + resource_group_name: str, + cluster_name: str, + cluster_migrate_request: Union[_models.ClusterMigrateRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Migrate data from a Kusto cluster to another cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param cluster_migrate_request: The cluster migrate request parameters. Is one of the following + types: ClusterMigrateRequest, JSON, IO[bytes] Required. + :type cluster_migrate_request: ~azure.mgmt.kusto.models.ClusterMigrateRequest or JSON or + IO[bytes] + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._migrate_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + cluster_migrate_request=cluster_migrate_request, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_follower_databases_get( + self, resource_group_name: str, cluster_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.FollowerDatabaseDefinitionGet"]: + """Returns a list of databases that are owned by this cluster and were followed by another + cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :return: An iterator like instance of FollowerDatabaseDefinitionGet + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.kusto.models.FollowerDatabaseDefinitionGet] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.FollowerDatabaseDefinitionGet]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_clusters_list_follower_databases_get_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.FollowerDatabaseDefinitionGet], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace + def list_follower_databases( + self, resource_group_name: str, cluster_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.FollowerDatabaseDefinition"]: + """Returns a list of databases that are owned by this cluster and were followed by another + cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :return: An iterator like instance of FollowerDatabaseDefinition + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.kusto.models.FollowerDatabaseDefinition] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.FollowerDatabaseDefinition]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_clusters_list_follower_databases_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.FollowerDatabaseDefinition], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + async def _detach_follower_databases_initial( + self, + resource_group_name: str, + cluster_name: str, + follower_database_to_remove: Union[_models.FollowerDatabaseDefinition, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(follower_database_to_remove, (IOBase, bytes)): + _content = follower_database_to_remove + else: + _content = json.dumps(follower_database_to_remove, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_clusters_detach_follower_databases_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_detach_follower_databases( + self, + resource_group_name: str, + cluster_name: str, + follower_database_to_remove: _models.FollowerDatabaseDefinition, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Detaches all followers of a database owned by this cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param follower_database_to_remove: The follower databases properties to remove. Required. + :type follower_database_to_remove: ~azure.mgmt.kusto.models.FollowerDatabaseDefinition + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_detach_follower_databases( + self, + resource_group_name: str, + cluster_name: str, + follower_database_to_remove: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Detaches all followers of a database owned by this cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param follower_database_to_remove: The follower databases properties to remove. Required. + :type follower_database_to_remove: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_detach_follower_databases( + self, + resource_group_name: str, + cluster_name: str, + follower_database_to_remove: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Detaches all followers of a database owned by this cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param follower_database_to_remove: The follower databases properties to remove. Required. + :type follower_database_to_remove: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_detach_follower_databases( + self, + resource_group_name: str, + cluster_name: str, + follower_database_to_remove: Union[_models.FollowerDatabaseDefinition, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Detaches all followers of a database owned by this cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param follower_database_to_remove: The follower databases properties to remove. Is one of the + following types: FollowerDatabaseDefinition, JSON, IO[bytes] Required. + :type follower_database_to_remove: ~azure.mgmt.kusto.models.FollowerDatabaseDefinition or JSON + or IO[bytes] + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._detach_follower_databases_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + follower_database_to_remove=follower_database_to_remove, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + async def _diagnose_virtual_network_initial( + self, resource_group_name: str, cluster_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_clusters_diagnose_virtual_network_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_diagnose_virtual_network( + self, resource_group_name: str, cluster_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.DiagnoseVirtualNetworkResult]: + """Diagnoses network connectivity status for external resources on which the service is dependent + on. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :return: An instance of AsyncLROPoller that returns DiagnoseVirtualNetworkResult. The + DiagnoseVirtualNetworkResult is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.DiagnoseVirtualNetworkResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.DiagnoseVirtualNetworkResult] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._diagnose_virtual_network_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = _deserialize(_models.DiagnoseVirtualNetworkResult, response.json()) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.DiagnoseVirtualNetworkResult].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.DiagnoseVirtualNetworkResult]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @distributed_trace + def list_skus_by_resource( + self, resource_group_name: str, cluster_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.AzureResourceSku"]: + """Returns the SKUs available for the provided resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :return: An iterator like instance of AzureResourceSku + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.kusto.models.AzureResourceSku] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.AzureResourceSku]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_clusters_list_skus_by_resource_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.AzureResourceSku], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace + def list_outbound_network_dependencies_endpoints( # pylint: disable=name-too-long + self, resource_group_name: str, cluster_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.OutboundNetworkDependenciesEndpoint"]: + """Gets the network endpoints of all outbound dependencies of a Kusto cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :return: An iterator like instance of OutboundNetworkDependenciesEndpoint + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.kusto.models.OutboundNetworkDependenciesEndpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.OutboundNetworkDependenciesEndpoint]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_clusters_list_outbound_network_dependencies_endpoints_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.OutboundNetworkDependenciesEndpoint], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + async def _add_callout_policies_initial( + self, + resource_group_name: str, + cluster_name: str, + callout_policies: Union[_models.CalloutPoliciesList, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(callout_policies, (IOBase, bytes)): + _content = callout_policies + else: + _content = json.dumps(callout_policies, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_clusters_add_callout_policies_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_add_callout_policies( + self, + resource_group_name: str, + cluster_name: str, + callout_policies: _models.CalloutPoliciesList, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Adds a list of callout policies for engine services. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param callout_policies: The callout policies to add. Required. + :type callout_policies: ~azure.mgmt.kusto.models.CalloutPoliciesList + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_add_callout_policies( + self, + resource_group_name: str, + cluster_name: str, + callout_policies: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Adds a list of callout policies for engine services. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param callout_policies: The callout policies to add. Required. + :type callout_policies: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_add_callout_policies( + self, + resource_group_name: str, + cluster_name: str, + callout_policies: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Adds a list of callout policies for engine services. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param callout_policies: The callout policies to add. Required. + :type callout_policies: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_add_callout_policies( + self, + resource_group_name: str, + cluster_name: str, + callout_policies: Union[_models.CalloutPoliciesList, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Adds a list of callout policies for engine services. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param callout_policies: The callout policies to add. Is one of the following types: + CalloutPoliciesList, JSON, IO[bytes] Required. + :type callout_policies: ~azure.mgmt.kusto.models.CalloutPoliciesList or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._add_callout_policies_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + callout_policies=callout_policies, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + async def _remove_callout_policy_initial( + self, + resource_group_name: str, + cluster_name: str, + callout_policy: Union[_models.CalloutPolicyToRemove, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(callout_policy, (IOBase, bytes)): + _content = callout_policy + else: + _content = json.dumps(callout_policy, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_clusters_remove_callout_policy_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_remove_callout_policy( + self, + resource_group_name: str, + cluster_name: str, + callout_policy: _models.CalloutPolicyToRemove, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Removes callout policy for engine services. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param callout_policy: The callout policies to remove. Required. + :type callout_policy: ~azure.mgmt.kusto.models.CalloutPolicyToRemove + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_remove_callout_policy( + self, + resource_group_name: str, + cluster_name: str, + callout_policy: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Removes callout policy for engine services. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param callout_policy: The callout policies to remove. Required. + :type callout_policy: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_remove_callout_policy( + self, + resource_group_name: str, + cluster_name: str, + callout_policy: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Removes callout policy for engine services. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param callout_policy: The callout policies to remove. Required. + :type callout_policy: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_remove_callout_policy( + self, + resource_group_name: str, + cluster_name: str, + callout_policy: Union[_models.CalloutPolicyToRemove, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Removes callout policy for engine services. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param callout_policy: The callout policies to remove. Is one of the following types: + CalloutPolicyToRemove, JSON, IO[bytes] Required. + :type callout_policy: ~azure.mgmt.kusto.models.CalloutPolicyToRemove or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._remove_callout_policy_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + callout_policy=callout_policy, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_callout_policies( + self, resource_group_name: str, cluster_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.CalloutPolicy"]: + """Returns the allowed callout policies for the specified service. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :return: An iterator like instance of CalloutPolicy + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.kusto.models.CalloutPolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.CalloutPolicy]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_clusters_list_callout_policies_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.CalloutPolicy], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace + def list_language_extensions( + self, resource_group_name: str, cluster_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.LanguageExtension"]: + """Returns a list of language extensions that can run within KQL queries. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :return: An iterator like instance of LanguageExtension + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.kusto.models.LanguageExtension] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.LanguageExtension]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_clusters_list_language_extensions_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.LanguageExtension], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + async def _add_language_extensions_initial( + self, + resource_group_name: str, + cluster_name: str, + language_extensions_to_add: Union[_models.LanguageExtensionsList, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(language_extensions_to_add, (IOBase, bytes)): + _content = language_extensions_to_add + else: + _content = json.dumps(language_extensions_to_add, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_clusters_add_language_extensions_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_add_language_extensions( + self, + resource_group_name: str, + cluster_name: str, + language_extensions_to_add: _models.LanguageExtensionsList, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Add a list of language extensions that can run within KQL queries. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param language_extensions_to_add: The language extensions to add. Required. + :type language_extensions_to_add: ~azure.mgmt.kusto.models.LanguageExtensionsList + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_add_language_extensions( + self, + resource_group_name: str, + cluster_name: str, + language_extensions_to_add: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Add a list of language extensions that can run within KQL queries. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param language_extensions_to_add: The language extensions to add. Required. + :type language_extensions_to_add: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_add_language_extensions( + self, + resource_group_name: str, + cluster_name: str, + language_extensions_to_add: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Add a list of language extensions that can run within KQL queries. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param language_extensions_to_add: The language extensions to add. Required. + :type language_extensions_to_add: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_add_language_extensions( + self, + resource_group_name: str, + cluster_name: str, + language_extensions_to_add: Union[_models.LanguageExtensionsList, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Add a list of language extensions that can run within KQL queries. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param language_extensions_to_add: The language extensions to add. Is one of the following + types: LanguageExtensionsList, JSON, IO[bytes] Required. + :type language_extensions_to_add: ~azure.mgmt.kusto.models.LanguageExtensionsList or JSON or + IO[bytes] + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._add_language_extensions_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + language_extensions_to_add=language_extensions_to_add, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + async def _remove_language_extensions_initial( + self, + resource_group_name: str, + cluster_name: str, + language_extensions_to_remove: Union[_models.LanguageExtensionsList, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(language_extensions_to_remove, (IOBase, bytes)): + _content = language_extensions_to_remove + else: + _content = json.dumps(language_extensions_to_remove, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_clusters_remove_language_extensions_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_remove_language_extensions( + self, + resource_group_name: str, + cluster_name: str, + language_extensions_to_remove: _models.LanguageExtensionsList, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Remove a list of language extensions that can run within KQL queries. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param language_extensions_to_remove: The language extensions to remove. Required. + :type language_extensions_to_remove: ~azure.mgmt.kusto.models.LanguageExtensionsList + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_remove_language_extensions( + self, + resource_group_name: str, + cluster_name: str, + language_extensions_to_remove: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Remove a list of language extensions that can run within KQL queries. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param language_extensions_to_remove: The language extensions to remove. Required. + :type language_extensions_to_remove: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_remove_language_extensions( + self, + resource_group_name: str, + cluster_name: str, + language_extensions_to_remove: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Remove a list of language extensions that can run within KQL queries. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param language_extensions_to_remove: The language extensions to remove. Required. + :type language_extensions_to_remove: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_remove_language_extensions( + self, + resource_group_name: str, + cluster_name: str, + language_extensions_to_remove: Union[_models.LanguageExtensionsList, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Remove a list of language extensions that can run within KQL queries. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param language_extensions_to_remove: The language extensions to remove. Is one of the + following types: LanguageExtensionsList, JSON, IO[bytes] Required. + :type language_extensions_to_remove: ~azure.mgmt.kusto.models.LanguageExtensionsList or JSON or + IO[bytes] + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._remove_language_extensions_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + language_extensions_to_remove=language_extensions_to_remove, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_skus(self, **kwargs: Any) -> AsyncItemPaged["_models.SkuDescription"]: + """Lists eligible SKUs for Kusto resource provider. + + :return: An iterator like instance of SkuDescription + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.kusto.models.SkuDescription] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.SkuDescription]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_clusters_list_skus_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.SkuDescription], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @overload + async def check_name_availability( + self, + location: str, + cluster_name: _models.ClusterCheckNameRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the cluster name is valid and is not already in use. + + :param location: The location name. Required. + :type location: str + :param cluster_name: The request body. Required. + :type cluster_name: ~azure.mgmt.kusto.models.ClusterCheckNameRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def check_name_availability( + self, location: str, cluster_name: JSON, *, content_type: str = "application/json", **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the cluster name is valid and is not already in use. + + :param location: The location name. Required. + :type location: str + :param cluster_name: The request body. Required. + :type cluster_name: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def check_name_availability( + self, location: str, cluster_name: IO[bytes], *, content_type: str = "application/json", **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the cluster name is valid and is not already in use. + + :param location: The location name. Required. + :type location: str + :param cluster_name: The request body. Required. + :type cluster_name: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def check_name_availability( + self, location: str, cluster_name: Union[_models.ClusterCheckNameRequest, JSON, IO[bytes]], **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the cluster name is valid and is not already in use. + + :param location: The location name. Required. + :type location: str + :param cluster_name: The request body. Is one of the following types: ClusterCheckNameRequest, + JSON, IO[bytes] Required. + :type cluster_name: ~azure.mgmt.kusto.models.ClusterCheckNameRequest or JSON or IO[bytes] + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CheckNameResult] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(cluster_name, (IOBase, bytes)): + _content = cluster_name + else: + _content = json.dumps(cluster_name, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_clusters_check_name_availability_request( + location=location, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CheckNameResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class PrivateEndpointConnectionsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.kusto.aio.KustoManagementClient`'s + :attr:`private_endpoint_connections` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: KustoManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, cluster_name: str, private_endpoint_connection_name: str, **kwargs: Any + ) -> _models.PrivateEndpointConnection: + """Gets a private endpoint connection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :return: PrivateEndpointConnection. The PrivateEndpointConnection is compatible with + MutableMapping + :rtype: ~azure.mgmt.kusto.models.PrivateEndpointConnection + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) + + _request = build_private_endpoint_connections_get_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + private_endpoint_connection_name=private_endpoint_connection_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PrivateEndpointConnection, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + cluster_name: str, + private_endpoint_connection_name: str, + parameters: Union[_models.PrivateEndpointConnection, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_private_endpoint_connections_create_or_update_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + private_endpoint_connection_name=private_endpoint_connection_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + private_endpoint_connection_name: str, + parameters: _models.PrivateEndpointConnection, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.PrivateEndpointConnection]: + """Approve or reject a private endpoint connection with a given name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :param parameters: Required. + :type parameters: ~azure.mgmt.kusto.models.PrivateEndpointConnection + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns PrivateEndpointConnection. The + PrivateEndpointConnection is compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.PrivateEndpointConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + private_endpoint_connection_name: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.PrivateEndpointConnection]: + """Approve or reject a private endpoint connection with a given name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :param parameters: Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns PrivateEndpointConnection. The + PrivateEndpointConnection is compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.PrivateEndpointConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + private_endpoint_connection_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.PrivateEndpointConnection]: + """Approve or reject a private endpoint connection with a given name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :param parameters: Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns PrivateEndpointConnection. The + PrivateEndpointConnection is compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.PrivateEndpointConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + private_endpoint_connection_name: str, + parameters: Union[_models.PrivateEndpointConnection, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.PrivateEndpointConnection]: + """Approve or reject a private endpoint connection with a given name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :param parameters: Is one of the following types: PrivateEndpointConnection, JSON, IO[bytes] + Required. + :type parameters: ~azure.mgmt.kusto.models.PrivateEndpointConnection or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns PrivateEndpointConnection. The + PrivateEndpointConnection is compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.PrivateEndpointConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + private_endpoint_connection_name=private_endpoint_connection_name, + parameters=parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.PrivateEndpointConnection, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.PrivateEndpointConnection].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.PrivateEndpointConnection]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, resource_group_name: str, cluster_name: str, private_endpoint_connection_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_private_endpoint_connections_delete_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + private_endpoint_connection_name=private_endpoint_connection_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_delete( + self, resource_group_name: str, cluster_name: str, private_endpoint_connection_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a private endpoint connection with a given name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + private_endpoint_connection_name=private_endpoint_connection_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list( + self, resource_group_name: str, cluster_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.PrivateEndpointConnection"]: + """Returns the list of private endpoint connections. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :return: An iterator like instance of PrivateEndpointConnection + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.kusto.models.PrivateEndpointConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.PrivateEndpointConnection]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_private_endpoint_connections_list_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.PrivateEndpointConnection], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class PrivateLinkResourcesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.kusto.aio.KustoManagementClient`'s + :attr:`private_link_resources` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: KustoManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get( + self, resource_group_name: str, cluster_name: str, private_link_resource_name: str, **kwargs: Any + ) -> _models.PrivateLinkResource: + """Gets a private link resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param private_link_resource_name: The name of the private link resource. Required. + :type private_link_resource_name: str + :return: PrivateLinkResource. The PrivateLinkResource is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.PrivateLinkResource + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PrivateLinkResource] = kwargs.pop("cls", None) + + _request = build_private_link_resources_get_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + private_link_resource_name=private_link_resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PrivateLinkResource, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def list( + self, resource_group_name: str, cluster_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.PrivateLinkResource"]: + """Returns the list of private link resources. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :return: An iterator like instance of PrivateLinkResource + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.kusto.models.PrivateLinkResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.PrivateLinkResource]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_private_link_resources_list_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.PrivateLinkResource], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class DatabaseOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.kusto.aio.KustoManagementClient`'s + :attr:`database` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: KustoManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @overload + async def invite_follower( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + parameters: _models.DatabaseInviteFollowerRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DatabaseInviteFollowerResult: + """Generates an invitation token that allows attaching a follower database to this database. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param parameters: The follower invitation request parameters. Required. + :type parameters: ~azure.mgmt.kusto.models.DatabaseInviteFollowerRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: DatabaseInviteFollowerResult. The DatabaseInviteFollowerResult is compatible with + MutableMapping + :rtype: ~azure.mgmt.kusto.models.DatabaseInviteFollowerResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def invite_follower( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DatabaseInviteFollowerResult: + """Generates an invitation token that allows attaching a follower database to this database. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param parameters: The follower invitation request parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: DatabaseInviteFollowerResult. The DatabaseInviteFollowerResult is compatible with + MutableMapping + :rtype: ~azure.mgmt.kusto.models.DatabaseInviteFollowerResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def invite_follower( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DatabaseInviteFollowerResult: + """Generates an invitation token that allows attaching a follower database to this database. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param parameters: The follower invitation request parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: DatabaseInviteFollowerResult. The DatabaseInviteFollowerResult is compatible with + MutableMapping + :rtype: ~azure.mgmt.kusto.models.DatabaseInviteFollowerResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def invite_follower( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + parameters: Union[_models.DatabaseInviteFollowerRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.DatabaseInviteFollowerResult: + """Generates an invitation token that allows attaching a follower database to this database. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param parameters: The follower invitation request parameters. Is one of the following types: + DatabaseInviteFollowerRequest, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.kusto.models.DatabaseInviteFollowerRequest or JSON or IO[bytes] + :return: DatabaseInviteFollowerResult. The DatabaseInviteFollowerResult is compatible with + MutableMapping + :rtype: ~azure.mgmt.kusto.models.DatabaseInviteFollowerResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.DatabaseInviteFollowerResult] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_database_invite_follower_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.DatabaseInviteFollowerResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class SkusOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.kusto.aio.KustoManagementClient`'s + :attr:`skus` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: KustoManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list(self, location: str, **kwargs: Any) -> AsyncItemPaged["_models.SkuDescription"]: + """Lists eligible region SKUs for Kusto resource provider by Azure region. + + :param location: The location name. Required. + :type location: str + :return: An iterator like instance of SkuDescription + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.kusto.models.SkuDescription] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.SkuDescription]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_skus_list_request( + location=location, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.SkuDescription], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + +class OperationsResultsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.kusto.aio.KustoManagementClient`'s + :attr:`operations_results` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: KustoManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get(self, location: str, operation_id: str, **kwargs: Any) -> _models.OperationResult: + """Returns operation results. + + :param location: The name of the Azure region. Required. + :type location: str + :param operation_id: The ID of an ongoing async operation. Required. + :type operation_id: str + :return: OperationResult. The OperationResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.OperationResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.OperationResult] = kwargs.pop("cls", None) + + _request = build_operations_results_get_request( + location=location, + operation_id=operation_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.OperationResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class OperationsResultsLocationOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.kusto.aio.KustoManagementClient`'s + :attr:`operations_results_location` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: KustoManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def get(self, location: str, operation_id: str, **kwargs: Any) -> None: + """Returns operation results. + + :param location: The name of the Azure region. Required. + :type location: str + :param operation_id: The ID of an ongoing async operation. Required. + :type operation_id: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + operation_result_response_type: Literal["Location"] = kwargs.pop( + "operation_result_response_type", _params.pop("operationResultResponseType", "Location") + ) + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_operations_results_location_get_request( + location=location, + operation_id=operation_id, + subscription_id=self._config.subscription_id, + operation_result_response_type=operation_result_response_type, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_operations_results_location_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_operations_results_location_operations.py deleted file mode 100644 index 7532df0941bd..000000000000 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_operations_results_location_operations.py +++ /dev/null @@ -1,109 +0,0 @@ -# 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 sys -from typing import Any, Callable, Dict, Optional, TypeVar - -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ...operations._operations_results_location_operations import build_get_request - -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - - -class OperationsResultsLocationOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.kusto.aio.KustoManagementClient`'s - :attr:`operations_results_location` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - async def get(self, location: str, operation_id: str, **kwargs: Any) -> None: - """Returns operation results. - - :param location: The name of Azure region. Required. - :type location: str - :param operation_id: The ID of an ongoing async operation. Required. - :type operation_id: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_request( - location=location, - operation_id=operation_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_operations_results_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_operations_results_operations.py deleted file mode 100644 index c268b023161f..000000000000 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_operations_results_operations.py +++ /dev/null @@ -1,108 +0,0 @@ -# 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 sys -from typing import Any, Callable, Dict, Optional, TypeVar - -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ...operations._operations_results_operations import build_get_request - -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - - -class OperationsResultsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.kusto.aio.KustoManagementClient`'s - :attr:`operations_results` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - async def get(self, location: str, operation_id: str, **kwargs: Any) -> _models.OperationResult: - """Returns operation results. - - :param location: The name of Azure region. Required. - :type location: str - :param operation_id: The ID of an ongoing async operation. Required. - :type operation_id: str - :return: OperationResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.OperationResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.OperationResult] = kwargs.pop("cls", None) - - _request = build_get_request( - location=location, - operation_id=operation_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("OperationResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_patch.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_patch.py index f7dd32510333..ea765788358a 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_patch.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_patch.py @@ -1,14 +1,14 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ +# 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. +# -------------------------------------------------------------------------- """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ -from typing import List -__all__: List[str] = [] # Add all objects you want publicly available to users at this package level +__all__: list[str] = [] # Add all objects you want publicly available to users at this package level def patch_sdk(): diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_private_endpoint_connections_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_private_endpoint_connections_operations.py deleted file mode 100644 index b72437a4b237..000000000000 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_private_endpoint_connections_operations.py +++ /dev/null @@ -1,534 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from io import IOBase -import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ...operations._private_endpoint_connections_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_request, - build_list_request, -) - -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - - -class PrivateEndpointConnectionsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.kusto.aio.KustoManagementClient`'s - :attr:`private_endpoint_connections` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list( - self, resource_group_name: str, cluster_name: str, **kwargs: Any - ) -> AsyncIterable["_models.PrivateEndpointConnection"]: - """Returns the list of private endpoint connections. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :return: An iterator like instance of either PrivateEndpointConnection or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.kusto.models.PrivateEndpointConnection] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("PrivateEndpointConnectionListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get( - self, resource_group_name: str, cluster_name: str, private_endpoint_connection_name: str, **kwargs: Any - ) -> _models.PrivateEndpointConnection: - """Gets a private endpoint connection. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param private_endpoint_connection_name: The name of the private endpoint connection. Required. - :type private_endpoint_connection_name: str - :return: PrivateEndpointConnection or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.PrivateEndpointConnection - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - private_endpoint_connection_name=private_endpoint_connection_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("PrivateEndpointConnection", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _create_or_update_initial( - self, - resource_group_name: str, - cluster_name: str, - private_endpoint_connection_name: str, - parameters: Union[_models.PrivateEndpointConnection, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "PrivateEndpointConnection") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - private_endpoint_connection_name=private_endpoint_connection_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - cluster_name: str, - private_endpoint_connection_name: str, - parameters: _models.PrivateEndpointConnection, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.PrivateEndpointConnection]: - """Approve or reject a private endpoint connection with a given name. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param private_endpoint_connection_name: The name of the private endpoint connection. Required. - :type private_endpoint_connection_name: str - :param parameters: Required. - :type parameters: ~azure.mgmt.kusto.models.PrivateEndpointConnection - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either PrivateEndpointConnection or the - result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.PrivateEndpointConnection] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - cluster_name: str, - private_endpoint_connection_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.PrivateEndpointConnection]: - """Approve or reject a private endpoint connection with a given name. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param private_endpoint_connection_name: The name of the private endpoint connection. Required. - :type private_endpoint_connection_name: str - :param parameters: Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either PrivateEndpointConnection or the - result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.PrivateEndpointConnection] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create_or_update( - self, - resource_group_name: str, - cluster_name: str, - private_endpoint_connection_name: str, - parameters: Union[_models.PrivateEndpointConnection, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.PrivateEndpointConnection]: - """Approve or reject a private endpoint connection with a given name. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param private_endpoint_connection_name: The name of the private endpoint connection. Required. - :type private_endpoint_connection_name: str - :param parameters: Is either a PrivateEndpointConnection type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.kusto.models.PrivateEndpointConnection or IO[bytes] - :return: An instance of AsyncLROPoller that returns either PrivateEndpointConnection or the - result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.PrivateEndpointConnection] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_or_update_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - private_endpoint_connection_name=private_endpoint_connection_name, - parameters=parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("PrivateEndpointConnection", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.PrivateEndpointConnection].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.PrivateEndpointConnection]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, resource_group_name: str, cluster_name: str, private_endpoint_connection_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - private_endpoint_connection_name=private_endpoint_connection_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, resource_group_name: str, cluster_name: str, private_endpoint_connection_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes a private endpoint connection with a given name. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param private_endpoint_connection_name: The name of the private endpoint connection. Required. - :type private_endpoint_connection_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - private_endpoint_connection_name=private_endpoint_connection_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_private_link_resources_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_private_link_resources_operations.py deleted file mode 100644 index 839951e1ed24..000000000000 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_private_link_resources_operations.py +++ /dev/null @@ -1,201 +0,0 @@ -# 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 sys -from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar -import urllib.parse - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ...operations._private_link_resources_operations import build_get_request, build_list_request - -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - - -class PrivateLinkResourcesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.kusto.aio.KustoManagementClient`'s - :attr:`private_link_resources` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list( - self, resource_group_name: str, cluster_name: str, **kwargs: Any - ) -> AsyncIterable["_models.PrivateLinkResource"]: - """Returns the list of private link resources. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :return: An iterator like instance of either PrivateLinkResource or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.kusto.models.PrivateLinkResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PrivateLinkResourceListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("PrivateLinkResourceListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get( - self, resource_group_name: str, cluster_name: str, private_link_resource_name: str, **kwargs: Any - ) -> _models.PrivateLinkResource: - """Gets a private link resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param private_link_resource_name: The name of the private link resource. Required. - :type private_link_resource_name: str - :return: PrivateLinkResource or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.PrivateLinkResource - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PrivateLinkResource] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - private_link_resource_name=private_link_resource_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("PrivateLinkResource", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_sandbox_custom_images_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_sandbox_custom_images_operations.py deleted file mode 100644 index e60b20fc29cd..000000000000 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_sandbox_custom_images_operations.py +++ /dev/null @@ -1,878 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from io import IOBase -import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ...operations._sandbox_custom_images_operations import ( - build_check_name_availability_request, - build_create_or_update_request, - build_delete_request, - build_get_request, - build_list_by_cluster_request, - build_update_request, -) - -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - - -class SandboxCustomImagesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.kusto.aio.KustoManagementClient`'s - :attr:`sandbox_custom_images` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_cluster( - self, resource_group_name: str, cluster_name: str, **kwargs: Any - ) -> AsyncIterable["_models.SandboxCustomImage"]: - """Returns the list of the existing sandbox custom images of the given Kusto cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :return: An iterator like instance of either SandboxCustomImage or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.kusto.models.SandboxCustomImage] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.SandboxCustomImagesListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_cluster_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("SandboxCustomImagesListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get( - self, resource_group_name: str, cluster_name: str, sandbox_custom_image_name: str, **kwargs: Any - ) -> _models.SandboxCustomImage: - """Returns a sandbox custom image. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param sandbox_custom_image_name: The name of the sandbox custom image. Required. - :type sandbox_custom_image_name: str - :return: SandboxCustomImage or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.SandboxCustomImage - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.SandboxCustomImage] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - sandbox_custom_image_name=sandbox_custom_image_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("SandboxCustomImage", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _create_or_update_initial( - self, - resource_group_name: str, - cluster_name: str, - sandbox_custom_image_name: str, - parameters: Union[_models.SandboxCustomImage, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "SandboxCustomImage") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - sandbox_custom_image_name=sandbox_custom_image_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - cluster_name: str, - sandbox_custom_image_name: str, - parameters: _models.SandboxCustomImage, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.SandboxCustomImage]: - """Creates or updates a sandbox custom image. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param sandbox_custom_image_name: The name of the sandbox custom image. Required. - :type sandbox_custom_image_name: str - :param parameters: The sandbox custom image parameters. Required. - :type parameters: ~azure.mgmt.kusto.models.SandboxCustomImage - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either SandboxCustomImage or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.SandboxCustomImage] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - cluster_name: str, - sandbox_custom_image_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.SandboxCustomImage]: - """Creates or updates a sandbox custom image. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param sandbox_custom_image_name: The name of the sandbox custom image. Required. - :type sandbox_custom_image_name: str - :param parameters: The sandbox custom image parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either SandboxCustomImage or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.SandboxCustomImage] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create_or_update( - self, - resource_group_name: str, - cluster_name: str, - sandbox_custom_image_name: str, - parameters: Union[_models.SandboxCustomImage, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.SandboxCustomImage]: - """Creates or updates a sandbox custom image. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param sandbox_custom_image_name: The name of the sandbox custom image. Required. - :type sandbox_custom_image_name: str - :param parameters: The sandbox custom image parameters. Is either a SandboxCustomImage type or - a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.kusto.models.SandboxCustomImage or IO[bytes] - :return: An instance of AsyncLROPoller that returns either SandboxCustomImage or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.SandboxCustomImage] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.SandboxCustomImage] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_or_update_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - sandbox_custom_image_name=sandbox_custom_image_name, - parameters=parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("SandboxCustomImage", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.SandboxCustomImage].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.SandboxCustomImage]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _update_initial( - self, - resource_group_name: str, - cluster_name: str, - sandbox_custom_image_name: str, - parameters: Union[_models.SandboxCustomImage, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "SandboxCustomImage") - - _request = build_update_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - sandbox_custom_image_name=sandbox_custom_image_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update( - self, - resource_group_name: str, - cluster_name: str, - sandbox_custom_image_name: str, - parameters: _models.SandboxCustomImage, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.SandboxCustomImage]: - """Updates a sandbox custom image. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param sandbox_custom_image_name: The name of the sandbox custom image. Required. - :type sandbox_custom_image_name: str - :param parameters: The sandbox custom image parameters. Required. - :type parameters: ~azure.mgmt.kusto.models.SandboxCustomImage - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either SandboxCustomImage or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.SandboxCustomImage] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update( - self, - resource_group_name: str, - cluster_name: str, - sandbox_custom_image_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.SandboxCustomImage]: - """Updates a sandbox custom image. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param sandbox_custom_image_name: The name of the sandbox custom image. Required. - :type sandbox_custom_image_name: str - :param parameters: The sandbox custom image parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either SandboxCustomImage or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.SandboxCustomImage] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_update( - self, - resource_group_name: str, - cluster_name: str, - sandbox_custom_image_name: str, - parameters: Union[_models.SandboxCustomImage, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.SandboxCustomImage]: - """Updates a sandbox custom image. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param sandbox_custom_image_name: The name of the sandbox custom image. Required. - :type sandbox_custom_image_name: str - :param parameters: The sandbox custom image parameters. Is either a SandboxCustomImage type or - a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.kusto.models.SandboxCustomImage or IO[bytes] - :return: An instance of AsyncLROPoller that returns either SandboxCustomImage or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.SandboxCustomImage] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.SandboxCustomImage] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - sandbox_custom_image_name=sandbox_custom_image_name, - parameters=parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("SandboxCustomImage", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.SandboxCustomImage].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.SandboxCustomImage]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, resource_group_name: str, cluster_name: str, sandbox_custom_image_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - sandbox_custom_image_name=sandbox_custom_image_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, resource_group_name: str, cluster_name: str, sandbox_custom_image_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes a sandbox custom image. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param sandbox_custom_image_name: The name of the sandbox custom image. Required. - :type sandbox_custom_image_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - sandbox_custom_image_name=sandbox_custom_image_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @overload - async def check_name_availability( - self, - resource_group_name: str, - cluster_name: str, - resource_name: _models.SandboxCustomImagesCheckNameRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CheckNameResult: - """Checks that the sandbox custom image resource name is valid and is not already in use. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param resource_name: The name of the resource. Required. - :type resource_name: ~azure.mgmt.kusto.models.SandboxCustomImagesCheckNameRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: CheckNameResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.CheckNameResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def check_name_availability( - self, - resource_group_name: str, - cluster_name: str, - resource_name: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CheckNameResult: - """Checks that the sandbox custom image resource name is valid and is not already in use. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param resource_name: The name of the resource. Required. - :type resource_name: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: CheckNameResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.CheckNameResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def check_name_availability( - self, - resource_group_name: str, - cluster_name: str, - resource_name: Union[_models.SandboxCustomImagesCheckNameRequest, IO[bytes]], - **kwargs: Any - ) -> _models.CheckNameResult: - """Checks that the sandbox custom image resource name is valid and is not already in use. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param resource_name: The name of the resource. Is either a SandboxCustomImagesCheckNameRequest - type or a IO[bytes] type. Required. - :type resource_name: ~azure.mgmt.kusto.models.SandboxCustomImagesCheckNameRequest or IO[bytes] - :return: CheckNameResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.CheckNameResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CheckNameResult] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(resource_name, (IOBase, bytes)): - _content = resource_name - else: - _json = self._serialize.body(resource_name, "SandboxCustomImagesCheckNameRequest") - - _request = build_check_name_availability_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("CheckNameResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_scripts_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_scripts_operations.py deleted file mode 100644 index 2fac0b2e7efc..000000000000 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_scripts_operations.py +++ /dev/null @@ -1,928 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from io import IOBase -import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ...operations._scripts_operations import ( - build_check_name_availability_request, - build_create_or_update_request, - build_delete_request, - build_get_request, - build_list_by_database_request, - build_update_request, -) - -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - - -class ScriptsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.kusto.aio.KustoManagementClient`'s - :attr:`scripts` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_database( - self, resource_group_name: str, cluster_name: str, database_name: str, **kwargs: Any - ) -> AsyncIterable["_models.Script"]: - """Returns the list of database scripts for given database. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :return: An iterator like instance of either Script or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.kusto.models.Script] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ScriptListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_database_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("ScriptListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get( - self, resource_group_name: str, cluster_name: str, database_name: str, script_name: str, **kwargs: Any - ) -> _models.Script: - """Gets a Kusto cluster database script. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param script_name: The name of the Kusto database script. Required. - :type script_name: str - :return: Script or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.Script - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.Script] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - script_name=script_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("Script", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _create_or_update_initial( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - script_name: str, - parameters: Union[_models.Script, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "Script") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - script_name=script_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - script_name: str, - parameters: _models.Script, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.Script]: - """Creates a Kusto database script. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param script_name: The name of the Kusto database script. Required. - :type script_name: str - :param parameters: The Kusto Script parameters contains the KQL to run. Required. - :type parameters: ~azure.mgmt.kusto.models.Script - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either Script or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.Script] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - script_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.Script]: - """Creates a Kusto database script. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param script_name: The name of the Kusto database script. Required. - :type script_name: str - :param parameters: The Kusto Script parameters contains the KQL to run. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either Script or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.Script] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create_or_update( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - script_name: str, - parameters: Union[_models.Script, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.Script]: - """Creates a Kusto database script. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param script_name: The name of the Kusto database script. Required. - :type script_name: str - :param parameters: The Kusto Script parameters contains the KQL to run. Is either a Script type - or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.kusto.models.Script or IO[bytes] - :return: An instance of AsyncLROPoller that returns either Script or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.Script] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Script] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._create_or_update_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - script_name=script_name, - parameters=parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Script", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.Script].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.Script]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _update_initial( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - script_name: str, - parameters: Union[_models.Script, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "Script") - - _request = build_update_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - script_name=script_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_update( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - script_name: str, - parameters: _models.Script, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.Script]: - """Updates a database script. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param script_name: The name of the Kusto database script. Required. - :type script_name: str - :param parameters: The Kusto Script parameters contains to the KQL to run. Required. - :type parameters: ~azure.mgmt.kusto.models.Script - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either Script or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.Script] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_update( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - script_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.Script]: - """Updates a database script. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param script_name: The name of the Kusto database script. Required. - :type script_name: str - :param parameters: The Kusto Script parameters contains to the KQL to run. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns either Script or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.Script] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_update( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - script_name: str, - parameters: Union[_models.Script, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.Script]: - """Updates a database script. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param script_name: The name of the Kusto database script. Required. - :type script_name: str - :param parameters: The Kusto Script parameters contains to the KQL to run. Is either a Script - type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.kusto.models.Script or IO[bytes] - :return: An instance of AsyncLROPoller that returns either Script or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.kusto.models.Script] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Script] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._update_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - script_name=script_name, - parameters=parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Script", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.Script].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.Script]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, resource_group_name: str, cluster_name: str, database_name: str, script_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - script_name=script_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, resource_group_name: str, cluster_name: str, database_name: str, script_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes a Kusto database script. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param script_name: The name of the Kusto database script. Required. - :type script_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - script_name=script_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @overload - async def check_name_availability( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - script_name: _models.ScriptCheckNameRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CheckNameResult: - """Checks that the script name is valid and is not already in use. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param script_name: The name of the script. Required. - :type script_name: ~azure.mgmt.kusto.models.ScriptCheckNameRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: CheckNameResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.CheckNameResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def check_name_availability( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - script_name: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CheckNameResult: - """Checks that the script name is valid and is not already in use. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param script_name: The name of the script. Required. - :type script_name: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: CheckNameResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.CheckNameResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def check_name_availability( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - script_name: Union[_models.ScriptCheckNameRequest, IO[bytes]], - **kwargs: Any - ) -> _models.CheckNameResult: - """Checks that the script name is valid and is not already in use. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param script_name: The name of the script. Is either a ScriptCheckNameRequest type or a - IO[bytes] type. Required. - :type script_name: ~azure.mgmt.kusto.models.ScriptCheckNameRequest or IO[bytes] - :return: CheckNameResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.CheckNameResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CheckNameResult] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(script_name, (IOBase, bytes)): - _content = script_name - else: - _json = self._serialize.body(script_name, "ScriptCheckNameRequest") - - _request = build_check_name_availability_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("CheckNameResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_skus_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_skus_operations.py deleted file mode 100644 index aeed2e8cca21..000000000000 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_skus_operations.py +++ /dev/null @@ -1,133 +0,0 @@ -# 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 sys -from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar -import urllib.parse - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ...operations._skus_operations import build_list_request - -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - - -class SkusOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.kusto.aio.KustoManagementClient`'s - :attr:`skus` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.SkuDescription"]: - """Lists eligible region SKUs for Kusto resource provider by Azure region. - - :param location: The name of Azure region. Required. - :type location: str - :return: An iterator like instance of either SkuDescription or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.kusto.models.SkuDescription] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.SkuDescriptionList] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_request( - location=location, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("SkuDescriptionList", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/__init__.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/__init__.py index 10a0dc01e9a6..8bbb139e55b2 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/__init__.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/__init__.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # pylint: disable=wrong-import-position @@ -13,10 +13,10 @@ from ._patch import * # pylint: disable=unused-wildcard-import -from ._models_py3 import ( # type: ignore +from ._models import ( # type: ignore AcceptedAudiences, AttachedDatabaseConfiguration, - AttachedDatabaseConfigurationListResult, + AttachedDatabaseConfigurationProperties, AttachedDatabaseConfigurationsCheckNameRequest, AzureCapacity, AzureResourceSku, @@ -28,30 +28,29 @@ CheckNameResult, Cluster, ClusterCheckNameRequest, - ClusterListResult, ClusterMigrateRequest, ClusterPrincipalAssignment, ClusterPrincipalAssignmentCheckNameRequest, - ClusterPrincipalAssignmentListResult, + ClusterPrincipalProperties, + ClusterProperties, ClusterUpdate, ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties, CosmosDbDataConnection, + CosmosDbDataConnectionProperties, DataConnection, DataConnectionCheckNameRequest, - DataConnectionListResult, DataConnectionValidation, DataConnectionValidationListResult, DataConnectionValidationResult, Database, DatabaseInviteFollowerRequest, DatabaseInviteFollowerResult, - DatabaseListResult, DatabasePrincipal, DatabasePrincipalAssignment, DatabasePrincipalAssignmentCheckNameRequest, - DatabasePrincipalAssignmentListResult, DatabasePrincipalListRequest, DatabasePrincipalListResult, + DatabasePrincipalProperties, DatabaseStatistics, DiagnoseVirtualNetworkResult, EndpointDependency, @@ -59,49 +58,56 @@ ErrorAdditionalInfo, ErrorDetail, ErrorResponse, + EventGridConnectionProperties, + EventGridConnectionWithManagedIdentityProperties, EventGridDataConnection, + EventGridDataConnectionWithManagedIdentity, + EventHubConnectionProperties, + EventHubConnectionWithManagedIdentityProperties, EventHubDataConnection, + EventHubDataConnectionWithManagedIdentity, FollowerDatabaseDefinition, FollowerDatabaseDefinitionGet, - FollowerDatabaseListResult, - FollowerDatabaseListResultGet, + FollowerDatabaseProperties, Identity, + IotHubConnectionProperties, IotHubDataConnection, KeyVaultProperties, LanguageExtension, LanguageExtensionsList, - ListResourceSkusResult, ManagedPrivateEndpoint, - ManagedPrivateEndpointListResult, + ManagedPrivateEndpointProperties, ManagedPrivateEndpointsCheckNameRequest, MigrationClusterProperties, Operation, OperationDisplay, - OperationListResult, OperationResult, + OperationResultErrorProperties, + OperationResultProperties, OptimizedAutoscale, OutboundNetworkDependenciesEndpoint, - OutboundNetworkDependenciesEndpointListResult, + OutboundNetworkDependenciesEndpointProperties, PrivateEndpointConnection, - PrivateEndpointConnectionListResult, + PrivateEndpointConnectionProperties, PrivateEndpointProperty, PrivateLinkResource, - PrivateLinkResourceListResult, + PrivateLinkResourceProperties, PrivateLinkServiceConnectionStateProperty, ProxyResource, ReadOnlyFollowingDatabase, + ReadOnlyFollowingDatabaseProperties, ReadWriteDatabase, + ReadWriteDatabaseProperties, Resource, ResourceSkuCapabilities, ResourceSkuZoneDetails, SandboxCustomImage, + SandboxCustomImageProperties, SandboxCustomImagesCheckNameRequest, - SandboxCustomImagesListResult, Script, ScriptCheckNameRequest, - ScriptListResult, + ScriptProperties, SkuDescription, - SkuDescriptionList, SkuLocationInfoItem, SuspensionDetails, SystemData, @@ -111,7 +117,7 @@ VirtualNetworkConfiguration, ) -from ._kusto_management_client_enums import ( # type: ignore +from ._enums import ( # type: ignore AzureScaleType, AzureSkuName, AzureSkuTier, @@ -160,7 +166,7 @@ __all__ = [ "AcceptedAudiences", "AttachedDatabaseConfiguration", - "AttachedDatabaseConfigurationListResult", + "AttachedDatabaseConfigurationProperties", "AttachedDatabaseConfigurationsCheckNameRequest", "AzureCapacity", "AzureResourceSku", @@ -172,30 +178,29 @@ "CheckNameResult", "Cluster", "ClusterCheckNameRequest", - "ClusterListResult", "ClusterMigrateRequest", "ClusterPrincipalAssignment", "ClusterPrincipalAssignmentCheckNameRequest", - "ClusterPrincipalAssignmentListResult", + "ClusterPrincipalProperties", + "ClusterProperties", "ClusterUpdate", "ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties", "CosmosDbDataConnection", + "CosmosDbDataConnectionProperties", "DataConnection", "DataConnectionCheckNameRequest", - "DataConnectionListResult", "DataConnectionValidation", "DataConnectionValidationListResult", "DataConnectionValidationResult", "Database", "DatabaseInviteFollowerRequest", "DatabaseInviteFollowerResult", - "DatabaseListResult", "DatabasePrincipal", "DatabasePrincipalAssignment", "DatabasePrincipalAssignmentCheckNameRequest", - "DatabasePrincipalAssignmentListResult", "DatabasePrincipalListRequest", "DatabasePrincipalListResult", + "DatabasePrincipalProperties", "DatabaseStatistics", "DiagnoseVirtualNetworkResult", "EndpointDependency", @@ -203,49 +208,56 @@ "ErrorAdditionalInfo", "ErrorDetail", "ErrorResponse", + "EventGridConnectionProperties", + "EventGridConnectionWithManagedIdentityProperties", "EventGridDataConnection", + "EventGridDataConnectionWithManagedIdentity", + "EventHubConnectionProperties", + "EventHubConnectionWithManagedIdentityProperties", "EventHubDataConnection", + "EventHubDataConnectionWithManagedIdentity", "FollowerDatabaseDefinition", "FollowerDatabaseDefinitionGet", - "FollowerDatabaseListResult", - "FollowerDatabaseListResultGet", + "FollowerDatabaseProperties", "Identity", + "IotHubConnectionProperties", "IotHubDataConnection", "KeyVaultProperties", "LanguageExtension", "LanguageExtensionsList", - "ListResourceSkusResult", "ManagedPrivateEndpoint", - "ManagedPrivateEndpointListResult", + "ManagedPrivateEndpointProperties", "ManagedPrivateEndpointsCheckNameRequest", "MigrationClusterProperties", "Operation", "OperationDisplay", - "OperationListResult", "OperationResult", + "OperationResultErrorProperties", + "OperationResultProperties", "OptimizedAutoscale", "OutboundNetworkDependenciesEndpoint", - "OutboundNetworkDependenciesEndpointListResult", + "OutboundNetworkDependenciesEndpointProperties", "PrivateEndpointConnection", - "PrivateEndpointConnectionListResult", + "PrivateEndpointConnectionProperties", "PrivateEndpointProperty", "PrivateLinkResource", - "PrivateLinkResourceListResult", + "PrivateLinkResourceProperties", "PrivateLinkServiceConnectionStateProperty", "ProxyResource", "ReadOnlyFollowingDatabase", + "ReadOnlyFollowingDatabaseProperties", "ReadWriteDatabase", + "ReadWriteDatabaseProperties", "Resource", "ResourceSkuCapabilities", "ResourceSkuZoneDetails", "SandboxCustomImage", + "SandboxCustomImageProperties", "SandboxCustomImagesCheckNameRequest", - "SandboxCustomImagesListResult", "Script", "ScriptCheckNameRequest", - "ScriptListResult", + "ScriptProperties", "SkuDescription", - "SkuDescriptionList", "SkuLocationInfoItem", "SuspensionDetails", "SystemData", diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/_kusto_management_client_enums.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/_enums.py similarity index 69% rename from sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/_kusto_management_client_enums.py rename to sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/_enums.py index 9f79f40b56d5..8ab77ecff8d7 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/_kusto_management_client_enums.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/_enums.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -14,98 +14,171 @@ class AzureScaleType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Scale type.""" AUTOMATIC = "automatic" + """automatic.""" MANUAL = "manual" + """manual.""" NONE = "none" + """none.""" class AzureSkuName(str, Enum, metaclass=CaseInsensitiveEnumMeta): """SKU name.""" DEV_NO_SLA_STANDARD_D11_V2 = "Dev(No SLA)_Standard_D11_v2" + """Dev(No SLA)_Standard_D11_v2.""" DEV_NO_SLA_STANDARD_E2_A_V4 = "Dev(No SLA)_Standard_E2a_v4" + """Dev(No SLA)_Standard_E2a_v4.""" STANDARD_D11_V2 = "Standard_D11_v2" + """Standard_D11_v2.""" STANDARD_D12_V2 = "Standard_D12_v2" + """Standard_D12_v2.""" STANDARD_D13_V2 = "Standard_D13_v2" + """Standard_D13_v2.""" STANDARD_D14_V2 = "Standard_D14_v2" + """Standard_D14_v2.""" STANDARD_D32_D_V4 = "Standard_D32d_v4" + """Standard_D32d_v4.""" STANDARD_D16_D_V5 = "Standard_D16d_v5" + """Standard_D16d_v5.""" STANDARD_D32_D_V5 = "Standard_D32d_v5" + """Standard_D32d_v5.""" STANDARD_DS13_V2_1_TB_PS = "Standard_DS13_v2+1TB_PS" + """Standard_DS13_v2+1TB_PS.""" STANDARD_DS13_V2_2_TB_PS = "Standard_DS13_v2+2TB_PS" + """Standard_DS13_v2+2TB_PS.""" STANDARD_DS14_V2_3_TB_PS = "Standard_DS14_v2+3TB_PS" + """Standard_DS14_v2+3TB_PS.""" STANDARD_DS14_V2_4_TB_PS = "Standard_DS14_v2+4TB_PS" + """Standard_DS14_v2+4TB_PS.""" STANDARD_L4_S = "Standard_L4s" + """Standard_L4s.""" STANDARD_L8_S = "Standard_L8s" + """Standard_L8s.""" STANDARD_L16_S = "Standard_L16s" + """Standard_L16s.""" STANDARD_L8_S_V2 = "Standard_L8s_v2" + """Standard_L8s_v2.""" STANDARD_L16_S_V2 = "Standard_L16s_v2" + """Standard_L16s_v2.""" STANDARD_L8_S_V3 = "Standard_L8s_v3" + """Standard_L8s_v3.""" STANDARD_L16_S_V3 = "Standard_L16s_v3" + """Standard_L16s_v3.""" STANDARD_L32_S_V3 = "Standard_L32s_v3" + """Standard_L32s_v3.""" STANDARD_L8_AS_V3 = "Standard_L8as_v3" + """Standard_L8as_v3.""" STANDARD_L16_AS_V3 = "Standard_L16as_v3" + """Standard_L16as_v3.""" STANDARD_L32_AS_V3 = "Standard_L32as_v3" + """Standard_L32as_v3.""" STANDARD_E64_I_V3 = "Standard_E64i_v3" + """Standard_E64i_v3.""" STANDARD_E80_IDS_V4 = "Standard_E80ids_v4" + """Standard_E80ids_v4.""" STANDARD_E2_A_V4 = "Standard_E2a_v4" + """Standard_E2a_v4.""" STANDARD_E4_A_V4 = "Standard_E4a_v4" + """Standard_E4a_v4.""" STANDARD_E8_A_V4 = "Standard_E8a_v4" + """Standard_E8a_v4.""" STANDARD_E16_A_V4 = "Standard_E16a_v4" + """Standard_E16a_v4.""" STANDARD_E8_AS_V4_1_TB_PS = "Standard_E8as_v4+1TB_PS" + """Standard_E8as_v4+1TB_PS.""" STANDARD_E8_AS_V4_2_TB_PS = "Standard_E8as_v4+2TB_PS" + """Standard_E8as_v4+2TB_PS.""" STANDARD_E16_AS_V4_3_TB_PS = "Standard_E16as_v4+3TB_PS" + """Standard_E16as_v4+3TB_PS.""" STANDARD_E16_AS_V4_4_TB_PS = "Standard_E16as_v4+4TB_PS" + """Standard_E16as_v4+4TB_PS.""" STANDARD_E8_AS_V5_1_TB_PS = "Standard_E8as_v5+1TB_PS" + """Standard_E8as_v5+1TB_PS.""" STANDARD_E8_AS_V5_2_TB_PS = "Standard_E8as_v5+2TB_PS" + """Standard_E8as_v5+2TB_PS.""" STANDARD_E16_AS_V5_3_TB_PS = "Standard_E16as_v5+3TB_PS" + """Standard_E16as_v5+3TB_PS.""" STANDARD_E16_AS_V5_4_TB_PS = "Standard_E16as_v5+4TB_PS" + """Standard_E16as_v5+4TB_PS.""" STANDARD_E2_ADS_V5 = "Standard_E2ads_v5" + """Standard_E2ads_v5.""" STANDARD_E4_ADS_V5 = "Standard_E4ads_v5" + """Standard_E4ads_v5.""" STANDARD_E8_ADS_V5 = "Standard_E8ads_v5" + """Standard_E8ads_v5.""" STANDARD_E16_ADS_V5 = "Standard_E16ads_v5" + """Standard_E16ads_v5.""" STANDARD_EC8_AS_V5_1_TB_PS = "Standard_EC8as_v5+1TB_PS" + """Standard_EC8as_v5+1TB_PS.""" STANDARD_EC8_AS_V5_2_TB_PS = "Standard_EC8as_v5+2TB_PS" + """Standard_EC8as_v5+2TB_PS.""" STANDARD_EC16_AS_V5_3_TB_PS = "Standard_EC16as_v5+3TB_PS" + """Standard_EC16as_v5+3TB_PS.""" STANDARD_EC16_AS_V5_4_TB_PS = "Standard_EC16as_v5+4TB_PS" + """Standard_EC16as_v5+4TB_PS.""" STANDARD_EC8_ADS_V5 = "Standard_EC8ads_v5" + """Standard_EC8ads_v5.""" STANDARD_EC16_ADS_V5 = "Standard_EC16ads_v5" + """Standard_EC16ads_v5.""" STANDARD_E8_S_V4_1_TB_PS = "Standard_E8s_v4+1TB_PS" + """Standard_E8s_v4+1TB_PS.""" STANDARD_E8_S_V4_2_TB_PS = "Standard_E8s_v4+2TB_PS" + """Standard_E8s_v4+2TB_PS.""" STANDARD_E16_S_V4_3_TB_PS = "Standard_E16s_v4+3TB_PS" + """Standard_E16s_v4+3TB_PS.""" STANDARD_E16_S_V4_4_TB_PS = "Standard_E16s_v4+4TB_PS" + """Standard_E16s_v4+4TB_PS.""" STANDARD_E8_S_V5_1_TB_PS = "Standard_E8s_v5+1TB_PS" + """Standard_E8s_v5+1TB_PS.""" STANDARD_E8_S_V5_2_TB_PS = "Standard_E8s_v5+2TB_PS" + """Standard_E8s_v5+2TB_PS.""" STANDARD_E16_S_V5_3_TB_PS = "Standard_E16s_v5+3TB_PS" + """Standard_E16s_v5+3TB_PS.""" STANDARD_E16_S_V5_4_TB_PS = "Standard_E16s_v5+4TB_PS" + """Standard_E16s_v5+4TB_PS.""" STANDARD_E2_D_V4 = "Standard_E2d_v4" + """Standard_E2d_v4.""" STANDARD_E4_D_V4 = "Standard_E4d_v4" + """Standard_E4d_v4.""" STANDARD_E8_D_V4 = "Standard_E8d_v4" + """Standard_E8d_v4.""" STANDARD_E16_D_V4 = "Standard_E16d_v4" + """Standard_E16d_v4.""" STANDARD_E2_D_V5 = "Standard_E2d_v5" + """Standard_E2d_v5.""" STANDARD_E4_D_V5 = "Standard_E4d_v5" + """Standard_E4d_v5.""" STANDARD_E8_D_V5 = "Standard_E8d_v5" + """Standard_E8d_v5.""" STANDARD_E16_D_V5 = "Standard_E16d_v5" + """Standard_E16d_v5.""" class AzureSkuTier(str, Enum, metaclass=CaseInsensitiveEnumMeta): """SKU tier.""" BASIC = "Basic" + """Basic.""" STANDARD = "Standard" + """Standard.""" class BlobStorageEventType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The name of blob storage event type to process.""" MICROSOFT_STORAGE_BLOB_CREATED = "Microsoft.Storage.BlobCreated" + """Microsoft.Storage.BlobCreated.""" MICROSOFT_STORAGE_BLOB_RENAMED = "Microsoft.Storage.BlobRenamed" + """Microsoft.Storage.BlobRenamed.""" class CallerRole(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """CallerRole.""" + """Type of CallerRole.""" ADMIN = "Admin" + """Admin.""" NONE = "None" + """None.""" class CalloutType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -114,16 +187,27 @@ class CalloutType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """ KUSTO = "kusto" + """kusto.""" SQL = "sql" + """sql.""" COSMOSDB = "cosmosdb" + """cosmosdb.""" EXTERNAL_DATA = "external_data" + """external_data.""" AZURE_DIGITAL_TWINS = "azure_digital_twins" + """azure_digital_twins.""" SANDBOX_ARTIFACTS = "sandbox_artifacts" + """sandbox_artifacts.""" WEBAPI = "webapi" + """webapi.""" MYSQL = "mysql" + """mysql.""" POSTGRESQL = "postgresql" + """postgresql.""" GENEVAMETRICS = "genevametrics" + """genevametrics.""" AZURE_OPENAI = "azure_openai" + """azure_openai.""" class ClusterNetworkAccessFlag(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -132,50 +216,70 @@ class ClusterNetworkAccessFlag(str, Enum, metaclass=CaseInsensitiveEnumMeta): """ ENABLED = "Enabled" + """Enabled.""" DISABLED = "Disabled" + """Disabled.""" class ClusterPrincipalRole(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Cluster principal role.""" ALL_DATABASES_ADMIN = "AllDatabasesAdmin" + """AllDatabasesAdmin.""" ALL_DATABASES_VIEWER = "AllDatabasesViewer" + """AllDatabasesViewer.""" ALL_DATABASES_MONITOR = "AllDatabasesMonitor" + """AllDatabasesMonitor.""" class Compression(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The compression type.""" NONE = "None" + """None.""" G_ZIP = "GZip" + """GZip.""" class CreatedByType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The type of identity that created the resource.""" + """The kind of entity that created the resource.""" USER = "User" + """The entity was created by a user.""" APPLICATION = "Application" + """The entity was created by an application.""" MANAGED_IDENTITY = "ManagedIdentity" + """The entity was created by a managed identity.""" KEY = "Key" + """The entity was created by a key.""" class DatabasePrincipalRole(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Database principal role.""" ADMIN = "Admin" + """Admin.""" INGESTOR = "Ingestor" + """Ingestor.""" MONITOR = "Monitor" + """Monitor.""" USER = "User" + """User.""" UNRESTRICTED_VIEWER = "UnrestrictedViewer" + """UnrestrictedViewer.""" VIEWER = "Viewer" + """Viewer.""" class DatabasePrincipalType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Database principal type.""" APP = "App" + """App.""" GROUP = "Group" + """Group.""" USER = "User" + """User.""" class DatabaseRouting(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -184,81 +288,135 @@ class DatabaseRouting(str, Enum, metaclass=CaseInsensitiveEnumMeta): """ SINGLE = "Single" + """Single.""" MULTI = "Multi" + """Multi.""" class DatabaseShareOrigin(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The origin of the following setup.""" DIRECT = "Direct" + """Direct.""" DATA_SHARE = "DataShare" + """DataShare.""" OTHER = "Other" + """Other.""" class DataConnectionKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Kind of the endpoint for the data connection.""" EVENT_HUB = "EventHub" + """EventHub.""" EVENT_GRID = "EventGrid" + """EventGrid.""" IOT_HUB = "IotHub" + """IotHub.""" COSMOS_DB = "CosmosDb" + """CosmosDb.""" + EVENT_HUB_WITH_MANAGED_IDENTITY = "EventHubWithManagedIdentity" + """EventHubWithManagedIdentity.""" + EVENT_GRID_WITH_MANAGED_IDENTITY = "EventGridWithManagedIdentity" + """EventGridWithManagedIdentity.""" class DefaultPrincipalsModificationKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The default principals modification kind.""" UNION = "Union" + """Union.""" REPLACE = "Replace" + """Replace.""" NONE = "None" + """None.""" class EngineType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The engine type.""" V2 = "V2" + """V2.""" V3 = "V3" + """V3.""" class EventGridDataFormat(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The data format of the message. Optionally the data format can be added to each message.""" MULTIJSON = "MULTIJSON" + """MULTIJSON.""" JSON = "JSON" + """JSON.""" CSV = "CSV" + """CSV.""" TSV = "TSV" + """TSV.""" SCSV = "SCSV" + """SCSV.""" SOHSV = "SOHSV" + """SOHSV.""" PSV = "PSV" + """PSV.""" TXT = "TXT" + """TXT.""" RAW = "RAW" + """RAW.""" SINGLEJSON = "SINGLEJSON" + """SINGLEJSON.""" AVRO = "AVRO" + """AVRO.""" TSVE = "TSVE" + """TSVE.""" PARQUET = "PARQUET" + """PARQUET.""" ORC = "ORC" + """ORC.""" APACHEAVRO = "APACHEAVRO" + """APACHEAVRO.""" W3_CLOGFILE = "W3CLOGFILE" + """W3CLOGFILE.""" + AZMONSTREAM = "AZMONSTREAM" + """AZMONSTREAM.""" class EventHubDataFormat(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The data format of the message. Optionally the data format can be added to each message.""" MULTIJSON = "MULTIJSON" + """MULTIJSON.""" JSON = "JSON" + """JSON.""" CSV = "CSV" + """CSV.""" TSV = "TSV" + """TSV.""" SCSV = "SCSV" + """SCSV.""" SOHSV = "SOHSV" + """SOHSV.""" PSV = "PSV" + """PSV.""" TXT = "TXT" + """TXT.""" RAW = "RAW" + """RAW.""" SINGLEJSON = "SINGLEJSON" + """SINGLEJSON.""" AVRO = "AVRO" + """AVRO.""" TSVE = "TSVE" + """TSVE.""" PARQUET = "PARQUET" + """PARQUET.""" ORC = "ORC" + """ORC.""" APACHEAVRO = "APACHEAVRO" + """APACHEAVRO.""" W3_CLOGFILE = "W3CLOGFILE" + """W3CLOGFILE.""" + AZMONSTREAM = "AZMONSTREAM" + """AZMONSTREAM.""" class IdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -268,118 +426,173 @@ class IdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """ NONE = "None" + """None.""" SYSTEM_ASSIGNED = "SystemAssigned" + """SystemAssigned.""" USER_ASSIGNED = "UserAssigned" + """UserAssigned.""" SYSTEM_ASSIGNED_USER_ASSIGNED = "SystemAssigned, UserAssigned" + """SystemAssigned, UserAssigned.""" class IotHubDataFormat(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The data format of the message. Optionally the data format can be added to each message.""" MULTIJSON = "MULTIJSON" + """MULTIJSON.""" JSON = "JSON" + """JSON.""" CSV = "CSV" + """CSV.""" TSV = "TSV" + """TSV.""" SCSV = "SCSV" + """SCSV.""" SOHSV = "SOHSV" + """SOHSV.""" PSV = "PSV" + """PSV.""" TXT = "TXT" + """TXT.""" RAW = "RAW" + """RAW.""" SINGLEJSON = "SINGLEJSON" + """SINGLEJSON.""" AVRO = "AVRO" + """AVRO.""" TSVE = "TSVE" + """TSVE.""" PARQUET = "PARQUET" + """PARQUET.""" ORC = "ORC" + """ORC.""" APACHEAVRO = "APACHEAVRO" + """APACHEAVRO.""" W3_CLOGFILE = "W3CLOGFILE" + """W3CLOGFILE.""" + AZMONSTREAM = "AZMONSTREAM" + """AZMONSTREAM.""" class Kind(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Kind of the database.""" READ_WRITE = "ReadWrite" + """ReadWrite.""" READ_ONLY_FOLLOWING = "ReadOnlyFollowing" + """ReadOnlyFollowing.""" class Language(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The language name, for example Python.""" PYTHON = "Python" + """Python.""" class LanguageExtensionImageName(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Language extension image name.""" R = "R" + """R.""" PYTHON3_6_5 = "Python3_6_5" + """Python3_6_5.""" PYTHON3_10_8 = "Python3_10_8" + """Python3_10_8.""" PYTHON3_10_8_DL = "Python3_10_8_DL" + """Python3_10_8_DL.""" PYTHON_CUSTOM_IMAGE = "PythonCustomImage" + """PythonCustomImage.""" PYTHON3_11_7 = "Python3_11_7" + """Python3_11_7.""" PYTHON3_11_7_DL = "Python3_11_7_DL" + """Python3_11_7_DL.""" class LanguageExtensionName(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Language extension that can run within KQL query.""" PYTHON = "PYTHON" + """PYTHON.""" R = "R" + """R.""" class MigrationClusterRole(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The role of the cluster in the migration process.""" SOURCE = "Source" + """Source.""" DESTINATION = "Destination" + """Destination.""" class OutboundAccess(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Indicates whether outbound access is permitted for the specified URI pattern.""" ALLOW = "Allow" + """Allow.""" DENY = "Deny" + """Deny.""" class PrincipalPermissionsAction(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Indicates if the permissions for the script caller are kept following completion of the script.""" RETAIN_PERMISSION_ON_SCRIPT_COMPLETION = "RetainPermissionOnScriptCompletion" + """RetainPermissionOnScriptCompletion.""" REMOVE_PERMISSION_ON_SCRIPT_COMPLETION = "RemovePermissionOnScriptCompletion" + """RemovePermissionOnScriptCompletion.""" class PrincipalsModificationKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The principals modification kind of the database.""" UNION = "Union" + """Union.""" REPLACE = "Replace" + """Replace.""" NONE = "None" + """None.""" class PrincipalType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Principal type.""" APP = "App" + """App.""" GROUP = "Group" + """Group.""" USER = "User" + """User.""" class ProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The provisioned state of the resource.""" RUNNING = "Running" + """Running.""" CREATING = "Creating" + """Creating.""" DELETING = "Deleting" + """Deleting.""" SUCCEEDED = "Succeeded" + """Succeeded.""" FAILED = "Failed" + """Failed.""" MOVING = "Moving" + """Moving.""" CANCELED = "Canceled" + """Canceled.""" class PublicIPType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Indicates what public IP type to create - IPv4 (default), or DualStack (both IPv4 and IPv6).""" I_PV4 = "IPv4" + """IPv4.""" DUAL_STACK = "DualStack" + """DualStack.""" class PublicNetworkAccess(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -388,14 +601,20 @@ class PublicNetworkAccess(str, Enum, metaclass=CaseInsensitiveEnumMeta): """ ENABLED = "Enabled" + """Enabled.""" DISABLED = "Disabled" + """Disabled.""" + SECURED_BY_PERIMETER = "SecuredByPerimeter" + """SecuredByPerimeter.""" class Reason(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Message providing the reason why the given name is invalid.""" INVALID = "Invalid" + """Invalid.""" ALREADY_EXISTS = "AlreadyExists" + """AlreadyExists.""" class ScriptLevel(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -404,40 +623,58 @@ class ScriptLevel(str, Enum, metaclass=CaseInsensitiveEnumMeta): """ DATABASE = "Database" + """Database.""" CLUSTER = "Cluster" + """Cluster.""" class State(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The state of the resource.""" CREATING = "Creating" + """Creating.""" UNAVAILABLE = "Unavailable" + """Unavailable.""" RUNNING = "Running" + """Running.""" DELETING = "Deleting" + """Deleting.""" DELETED = "Deleted" + """Deleted.""" STOPPING = "Stopping" + """Stopping.""" STOPPED = "Stopped" + """Stopped.""" STARTING = "Starting" + """Starting.""" UPDATING = "Updating" + """Updating.""" MIGRATED = "Migrated" + """Migrated.""" class Status(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The status of operation.""" SUCCEEDED = "Succeeded" + """Succeeded.""" CANCELED = "Canceled" + """Canceled.""" FAILED = "Failed" + """Failed.""" RUNNING = "Running" + """Running.""" class Type(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of resource, for instance Microsoft.Kusto/clusters/databases.""" MICROSOFT_KUSTO_CLUSTERS_DATABASES = "Microsoft.Kusto/clusters/databases" + """Microsoft.Kusto/clusters/databases.""" MICROSOFT_KUSTO_CLUSTERS_ATTACHED_DATABASE_CONFIGURATIONS = ( "Microsoft.Kusto/clusters/attachedDatabaseConfigurations" ) + """Microsoft.Kusto/clusters/attachedDatabaseConfigurations.""" class VnetState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -446,12 +683,17 @@ class VnetState(str, Enum, metaclass=CaseInsensitiveEnumMeta): """ ENABLED = "Enabled" + """Enabled.""" DISABLED = "Disabled" + """Disabled.""" class ZoneStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Indicates whether the cluster is zonal or non-zonal.""" NON_ZONAL = "NonZonal" + """NonZonal.""" ZONAL_INCONSISTENCY = "ZonalInconsistency" + """ZonalInconsistency.""" ZONAL = "Zonal" + """Zonal.""" diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/_models.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/_models.py new file mode 100644 index 000000000000..1aaa5143d364 --- /dev/null +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/_models.py @@ -0,0 +1,5707 @@ +# pylint: disable=line-too-long,useless-suppression,too-many-lines +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=useless-super-delegation + +import datetime +from typing import Any, Literal, Mapping, Optional, TYPE_CHECKING, Union, overload + +from .._utils.model_base import Model as _Model, rest_discriminator, rest_field +from ._enums import DataConnectionKind, Kind + +if TYPE_CHECKING: + from .. import models as _models + + +class AcceptedAudiences(_Model): + """Represents an accepted audience trusted by the cluster. + + :ivar value: GUID or valid URL representing an accepted audience. + :vartype value: str + """ + + value: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """GUID or valid URL representing an accepted audience.""" + + @overload + def __init__( + self, + *, + value: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class Resource(_Model): + """Resource. + + :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 system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.kusto.models.SystemData + """ + + id: Optional[str] = rest_field(visibility=["read"]) + """Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.""" + name: Optional[str] = rest_field(visibility=["read"]) + """The name of the resource.""" + type: Optional[str] = rest_field(visibility=["read"]) + """The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or + \"Microsoft.Storage/storageAccounts\".""" + system_data: Optional["_models.SystemData"] = rest_field(name="systemData", visibility=["read"]) + """Azure Resource Manager metadata containing createdBy and modifiedBy information.""" + + +class ProxyResource(Resource): + """Proxy Resource. + + :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 system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.kusto.models.SystemData + """ + + +class AttachedDatabaseConfiguration(ProxyResource): + """Class representing an attached database configuration. + + :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 system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.kusto.models.SystemData + :ivar properties: The properties of the attached database configuration. + :vartype properties: ~azure.mgmt.kusto.models.AttachedDatabaseConfigurationProperties + :ivar location: Resource location. + :vartype location: str + """ + + properties: Optional["_models.AttachedDatabaseConfigurationProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The properties of the attached database configuration.""" + location: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Resource location.""" + + __flattened_items = [ + "provisioning_state", + "database_name", + "cluster_resource_id", + "attached_database_names", + "default_principals_modification_kind", + "table_level_sharing_properties", + "database_name_override", + "database_name_prefix", + ] + + @overload + def __init__( + self, + *, + properties: Optional["_models.AttachedDatabaseConfigurationProperties"] = None, + location: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class AttachedDatabaseConfigurationProperties(_Model): + """Class representing the an attached database configuration properties of kind specific. + + :ivar provisioning_state: The provisioned state of the resource. Known values are: "Running", + "Creating", "Deleting", "Succeeded", "Failed", "Moving", and "Canceled". + :vartype provisioning_state: str or ~azure.mgmt.kusto.models.ProvisioningState + :ivar database_name: The name of the database which you would like to attach, use * if you want + to follow all current and future databases. Required. + :vartype database_name: str + :ivar cluster_resource_id: The resource id of the cluster where the databases you would like to + attach reside. Required. + :vartype cluster_resource_id: str + :ivar attached_database_names: The list of databases from the clusterResourceId which are + currently attached to the cluster. + :vartype attached_database_names: list[str] + :ivar default_principals_modification_kind: The default principals modification kind. Required. + Known values are: "Union", "Replace", and "None". + :vartype default_principals_modification_kind: str or + ~azure.mgmt.kusto.models.DefaultPrincipalsModificationKind + :ivar table_level_sharing_properties: Table level sharing specifications. + :vartype table_level_sharing_properties: ~azure.mgmt.kusto.models.TableLevelSharingProperties + :ivar database_name_override: Overrides the original database name. Relevant only when + attaching to a specific database. + :vartype database_name_override: str + :ivar database_name_prefix: Adds a prefix to the attached databases name. When following an + entire cluster, that prefix would be added to all of the databases original names from leader + cluster. + :vartype database_name_prefix: str + """ + + provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """The provisioned state of the resource. Known values are: \"Running\", \"Creating\", + \"Deleting\", \"Succeeded\", \"Failed\", \"Moving\", and \"Canceled\".""" + database_name: str = rest_field(name="databaseName", visibility=["read", "create", "update", "delete", "query"]) + """The name of the database which you would like to attach, use * if you want to follow all + current and future databases. Required.""" + cluster_resource_id: str = rest_field( + name="clusterResourceId", visibility=["read", "create", "update", "delete", "query"] + ) + """The resource id of the cluster where the databases you would like to attach reside. Required.""" + attached_database_names: Optional[list[str]] = rest_field(name="attachedDatabaseNames", visibility=["read"]) + """The list of databases from the clusterResourceId which are currently attached to the cluster.""" + default_principals_modification_kind: Union[str, "_models.DefaultPrincipalsModificationKind"] = rest_field( + name="defaultPrincipalsModificationKind", visibility=["read", "create", "update", "delete", "query"] + ) + """The default principals modification kind. Required. Known values are: \"Union\", \"Replace\", + and \"None\".""" + table_level_sharing_properties: Optional["_models.TableLevelSharingProperties"] = rest_field( + name="tableLevelSharingProperties", visibility=["read", "create", "update", "delete", "query"] + ) + """Table level sharing specifications.""" + database_name_override: Optional[str] = rest_field( + name="databaseNameOverride", visibility=["read", "create", "update", "delete", "query"] + ) + """Overrides the original database name. Relevant only when attaching to a specific database.""" + database_name_prefix: Optional[str] = rest_field( + name="databaseNamePrefix", visibility=["read", "create", "update", "delete", "query"] + ) + """Adds a prefix to the attached databases name. When following an entire cluster, that prefix + would be added to all of the databases original names from leader cluster.""" + + @overload + def __init__( + self, + *, + database_name: str, + cluster_resource_id: str, + default_principals_modification_kind: Union[str, "_models.DefaultPrincipalsModificationKind"], + table_level_sharing_properties: Optional["_models.TableLevelSharingProperties"] = None, + database_name_override: Optional[str] = None, + database_name_prefix: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class AttachedDatabaseConfigurationsCheckNameRequest(_Model): # pylint: disable=name-too-long + """The result returned from a AttachedDatabaseConfigurations check name availability request. + + :ivar name: Attached database resource name. Required. + :vartype name: str + :ivar type: The type of resource, for instance + Microsoft.Kusto/clusters/attachedDatabaseConfigurations. Required. Default value is + "Microsoft.Kusto/clusters/attachedDatabaseConfigurations". + :vartype type: str + """ + + name: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Attached database resource name. Required.""" + type: Literal["Microsoft.Kusto/clusters/attachedDatabaseConfigurations"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The type of resource, for instance Microsoft.Kusto/clusters/attachedDatabaseConfigurations. + Required. Default value is \"Microsoft.Kusto/clusters/attachedDatabaseConfigurations\".""" + + @overload + def __init__( + self, + *, + name: str, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.type: Literal["Microsoft.Kusto/clusters/attachedDatabaseConfigurations"] = ( + "Microsoft.Kusto/clusters/attachedDatabaseConfigurations" + ) + + +class AzureCapacity(_Model): + """Azure capacity definition. + + :ivar scale_type: Scale type. Required. Known values are: "automatic", "manual", and "none". + :vartype scale_type: str or ~azure.mgmt.kusto.models.AzureScaleType + :ivar minimum: Minimum allowed capacity. Required. + :vartype minimum: int + :ivar maximum: Maximum allowed capacity. Required. + :vartype maximum: int + :ivar default: The default capacity that would be used. Required. + :vartype default: int + """ + + scale_type: Union[str, "_models.AzureScaleType"] = rest_field( + name="scaleType", visibility=["read", "create", "update", "delete", "query"] + ) + """Scale type. Required. Known values are: \"automatic\", \"manual\", and \"none\".""" + minimum: int = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Minimum allowed capacity. Required.""" + maximum: int = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Maximum allowed capacity. Required.""" + default: int = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The default capacity that would be used. Required.""" + + @overload + def __init__( + self, + *, + scale_type: Union[str, "_models.AzureScaleType"], + minimum: int, + maximum: int, + default: int, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class AzureResourceSku(_Model): + """Azure resource SKU definition. + + :ivar resource_type: Resource Namespace and Type. + :vartype resource_type: str + :ivar sku: The SKU details. + :vartype sku: ~azure.mgmt.kusto.models.AzureSku + :ivar capacity: The number of instances of the cluster. + :vartype capacity: ~azure.mgmt.kusto.models.AzureCapacity + """ + + resource_type: Optional[str] = rest_field( + name="resourceType", visibility=["read", "create", "update", "delete", "query"] + ) + """Resource Namespace and Type.""" + sku: Optional["_models.AzureSku"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The SKU details.""" + capacity: Optional["_models.AzureCapacity"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The number of instances of the cluster.""" + + @overload + def __init__( + self, + *, + resource_type: Optional[str] = None, + sku: Optional["_models.AzureSku"] = None, + capacity: Optional["_models.AzureCapacity"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class AzureSku(_Model): + """Azure SKU definition. + + :ivar name: SKU name. Required. Known values are: "Dev(No SLA)_Standard_D11_v2", "Dev(No + SLA)_Standard_E2a_v4", "Standard_D11_v2", "Standard_D12_v2", "Standard_D13_v2", + "Standard_D14_v2", "Standard_D32d_v4", "Standard_D16d_v5", "Standard_D32d_v5", + "Standard_DS13_v2+1TB_PS", "Standard_DS13_v2+2TB_PS", "Standard_DS14_v2+3TB_PS", + "Standard_DS14_v2+4TB_PS", "Standard_L4s", "Standard_L8s", "Standard_L16s", "Standard_L8s_v2", + "Standard_L16s_v2", "Standard_L8s_v3", "Standard_L16s_v3", "Standard_L32s_v3", + "Standard_L8as_v3", "Standard_L16as_v3", "Standard_L32as_v3", "Standard_E64i_v3", + "Standard_E80ids_v4", "Standard_E2a_v4", "Standard_E4a_v4", "Standard_E8a_v4", + "Standard_E16a_v4", "Standard_E8as_v4+1TB_PS", "Standard_E8as_v4+2TB_PS", + "Standard_E16as_v4+3TB_PS", "Standard_E16as_v4+4TB_PS", "Standard_E8as_v5+1TB_PS", + "Standard_E8as_v5+2TB_PS", "Standard_E16as_v5+3TB_PS", "Standard_E16as_v5+4TB_PS", + "Standard_E2ads_v5", "Standard_E4ads_v5", "Standard_E8ads_v5", "Standard_E16ads_v5", + "Standard_EC8as_v5+1TB_PS", "Standard_EC8as_v5+2TB_PS", "Standard_EC16as_v5+3TB_PS", + "Standard_EC16as_v5+4TB_PS", "Standard_EC8ads_v5", "Standard_EC16ads_v5", + "Standard_E8s_v4+1TB_PS", "Standard_E8s_v4+2TB_PS", "Standard_E16s_v4+3TB_PS", + "Standard_E16s_v4+4TB_PS", "Standard_E8s_v5+1TB_PS", "Standard_E8s_v5+2TB_PS", + "Standard_E16s_v5+3TB_PS", "Standard_E16s_v5+4TB_PS", "Standard_E2d_v4", "Standard_E4d_v4", + "Standard_E8d_v4", "Standard_E16d_v4", "Standard_E2d_v5", "Standard_E4d_v5", "Standard_E8d_v5", + and "Standard_E16d_v5". + :vartype name: str or ~azure.mgmt.kusto.models.AzureSkuName + :ivar capacity: The number of instances of the cluster. + :vartype capacity: int + :ivar tier: SKU tier. Required. Known values are: "Basic" and "Standard". + :vartype tier: str or ~azure.mgmt.kusto.models.AzureSkuTier + """ + + name: Union[str, "_models.AzureSkuName"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """SKU name. Required. Known values are: \"Dev(No SLA)_Standard_D11_v2\", \"Dev(No + SLA)_Standard_E2a_v4\", \"Standard_D11_v2\", \"Standard_D12_v2\", \"Standard_D13_v2\", + \"Standard_D14_v2\", \"Standard_D32d_v4\", \"Standard_D16d_v5\", \"Standard_D32d_v5\", + \"Standard_DS13_v2+1TB_PS\", \"Standard_DS13_v2+2TB_PS\", \"Standard_DS14_v2+3TB_PS\", + \"Standard_DS14_v2+4TB_PS\", \"Standard_L4s\", \"Standard_L8s\", \"Standard_L16s\", + \"Standard_L8s_v2\", \"Standard_L16s_v2\", \"Standard_L8s_v3\", \"Standard_L16s_v3\", + \"Standard_L32s_v3\", \"Standard_L8as_v3\", \"Standard_L16as_v3\", \"Standard_L32as_v3\", + \"Standard_E64i_v3\", \"Standard_E80ids_v4\", \"Standard_E2a_v4\", \"Standard_E4a_v4\", + \"Standard_E8a_v4\", \"Standard_E16a_v4\", \"Standard_E8as_v4+1TB_PS\", + \"Standard_E8as_v4+2TB_PS\", \"Standard_E16as_v4+3TB_PS\", \"Standard_E16as_v4+4TB_PS\", + \"Standard_E8as_v5+1TB_PS\", \"Standard_E8as_v5+2TB_PS\", \"Standard_E16as_v5+3TB_PS\", + \"Standard_E16as_v5+4TB_PS\", \"Standard_E2ads_v5\", \"Standard_E4ads_v5\", + \"Standard_E8ads_v5\", \"Standard_E16ads_v5\", \"Standard_EC8as_v5+1TB_PS\", + \"Standard_EC8as_v5+2TB_PS\", \"Standard_EC16as_v5+3TB_PS\", \"Standard_EC16as_v5+4TB_PS\", + \"Standard_EC8ads_v5\", \"Standard_EC16ads_v5\", \"Standard_E8s_v4+1TB_PS\", + \"Standard_E8s_v4+2TB_PS\", \"Standard_E16s_v4+3TB_PS\", \"Standard_E16s_v4+4TB_PS\", + \"Standard_E8s_v5+1TB_PS\", \"Standard_E8s_v5+2TB_PS\", \"Standard_E16s_v5+3TB_PS\", + \"Standard_E16s_v5+4TB_PS\", \"Standard_E2d_v4\", \"Standard_E4d_v4\", \"Standard_E8d_v4\", + \"Standard_E16d_v4\", \"Standard_E2d_v5\", \"Standard_E4d_v5\", \"Standard_E8d_v5\", and + \"Standard_E16d_v5\".""" + capacity: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The number of instances of the cluster.""" + tier: Union[str, "_models.AzureSkuTier"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """SKU tier. Required. Known values are: \"Basic\" and \"Standard\".""" + + @overload + def __init__( + self, + *, + name: Union[str, "_models.AzureSkuName"], + tier: Union[str, "_models.AzureSkuTier"], + capacity: Optional[int] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CalloutPoliciesList(_Model): + """A list of the service's callout policy objects. + + :ivar value: The CalloutPolicy items on this page. Required. + :vartype value: list[~azure.mgmt.kusto.models.CalloutPolicy] + :ivar next_link: The URL to get the next set of callout policies list results if there are any. + :vartype next_link: str + """ + + value: list["_models.CalloutPolicy"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The CalloutPolicy items on this page. Required.""" + next_link: Optional[str] = rest_field(name="nextLink", visibility=["read", "create", "update", "delete", "query"]) + """The URL to get the next set of callout policies list results if there are any.""" + + @overload + def __init__( + self, + *, + value: list["_models.CalloutPolicy"], + next_link: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CalloutPolicy(_Model): + """Configuration for external callout policies, including URI patterns, access types, and service + types. + + :ivar callout_uri_regex: Regular expression or FQDN pattern for the callout URI. + :vartype callout_uri_regex: str + :ivar callout_type: Type of the callout service, specifying the kind of external resource or + service being accessed. Known values are: "kusto", "sql", "cosmosdb", "external_data", + "azure_digital_twins", "sandbox_artifacts", "webapi", "mysql", "postgresql", "genevametrics", + and "azure_openai". + :vartype callout_type: str or ~azure.mgmt.kusto.models.CalloutType + :ivar outbound_access: Indicates whether outbound access is permitted for the specified URI + pattern. Known values are: "Allow" and "Deny". + :vartype outbound_access: str or ~azure.mgmt.kusto.models.OutboundAccess + :ivar callout_id: Unique identifier for the callout configuration. + :vartype callout_id: str + """ + + callout_uri_regex: Optional[str] = rest_field( + name="calloutUriRegex", visibility=["read", "create", "update", "delete", "query"] + ) + """Regular expression or FQDN pattern for the callout URI.""" + callout_type: Optional[Union[str, "_models.CalloutType"]] = rest_field( + name="calloutType", visibility=["read", "create", "update", "delete", "query"] + ) + """Type of the callout service, specifying the kind of external resource or service being + accessed. Known values are: \"kusto\", \"sql\", \"cosmosdb\", \"external_data\", + \"azure_digital_twins\", \"sandbox_artifacts\", \"webapi\", \"mysql\", \"postgresql\", + \"genevametrics\", and \"azure_openai\".""" + outbound_access: Optional[Union[str, "_models.OutboundAccess"]] = rest_field( + name="outboundAccess", visibility=["read", "create", "update", "delete", "query"] + ) + """Indicates whether outbound access is permitted for the specified URI pattern. Known values are: + \"Allow\" and \"Deny\".""" + callout_id: Optional[str] = rest_field(name="calloutId", visibility=["read"]) + """Unique identifier for the callout configuration.""" + + @overload + def __init__( + self, + *, + callout_uri_regex: Optional[str] = None, + callout_type: Optional[Union[str, "_models.CalloutType"]] = None, + outbound_access: Optional[Union[str, "_models.OutboundAccess"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CalloutPolicyToRemove(_Model): + """Configuration for an external callout policy to remove. + + :ivar callout_id: Unique identifier for the callout configuration. + :vartype callout_id: str + """ + + callout_id: Optional[str] = rest_field(name="calloutId", visibility=["read", "create", "update", "delete", "query"]) + """Unique identifier for the callout configuration.""" + + @overload + def __init__( + self, + *, + callout_id: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CheckNameRequest(_Model): + """The result returned from a database check name availability request. + + :ivar name: Resource name. Required. + :vartype name: str + :ivar type: The type of resource, for instance Microsoft.Kusto/clusters/databases. Required. + Known values are: "Microsoft.Kusto/clusters/databases" and + "Microsoft.Kusto/clusters/attachedDatabaseConfigurations". + :vartype type: str or ~azure.mgmt.kusto.models.Type + """ + + name: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Resource name. Required.""" + type: Union[str, "_models.Type"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The type of resource, for instance Microsoft.Kusto/clusters/databases. Required. Known values + are: \"Microsoft.Kusto/clusters/databases\" and + \"Microsoft.Kusto/clusters/attachedDatabaseConfigurations\".""" + + @overload + def __init__( + self, + *, + name: str, + type: Union[str, "_models.Type"], + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CheckNameResult(_Model): + """The result returned from a check name availability request. + + :ivar name_available: Specifies a Boolean value that indicates if the name is available. + :vartype name_available: bool + :ivar name: The name that was checked. + :vartype name: str + :ivar message: Message indicating an unavailable name due to a conflict, or a description of + the naming rules that are violated. + :vartype message: str + :ivar reason: Message providing the reason why the given name is invalid. Known values are: + "Invalid" and "AlreadyExists". + :vartype reason: str or ~azure.mgmt.kusto.models.Reason + """ + + name_available: Optional[bool] = rest_field( + name="nameAvailable", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies a Boolean value that indicates if the name is available.""" + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The name that was checked.""" + message: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Message indicating an unavailable name due to a conflict, or a description of the naming rules + that are violated.""" + reason: Optional[Union[str, "_models.Reason"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Message providing the reason why the given name is invalid. Known values are: \"Invalid\" and + \"AlreadyExists\".""" + + @overload + def __init__( + self, + *, + name_available: Optional[bool] = None, + name: Optional[str] = None, + message: Optional[str] = None, + reason: Optional[Union[str, "_models.Reason"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class TrackedResource(Resource): + """Tracked Resource. + + :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 system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.kusto.models.SystemData + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + """ + + tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Resource tags.""" + location: str = rest_field(visibility=["read", "create"]) + """The geo-location where the resource lives. Required.""" + + @overload + def __init__( + self, + *, + location: str, + tags: Optional[dict[str, str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class Cluster(TrackedResource): + """Class representing a Kusto cluster. + + :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 system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.kusto.models.SystemData + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + :ivar properties: The cluster properties. + :vartype properties: ~azure.mgmt.kusto.models.ClusterProperties + :ivar sku: The SKU of the cluster. Required. + :vartype sku: ~azure.mgmt.kusto.models.AzureSku + :ivar zones: The availability zones. + :vartype zones: list[str] + :ivar identity: The identity of the cluster, if configured. + :vartype identity: ~azure.mgmt.kusto.models.Identity + :ivar etag: "If etag is provided in the response body, it may also be provided as a header per + the normal etag convention. Entity tags are used for comparing two or more entities from the + same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match + (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields."). + :vartype etag: str + """ + + properties: Optional["_models.ClusterProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The cluster properties.""" + sku: "_models.AzureSku" = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The SKU of the cluster. Required.""" + zones: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The availability zones.""" + identity: Optional["_models.Identity"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The identity of the cluster, if configured.""" + etag: Optional[str] = rest_field(visibility=["read"]) + """\"If etag is provided in the response body, it may also be provided as a header per the normal + etag convention. Entity tags are used for comparing two or more entities from the same + requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section + 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.\").""" + + __flattened_items = [ + "state", + "provisioning_state", + "uri", + "data_ingestion_uri", + "state_reason", + "trusted_external_tenants", + "optimized_autoscale", + "enable_disk_encryption", + "enable_streaming_ingest", + "virtual_network_configuration", + "key_vault_properties", + "enable_purge", + "language_extensions", + "enable_double_encryption", + "public_network_access", + "allowed_ip_range_list", + "engine_type", + "accepted_audiences", + "enable_auto_stop", + "restrict_outbound_network_access", + "allowed_fqdn_list", + "callout_policies", + "public_ip_type", + "virtual_cluster_graduation_properties", + "private_endpoint_connections", + "migration_cluster", + "zone_status", + ] + + @overload + def __init__( + self, + *, + location: str, + sku: "_models.AzureSku", + tags: Optional[dict[str, str]] = None, + properties: Optional["_models.ClusterProperties"] = None, + zones: Optional[list[str]] = None, + identity: Optional["_models.Identity"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class ClusterCheckNameRequest(_Model): + """The result returned from a cluster check name availability request. + + :ivar name: Cluster name. Required. + :vartype name: str + :ivar type: The type of resource, Microsoft.Kusto/clusters. Required. Default value is + "Microsoft.Kusto/clusters". + :vartype type: str + """ + + name: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Cluster name. Required.""" + type: Literal["Microsoft.Kusto/clusters"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The type of resource, Microsoft.Kusto/clusters. Required. Default value is + \"Microsoft.Kusto/clusters\".""" + + @overload + def __init__( + self, + *, + name: str, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.type: Literal["Microsoft.Kusto/clusters"] = "Microsoft.Kusto/clusters" + + +class ClusterMigrateRequest(_Model): + """A cluster migrate request. + + :ivar cluster_resource_id: Resource ID of the destination cluster or kusto pool. Required. + :vartype cluster_resource_id: str + """ + + cluster_resource_id: str = rest_field( + name="clusterResourceId", visibility=["read", "create", "update", "delete", "query"] + ) + """Resource ID of the destination cluster or kusto pool. Required.""" + + @overload + def __init__( + self, + *, + cluster_resource_id: str, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ClusterPrincipalAssignment(ProxyResource): + """Class representing a cluster principal assignment. + + :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 system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.kusto.models.SystemData + :ivar properties: The cluster principal. + :vartype properties: ~azure.mgmt.kusto.models.ClusterPrincipalProperties + """ + + properties: Optional["_models.ClusterPrincipalProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The cluster principal.""" + + __flattened_items = [ + "principal_id", + "role", + "tenant_id", + "principal_type", + "tenant_name", + "principal_name", + "provisioning_state", + "aad_object_id", + ] + + @overload + def __init__( + self, + *, + properties: Optional["_models.ClusterPrincipalProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class ClusterPrincipalAssignmentCheckNameRequest(_Model): # pylint: disable=name-too-long + """A principal assignment check name availability request. + + :ivar name: Principal Assignment resource name. Required. + :vartype name: str + :ivar type: The type of resource, Microsoft.Kusto/clusters/principalAssignments. Required. + Default value is "Microsoft.Kusto/clusters/principalAssignments". + :vartype type: str + """ + + name: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Principal Assignment resource name. Required.""" + type: Literal["Microsoft.Kusto/clusters/principalAssignments"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The type of resource, Microsoft.Kusto/clusters/principalAssignments. Required. Default value is + \"Microsoft.Kusto/clusters/principalAssignments\".""" + + @overload + def __init__( + self, + *, + name: str, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.type: Literal["Microsoft.Kusto/clusters/principalAssignments"] = ( + "Microsoft.Kusto/clusters/principalAssignments" + ) + + +class ClusterPrincipalProperties(_Model): + """A class representing cluster principal property. + + :ivar principal_id: The principal ID assigned to the cluster principal. It can be a user email, + application ID, or security group name. Required. + :vartype principal_id: str + :ivar role: Cluster principal role. Required. Known values are: "AllDatabasesAdmin", + "AllDatabasesViewer", and "AllDatabasesMonitor". + :vartype role: str or ~azure.mgmt.kusto.models.ClusterPrincipalRole + :ivar tenant_id: The tenant id of the principal. + :vartype tenant_id: str + :ivar principal_type: Principal type. Required. Known values are: "App", "Group", and "User". + :vartype principal_type: str or ~azure.mgmt.kusto.models.PrincipalType + :ivar tenant_name: The tenant name of the principal. + :vartype tenant_name: str + :ivar principal_name: The principal name. + :vartype principal_name: str + :ivar provisioning_state: The provisioned state of the resource. Known values are: "Running", + "Creating", "Deleting", "Succeeded", "Failed", "Moving", and "Canceled". + :vartype provisioning_state: str or ~azure.mgmt.kusto.models.ProvisioningState + :ivar aad_object_id: The service principal object id in AAD (Azure active directory). + :vartype aad_object_id: str + """ + + principal_id: str = rest_field(name="principalId", visibility=["read", "create", "update", "delete", "query"]) + """The principal ID assigned to the cluster principal. It can be a user email, application ID, or + security group name. Required.""" + role: Union[str, "_models.ClusterPrincipalRole"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Cluster principal role. Required. Known values are: \"AllDatabasesAdmin\", + \"AllDatabasesViewer\", and \"AllDatabasesMonitor\".""" + tenant_id: Optional[str] = rest_field(name="tenantId", visibility=["read", "create", "update", "delete", "query"]) + """The tenant id of the principal.""" + principal_type: Union[str, "_models.PrincipalType"] = rest_field( + name="principalType", visibility=["read", "create", "update", "delete", "query"] + ) + """Principal type. Required. Known values are: \"App\", \"Group\", and \"User\".""" + tenant_name: Optional[str] = rest_field(name="tenantName", visibility=["read"]) + """The tenant name of the principal.""" + principal_name: Optional[str] = rest_field(name="principalName", visibility=["read"]) + """The principal name.""" + provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """The provisioned state of the resource. Known values are: \"Running\", \"Creating\", + \"Deleting\", \"Succeeded\", \"Failed\", \"Moving\", and \"Canceled\".""" + aad_object_id: Optional[str] = rest_field(name="aadObjectId", visibility=["read"]) + """The service principal object id in AAD (Azure active directory).""" + + @overload + def __init__( + self, + *, + principal_id: str, + role: Union[str, "_models.ClusterPrincipalRole"], + principal_type: Union[str, "_models.PrincipalType"], + tenant_id: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ClusterProperties(_Model): + """Class representing the Kusto cluster properties. + + :ivar state: The state of the resource. Known values are: "Creating", "Unavailable", "Running", + "Deleting", "Deleted", "Stopping", "Stopped", "Starting", "Updating", and "Migrated". + :vartype state: str or ~azure.mgmt.kusto.models.State + :ivar provisioning_state: The provisioned state of the resource. Known values are: "Running", + "Creating", "Deleting", "Succeeded", "Failed", "Moving", and "Canceled". + :vartype provisioning_state: str or ~azure.mgmt.kusto.models.ProvisioningState + :ivar uri: The cluster URI. + :vartype uri: str + :ivar data_ingestion_uri: The cluster data ingestion URI. + :vartype data_ingestion_uri: str + :ivar state_reason: The reason for the cluster's current state. + :vartype state_reason: str + :ivar trusted_external_tenants: The cluster's external tenants. + :vartype trusted_external_tenants: list[~azure.mgmt.kusto.models.TrustedExternalTenant] + :ivar optimized_autoscale: Optimized auto scale definition. + :vartype optimized_autoscale: ~azure.mgmt.kusto.models.OptimizedAutoscale + :ivar enable_disk_encryption: A boolean value that indicates if the cluster's disks are + encrypted. + :vartype enable_disk_encryption: bool + :ivar enable_streaming_ingest: A boolean value that indicates if the streaming ingest is + enabled. + :vartype enable_streaming_ingest: bool + :ivar virtual_network_configuration: Virtual network definition. + :vartype virtual_network_configuration: ~azure.mgmt.kusto.models.VirtualNetworkConfiguration + :ivar key_vault_properties: KeyVault properties for the cluster encryption. + :vartype key_vault_properties: ~azure.mgmt.kusto.models.KeyVaultProperties + :ivar enable_purge: A boolean value that indicates if the purge operations are enabled. + :vartype enable_purge: bool + :ivar language_extensions: List of the cluster's language extensions. + :vartype language_extensions: ~azure.mgmt.kusto.models.LanguageExtensionsList + :ivar enable_double_encryption: A boolean value that indicates if double encryption is enabled. + :vartype enable_double_encryption: bool + :ivar public_network_access: Public network access to the cluster is enabled by default. When + disabled, only private endpoint connection to the cluster is allowed. Known values are: + "Enabled", "Disabled", and "SecuredByPerimeter". + :vartype public_network_access: str or ~azure.mgmt.kusto.models.PublicNetworkAccess + :ivar allowed_ip_range_list: The list of ips in the format of CIDR allowed to connect to the + cluster. + :vartype allowed_ip_range_list: list[str] + :ivar engine_type: The engine type. Known values are: "V2" and "V3". + :vartype engine_type: str or ~azure.mgmt.kusto.models.EngineType + :ivar accepted_audiences: The cluster's accepted audiences. + :vartype accepted_audiences: list[~azure.mgmt.kusto.models.AcceptedAudiences] + :ivar enable_auto_stop: A boolean value that indicates if the cluster could be automatically + stopped (due to lack of data or no activity for many days). + :vartype enable_auto_stop: bool + :ivar restrict_outbound_network_access: Whether or not to restrict outbound network access. + Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Known values are: + "Enabled" and "Disabled". + :vartype restrict_outbound_network_access: str or + ~azure.mgmt.kusto.models.ClusterNetworkAccessFlag + :ivar allowed_fqdn_list: List of allowed FQDNs(Fully Qualified Domain Name) for egress from + Cluster. + :vartype allowed_fqdn_list: list[str] + :ivar callout_policies: List of callout policies for egress from Cluster. + :vartype callout_policies: list[~azure.mgmt.kusto.models.CalloutPolicy] + :ivar public_ip_type: Indicates what public IP type to create - IPv4 (default), or DualStack + (both IPv4 and IPv6). Known values are: "IPv4" and "DualStack". + :vartype public_ip_type: str or ~azure.mgmt.kusto.models.PublicIPType + :ivar virtual_cluster_graduation_properties: Virtual Cluster graduation properties. + :vartype virtual_cluster_graduation_properties: str + :ivar private_endpoint_connections: A list of private endpoint connections. + :vartype private_endpoint_connections: list[~azure.mgmt.kusto.models.PrivateEndpointConnection] + :ivar migration_cluster: Properties of the peer cluster involved in a migration to/from this + cluster. + :vartype migration_cluster: ~azure.mgmt.kusto.models.MigrationClusterProperties + :ivar zone_status: Indicates whether the cluster is zonal or non-zonal. Known values are: + "NonZonal", "ZonalInconsistency", and "Zonal". + :vartype zone_status: str or ~azure.mgmt.kusto.models.ZoneStatus + """ + + state: Optional[Union[str, "_models.State"]] = rest_field(visibility=["read"]) + """The state of the resource. Known values are: \"Creating\", \"Unavailable\", \"Running\", + \"Deleting\", \"Deleted\", \"Stopping\", \"Stopped\", \"Starting\", \"Updating\", and + \"Migrated\".""" + provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """The provisioned state of the resource. Known values are: \"Running\", \"Creating\", + \"Deleting\", \"Succeeded\", \"Failed\", \"Moving\", and \"Canceled\".""" + uri: Optional[str] = rest_field(visibility=["read"]) + """The cluster URI.""" + data_ingestion_uri: Optional[str] = rest_field(name="dataIngestionUri", visibility=["read"]) + """The cluster data ingestion URI.""" + state_reason: Optional[str] = rest_field(name="stateReason", visibility=["read"]) + """The reason for the cluster's current state.""" + trusted_external_tenants: Optional[list["_models.TrustedExternalTenant"]] = rest_field( + name="trustedExternalTenants", visibility=["read", "create", "update", "delete", "query"] + ) + """The cluster's external tenants.""" + optimized_autoscale: Optional["_models.OptimizedAutoscale"] = rest_field( + name="optimizedAutoscale", visibility=["read", "create", "update", "delete", "query"] + ) + """Optimized auto scale definition.""" + enable_disk_encryption: Optional[bool] = rest_field( + name="enableDiskEncryption", visibility=["read", "create", "update", "delete", "query"] + ) + """A boolean value that indicates if the cluster's disks are encrypted.""" + enable_streaming_ingest: Optional[bool] = rest_field( + name="enableStreamingIngest", visibility=["read", "create", "update", "delete", "query"] + ) + """A boolean value that indicates if the streaming ingest is enabled.""" + virtual_network_configuration: Optional["_models.VirtualNetworkConfiguration"] = rest_field( + name="virtualNetworkConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """Virtual network definition.""" + key_vault_properties: Optional["_models.KeyVaultProperties"] = rest_field( + name="keyVaultProperties", visibility=["read", "create", "update", "delete", "query"] + ) + """KeyVault properties for the cluster encryption.""" + enable_purge: Optional[bool] = rest_field( + name="enablePurge", visibility=["read", "create", "update", "delete", "query"] + ) + """A boolean value that indicates if the purge operations are enabled.""" + language_extensions: Optional["_models.LanguageExtensionsList"] = rest_field( + name="languageExtensions", visibility=["read", "create", "update", "delete", "query"] + ) + """List of the cluster's language extensions.""" + enable_double_encryption: Optional[bool] = rest_field( + name="enableDoubleEncryption", visibility=["read", "create", "update", "delete", "query"] + ) + """A boolean value that indicates if double encryption is enabled.""" + public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = rest_field( + name="publicNetworkAccess", visibility=["read", "create", "update", "delete", "query"] + ) + """Public network access to the cluster is enabled by default. When disabled, only private + endpoint connection to the cluster is allowed. Known values are: \"Enabled\", \"Disabled\", and + \"SecuredByPerimeter\".""" + allowed_ip_range_list: Optional[list[str]] = rest_field( + name="allowedIpRangeList", visibility=["read", "create", "update", "delete", "query"] + ) + """The list of ips in the format of CIDR allowed to connect to the cluster.""" + engine_type: Optional[Union[str, "_models.EngineType"]] = rest_field( + name="engineType", visibility=["read", "create", "update", "delete", "query"] + ) + """The engine type. Known values are: \"V2\" and \"V3\".""" + accepted_audiences: Optional[list["_models.AcceptedAudiences"]] = rest_field( + name="acceptedAudiences", visibility=["read", "create", "update", "delete", "query"] + ) + """The cluster's accepted audiences.""" + enable_auto_stop: Optional[bool] = rest_field( + name="enableAutoStop", visibility=["read", "create", "update", "delete", "query"] + ) + """A boolean value that indicates if the cluster could be automatically stopped (due to lack of + data or no activity for many days).""" + restrict_outbound_network_access: Optional[Union[str, "_models.ClusterNetworkAccessFlag"]] = rest_field( + name="restrictOutboundNetworkAccess", visibility=["read", "create", "update", "delete", "query"] + ) + """Whether or not to restrict outbound network access. Value is optional but if passed in, must + be 'Enabled' or 'Disabled'. Known values are: \"Enabled\" and \"Disabled\".""" + allowed_fqdn_list: Optional[list[str]] = rest_field( + name="allowedFqdnList", visibility=["read", "create", "update", "delete", "query"] + ) + """List of allowed FQDNs(Fully Qualified Domain Name) for egress from Cluster.""" + callout_policies: Optional[list["_models.CalloutPolicy"]] = rest_field( + name="calloutPolicies", visibility=["read", "create", "update", "delete", "query"] + ) + """List of callout policies for egress from Cluster.""" + public_ip_type: Optional[Union[str, "_models.PublicIPType"]] = rest_field( + name="publicIPType", visibility=["read", "create", "update", "delete", "query"] + ) + """Indicates what public IP type to create - IPv4 (default), or DualStack (both IPv4 and IPv6). + Known values are: \"IPv4\" and \"DualStack\".""" + virtual_cluster_graduation_properties: Optional[str] = rest_field( + name="virtualClusterGraduationProperties", visibility=["create"] + ) + """Virtual Cluster graduation properties.""" + private_endpoint_connections: Optional[list["_models.PrivateEndpointConnection"]] = rest_field( + name="privateEndpointConnections", visibility=["read"] + ) + """A list of private endpoint connections.""" + migration_cluster: Optional["_models.MigrationClusterProperties"] = rest_field( + name="migrationCluster", visibility=["read"] + ) + """Properties of the peer cluster involved in a migration to/from this cluster.""" + zone_status: Optional[Union[str, "_models.ZoneStatus"]] = rest_field(name="zoneStatus", visibility=["read"]) + """Indicates whether the cluster is zonal or non-zonal. Known values are: \"NonZonal\", + \"ZonalInconsistency\", and \"Zonal\".""" + + @overload + def __init__( # pylint: disable=too-many-locals + self, + *, + trusted_external_tenants: Optional[list["_models.TrustedExternalTenant"]] = None, + optimized_autoscale: Optional["_models.OptimizedAutoscale"] = None, + enable_disk_encryption: Optional[bool] = None, + enable_streaming_ingest: Optional[bool] = None, + virtual_network_configuration: Optional["_models.VirtualNetworkConfiguration"] = None, + key_vault_properties: Optional["_models.KeyVaultProperties"] = None, + enable_purge: Optional[bool] = None, + language_extensions: Optional["_models.LanguageExtensionsList"] = None, + enable_double_encryption: Optional[bool] = None, + public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = None, + allowed_ip_range_list: Optional[list[str]] = None, + engine_type: Optional[Union[str, "_models.EngineType"]] = None, + accepted_audiences: Optional[list["_models.AcceptedAudiences"]] = None, + enable_auto_stop: Optional[bool] = None, + restrict_outbound_network_access: Optional[Union[str, "_models.ClusterNetworkAccessFlag"]] = None, + allowed_fqdn_list: Optional[list[str]] = None, + callout_policies: Optional[list["_models.CalloutPolicy"]] = None, + public_ip_type: Optional[Union[str, "_models.PublicIPType"]] = None, + virtual_cluster_graduation_properties: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ClusterUpdate(Resource): + """Class representing an update to a Kusto cluster. + + :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 system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.kusto.models.SystemData + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: Resource location. + :vartype location: str + :ivar sku: The SKU of the cluster. + :vartype sku: ~azure.mgmt.kusto.models.AzureSku + :ivar zones: The availability zones of the cluster. + :vartype zones: list[str] + :ivar identity: The identity of the cluster, if configured. + :vartype identity: ~azure.mgmt.kusto.models.Identity + :ivar properties: The cluster properties. + :vartype properties: ~azure.mgmt.kusto.models.ClusterProperties + """ + + tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update"]) + """Resource tags.""" + location: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Resource location.""" + sku: Optional["_models.AzureSku"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The SKU of the cluster.""" + zones: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The availability zones of the cluster.""" + identity: Optional["_models.Identity"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The identity of the cluster, if configured.""" + properties: Optional["_models.ClusterProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The cluster properties.""" + + __flattened_items = [ + "state", + "provisioning_state", + "uri", + "data_ingestion_uri", + "state_reason", + "trusted_external_tenants", + "optimized_autoscale", + "enable_disk_encryption", + "enable_streaming_ingest", + "virtual_network_configuration", + "key_vault_properties", + "enable_purge", + "language_extensions", + "enable_double_encryption", + "public_network_access", + "allowed_ip_range_list", + "engine_type", + "accepted_audiences", + "enable_auto_stop", + "restrict_outbound_network_access", + "allowed_fqdn_list", + "callout_policies", + "public_ip_type", + "virtual_cluster_graduation_properties", + "private_endpoint_connections", + "migration_cluster", + "zone_status", + ] + + @overload + def __init__( + self, + *, + tags: Optional[dict[str, str]] = None, + location: Optional[str] = None, + sku: Optional["_models.AzureSku"] = None, + zones: Optional[list[str]] = None, + identity: Optional["_models.Identity"] = None, + properties: Optional["_models.ClusterProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties( + _Model +): # pylint: disable=name-too-long + """ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties. + + :ivar principal_id: The principal id of user assigned identity. + :vartype principal_id: str + :ivar client_id: The client id of user assigned identity. + :vartype client_id: str + """ + + principal_id: Optional[str] = rest_field(name="principalId", visibility=["read"]) + """The principal id of user assigned identity.""" + client_id: Optional[str] = rest_field(name="clientId", visibility=["read"]) + """The client id of user assigned identity.""" + + +class DataConnection(ProxyResource): + """Class representing an data connection. + + You probably want to use the sub-classes and not this class directly. Known sub-classes are: + CosmosDbDataConnection, EventGridDataConnection, EventGridDataConnectionWithManagedIdentity, + EventHubDataConnection, EventHubDataConnectionWithManagedIdentity, IotHubDataConnection + + :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 system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.kusto.models.SystemData + :ivar location: Resource location. + :vartype location: str + :ivar kind: Kind of the endpoint for the data connection. Required. Known values are: + "EventHub", "EventGrid", "IotHub", "CosmosDb", "EventHubWithManagedIdentity", and + "EventGridWithManagedIdentity". + :vartype kind: str or ~azure.mgmt.kusto.models.DataConnectionKind + """ + + __mapping__: dict[str, _Model] = {} + location: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Resource location.""" + kind: str = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) + """Kind of the endpoint for the data connection. Required. Known values are: \"EventHub\", + \"EventGrid\", \"IotHub\", \"CosmosDb\", \"EventHubWithManagedIdentity\", and + \"EventGridWithManagedIdentity\".""" + + @overload + def __init__( + self, + *, + kind: str, + location: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CosmosDbDataConnection(DataConnection, discriminator="CosmosDb"): + """Class representing a CosmosDb data connection. + + :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 system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.kusto.models.SystemData + :ivar location: Resource location. + :vartype location: str + :ivar properties: The properties of the CosmosDb data connection. + :vartype properties: ~azure.mgmt.kusto.models.CosmosDbDataConnectionProperties + :ivar kind: Kind of the endpoint for the data connection. Required. CosmosDb. + :vartype kind: str or ~azure.mgmt.kusto.models.COSMOS_DB + """ + + properties: Optional["_models.CosmosDbDataConnectionProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The properties of the CosmosDb data connection.""" + kind: Literal[DataConnectionKind.COSMOS_DB] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """Kind of the endpoint for the data connection. Required. CosmosDb.""" + + __flattened_items = [ + "table_name", + "mapping_rule_name", + "managed_identity_resource_id", + "managed_identity_object_id", + "cosmos_db_account_resource_id", + "cosmos_db_database", + "cosmos_db_container", + "retrieval_start_date", + "provisioning_state", + ] + + @overload + def __init__( + self, + *, + location: Optional[str] = None, + properties: Optional["_models.CosmosDbDataConnectionProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class CosmosDbDataConnectionProperties(_Model): + """Class representing the Kusto CosmosDb data connection properties. + + :ivar table_name: The case-sensitive name of the existing target table in your cluster. + Retrieved data is ingested into this table. Required. + :vartype table_name: str + :ivar mapping_rule_name: The name of an existing mapping rule to use when ingesting the + retrieved data. + :vartype mapping_rule_name: str + :ivar managed_identity_resource_id: The resource ID of a managed system or user-assigned + identity. The identity is used to authenticate with Cosmos DB. Required. + :vartype managed_identity_resource_id: str + :ivar managed_identity_object_id: The object ID of the managed identity resource. + :vartype managed_identity_object_id: str + :ivar cosmos_db_account_resource_id: The resource ID of the Cosmos DB account used to create + the data connection. Required. + :vartype cosmos_db_account_resource_id: str + :ivar cosmos_db_database: The name of an existing database in the Cosmos DB account. Required. + :vartype cosmos_db_database: str + :ivar cosmos_db_container: The name of an existing container in the Cosmos DB database. + Required. + :vartype cosmos_db_container: str + :ivar retrieval_start_date: Optional. If defined, the data connection retrieves Cosmos DB + documents created or updated after the specified retrieval start date. + :vartype retrieval_start_date: ~datetime.datetime + :ivar provisioning_state: The provisioned state of the resource. Known values are: "Running", + "Creating", "Deleting", "Succeeded", "Failed", "Moving", and "Canceled". + :vartype provisioning_state: str or ~azure.mgmt.kusto.models.ProvisioningState + """ + + table_name: str = rest_field(name="tableName", visibility=["read", "create", "update", "delete", "query"]) + """The case-sensitive name of the existing target table in your cluster. Retrieved data is + ingested into this table. Required.""" + mapping_rule_name: Optional[str] = rest_field( + name="mappingRuleName", visibility=["read", "create", "update", "delete", "query"] + ) + """The name of an existing mapping rule to use when ingesting the retrieved data.""" + managed_identity_resource_id: str = rest_field( + name="managedIdentityResourceId", visibility=["read", "create", "update", "delete", "query"] + ) + """The resource ID of a managed system or user-assigned identity. The identity is used to + authenticate with Cosmos DB. Required.""" + managed_identity_object_id: Optional[str] = rest_field(name="managedIdentityObjectId", visibility=["read"]) + """The object ID of the managed identity resource.""" + cosmos_db_account_resource_id: str = rest_field( + name="cosmosDbAccountResourceId", visibility=["read", "create", "update", "delete", "query"] + ) + """The resource ID of the Cosmos DB account used to create the data connection. Required.""" + cosmos_db_database: str = rest_field( + name="cosmosDbDatabase", visibility=["read", "create", "update", "delete", "query"] + ) + """The name of an existing database in the Cosmos DB account. Required.""" + cosmos_db_container: str = rest_field( + name="cosmosDbContainer", visibility=["read", "create", "update", "delete", "query"] + ) + """The name of an existing container in the Cosmos DB database. Required.""" + retrieval_start_date: Optional[datetime.datetime] = rest_field( + name="retrievalStartDate", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """Optional. If defined, the data connection retrieves Cosmos DB documents created or updated + after the specified retrieval start date.""" + provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """The provisioned state of the resource. Known values are: \"Running\", \"Creating\", + \"Deleting\", \"Succeeded\", \"Failed\", \"Moving\", and \"Canceled\".""" + + @overload + def __init__( + self, + *, + table_name: str, + managed_identity_resource_id: str, + cosmos_db_account_resource_id: str, + cosmos_db_database: str, + cosmos_db_container: str, + mapping_rule_name: Optional[str] = None, + retrieval_start_date: Optional[datetime.datetime] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class Database(ProxyResource): + """Class representing a Kusto database. + + You probably want to use the sub-classes and not this class directly. Known sub-classes are: + ReadOnlyFollowingDatabase, ReadWriteDatabase + + :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 system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.kusto.models.SystemData + :ivar location: Resource location. + :vartype location: str + :ivar kind: Kind of the database. Required. Known values are: "ReadWrite" and + "ReadOnlyFollowing". + :vartype kind: str or ~azure.mgmt.kusto.models.Kind + """ + + __mapping__: dict[str, _Model] = {} + location: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Resource location.""" + kind: str = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) + """Kind of the database. Required. Known values are: \"ReadWrite\" and \"ReadOnlyFollowing\".""" + + @overload + def __init__( + self, + *, + kind: str, + location: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class DatabaseInviteFollowerRequest(_Model): + """The request to invite a follower to a database. + + :ivar invitee_email: The email of the invited user for which the follower invitation is + generated. Required. + :vartype invitee_email: str + :ivar table_level_sharing_properties: Table level sharing specifications. + :vartype table_level_sharing_properties: ~azure.mgmt.kusto.models.TableLevelSharingProperties + """ + + invitee_email: str = rest_field(name="inviteeEmail", visibility=["read", "create", "update", "delete", "query"]) + """The email of the invited user for which the follower invitation is generated. Required.""" + table_level_sharing_properties: Optional["_models.TableLevelSharingProperties"] = rest_field( + name="tableLevelSharingProperties", visibility=["read", "create", "update", "delete", "query"] + ) + """Table level sharing specifications.""" + + @overload + def __init__( + self, + *, + invitee_email: str, + table_level_sharing_properties: Optional["_models.TableLevelSharingProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class DatabaseInviteFollowerResult(_Model): + """The result returned from a follower invitation generation request. + + :ivar generated_invitation: The generated invitation token. + :vartype generated_invitation: str + """ + + generated_invitation: Optional[str] = rest_field( + name="generatedInvitation", visibility=["read", "create", "update", "delete", "query"] + ) + """The generated invitation token.""" + + @overload + def __init__( + self, + *, + generated_invitation: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class DatabasePrincipal(_Model): + """A class representing database principal entity. + + :ivar role: Database principal role. Required. Known values are: "Admin", "Ingestor", + "Monitor", "User", "UnrestrictedViewer", and "Viewer". + :vartype role: str or ~azure.mgmt.kusto.models.DatabasePrincipalRole + :ivar name: Database principal name. Required. + :vartype name: str + :ivar type: Database principal type. Required. Known values are: "App", "Group", and "User". + :vartype type: str or ~azure.mgmt.kusto.models.DatabasePrincipalType + :ivar fqn: Database principal fully qualified name. + :vartype fqn: str + :ivar email: Database principal email if exists. + :vartype email: str + :ivar app_id: Application id - relevant only for application principal type. + :vartype app_id: str + :ivar tenant_name: The tenant name of the principal. + :vartype tenant_name: str + """ + + role: Union[str, "_models.DatabasePrincipalRole"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Database principal role. Required. Known values are: \"Admin\", \"Ingestor\", \"Monitor\", + \"User\", \"UnrestrictedViewer\", and \"Viewer\".""" + name: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Database principal name. Required.""" + type: Union[str, "_models.DatabasePrincipalType"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Database principal type. Required. Known values are: \"App\", \"Group\", and \"User\".""" + fqn: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Database principal fully qualified name.""" + email: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Database principal email if exists.""" + app_id: Optional[str] = rest_field(name="appId", visibility=["read", "create", "update", "delete", "query"]) + """Application id - relevant only for application principal type.""" + tenant_name: Optional[str] = rest_field(name="tenantName", visibility=["read"]) + """The tenant name of the principal.""" + + @overload + def __init__( + self, + *, + role: Union[str, "_models.DatabasePrincipalRole"], + name: str, + type: Union[str, "_models.DatabasePrincipalType"], + fqn: Optional[str] = None, + email: Optional[str] = None, + app_id: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class DatabasePrincipalAssignment(ProxyResource): + """Class representing a database principal assignment. + + :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 system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.kusto.models.SystemData + :ivar properties: The database principal. + :vartype properties: ~azure.mgmt.kusto.models.DatabasePrincipalProperties + """ + + properties: Optional["_models.DatabasePrincipalProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The database principal.""" + + __flattened_items = [ + "principal_id", + "role", + "tenant_id", + "principal_type", + "tenant_name", + "principal_name", + "provisioning_state", + "aad_object_id", + ] + + @overload + def __init__( + self, + *, + properties: Optional["_models.DatabasePrincipalProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class DatabasePrincipalAssignmentCheckNameRequest(_Model): # pylint: disable=name-too-long + """A principal assignment check name availability request. + + :ivar name: Principal Assignment resource name. Required. + :vartype name: str + :ivar type: The type of resource, Microsoft.Kusto/clusters/databases/principalAssignments. + Required. Default value is "Microsoft.Kusto/clusters/databases/principalAssignments". + :vartype type: str + """ + + name: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Principal Assignment resource name. Required.""" + type: Literal["Microsoft.Kusto/clusters/databases/principalAssignments"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The type of resource, Microsoft.Kusto/clusters/databases/principalAssignments. Required. + Default value is \"Microsoft.Kusto/clusters/databases/principalAssignments\".""" + + @overload + def __init__( + self, + *, + name: str, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.type: Literal["Microsoft.Kusto/clusters/databases/principalAssignments"] = ( + "Microsoft.Kusto/clusters/databases/principalAssignments" + ) + + +class DatabasePrincipalListRequest(_Model): + """The list Kusto database principals operation request. + + :ivar value: The list of Kusto database principals. + :vartype value: list[~azure.mgmt.kusto.models.DatabasePrincipal] + """ + + value: Optional[list["_models.DatabasePrincipal"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The list of Kusto database principals.""" + + @overload + def __init__( + self, + *, + value: Optional[list["_models.DatabasePrincipal"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class DatabasePrincipalListResult(_Model): + """The list Kusto database principals operation response. + + :ivar value: The list of Kusto database principals. + :vartype value: list[~azure.mgmt.kusto.models.DatabasePrincipal] + :ivar next_link: Link to the next page of results. + :vartype next_link: str + """ + + value: Optional[list["_models.DatabasePrincipal"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The list of Kusto database principals.""" + next_link: Optional[str] = rest_field(name="nextLink", visibility=["read", "create", "update", "delete", "query"]) + """Link to the next page of results.""" + + @overload + def __init__( + self, + *, + value: Optional[list["_models.DatabasePrincipal"]] = None, + next_link: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class DatabasePrincipalProperties(_Model): + """A class representing database principal property. + + :ivar principal_id: The principal ID assigned to the database principal. It can be a user + email, application ID, or security group name. Required. + :vartype principal_id: str + :ivar role: Database principal role. Required. Known values are: "Admin", "Ingestor", + "Monitor", "User", "UnrestrictedViewer", and "Viewer". + :vartype role: str or ~azure.mgmt.kusto.models.DatabasePrincipalRole + :ivar tenant_id: The tenant id of the principal. + :vartype tenant_id: str + :ivar principal_type: Principal type. Required. Known values are: "App", "Group", and "User". + :vartype principal_type: str or ~azure.mgmt.kusto.models.PrincipalType + :ivar tenant_name: The tenant name of the principal. + :vartype tenant_name: str + :ivar principal_name: The principal name. + :vartype principal_name: str + :ivar provisioning_state: The provisioned state of the resource. Known values are: "Running", + "Creating", "Deleting", "Succeeded", "Failed", "Moving", and "Canceled". + :vartype provisioning_state: str or ~azure.mgmt.kusto.models.ProvisioningState + :ivar aad_object_id: The service principal object id in AAD (Azure active directory). + :vartype aad_object_id: str + """ + + principal_id: str = rest_field(name="principalId", visibility=["read", "create", "update", "delete", "query"]) + """The principal ID assigned to the database principal. It can be a user email, application ID, or + security group name. Required.""" + role: Union[str, "_models.DatabasePrincipalRole"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Database principal role. Required. Known values are: \"Admin\", \"Ingestor\", \"Monitor\", + \"User\", \"UnrestrictedViewer\", and \"Viewer\".""" + tenant_id: Optional[str] = rest_field(name="tenantId", visibility=["read", "create", "update", "delete", "query"]) + """The tenant id of the principal.""" + principal_type: Union[str, "_models.PrincipalType"] = rest_field( + name="principalType", visibility=["read", "create", "update", "delete", "query"] + ) + """Principal type. Required. Known values are: \"App\", \"Group\", and \"User\".""" + tenant_name: Optional[str] = rest_field(name="tenantName", visibility=["read"]) + """The tenant name of the principal.""" + principal_name: Optional[str] = rest_field(name="principalName", visibility=["read"]) + """The principal name.""" + provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """The provisioned state of the resource. Known values are: \"Running\", \"Creating\", + \"Deleting\", \"Succeeded\", \"Failed\", \"Moving\", and \"Canceled\".""" + aad_object_id: Optional[str] = rest_field(name="aadObjectId", visibility=["read"]) + """The service principal object id in AAD (Azure active directory).""" + + @overload + def __init__( + self, + *, + principal_id: str, + role: Union[str, "_models.DatabasePrincipalRole"], + principal_type: Union[str, "_models.PrincipalType"], + tenant_id: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class DatabaseStatistics(_Model): + """A class that contains database statistics information. + + :ivar size: The database size - the total size of compressed data and index in bytes. + :vartype size: float + """ + + size: Optional[float] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The database size - the total size of compressed data and index in bytes.""" + + @overload + def __init__( + self, + *, + size: Optional[float] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class DataConnectionCheckNameRequest(_Model): + """A data connection check name availability request. + + :ivar name: Data Connection name. Required. + :vartype name: str + :ivar type: The type of resource, Microsoft.Kusto/clusters/databases/dataConnections. Required. + Default value is "Microsoft.Kusto/clusters/databases/dataConnections". + :vartype type: str + """ + + name: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Data Connection name. Required.""" + type: Literal["Microsoft.Kusto/clusters/databases/dataConnections"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The type of resource, Microsoft.Kusto/clusters/databases/dataConnections. Required. Default + value is \"Microsoft.Kusto/clusters/databases/dataConnections\".""" + + @overload + def __init__( + self, + *, + name: str, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.type: Literal["Microsoft.Kusto/clusters/databases/dataConnections"] = ( + "Microsoft.Kusto/clusters/databases/dataConnections" + ) + + +class DataConnectionValidation(_Model): + """Class representing an data connection validation. + + :ivar data_connection_name: The name of the data connection. + :vartype data_connection_name: str + :ivar properties: The data connection properties to validate. + :vartype properties: ~azure.mgmt.kusto.models.DataConnection + """ + + data_connection_name: Optional[str] = rest_field( + name="dataConnectionName", visibility=["read", "create", "update", "delete", "query"] + ) + """The name of the data connection.""" + properties: Optional["_models.DataConnection"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The data connection properties to validate.""" + + @overload + def __init__( + self, + *, + data_connection_name: Optional[str] = None, + properties: Optional["_models.DataConnection"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class DataConnectionValidationListResult(_Model): + """The list Kusto data connection validation result. + + :ivar value: The list of Kusto data connection validation errors. + :vartype value: list[~azure.mgmt.kusto.models.DataConnectionValidationResult] + """ + + value: Optional[list["_models.DataConnectionValidationResult"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The list of Kusto data connection validation errors.""" + + @overload + def __init__( + self, + *, + value: Optional[list["_models.DataConnectionValidationResult"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class DataConnectionValidationResult(_Model): + """The result returned from a data connection validation request. + + :ivar error_message: A message which indicates a problem in data connection validation. + :vartype error_message: str + """ + + error_message: Optional[str] = rest_field( + name="errorMessage", visibility=["read", "create", "update", "delete", "query"] + ) + """A message which indicates a problem in data connection validation.""" + + @overload + def __init__( + self, + *, + error_message: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class DiagnoseVirtualNetworkResult(_Model): + """DiagnoseVirtualNetworkResult. + + :ivar findings: The list of network connectivity diagnostic finding. + :vartype findings: list[str] + """ + + findings: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The list of network connectivity diagnostic finding.""" + + @overload + def __init__( + self, + *, + findings: Optional[list[str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class EndpointDependency(_Model): + """A domain name that a service is reached at, including details of the current connection status. + + :ivar domain_name: The domain name of the dependency. + :vartype domain_name: str + :ivar endpoint_details: The ports used when connecting to DomainName. + :vartype endpoint_details: list[~azure.mgmt.kusto.models.EndpointDetail] + """ + + domain_name: Optional[str] = rest_field( + name="domainName", visibility=["read", "create", "update", "delete", "query"] + ) + """The domain name of the dependency.""" + endpoint_details: Optional[list["_models.EndpointDetail"]] = rest_field( + name="endpointDetails", visibility=["read", "create", "update", "delete", "query"] + ) + """The ports used when connecting to DomainName.""" + + @overload + def __init__( + self, + *, + domain_name: Optional[str] = None, + endpoint_details: Optional[list["_models.EndpointDetail"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class EndpointDetail(_Model): + """Current TCP connectivity information from the Kusto cluster to a single endpoint. + + :ivar port: The port an endpoint is connected to. + :vartype port: int + :ivar ip_address: The ip address of the endpoint. + :vartype ip_address: str + """ + + port: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The port an endpoint is connected to.""" + ip_address: Optional[str] = rest_field(name="ipAddress", visibility=["read", "create", "update", "delete", "query"]) + """The ip address of the endpoint.""" + + @overload + def __init__( + self, + *, + port: Optional[int] = None, + ip_address: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ErrorAdditionalInfo(_Model): + """The resource management error additional info. + + :ivar type: The additional info type. + :vartype type: str + :ivar info: The additional info. + :vartype info: any + """ + + type: Optional[str] = rest_field(visibility=["read"]) + """The additional info type.""" + info: Optional[Any] = rest_field(visibility=["read"]) + """The additional info.""" + + +class ErrorDetail(_Model): + """The error detail. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + :ivar target: The error target. + :vartype target: str + :ivar details: The error details. + :vartype details: list[~azure.mgmt.kusto.models.ErrorDetail] + :ivar additional_info: The error additional info. + :vartype additional_info: list[~azure.mgmt.kusto.models.ErrorAdditionalInfo] + """ + + code: Optional[str] = rest_field(visibility=["read"]) + """The error code.""" + message: Optional[str] = rest_field(visibility=["read"]) + """The error message.""" + target: Optional[str] = rest_field(visibility=["read"]) + """The error target.""" + details: Optional[list["_models.ErrorDetail"]] = rest_field(visibility=["read"]) + """The error details.""" + additional_info: Optional[list["_models.ErrorAdditionalInfo"]] = rest_field( + name="additionalInfo", visibility=["read"] + ) + """The error additional info.""" + + +class ErrorResponse(_Model): + """Error response. + + :ivar error: The error object. + :vartype error: ~azure.mgmt.kusto.models.ErrorDetail + """ + + error: Optional["_models.ErrorDetail"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The error object.""" + + @overload + def __init__( + self, + *, + error: Optional["_models.ErrorDetail"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class EventGridConnectionProperties(_Model): + """Class representing the Kusto event grid connection properties. + + :ivar storage_account_resource_id: The resource ID of the storage account where the data + resides. Required. + :vartype storage_account_resource_id: str + :ivar event_grid_resource_id: The resource ID of the event grid that is subscribed to the + storage account events. + :vartype event_grid_resource_id: str + :ivar event_hub_resource_id: The resource ID where the event grid is configured to send events. + Required. + :vartype event_hub_resource_id: str + :ivar consumer_group: The event hub consumer group. Required. + :vartype consumer_group: str + :ivar table_name: The table where the data should be ingested. Optionally the table information + can be added to each message. + :vartype table_name: str + :ivar mapping_rule_name: The mapping rule to be used to ingest the data. Optionally the mapping + information can be added to each message. + :vartype mapping_rule_name: str + :ivar data_format: The data format of the message. Optionally the data format can be added to + each message. Known values are: "MULTIJSON", "JSON", "CSV", "TSV", "SCSV", "SOHSV", "PSV", + "TXT", "RAW", "SINGLEJSON", "AVRO", "TSVE", "PARQUET", "ORC", "APACHEAVRO", "W3CLOGFILE", and + "AZMONSTREAM". + :vartype data_format: str or ~azure.mgmt.kusto.models.EventGridDataFormat + :ivar ignore_first_record: A Boolean value that, if set to true, indicates that ingestion + should ignore the first record of every file. + :vartype ignore_first_record: bool + :ivar blob_storage_event_type: The name of blob storage event type to process. Known values + are: "Microsoft.Storage.BlobCreated" and "Microsoft.Storage.BlobRenamed". + :vartype blob_storage_event_type: str or ~azure.mgmt.kusto.models.BlobStorageEventType + :ivar managed_identity_resource_id: The resource ID of a managed identity (system or user + assigned) to be used to authenticate with event hub and storage account. + :vartype managed_identity_resource_id: str + :ivar managed_identity_object_id: The object ID of managedIdentityResourceId. + :vartype managed_identity_object_id: str + :ivar database_routing: Indication for database routing information from the data connection, + by default only database routing information is allowed. Known values are: "Single" and + "Multi". + :vartype database_routing: str or ~azure.mgmt.kusto.models.DatabaseRouting + :ivar provisioning_state: The provisioned state of the resource. Known values are: "Running", + "Creating", "Deleting", "Succeeded", "Failed", "Moving", and "Canceled". + :vartype provisioning_state: str or ~azure.mgmt.kusto.models.ProvisioningState + """ + + storage_account_resource_id: str = rest_field( + name="storageAccountResourceId", visibility=["read", "create", "update", "delete", "query"] + ) + """The resource ID of the storage account where the data resides. Required.""" + event_grid_resource_id: Optional[str] = rest_field( + name="eventGridResourceId", visibility=["read", "create", "update", "delete", "query"] + ) + """The resource ID of the event grid that is subscribed to the storage account events.""" + event_hub_resource_id: str = rest_field( + name="eventHubResourceId", visibility=["read", "create", "update", "delete", "query"] + ) + """The resource ID where the event grid is configured to send events. Required.""" + consumer_group: str = rest_field(name="consumerGroup", visibility=["read", "create", "update", "delete", "query"]) + """The event hub consumer group. Required.""" + table_name: Optional[str] = rest_field(name="tableName", visibility=["read", "create", "update", "delete", "query"]) + """The table where the data should be ingested. Optionally the table information can be added to + each message.""" + mapping_rule_name: Optional[str] = rest_field( + name="mappingRuleName", visibility=["read", "create", "update", "delete", "query"] + ) + """The mapping rule to be used to ingest the data. Optionally the mapping information can be added + to each message.""" + data_format: Optional[Union[str, "_models.EventGridDataFormat"]] = rest_field( + name="dataFormat", visibility=["read", "create", "update", "delete", "query"] + ) + """The data format of the message. Optionally the data format can be added to each message. Known + values are: \"MULTIJSON\", \"JSON\", \"CSV\", \"TSV\", \"SCSV\", \"SOHSV\", \"PSV\", \"TXT\", + \"RAW\", \"SINGLEJSON\", \"AVRO\", \"TSVE\", \"PARQUET\", \"ORC\", \"APACHEAVRO\", + \"W3CLOGFILE\", and \"AZMONSTREAM\".""" + ignore_first_record: Optional[bool] = rest_field( + name="ignoreFirstRecord", visibility=["read", "create", "update", "delete", "query"] + ) + """A Boolean value that, if set to true, indicates that ingestion should ignore the first record + of every file.""" + blob_storage_event_type: Optional[Union[str, "_models.BlobStorageEventType"]] = rest_field( + name="blobStorageEventType", visibility=["read", "create", "update", "delete", "query"] + ) + """The name of blob storage event type to process. Known values are: + \"Microsoft.Storage.BlobCreated\" and \"Microsoft.Storage.BlobRenamed\".""" + managed_identity_resource_id: Optional[str] = rest_field( + name="managedIdentityResourceId", visibility=["read", "create", "update", "delete", "query"] + ) + """The resource ID of a managed identity (system or user assigned) to be used to authenticate with + event hub and storage account.""" + managed_identity_object_id: Optional[str] = rest_field(name="managedIdentityObjectId", visibility=["read"]) + """The object ID of managedIdentityResourceId.""" + database_routing: Optional[Union[str, "_models.DatabaseRouting"]] = rest_field( + name="databaseRouting", visibility=["read", "create", "update", "delete", "query"] + ) + """Indication for database routing information from the data connection, by default only database + routing information is allowed. Known values are: \"Single\" and \"Multi\".""" + provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """The provisioned state of the resource. Known values are: \"Running\", \"Creating\", + \"Deleting\", \"Succeeded\", \"Failed\", \"Moving\", and \"Canceled\".""" + + @overload + def __init__( + self, + *, + storage_account_resource_id: str, + event_hub_resource_id: str, + consumer_group: str, + event_grid_resource_id: Optional[str] = None, + table_name: Optional[str] = None, + mapping_rule_name: Optional[str] = None, + data_format: Optional[Union[str, "_models.EventGridDataFormat"]] = None, + ignore_first_record: Optional[bool] = None, + blob_storage_event_type: Optional[Union[str, "_models.BlobStorageEventType"]] = None, + managed_identity_resource_id: Optional[str] = None, + database_routing: Optional[Union[str, "_models.DatabaseRouting"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class EventGridConnectionWithManagedIdentityProperties(_Model): # pylint: disable=name-too-long + """Class representing the Kusto event grid connection with mandatory managed identity properties. + + :ivar storage_account_resource_id_for_managed_identity: The resource ID of the storage account + where the data resides. Required. + :vartype storage_account_resource_id_for_managed_identity: str + :ivar event_hub_resource_id_for_managed_identity: The resource ID of the event hub that is + subscribed to the storage account events. Required. + :vartype event_hub_resource_id_for_managed_identity: str + :ivar event_grid_resource_id: The resource ID where the event grid is configured to send + events. + :vartype event_grid_resource_id: str + :ivar consumer_group: The event hub consumer group. Required. + :vartype consumer_group: str + :ivar table_name: The table where the data should be ingested. Optionally the table information + can be added to each message. + :vartype table_name: str + :ivar mapping_rule_name: The mapping rule to be used to ingest the data. Optionally the mapping + information can be added to each message. + :vartype mapping_rule_name: str + :ivar data_format: The data format of the message. Optionally the data format can be added to + each message. Known values are: "MULTIJSON", "JSON", "CSV", "TSV", "SCSV", "SOHSV", "PSV", + "TXT", "RAW", "SINGLEJSON", "AVRO", "TSVE", "PARQUET", "ORC", "APACHEAVRO", "W3CLOGFILE", and + "AZMONSTREAM". + :vartype data_format: str or ~azure.mgmt.kusto.models.EventGridDataFormat + :ivar ignore_first_record: A Boolean value that, if set to true, indicates that ingestion + should ignore the first record of every file. + :vartype ignore_first_record: bool + :ivar blob_storage_event_type: The name of blob storage event type to process. Known values + are: "Microsoft.Storage.BlobCreated" and "Microsoft.Storage.BlobRenamed". + :vartype blob_storage_event_type: str or ~azure.mgmt.kusto.models.BlobStorageEventType + :ivar managed_identity_resource_id: The resource ID of a managed identity (system or user + assigned) to be used to authenticate with event hub and storage account. Required. + :vartype managed_identity_resource_id: str + :ivar managed_identity_object_id: The object ID of managedIdentityResourceId. + :vartype managed_identity_object_id: str + :ivar database_routing: Indication for database routing information from the data connection, + by default only database routing information is allowed. Known values are: "Single" and + "Multi". + :vartype database_routing: str or ~azure.mgmt.kusto.models.DatabaseRouting + :ivar provisioning_state: The provisioned state of the resource. Known values are: "Running", + "Creating", "Deleting", "Succeeded", "Failed", "Moving", and "Canceled". + :vartype provisioning_state: str or ~azure.mgmt.kusto.models.ProvisioningState + """ + + storage_account_resource_id_for_managed_identity: str = rest_field( + name="storageAccountResourceIdForManagedIdentity", visibility=["read", "create", "update", "delete", "query"] + ) + """The resource ID of the storage account where the data resides. Required.""" + event_hub_resource_id_for_managed_identity: str = rest_field( + name="eventHubResourceIdForManagedIdentity", visibility=["read", "create", "update", "delete", "query"] + ) + """The resource ID of the event hub that is subscribed to the storage account events. Required.""" + event_grid_resource_id: Optional[str] = rest_field( + name="eventGridResourceId", visibility=["read", "create", "update", "delete", "query"] + ) + """The resource ID where the event grid is configured to send events.""" + consumer_group: str = rest_field(name="consumerGroup", visibility=["read", "create", "update", "delete", "query"]) + """The event hub consumer group. Required.""" + table_name: Optional[str] = rest_field(name="tableName", visibility=["read", "create", "update", "delete", "query"]) + """The table where the data should be ingested. Optionally the table information can be added to + each message.""" + mapping_rule_name: Optional[str] = rest_field( + name="mappingRuleName", visibility=["read", "create", "update", "delete", "query"] + ) + """The mapping rule to be used to ingest the data. Optionally the mapping information can be added + to each message.""" + data_format: Optional[Union[str, "_models.EventGridDataFormat"]] = rest_field( + name="dataFormat", visibility=["read", "create", "update", "delete", "query"] + ) + """The data format of the message. Optionally the data format can be added to each message. Known + values are: \"MULTIJSON\", \"JSON\", \"CSV\", \"TSV\", \"SCSV\", \"SOHSV\", \"PSV\", \"TXT\", + \"RAW\", \"SINGLEJSON\", \"AVRO\", \"TSVE\", \"PARQUET\", \"ORC\", \"APACHEAVRO\", + \"W3CLOGFILE\", and \"AZMONSTREAM\".""" + ignore_first_record: Optional[bool] = rest_field( + name="ignoreFirstRecord", visibility=["read", "create", "update", "delete", "query"] + ) + """A Boolean value that, if set to true, indicates that ingestion should ignore the first record + of every file.""" + blob_storage_event_type: Optional[Union[str, "_models.BlobStorageEventType"]] = rest_field( + name="blobStorageEventType", visibility=["read", "create", "update", "delete", "query"] + ) + """The name of blob storage event type to process. Known values are: + \"Microsoft.Storage.BlobCreated\" and \"Microsoft.Storage.BlobRenamed\".""" + managed_identity_resource_id: str = rest_field( + name="managedIdentityResourceId", visibility=["read", "create", "update", "delete", "query"] + ) + """The resource ID of a managed identity (system or user assigned) to be used to authenticate with + event hub and storage account. Required.""" + managed_identity_object_id: Optional[str] = rest_field(name="managedIdentityObjectId", visibility=["read"]) + """The object ID of managedIdentityResourceId.""" + database_routing: Optional[Union[str, "_models.DatabaseRouting"]] = rest_field( + name="databaseRouting", visibility=["read", "create", "update", "delete", "query"] + ) + """Indication for database routing information from the data connection, by default only database + routing information is allowed. Known values are: \"Single\" and \"Multi\".""" + provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """The provisioned state of the resource. Known values are: \"Running\", \"Creating\", + \"Deleting\", \"Succeeded\", \"Failed\", \"Moving\", and \"Canceled\".""" + + @overload + def __init__( + self, + *, + storage_account_resource_id_for_managed_identity: str, + event_hub_resource_id_for_managed_identity: str, + consumer_group: str, + managed_identity_resource_id: str, + event_grid_resource_id: Optional[str] = None, + table_name: Optional[str] = None, + mapping_rule_name: Optional[str] = None, + data_format: Optional[Union[str, "_models.EventGridDataFormat"]] = None, + ignore_first_record: Optional[bool] = None, + blob_storage_event_type: Optional[Union[str, "_models.BlobStorageEventType"]] = None, + database_routing: Optional[Union[str, "_models.DatabaseRouting"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class EventGridDataConnection(DataConnection, discriminator="EventGrid"): + """Class representing an Event Grid data connection. + + :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 system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.kusto.models.SystemData + :ivar location: Resource location. + :vartype location: str + :ivar properties: The properties of the Event Grid data connection. + :vartype properties: ~azure.mgmt.kusto.models.EventGridConnectionProperties + :ivar kind: Kind of the endpoint for the data connection. Required. EventGrid. + :vartype kind: str or ~azure.mgmt.kusto.models.EVENT_GRID + """ + + properties: Optional["_models.EventGridConnectionProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The properties of the Event Grid data connection.""" + kind: Literal[DataConnectionKind.EVENT_GRID] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """Kind of the endpoint for the data connection. Required. EventGrid.""" + + __flattened_items = [ + "storage_account_resource_id", + "event_grid_resource_id", + "event_hub_resource_id", + "consumer_group", + "table_name", + "mapping_rule_name", + "data_format", + "ignore_first_record", + "blob_storage_event_type", + "managed_identity_resource_id", + "managed_identity_object_id", + "database_routing", + "provisioning_state", + ] + + @overload + def __init__( + self, + *, + location: Optional[str] = None, + properties: Optional["_models.EventGridConnectionProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class EventGridDataConnectionWithManagedIdentity( + DataConnection, discriminator="EventGridWithManagedIdentity" +): # pylint: disable=name-too-long + """Class representing an Event Grid data connection with mandatory managed identity. + + :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 system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.kusto.models.SystemData + :ivar location: Resource location. + :vartype location: str + :ivar properties: The properties of the Event Grid data connection with mandatory managed + identity. + :vartype properties: ~azure.mgmt.kusto.models.EventGridConnectionWithManagedIdentityProperties + :ivar kind: Kind of the endpoint for the data connection. Required. + EventGridWithManagedIdentity. + :vartype kind: str or ~azure.mgmt.kusto.models.EVENT_GRID_WITH_MANAGED_IDENTITY + """ + + properties: Optional["_models.EventGridConnectionWithManagedIdentityProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The properties of the Event Grid data connection with mandatory managed identity.""" + kind: Literal[DataConnectionKind.EVENT_GRID_WITH_MANAGED_IDENTITY] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """Kind of the endpoint for the data connection. Required. EventGridWithManagedIdentity.""" + + __flattened_items = [ + "storage_account_resource_id_for_managed_identity", + "event_hub_resource_id_for_managed_identity", + "event_grid_resource_id", + "consumer_group", + "table_name", + "mapping_rule_name", + "data_format", + "ignore_first_record", + "blob_storage_event_type", + "managed_identity_resource_id", + "managed_identity_object_id", + "database_routing", + "provisioning_state", + ] + + @overload + def __init__( + self, + *, + location: Optional[str] = None, + properties: Optional["_models.EventGridConnectionWithManagedIdentityProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class EventHubConnectionProperties(_Model): + """Class representing the Kusto event hub connection properties. + + :ivar event_hub_resource_id: The resource ID of the event hub to be used to create a data + connection. Required. + :vartype event_hub_resource_id: str + :ivar consumer_group: The event hub consumer group. Required. + :vartype consumer_group: str + :ivar table_name: The table where the data should be ingested. Optionally the table information + can be added to each message. + :vartype table_name: str + :ivar mapping_rule_name: The mapping rule to be used to ingest the data. Optionally the mapping + information can be added to each message. + :vartype mapping_rule_name: str + :ivar data_format: The data format of the message. Optionally the data format can be added to + each message. Known values are: "MULTIJSON", "JSON", "CSV", "TSV", "SCSV", "SOHSV", "PSV", + "TXT", "RAW", "SINGLEJSON", "AVRO", "TSVE", "PARQUET", "ORC", "APACHEAVRO", "W3CLOGFILE", and + "AZMONSTREAM". + :vartype data_format: str or ~azure.mgmt.kusto.models.EventHubDataFormat + :ivar event_system_properties: System properties of the event hub. + :vartype event_system_properties: list[str] + :ivar compression: The compression type. Known values are: "None" and "GZip". + :vartype compression: str or ~azure.mgmt.kusto.models.Compression + :ivar provisioning_state: The provisioned state of the resource. Known values are: "Running", + "Creating", "Deleting", "Succeeded", "Failed", "Moving", and "Canceled". + :vartype provisioning_state: str or ~azure.mgmt.kusto.models.ProvisioningState + :ivar managed_identity_resource_id: The resource ID of a managed identity (system or user + assigned) to be used to authenticate with event hub. + :vartype managed_identity_resource_id: str + :ivar managed_identity_object_id: The object ID of the managedIdentityResourceId. + :vartype managed_identity_object_id: str + :ivar database_routing: Indication for database routing information from the data connection, + by default only database routing information is allowed. Known values are: "Single" and + "Multi". + :vartype database_routing: str or ~azure.mgmt.kusto.models.DatabaseRouting + :ivar retrieval_start_date: When defined, the data connection retrieves existing Event hub + events created since the Retrieval start date. It can only retrieve events retained by the + Event hub, based on its retention period. + :vartype retrieval_start_date: ~datetime.datetime + """ + + event_hub_resource_id: str = rest_field( + name="eventHubResourceId", visibility=["read", "create", "update", "delete", "query"] + ) + """The resource ID of the event hub to be used to create a data connection. Required.""" + consumer_group: str = rest_field(name="consumerGroup", visibility=["read", "create", "update", "delete", "query"]) + """The event hub consumer group. Required.""" + table_name: Optional[str] = rest_field(name="tableName", visibility=["read", "create", "update", "delete", "query"]) + """The table where the data should be ingested. Optionally the table information can be added to + each message.""" + mapping_rule_name: Optional[str] = rest_field( + name="mappingRuleName", visibility=["read", "create", "update", "delete", "query"] + ) + """The mapping rule to be used to ingest the data. Optionally the mapping information can be added + to each message.""" + data_format: Optional[Union[str, "_models.EventHubDataFormat"]] = rest_field( + name="dataFormat", visibility=["read", "create", "update", "delete", "query"] + ) + """The data format of the message. Optionally the data format can be added to each message. Known + values are: \"MULTIJSON\", \"JSON\", \"CSV\", \"TSV\", \"SCSV\", \"SOHSV\", \"PSV\", \"TXT\", + \"RAW\", \"SINGLEJSON\", \"AVRO\", \"TSVE\", \"PARQUET\", \"ORC\", \"APACHEAVRO\", + \"W3CLOGFILE\", and \"AZMONSTREAM\".""" + event_system_properties: Optional[list[str]] = rest_field( + name="eventSystemProperties", visibility=["read", "create", "update", "delete", "query"] + ) + """System properties of the event hub.""" + compression: Optional[Union[str, "_models.Compression"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The compression type. Known values are: \"None\" and \"GZip\".""" + provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """The provisioned state of the resource. Known values are: \"Running\", \"Creating\", + \"Deleting\", \"Succeeded\", \"Failed\", \"Moving\", and \"Canceled\".""" + managed_identity_resource_id: Optional[str] = rest_field( + name="managedIdentityResourceId", visibility=["read", "create", "update", "delete", "query"] + ) + """The resource ID of a managed identity (system or user assigned) to be used to authenticate with + event hub.""" + managed_identity_object_id: Optional[str] = rest_field(name="managedIdentityObjectId", visibility=["read"]) + """The object ID of the managedIdentityResourceId.""" + database_routing: Optional[Union[str, "_models.DatabaseRouting"]] = rest_field( + name="databaseRouting", visibility=["read", "create", "update", "delete", "query"] + ) + """Indication for database routing information from the data connection, by default only database + routing information is allowed. Known values are: \"Single\" and \"Multi\".""" + retrieval_start_date: Optional[datetime.datetime] = rest_field( + name="retrievalStartDate", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """When defined, the data connection retrieves existing Event hub events created since the + Retrieval start date. It can only retrieve events retained by the Event hub, based on its + retention period.""" + + @overload + def __init__( + self, + *, + event_hub_resource_id: str, + consumer_group: str, + table_name: Optional[str] = None, + mapping_rule_name: Optional[str] = None, + data_format: Optional[Union[str, "_models.EventHubDataFormat"]] = None, + event_system_properties: Optional[list[str]] = None, + compression: Optional[Union[str, "_models.Compression"]] = None, + managed_identity_resource_id: Optional[str] = None, + database_routing: Optional[Union[str, "_models.DatabaseRouting"]] = None, + retrieval_start_date: Optional[datetime.datetime] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class EventHubConnectionWithManagedIdentityProperties(_Model): # pylint: disable=name-too-long + """Class representing the Kusto event hub connection with required managed identity properties. + + :ivar event_hub_resource_id_for_managed_identity: The resource ID of the event hub to be used + to create a data connection. Required. + :vartype event_hub_resource_id_for_managed_identity: str + :ivar consumer_group: The event hub consumer group. Required. + :vartype consumer_group: str + :ivar table_name: The table where the data should be ingested. Optionally the table information + can be added to each message. + :vartype table_name: str + :ivar mapping_rule_name: The mapping rule to be used to ingest the data. Optionally the mapping + information can be added to each message. + :vartype mapping_rule_name: str + :ivar data_format: The data format of the message. Optionally the data format can be added to + each message. Known values are: "MULTIJSON", "JSON", "CSV", "TSV", "SCSV", "SOHSV", "PSV", + "TXT", "RAW", "SINGLEJSON", "AVRO", "TSVE", "PARQUET", "ORC", "APACHEAVRO", "W3CLOGFILE", and + "AZMONSTREAM". + :vartype data_format: str or ~azure.mgmt.kusto.models.EventHubDataFormat + :ivar event_system_properties: System properties of the event hub. + :vartype event_system_properties: list[str] + :ivar compression: The compression type. Known values are: "None" and "GZip". + :vartype compression: str or ~azure.mgmt.kusto.models.Compression + :ivar provisioning_state: The provisioned state of the resource. Known values are: "Running", + "Creating", "Deleting", "Succeeded", "Failed", "Moving", and "Canceled". + :vartype provisioning_state: str or ~azure.mgmt.kusto.models.ProvisioningState + :ivar managed_identity_resource_id: The resource ID of a managed identity (system or user + assigned) to be used to authenticate with event hub. Required. + :vartype managed_identity_resource_id: str + :ivar managed_identity_object_id: The object ID of the managedIdentityResourceId. + :vartype managed_identity_object_id: str + :ivar database_routing: Indication for database routing information from the data connection, + by default only database routing information is allowed. Known values are: "Single" and + "Multi". + :vartype database_routing: str or ~azure.mgmt.kusto.models.DatabaseRouting + :ivar retrieval_start_date: When defined, the data connection retrieves existing Event hub + events created since the Retrieval start date. It can only retrieve events retained by the + Event hub, based on its retention period. + :vartype retrieval_start_date: ~datetime.datetime + """ + + event_hub_resource_id_for_managed_identity: str = rest_field( + name="eventHubResourceIdForManagedIdentity", visibility=["read", "create", "update", "delete", "query"] + ) + """The resource ID of the event hub to be used to create a data connection. Required.""" + consumer_group: str = rest_field(name="consumerGroup", visibility=["read", "create", "update", "delete", "query"]) + """The event hub consumer group. Required.""" + table_name: Optional[str] = rest_field(name="tableName", visibility=["read", "create", "update", "delete", "query"]) + """The table where the data should be ingested. Optionally the table information can be added to + each message.""" + mapping_rule_name: Optional[str] = rest_field( + name="mappingRuleName", visibility=["read", "create", "update", "delete", "query"] + ) + """The mapping rule to be used to ingest the data. Optionally the mapping information can be added + to each message.""" + data_format: Optional[Union[str, "_models.EventHubDataFormat"]] = rest_field( + name="dataFormat", visibility=["read", "create", "update", "delete", "query"] + ) + """The data format of the message. Optionally the data format can be added to each message. Known + values are: \"MULTIJSON\", \"JSON\", \"CSV\", \"TSV\", \"SCSV\", \"SOHSV\", \"PSV\", \"TXT\", + \"RAW\", \"SINGLEJSON\", \"AVRO\", \"TSVE\", \"PARQUET\", \"ORC\", \"APACHEAVRO\", + \"W3CLOGFILE\", and \"AZMONSTREAM\".""" + event_system_properties: Optional[list[str]] = rest_field( + name="eventSystemProperties", visibility=["read", "create", "update", "delete", "query"] + ) + """System properties of the event hub.""" + compression: Optional[Union[str, "_models.Compression"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The compression type. Known values are: \"None\" and \"GZip\".""" + provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """The provisioned state of the resource. Known values are: \"Running\", \"Creating\", + \"Deleting\", \"Succeeded\", \"Failed\", \"Moving\", and \"Canceled\".""" + managed_identity_resource_id: str = rest_field( + name="managedIdentityResourceId", visibility=["read", "create", "update", "delete", "query"] + ) + """The resource ID of a managed identity (system or user assigned) to be used to authenticate with + event hub. Required.""" + managed_identity_object_id: Optional[str] = rest_field(name="managedIdentityObjectId", visibility=["read"]) + """The object ID of the managedIdentityResourceId.""" + database_routing: Optional[Union[str, "_models.DatabaseRouting"]] = rest_field( + name="databaseRouting", visibility=["read", "create", "update", "delete", "query"] + ) + """Indication for database routing information from the data connection, by default only database + routing information is allowed. Known values are: \"Single\" and \"Multi\".""" + retrieval_start_date: Optional[datetime.datetime] = rest_field( + name="retrievalStartDate", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """When defined, the data connection retrieves existing Event hub events created since the + Retrieval start date. It can only retrieve events retained by the Event hub, based on its + retention period.""" + + @overload + def __init__( + self, + *, + event_hub_resource_id_for_managed_identity: str, + consumer_group: str, + managed_identity_resource_id: str, + table_name: Optional[str] = None, + mapping_rule_name: Optional[str] = None, + data_format: Optional[Union[str, "_models.EventHubDataFormat"]] = None, + event_system_properties: Optional[list[str]] = None, + compression: Optional[Union[str, "_models.Compression"]] = None, + database_routing: Optional[Union[str, "_models.DatabaseRouting"]] = None, + retrieval_start_date: Optional[datetime.datetime] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class EventHubDataConnection(DataConnection, discriminator="EventHub"): + """Class representing an event hub data connection. + + :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 system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.kusto.models.SystemData + :ivar location: Resource location. + :vartype location: str + :ivar properties: The Event Hub data connection properties to validate. + :vartype properties: ~azure.mgmt.kusto.models.EventHubConnectionProperties + :ivar kind: Kind of the endpoint for the data connection. Required. EventHub. + :vartype kind: str or ~azure.mgmt.kusto.models.EVENT_HUB + """ + + properties: Optional["_models.EventHubConnectionProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The Event Hub data connection properties to validate.""" + kind: Literal[DataConnectionKind.EVENT_HUB] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """Kind of the endpoint for the data connection. Required. EventHub.""" + + __flattened_items = [ + "event_hub_resource_id", + "consumer_group", + "table_name", + "mapping_rule_name", + "data_format", + "event_system_properties", + "compression", + "provisioning_state", + "managed_identity_resource_id", + "managed_identity_object_id", + "database_routing", + "retrieval_start_date", + ] + + @overload + def __init__( + self, + *, + location: Optional[str] = None, + properties: Optional["_models.EventHubConnectionProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class EventHubDataConnectionWithManagedIdentity( + DataConnection, discriminator="EventHubWithManagedIdentity" +): # pylint: disable=name-too-long + """Class representing an event hub data connection with required managed identity. + + :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 system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.kusto.models.SystemData + :ivar location: Resource location. + :vartype location: str + :ivar properties: The Event Hub data connection properties to validate. + :vartype properties: ~azure.mgmt.kusto.models.EventHubConnectionWithManagedIdentityProperties + :ivar kind: Kind of the endpoint for the data connection. Required. + EventHubWithManagedIdentity. + :vartype kind: str or ~azure.mgmt.kusto.models.EVENT_HUB_WITH_MANAGED_IDENTITY + """ + + properties: Optional["_models.EventHubConnectionWithManagedIdentityProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The Event Hub data connection properties to validate.""" + kind: Literal[DataConnectionKind.EVENT_HUB_WITH_MANAGED_IDENTITY] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """Kind of the endpoint for the data connection. Required. EventHubWithManagedIdentity.""" + + __flattened_items = [ + "event_hub_resource_id_for_managed_identity", + "consumer_group", + "table_name", + "mapping_rule_name", + "data_format", + "event_system_properties", + "compression", + "provisioning_state", + "managed_identity_resource_id", + "managed_identity_object_id", + "database_routing", + "retrieval_start_date", + ] + + @overload + def __init__( + self, + *, + location: Optional[str] = None, + properties: Optional["_models.EventHubConnectionWithManagedIdentityProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class FollowerDatabaseDefinition(_Model): + """A class representing follower database request. + + :ivar cluster_resource_id: Resource id of the cluster that follows a database owned by this + cluster. Required. + :vartype cluster_resource_id: str + :ivar attached_database_configuration_name: Resource name of the attached database + configuration in the follower cluster. Required. + :vartype attached_database_configuration_name: str + :ivar database_name: The database name owned by this cluster that was followed. * in case + following all databases. + :vartype database_name: str + :ivar table_level_sharing_properties: Table level sharing specifications. + :vartype table_level_sharing_properties: ~azure.mgmt.kusto.models.TableLevelSharingProperties + :ivar database_share_origin: The origin of the following setup. Known values are: "Direct", + "DataShare", and "Other". + :vartype database_share_origin: str or ~azure.mgmt.kusto.models.DatabaseShareOrigin + """ + + cluster_resource_id: str = rest_field( + name="clusterResourceId", visibility=["read", "create", "update", "delete", "query"] + ) + """Resource id of the cluster that follows a database owned by this cluster. Required.""" + attached_database_configuration_name: str = rest_field( + name="attachedDatabaseConfigurationName", visibility=["read", "create", "update", "delete", "query"] + ) + """Resource name of the attached database configuration in the follower cluster. Required.""" + database_name: Optional[str] = rest_field(name="databaseName", visibility=["read"]) + """The database name owned by this cluster that was followed. * in case following all databases.""" + table_level_sharing_properties: Optional["_models.TableLevelSharingProperties"] = rest_field( + name="tableLevelSharingProperties", visibility=["read"] + ) + """Table level sharing specifications.""" + database_share_origin: Optional[Union[str, "_models.DatabaseShareOrigin"]] = rest_field( + name="databaseShareOrigin", visibility=["read"] + ) + """The origin of the following setup. Known values are: \"Direct\", \"DataShare\", and \"Other\".""" + + @overload + def __init__( + self, + *, + cluster_resource_id: str, + attached_database_configuration_name: str, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class FollowerDatabaseDefinitionGet(_Model): + """A class representing follower database object. + + :ivar properties: Follower database definition. + :vartype properties: ~azure.mgmt.kusto.models.FollowerDatabaseProperties + """ + + properties: Optional["_models.FollowerDatabaseProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Follower database definition.""" + + __flattened_items = [ + "cluster_resource_id", + "attached_database_configuration_name", + "database_name", + "table_level_sharing_properties", + "database_share_origin", + ] + + @overload + def __init__( + self, + *, + properties: Optional["_models.FollowerDatabaseProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class FollowerDatabaseProperties(_Model): + """A class representing the properties of a follower database object. + + :ivar cluster_resource_id: Resource id of the cluster that follows a database owned by this + cluster. Required. + :vartype cluster_resource_id: str + :ivar attached_database_configuration_name: Resource name of the attached database + configuration in the follower cluster. Required. + :vartype attached_database_configuration_name: str + :ivar database_name: The database name owned by this cluster that was followed. * in case + following all databases. + :vartype database_name: str + :ivar table_level_sharing_properties: Table level sharing specifications. + :vartype table_level_sharing_properties: ~azure.mgmt.kusto.models.TableLevelSharingProperties + :ivar database_share_origin: The origin of the following setup. Known values are: "Direct", + "DataShare", and "Other". + :vartype database_share_origin: str or ~azure.mgmt.kusto.models.DatabaseShareOrigin + """ + + cluster_resource_id: str = rest_field( + name="clusterResourceId", visibility=["read", "create", "update", "delete", "query"] + ) + """Resource id of the cluster that follows a database owned by this cluster. Required.""" + attached_database_configuration_name: str = rest_field( + name="attachedDatabaseConfigurationName", visibility=["read", "create", "update", "delete", "query"] + ) + """Resource name of the attached database configuration in the follower cluster. Required.""" + database_name: Optional[str] = rest_field(name="databaseName", visibility=["read"]) + """The database name owned by this cluster that was followed. * in case following all databases.""" + table_level_sharing_properties: Optional["_models.TableLevelSharingProperties"] = rest_field( + name="tableLevelSharingProperties", visibility=["read"] + ) + """Table level sharing specifications.""" + database_share_origin: Optional[Union[str, "_models.DatabaseShareOrigin"]] = rest_field( + name="databaseShareOrigin", visibility=["read"] + ) + """The origin of the following setup. Known values are: \"Direct\", \"DataShare\", and \"Other\".""" + + @overload + def __init__( + self, + *, + cluster_resource_id: str, + attached_database_configuration_name: str, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class Identity(_Model): + """Identity for the resource. + + :ivar principal_id: The principal ID of resource identity. + :vartype principal_id: str + :ivar tenant_id: The tenant ID of resource. + :vartype tenant_id: str + :ivar type: The type of managed identity used. The type 'SystemAssigned, UserAssigned' includes + both an implicitly created identity and a set of user-assigned identities. The type 'None' will + remove all identities. Required. Known values are: "None", "SystemAssigned", "UserAssigned", + and "SystemAssigned, UserAssigned". + :vartype type: str or ~azure.mgmt.kusto.models.IdentityType + :ivar user_assigned_identities: The list of user identities associated with the Kusto cluster. + The user identity dictionary key references will be ARM resource ids in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + :vartype user_assigned_identities: dict[str, + ~azure.mgmt.kusto.models.ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties] + """ + + principal_id: Optional[str] = rest_field(name="principalId", visibility=["read"]) + """The principal ID of resource identity.""" + tenant_id: Optional[str] = rest_field(name="tenantId", visibility=["read"]) + """The tenant ID of resource.""" + type: Union[str, "_models.IdentityType"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The type of managed identity used. The type 'SystemAssigned, UserAssigned' includes both an + implicitly created identity and a set of user-assigned identities. The type 'None' will remove + all identities. Required. Known values are: \"None\", \"SystemAssigned\", \"UserAssigned\", and + \"SystemAssigned, UserAssigned\".""" + user_assigned_identities: Optional[ + dict[str, "_models.ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties"] + ] = rest_field(name="userAssignedIdentities", visibility=["read", "create", "update", "delete", "query"]) + """The list of user identities associated with the Kusto cluster. The user identity dictionary key + references will be ARM resource ids in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.""" + + @overload + def __init__( + self, + *, + type: Union[str, "_models.IdentityType"], + user_assigned_identities: Optional[ + dict[str, "_models.ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties"] + ] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class IotHubConnectionProperties(_Model): + """Class representing the Kusto Iot hub connection properties. + + :ivar iot_hub_resource_id: The resource ID of the Iot hub to be used to create a data + connection. Required. + :vartype iot_hub_resource_id: str + :ivar consumer_group: The iot hub consumer group. Required. + :vartype consumer_group: str + :ivar table_name: The table where the data should be ingested. Optionally the table information + can be added to each message. + :vartype table_name: str + :ivar mapping_rule_name: The mapping rule to be used to ingest the data. Optionally the mapping + information can be added to each message. + :vartype mapping_rule_name: str + :ivar data_format: The data format of the message. Optionally the data format can be added to + each message. Known values are: "MULTIJSON", "JSON", "CSV", "TSV", "SCSV", "SOHSV", "PSV", + "TXT", "RAW", "SINGLEJSON", "AVRO", "TSVE", "PARQUET", "ORC", "APACHEAVRO", "W3CLOGFILE", and + "AZMONSTREAM". + :vartype data_format: str or ~azure.mgmt.kusto.models.IotHubDataFormat + :ivar event_system_properties: System properties of the iot hub. + :vartype event_system_properties: list[str] + :ivar shared_access_policy_name: The name of the share access policy. Required. + :vartype shared_access_policy_name: str + :ivar database_routing: Indication for database routing information from the data connection, + by default only database routing information is allowed. Known values are: "Single" and + "Multi". + :vartype database_routing: str or ~azure.mgmt.kusto.models.DatabaseRouting + :ivar retrieval_start_date: When defined, the data connection retrieves existing Event hub + events created since the Retrieval start date. It can only retrieve events retained by the + Event hub, based on its retention period. + :vartype retrieval_start_date: ~datetime.datetime + :ivar provisioning_state: The provisioned state of the resource. Known values are: "Running", + "Creating", "Deleting", "Succeeded", "Failed", "Moving", and "Canceled". + :vartype provisioning_state: str or ~azure.mgmt.kusto.models.ProvisioningState + """ + + iot_hub_resource_id: str = rest_field( + name="iotHubResourceId", visibility=["read", "create", "update", "delete", "query"] + ) + """The resource ID of the Iot hub to be used to create a data connection. Required.""" + consumer_group: str = rest_field(name="consumerGroup", visibility=["read", "create", "update", "delete", "query"]) + """The iot hub consumer group. Required.""" + table_name: Optional[str] = rest_field(name="tableName", visibility=["read", "create", "update", "delete", "query"]) + """The table where the data should be ingested. Optionally the table information can be added to + each message.""" + mapping_rule_name: Optional[str] = rest_field( + name="mappingRuleName", visibility=["read", "create", "update", "delete", "query"] + ) + """The mapping rule to be used to ingest the data. Optionally the mapping information can be added + to each message.""" + data_format: Optional[Union[str, "_models.IotHubDataFormat"]] = rest_field( + name="dataFormat", visibility=["read", "create", "update", "delete", "query"] + ) + """The data format of the message. Optionally the data format can be added to each message. Known + values are: \"MULTIJSON\", \"JSON\", \"CSV\", \"TSV\", \"SCSV\", \"SOHSV\", \"PSV\", \"TXT\", + \"RAW\", \"SINGLEJSON\", \"AVRO\", \"TSVE\", \"PARQUET\", \"ORC\", \"APACHEAVRO\", + \"W3CLOGFILE\", and \"AZMONSTREAM\".""" + event_system_properties: Optional[list[str]] = rest_field( + name="eventSystemProperties", visibility=["read", "create", "update", "delete", "query"] + ) + """System properties of the iot hub.""" + shared_access_policy_name: str = rest_field( + name="sharedAccessPolicyName", visibility=["read", "create", "update", "delete", "query"] + ) + """The name of the share access policy. Required.""" + database_routing: Optional[Union[str, "_models.DatabaseRouting"]] = rest_field( + name="databaseRouting", visibility=["read", "create", "update", "delete", "query"] + ) + """Indication for database routing information from the data connection, by default only database + routing information is allowed. Known values are: \"Single\" and \"Multi\".""" + retrieval_start_date: Optional[datetime.datetime] = rest_field( + name="retrievalStartDate", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """When defined, the data connection retrieves existing Event hub events created since the + Retrieval start date. It can only retrieve events retained by the Event hub, based on its + retention period.""" + provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """The provisioned state of the resource. Known values are: \"Running\", \"Creating\", + \"Deleting\", \"Succeeded\", \"Failed\", \"Moving\", and \"Canceled\".""" + + @overload + def __init__( + self, + *, + iot_hub_resource_id: str, + consumer_group: str, + shared_access_policy_name: str, + table_name: Optional[str] = None, + mapping_rule_name: Optional[str] = None, + data_format: Optional[Union[str, "_models.IotHubDataFormat"]] = None, + event_system_properties: Optional[list[str]] = None, + database_routing: Optional[Union[str, "_models.DatabaseRouting"]] = None, + retrieval_start_date: Optional[datetime.datetime] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class IotHubDataConnection(DataConnection, discriminator="IotHub"): + """Class representing an iot hub data connection. + + :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 system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.kusto.models.SystemData + :ivar location: Resource location. + :vartype location: str + :ivar properties: The Iot Hub data connection properties. + :vartype properties: ~azure.mgmt.kusto.models.IotHubConnectionProperties + :ivar kind: Kind of the endpoint for the data connection. Required. IotHub. + :vartype kind: str or ~azure.mgmt.kusto.models.IOT_HUB + """ + + properties: Optional["_models.IotHubConnectionProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The Iot Hub data connection properties.""" + kind: Literal[DataConnectionKind.IOT_HUB] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """Kind of the endpoint for the data connection. Required. IotHub.""" + + __flattened_items = [ + "iot_hub_resource_id", + "consumer_group", + "table_name", + "mapping_rule_name", + "data_format", + "event_system_properties", + "shared_access_policy_name", + "database_routing", + "retrieval_start_date", + "provisioning_state", + ] + + @overload + def __init__( + self, + *, + location: Optional[str] = None, + properties: Optional["_models.IotHubConnectionProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class KeyVaultProperties(_Model): + """Properties of the key vault. + + :ivar key_name: The name of the key vault key. + :vartype key_name: str + :ivar key_version: The version of the key vault key. + :vartype key_version: str + :ivar key_vault_uri: The Uri of the key vault. + :vartype key_vault_uri: str + :ivar user_identity: The user assigned identity (ARM resource id) that has access to the key. + The identity must have 'Get', 'Wrap Key', and 'Unwrap Key' permissions on the Key Vault key, or + be assigned the 'Key Vault Crypto Service Encryption User' role. + :vartype user_identity: str + :ivar federated_identity_client_id: The application (client) ID of the multi-tenant Microsoft + Entra application. Used for cross-tenant customer-managed key scenarios where the encryption + key is stored in a different tenant than the cluster. The application must be configured with + the user-assigned managed identity as a federated identity credential. + :vartype federated_identity_client_id: str + """ + + key_name: Optional[str] = rest_field(name="keyName", visibility=["read", "create", "update", "delete", "query"]) + """The name of the key vault key.""" + key_version: Optional[str] = rest_field( + name="keyVersion", visibility=["read", "create", "update", "delete", "query"] + ) + """The version of the key vault key.""" + key_vault_uri: Optional[str] = rest_field( + name="keyVaultUri", visibility=["read", "create", "update", "delete", "query"] + ) + """The Uri of the key vault.""" + user_identity: Optional[str] = rest_field( + name="userIdentity", visibility=["read", "create", "update", "delete", "query"] + ) + """The user assigned identity (ARM resource id) that has access to the key. The identity must have + 'Get', 'Wrap Key', and 'Unwrap Key' permissions on the Key Vault key, or be assigned the 'Key + Vault Crypto Service Encryption User' role.""" + federated_identity_client_id: Optional[str] = rest_field( + name="federatedIdentityClientId", visibility=["read", "create", "update", "delete", "query"] + ) + """The application (client) ID of the multi-tenant Microsoft Entra application. Used for + cross-tenant customer-managed key scenarios where the encryption key is stored in a different + tenant than the cluster. The application must be configured with the user-assigned managed + identity as a federated identity credential.""" + + @overload + def __init__( + self, + *, + key_name: Optional[str] = None, + key_version: Optional[str] = None, + key_vault_uri: Optional[str] = None, + user_identity: Optional[str] = None, + federated_identity_client_id: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class LanguageExtension(_Model): + """The language extension object. + + :ivar language_extension_name: The language extension name. Known values are: "PYTHON" and "R". + :vartype language_extension_name: str or ~azure.mgmt.kusto.models.LanguageExtensionName + :ivar language_extension_image_name: The language extension image name. Known values are: "R", + "Python3_6_5", "Python3_10_8", "Python3_10_8_DL", "PythonCustomImage", "Python3_11_7", and + "Python3_11_7_DL". + :vartype language_extension_image_name: str or + ~azure.mgmt.kusto.models.LanguageExtensionImageName + :ivar language_extension_custom_image_name: The sandbox custom image name that should be + enabled as the active language extension. Sandbox custom image is a cluster sub resource. When + this property is set, LanguageExtensionImageName should be set to 'PythonCustomImage'. + :vartype language_extension_custom_image_name: str + """ + + language_extension_name: Optional[Union[str, "_models.LanguageExtensionName"]] = rest_field( + name="languageExtensionName", visibility=["read", "create", "update", "delete", "query"] + ) + """The language extension name. Known values are: \"PYTHON\" and \"R\".""" + language_extension_image_name: Optional[Union[str, "_models.LanguageExtensionImageName"]] = rest_field( + name="languageExtensionImageName", visibility=["read", "create", "update", "delete", "query"] + ) + """The language extension image name. Known values are: \"R\", \"Python3_6_5\", \"Python3_10_8\", + \"Python3_10_8_DL\", \"PythonCustomImage\", \"Python3_11_7\", and \"Python3_11_7_DL\".""" + language_extension_custom_image_name: Optional[str] = rest_field( + name="languageExtensionCustomImageName", visibility=["read", "create", "update", "delete", "query"] + ) + """The sandbox custom image name that should be enabled as the active language extension. Sandbox + custom image is a cluster sub resource. When this property is set, LanguageExtensionImageName + should be set to 'PythonCustomImage'.""" + + @overload + def __init__( + self, + *, + language_extension_name: Optional[Union[str, "_models.LanguageExtensionName"]] = None, + language_extension_image_name: Optional[Union[str, "_models.LanguageExtensionImageName"]] = None, + language_extension_custom_image_name: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class LanguageExtensionsList(_Model): + """The list of language extension objects. + + :ivar value: The list of language extensions. + :vartype value: list[~azure.mgmt.kusto.models.LanguageExtension] + :ivar next_link: The link to the next page of resources. + :vartype next_link: str + """ + + value: Optional[list["_models.LanguageExtension"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The list of language extensions.""" + next_link: Optional[str] = rest_field(name="nextLink", visibility=["read", "create", "update", "delete", "query"]) + """The link to the next page of resources.""" + + @overload + def __init__( + self, + *, + value: Optional[list["_models.LanguageExtension"]] = None, + next_link: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ManagedPrivateEndpoint(ProxyResource): + """Class representing a managed private endpoint. + + :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 system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.kusto.models.SystemData + :ivar properties: A managed private endpoint. + :vartype properties: ~azure.mgmt.kusto.models.ManagedPrivateEndpointProperties + """ + + properties: Optional["_models.ManagedPrivateEndpointProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """A managed private endpoint.""" + + __flattened_items = [ + "private_link_resource_id", + "private_link_resource_region", + "group_id", + "request_message", + "provisioning_state", + ] + + @overload + def __init__( + self, + *, + properties: Optional["_models.ManagedPrivateEndpointProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class ManagedPrivateEndpointProperties(_Model): + """A class representing the properties of a managed private endpoint object. + + :ivar private_link_resource_id: The ARM resource ID of the resource for which the managed + private endpoint is created. Required. + :vartype private_link_resource_id: str + :ivar private_link_resource_region: The region of the resource to which the managed private + endpoint is created. + :vartype private_link_resource_region: str + :ivar group_id: The groupId in which the managed private endpoint is created. Required. + :vartype group_id: str + :ivar request_message: The user request message. + :vartype request_message: str + :ivar provisioning_state: The provisioned state of the resource. Known values are: "Running", + "Creating", "Deleting", "Succeeded", "Failed", "Moving", and "Canceled". + :vartype provisioning_state: str or ~azure.mgmt.kusto.models.ProvisioningState + """ + + private_link_resource_id: str = rest_field( + name="privateLinkResourceId", visibility=["read", "create", "update", "delete", "query"] + ) + """The ARM resource ID of the resource for which the managed private endpoint is created. + Required.""" + private_link_resource_region: Optional[str] = rest_field( + name="privateLinkResourceRegion", visibility=["read", "create", "update", "delete", "query"] + ) + """The region of the resource to which the managed private endpoint is created.""" + group_id: str = rest_field(name="groupId", visibility=["read", "create", "update", "delete", "query"]) + """The groupId in which the managed private endpoint is created. Required.""" + request_message: Optional[str] = rest_field( + name="requestMessage", visibility=["read", "create", "update", "delete", "query"] + ) + """The user request message.""" + provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """The provisioned state of the resource. Known values are: \"Running\", \"Creating\", + \"Deleting\", \"Succeeded\", \"Failed\", \"Moving\", and \"Canceled\".""" + + @overload + def __init__( + self, + *, + private_link_resource_id: str, + group_id: str, + private_link_resource_region: Optional[str] = None, + request_message: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ManagedPrivateEndpointsCheckNameRequest(_Model): + """The result returned from a managedPrivateEndpoints check name availability request. + + :ivar name: Managed private endpoint resource name. Required. + :vartype name: str + :ivar type: The type of resource, for instance + Microsoft.Kusto/clusters/managedPrivateEndpoints. Required. Default value is + "Microsoft.Kusto/clusters/managedPrivateEndpoints". + :vartype type: str + """ + + name: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Managed private endpoint resource name. Required.""" + type: Literal["Microsoft.Kusto/clusters/managedPrivateEndpoints"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The type of resource, for instance Microsoft.Kusto/clusters/managedPrivateEndpoints. Required. + Default value is \"Microsoft.Kusto/clusters/managedPrivateEndpoints\".""" + + @overload + def __init__( + self, + *, + name: str, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.type: Literal["Microsoft.Kusto/clusters/managedPrivateEndpoints"] = ( + "Microsoft.Kusto/clusters/managedPrivateEndpoints" + ) + + +class MigrationClusterProperties(_Model): + """Represents a properties of a cluster that is part of a migration. + + :ivar id: The resource ID of the cluster. + :vartype id: str + :ivar uri: The public URL of the cluster. + :vartype uri: str + :ivar data_ingestion_uri: The public data ingestion URL of the cluster. + :vartype data_ingestion_uri: str + :ivar role: The role of the cluster in the migration process. Known values are: "Source" and + "Destination". + :vartype role: str or ~azure.mgmt.kusto.models.MigrationClusterRole + """ + + id: Optional[str] = rest_field(visibility=["read"]) + """The resource ID of the cluster.""" + uri: Optional[str] = rest_field(visibility=["read"]) + """The public URL of the cluster.""" + data_ingestion_uri: Optional[str] = rest_field(name="dataIngestionUri", visibility=["read"]) + """The public data ingestion URL of the cluster.""" + role: Optional[Union[str, "_models.MigrationClusterRole"]] = rest_field(visibility=["read"]) + """The role of the cluster in the migration process. Known values are: \"Source\" and + \"Destination\".""" + + +class Operation(_Model): + """A REST API operation. + + :ivar name: The operation name. + :vartype name: str + :ivar display: The object that describes the operation. + :vartype display: ~azure.mgmt.kusto.models.OperationDisplay + :ivar origin: The intended executor of the operation. + :vartype origin: str + :ivar properties: Properties of the operation. + :vartype properties: any + """ + + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The operation name.""" + display: Optional["_models.OperationDisplay"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The object that describes the operation.""" + origin: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The intended executor of the operation.""" + properties: Optional[Any] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Properties of the operation.""" + + __flattened_items = [""] + + @overload + def __init__( + self, + *, + name: Optional[str] = None, + display: Optional["_models.OperationDisplay"] = None, + origin: Optional[str] = None, + properties: Optional[Any] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class OperationDisplay(_Model): + """The object that describes the operation. + + :ivar provider: Friendly name of the resource provider. + :vartype provider: str + :ivar operation: The operation type. + :vartype operation: str + :ivar resource: The resource type on which the operation is performed. + :vartype resource: str + :ivar description: The friendly name of the operation. + :vartype description: str + """ + + provider: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Friendly name of the resource provider.""" + operation: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The operation type.""" + resource: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The resource type on which the operation is performed.""" + description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The friendly name of the operation.""" + + @overload + def __init__( + self, + *, + provider: Optional[str] = None, + operation: Optional[str] = None, + resource: Optional[str] = None, + description: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class OperationResult(_Model): + """Operation Result Entity. + + :ivar id: ID of the resource. + :vartype id: str + :ivar name: Name of the resource. + :vartype name: str + :ivar status: status of the Operation result. Known values are: "Succeeded", "Canceled", + "Failed", and "Running". + :vartype status: str or ~azure.mgmt.kusto.models.Status + :ivar start_time: The operation start time. + :vartype start_time: ~datetime.datetime + :ivar end_time: The operation end time. + :vartype end_time: ~datetime.datetime + :ivar percent_complete: Percentage completed. + :vartype percent_complete: float + :ivar properties: Properties of the operation results. + :vartype properties: ~azure.mgmt.kusto.models.OperationResultProperties + :ivar error: Object that contains the error code and message if the operation failed. + :vartype error: ~azure.mgmt.kusto.models.OperationResultErrorProperties + """ + + id: Optional[str] = rest_field(visibility=["read"]) + """ID of the resource.""" + name: Optional[str] = rest_field(visibility=["read"]) + """Name of the resource.""" + status: Optional[Union[str, "_models.Status"]] = rest_field(visibility=["read"]) + """status of the Operation result. Known values are: \"Succeeded\", \"Canceled\", \"Failed\", and + \"Running\".""" + start_time: Optional[datetime.datetime] = rest_field( + name="startTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The operation start time.""" + end_time: Optional[datetime.datetime] = rest_field( + name="endTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The operation end time.""" + percent_complete: Optional[float] = rest_field( + name="percentComplete", visibility=["read", "create", "update", "delete", "query"] + ) + """Percentage completed.""" + properties: Optional["_models.OperationResultProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Properties of the operation results.""" + error: Optional["_models.OperationResultErrorProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Object that contains the error code and message if the operation failed.""" + + __flattened_items = ["operation_kind", "provisioning_state", "operation_state", "code", "message"] + + @overload + def __init__( + self, + *, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + percent_complete: Optional[float] = None, + properties: Optional["_models.OperationResultProperties"] = None, + error: Optional["_models.OperationResultErrorProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class OperationResultErrorProperties(_Model): + """Operation result error properties. + + :ivar code: The code of the error. + :vartype code: str + :ivar message: The error message. + :vartype message: str + """ + + code: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The code of the error.""" + message: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The error message.""" + + @overload + def __init__( + self, + *, + code: Optional[str] = None, + message: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class OperationResultProperties(_Model): + """Operation result properties. + + :ivar operation_kind: The kind of the operation. + :vartype operation_kind: str + :ivar provisioning_state: The provisioned state of the resource. Known values are: "Running", + "Creating", "Deleting", "Succeeded", "Failed", "Moving", and "Canceled". + :vartype provisioning_state: str or ~azure.mgmt.kusto.models.ProvisioningState + :ivar operation_state: The state of the operation. + :vartype operation_state: str + """ + + operation_kind: Optional[str] = rest_field( + name="operationKind", visibility=["read", "create", "update", "delete", "query"] + ) + """The kind of the operation.""" + provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """The provisioned state of the resource. Known values are: \"Running\", \"Creating\", + \"Deleting\", \"Succeeded\", \"Failed\", \"Moving\", and \"Canceled\".""" + operation_state: Optional[str] = rest_field( + name="operationState", visibility=["read", "create", "update", "delete", "query"] + ) + """The state of the operation.""" + + @overload + def __init__( + self, + *, + operation_kind: Optional[str] = None, + operation_state: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class OptimizedAutoscale(_Model): + """A class that contains the optimized auto scale definition. + + :ivar version: The version of the template defined, for instance 1. Required. + :vartype version: int + :ivar is_enabled: A boolean value that indicate if the optimized autoscale feature is enabled + or not. Required. + :vartype is_enabled: bool + :ivar minimum: Minimum allowed instances count. Required. + :vartype minimum: int + :ivar maximum: Maximum allowed instances count. Required. + :vartype maximum: int + """ + + version: int = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The version of the template defined, for instance 1. Required.""" + is_enabled: bool = rest_field(name="isEnabled", visibility=["read", "create", "update", "delete", "query"]) + """A boolean value that indicate if the optimized autoscale feature is enabled or not. Required.""" + minimum: int = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Minimum allowed instances count. Required.""" + maximum: int = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Maximum allowed instances count. Required.""" + + @overload + def __init__( + self, + *, + version: int, + is_enabled: bool, + minimum: int, + maximum: int, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class OutboundNetworkDependenciesEndpoint(ProxyResource): + """Endpoints accessed for a common purpose that the Kusto Service Environment requires outbound + network access to. + + :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 system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.kusto.models.SystemData + :ivar properties: The outbound environment endpoint properties. + :vartype properties: ~azure.mgmt.kusto.models.OutboundNetworkDependenciesEndpointProperties + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + """ + + properties: Optional["_models.OutboundNetworkDependenciesEndpointProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The outbound environment endpoint properties.""" + etag: Optional[str] = rest_field(visibility=["read"]) + """A unique read-only string that changes whenever the resource is updated.""" + + __flattened_items = ["category", "endpoints", "provisioning_state"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.OutboundNetworkDependenciesEndpointProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class OutboundNetworkDependenciesEndpointProperties(_Model): # pylint: disable=name-too-long + """Endpoints accessed for a common purpose that the Kusto Service Environment requires outbound + network access to. + + :ivar category: The type of service accessed by the Kusto Service Environment, e.g., Azure + Storage, Azure SQL Database, and Azure Active Directory. + :vartype category: str + :ivar endpoints: The endpoints that the Kusto Service Environment reaches the service at. + :vartype endpoints: list[~azure.mgmt.kusto.models.EndpointDependency] + :ivar provisioning_state: The provisioned state of the resource. Known values are: "Running", + "Creating", "Deleting", "Succeeded", "Failed", "Moving", and "Canceled". + :vartype provisioning_state: str or ~azure.mgmt.kusto.models.ProvisioningState + """ + + category: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The type of service accessed by the Kusto Service Environment, e.g., Azure Storage, Azure SQL + Database, and Azure Active Directory.""" + endpoints: Optional[list["_models.EndpointDependency"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The endpoints that the Kusto Service Environment reaches the service at.""" + provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """The provisioned state of the resource. Known values are: \"Running\", \"Creating\", + \"Deleting\", \"Succeeded\", \"Failed\", \"Moving\", and \"Canceled\".""" + + @overload + def __init__( + self, + *, + category: Optional[str] = None, + endpoints: Optional[list["_models.EndpointDependency"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class PrivateEndpointConnection(ProxyResource): + """A private endpoint connection. + + :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 system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.kusto.models.SystemData + :ivar properties: Resource properties. + :vartype properties: ~azure.mgmt.kusto.models.PrivateEndpointConnectionProperties + """ + + properties: Optional["_models.PrivateEndpointConnectionProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Resource properties.""" + + __flattened_items = ["private_endpoint", "private_link_service_connection_state", "group_id", "provisioning_state"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.PrivateEndpointConnectionProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class PrivateEndpointConnectionProperties(_Model): + """Properties of a private endpoint connection. + + :ivar private_endpoint: Private endpoint which the connection belongs to. + :vartype private_endpoint: ~azure.mgmt.kusto.models.PrivateEndpointProperty + :ivar private_link_service_connection_state: Connection State of the Private Endpoint + Connection. Required. + :vartype private_link_service_connection_state: + ~azure.mgmt.kusto.models.PrivateLinkServiceConnectionStateProperty + :ivar group_id: Group id of the private endpoint. + :vartype group_id: str + :ivar provisioning_state: Provisioning state of the private endpoint. + :vartype provisioning_state: str + """ + + private_endpoint: Optional["_models.PrivateEndpointProperty"] = rest_field( + name="privateEndpoint", visibility=["read"] + ) + """Private endpoint which the connection belongs to.""" + private_link_service_connection_state: "_models.PrivateLinkServiceConnectionStateProperty" = rest_field( + name="privateLinkServiceConnectionState", visibility=["read", "create", "update", "delete", "query"] + ) + """Connection State of the Private Endpoint Connection. Required.""" + group_id: Optional[str] = rest_field(name="groupId", visibility=["read"]) + """Group id of the private endpoint.""" + provisioning_state: Optional[str] = rest_field(name="provisioningState", visibility=["read"]) + """Provisioning state of the private endpoint.""" + + @overload + def __init__( + self, + *, + private_link_service_connection_state: "_models.PrivateLinkServiceConnectionStateProperty", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class PrivateEndpointProperty(_Model): + """Private endpoint which the connection belongs to. + + :ivar id: Resource id of the private endpoint. + :vartype id: str + """ + + id: Optional[str] = rest_field(visibility=["read"]) + """Resource id of the private endpoint.""" + + +class PrivateLinkResource(ProxyResource): + """A private link resource. + + :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 system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.kusto.models.SystemData + :ivar properties: Resource properties. + :vartype properties: ~azure.mgmt.kusto.models.PrivateLinkResourceProperties + """ + + properties: Optional["_models.PrivateLinkResourceProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Resource properties.""" + + __flattened_items = ["group_id", "required_members", "required_zone_names"] + + @overload + def __init__( + self, + *, + properties: Optional["_models.PrivateLinkResourceProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class PrivateLinkResourceProperties(_Model): + """Properties of a private link resource. + + :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: The private link resource required zone names. + :vartype required_zone_names: list[str] + """ + + group_id: Optional[str] = rest_field(name="groupId", visibility=["read"]) + """The private link resource group id.""" + required_members: Optional[list[str]] = rest_field(name="requiredMembers", visibility=["read"]) + """The private link resource required member names.""" + required_zone_names: Optional[list[str]] = rest_field(name="requiredZoneNames", visibility=["read"]) + """The private link resource required zone names.""" + + +class PrivateLinkServiceConnectionStateProperty(_Model): # pylint: disable=name-too-long + """Connection State of the Private Endpoint Connection. + + :ivar status: The private link service connection status. + :vartype status: str + :ivar description: The private link service connection description. + :vartype description: str + :ivar actions_required: Any action that is required beyond basic workflow (approve/ reject/ + disconnect). + :vartype actions_required: str + """ + + status: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The private link service connection status.""" + description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The private link service connection description.""" + actions_required: Optional[str] = rest_field(name="actionsRequired", visibility=["read"]) + """Any action that is required beyond basic workflow (approve/ reject/ disconnect).""" + + @overload + def __init__( + self, + *, + status: Optional[str] = None, + description: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ReadOnlyFollowingDatabase(Database, discriminator="ReadOnlyFollowing"): + """Class representing a read only following database. + + :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 system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.kusto.models.SystemData + :ivar location: Resource location. + :vartype location: str + :ivar properties: The database properties. + :vartype properties: ~azure.mgmt.kusto.models.ReadOnlyFollowingDatabaseProperties + :ivar kind: Kind of the database. Required. ReadOnlyFollowing. + :vartype kind: str or ~azure.mgmt.kusto.models.READ_ONLY_FOLLOWING + """ + + properties: Optional["_models.ReadOnlyFollowingDatabaseProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The database properties.""" + kind: Literal[Kind.READ_ONLY_FOLLOWING] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """Kind of the database. Required. ReadOnlyFollowing.""" + + __flattened_items = [ + "provisioning_state", + "soft_delete_period", + "hot_cache_period", + "statistics", + "leader_cluster_resource_id", + "attached_database_configuration_name", + "principals_modification_kind", + "table_level_sharing_properties", + "original_database_name", + "database_share_origin", + "suspension_details", + ] + + @overload + def __init__( + self, + *, + location: Optional[str] = None, + properties: Optional["_models.ReadOnlyFollowingDatabaseProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class ReadOnlyFollowingDatabaseProperties(_Model): + """Class representing the Kusto database properties. + + :ivar provisioning_state: The provisioned state of the resource. Known values are: "Running", + "Creating", "Deleting", "Succeeded", "Failed", "Moving", and "Canceled". + :vartype provisioning_state: str or ~azure.mgmt.kusto.models.ProvisioningState + :ivar soft_delete_period: The time the data should be kept before it stops being accessible to + queries in TimeSpan. + :vartype soft_delete_period: ~datetime.timedelta + :ivar hot_cache_period: The time the data should be kept in cache for fast queries in TimeSpan. + :vartype hot_cache_period: ~datetime.timedelta + :ivar statistics: The statistics of the database. + :vartype statistics: ~azure.mgmt.kusto.models.DatabaseStatistics + :ivar leader_cluster_resource_id: The name of the leader cluster. + :vartype leader_cluster_resource_id: str + :ivar attached_database_configuration_name: The name of the attached database configuration + cluster. + :vartype attached_database_configuration_name: str + :ivar principals_modification_kind: The principals modification kind of the database. Known + values are: "Union", "Replace", and "None". + :vartype principals_modification_kind: str or + ~azure.mgmt.kusto.models.PrincipalsModificationKind + :ivar table_level_sharing_properties: Table level sharing specifications. + :vartype table_level_sharing_properties: ~azure.mgmt.kusto.models.TableLevelSharingProperties + :ivar original_database_name: The original database name, before databaseNameOverride or + databaseNamePrefix where applied. + :vartype original_database_name: str + :ivar database_share_origin: The origin of the following setup. Known values are: "Direct", + "DataShare", and "Other". + :vartype database_share_origin: str or ~azure.mgmt.kusto.models.DatabaseShareOrigin + :ivar suspension_details: The database suspension details. If the database is suspended, this + object contains information related to the database's suspension state. + :vartype suspension_details: ~azure.mgmt.kusto.models.SuspensionDetails + """ + + provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """The provisioned state of the resource. Known values are: \"Running\", \"Creating\", + \"Deleting\", \"Succeeded\", \"Failed\", \"Moving\", and \"Canceled\".""" + soft_delete_period: Optional[datetime.timedelta] = rest_field(name="softDeletePeriod", visibility=["read"]) + """The time the data should be kept before it stops being accessible to queries in TimeSpan.""" + hot_cache_period: Optional[datetime.timedelta] = rest_field( + name="hotCachePeriod", visibility=["read", "create", "update", "delete", "query"] + ) + """The time the data should be kept in cache for fast queries in TimeSpan.""" + statistics: Optional["_models.DatabaseStatistics"] = rest_field(visibility=["read"]) + """The statistics of the database.""" + leader_cluster_resource_id: Optional[str] = rest_field(name="leaderClusterResourceId", visibility=["read"]) + """The name of the leader cluster.""" + attached_database_configuration_name: Optional[str] = rest_field( + name="attachedDatabaseConfigurationName", visibility=["read"] + ) + """The name of the attached database configuration cluster.""" + principals_modification_kind: Optional[Union[str, "_models.PrincipalsModificationKind"]] = rest_field( + name="principalsModificationKind", visibility=["read"] + ) + """The principals modification kind of the database. Known values are: \"Union\", \"Replace\", and + \"None\".""" + table_level_sharing_properties: Optional["_models.TableLevelSharingProperties"] = rest_field( + name="tableLevelSharingProperties", visibility=["read"] + ) + """Table level sharing specifications.""" + original_database_name: Optional[str] = rest_field(name="originalDatabaseName", visibility=["read"]) + """The original database name, before databaseNameOverride or databaseNamePrefix where applied.""" + database_share_origin: Optional[Union[str, "_models.DatabaseShareOrigin"]] = rest_field( + name="databaseShareOrigin", visibility=["read"] + ) + """The origin of the following setup. Known values are: \"Direct\", \"DataShare\", and \"Other\".""" + suspension_details: Optional["_models.SuspensionDetails"] = rest_field( + name="suspensionDetails", visibility=["read"] + ) + """The database suspension details. If the database is suspended, this object contains information + related to the database's suspension state.""" + + @overload + def __init__( + self, + *, + hot_cache_period: Optional[datetime.timedelta] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ReadWriteDatabase(Database, discriminator="ReadWrite"): + """Class representing a read write database. + + :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 system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.kusto.models.SystemData + :ivar location: Resource location. + :vartype location: str + :ivar properties: The database properties. + :vartype properties: ~azure.mgmt.kusto.models.ReadWriteDatabaseProperties + :ivar kind: Kind of the database. Required. ReadWrite. + :vartype kind: str or ~azure.mgmt.kusto.models.READ_WRITE + """ + + properties: Optional["_models.ReadWriteDatabaseProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The database properties.""" + kind: Literal[Kind.READ_WRITE] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore + """Kind of the database. Required. ReadWrite.""" + + __flattened_items = [ + "provisioning_state", + "soft_delete_period", + "hot_cache_period", + "statistics", + "is_followed", + "key_vault_properties", + "suspension_details", + ] + + @overload + def __init__( + self, + *, + location: Optional[str] = None, + properties: Optional["_models.ReadWriteDatabaseProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class ReadWriteDatabaseProperties(_Model): + """Class representing the Kusto database properties. + + :ivar provisioning_state: The provisioned state of the resource. Known values are: "Running", + "Creating", "Deleting", "Succeeded", "Failed", "Moving", and "Canceled". + :vartype provisioning_state: str or ~azure.mgmt.kusto.models.ProvisioningState + :ivar soft_delete_period: The time the data should be kept before it stops being accessible to + queries in TimeSpan. + :vartype soft_delete_period: ~datetime.timedelta + :ivar hot_cache_period: The time the data should be kept in cache for fast queries in TimeSpan. + :vartype hot_cache_period: ~datetime.timedelta + :ivar statistics: The statistics of the database. + :vartype statistics: ~azure.mgmt.kusto.models.DatabaseStatistics + :ivar is_followed: Indicates whether the database is followed. + :vartype is_followed: bool + :ivar key_vault_properties: KeyVault properties for the database encryption. + :vartype key_vault_properties: ~azure.mgmt.kusto.models.KeyVaultProperties + :ivar suspension_details: The database suspension details. If the database is suspended, this + object contains information related to the database's suspension state. + :vartype suspension_details: ~azure.mgmt.kusto.models.SuspensionDetails + """ + + provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """The provisioned state of the resource. Known values are: \"Running\", \"Creating\", + \"Deleting\", \"Succeeded\", \"Failed\", \"Moving\", and \"Canceled\".""" + soft_delete_period: Optional[datetime.timedelta] = rest_field( + name="softDeletePeriod", visibility=["read", "create", "update", "delete", "query"] + ) + """The time the data should be kept before it stops being accessible to queries in TimeSpan.""" + hot_cache_period: Optional[datetime.timedelta] = rest_field( + name="hotCachePeriod", visibility=["read", "create", "update", "delete", "query"] + ) + """The time the data should be kept in cache for fast queries in TimeSpan.""" + statistics: Optional["_models.DatabaseStatistics"] = rest_field(visibility=["read"]) + """The statistics of the database.""" + is_followed: Optional[bool] = rest_field(name="isFollowed", visibility=["read"]) + """Indicates whether the database is followed.""" + key_vault_properties: Optional["_models.KeyVaultProperties"] = rest_field( + name="keyVaultProperties", visibility=["read", "create", "update", "delete", "query"] + ) + """KeyVault properties for the database encryption.""" + suspension_details: Optional["_models.SuspensionDetails"] = rest_field( + name="suspensionDetails", visibility=["read"] + ) + """The database suspension details. If the database is suspended, this object contains information + related to the database's suspension state.""" + + @overload + def __init__( + self, + *, + soft_delete_period: Optional[datetime.timedelta] = None, + hot_cache_period: Optional[datetime.timedelta] = None, + key_vault_properties: Optional["_models.KeyVaultProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ResourceSkuCapabilities(_Model): + """Describes The SKU capabilities object. + + :ivar name: An invariant to describe the feature. + :vartype name: str + :ivar value: An invariant if the feature is measured by quantity. + :vartype value: str + """ + + name: Optional[str] = rest_field(visibility=["read"]) + """An invariant to describe the feature.""" + value: Optional[str] = rest_field(visibility=["read"]) + """An invariant if the feature is measured by quantity.""" + + +class ResourceSkuZoneDetails(_Model): + """Describes The zonal capabilities of a SKU. + + :ivar name: The set of zones that the SKU is available in with the specified capabilities. + :vartype name: list[str] + :ivar capabilities: A list of capabilities that are available for the SKU in the specified list + of zones. + :vartype capabilities: list[~azure.mgmt.kusto.models.ResourceSkuCapabilities] + """ + + name: Optional[list[str]] = rest_field(visibility=["read"]) + """The set of zones that the SKU is available in with the specified capabilities.""" + capabilities: Optional[list["_models.ResourceSkuCapabilities"]] = rest_field(visibility=["read"]) + """A list of capabilities that are available for the SKU in the specified list of zones.""" + + +class SandboxCustomImage(ProxyResource): + """Class representing a Kusto sandbox custom image. + + :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 system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.kusto.models.SystemData + :ivar properties: A sandbox custom image. + :vartype properties: ~azure.mgmt.kusto.models.SandboxCustomImageProperties + """ + + properties: Optional["_models.SandboxCustomImageProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """A sandbox custom image.""" + + __flattened_items = [ + "language", + "language_version", + "base_image_name", + "requirements_file_content", + "provisioning_state", + ] + + @overload + def __init__( + self, + *, + properties: Optional["_models.SandboxCustomImageProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class SandboxCustomImageProperties(_Model): + """A class representing the properties of a sandbox custom image object. + + :ivar language: The language name, for example Python. Required. "Python" + :vartype language: str or ~azure.mgmt.kusto.models.Language + :ivar language_version: The version of the language. Either this property or baseImageName + should be specified. + :vartype language_version: str + :ivar base_image_name: The base image name on which the custom image is built on top of. It can + be one of the LanguageExtensionImageName (e.g.: 'Python3_10_8', 'Python3_10_8_DL') or the name + of an existing custom image. Either this property or languageVersion should be specified. + :vartype base_image_name: str + :ivar requirements_file_content: The requirements file content. + :vartype requirements_file_content: str + :ivar provisioning_state: The provisioned state of the resource. Known values are: "Running", + "Creating", "Deleting", "Succeeded", "Failed", "Moving", and "Canceled". + :vartype provisioning_state: str or ~azure.mgmt.kusto.models.ProvisioningState + """ + + language: Union[str, "_models.Language"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The language name, for example Python. Required. \"Python\"""" + language_version: Optional[str] = rest_field( + name="languageVersion", visibility=["read", "create", "update", "delete", "query"] + ) + """The version of the language. Either this property or baseImageName should be specified.""" + base_image_name: Optional[str] = rest_field( + name="baseImageName", visibility=["read", "create", "update", "delete", "query"] + ) + """The base image name on which the custom image is built on top of. It can be one of the + LanguageExtensionImageName (e.g.: 'Python3_10_8', 'Python3_10_8_DL') or the name of an existing + custom image. Either this property or languageVersion should be specified.""" + requirements_file_content: Optional[str] = rest_field( + name="requirementsFileContent", visibility=["read", "create", "update", "delete", "query"] + ) + """The requirements file content.""" + provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """The provisioned state of the resource. Known values are: \"Running\", \"Creating\", + \"Deleting\", \"Succeeded\", \"Failed\", \"Moving\", and \"Canceled\".""" + + @overload + def __init__( + self, + *, + language: Union[str, "_models.Language"], + language_version: Optional[str] = None, + base_image_name: Optional[str] = None, + requirements_file_content: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class SandboxCustomImagesCheckNameRequest(_Model): + """The result returned from a sandboxCustomImage check name availability request. + + :ivar name: Sandbox custom image resource name. Required. + :vartype name: str + :ivar type: The type of resource, for instance Microsoft.Kusto/clusters/sandboxCustomImages. + Required. Default value is "Microsoft.Kusto/clusters/sandboxCustomImages". + :vartype type: str + """ + + name: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Sandbox custom image resource name. Required.""" + type: Literal["Microsoft.Kusto/clusters/sandboxCustomImages"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The type of resource, for instance Microsoft.Kusto/clusters/sandboxCustomImages. Required. + Default value is \"Microsoft.Kusto/clusters/sandboxCustomImages\".""" + + @overload + def __init__( + self, + *, + name: str, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.type: Literal["Microsoft.Kusto/clusters/sandboxCustomImages"] = ( + "Microsoft.Kusto/clusters/sandboxCustomImages" + ) + + +class Script(ProxyResource): + """Class representing a database script. + + :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 system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.kusto.models.SystemData + :ivar properties: The database script. + :vartype properties: ~azure.mgmt.kusto.models.ScriptProperties + """ + + properties: Optional["_models.ScriptProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The database script.""" + + __flattened_items = [ + "script_url", + "script_url_sas_token", + "script_content", + "force_update_tag", + "continue_on_errors", + "provisioning_state", + "script_level", + "principal_permissions_action", + "managed_identity_resource_id", + ] + + @overload + def __init__( + self, + *, + properties: Optional["_models.ScriptProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} + super().__init__(*args, **kwargs) + for k, v in _flattened_input.items(): + setattr(self, k, v) + + def __getattr__(self, name: str) -> Any: + if name in self.__flattened_items: + if self.properties is None: + return None + return getattr(self.properties, name) + raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") + + def __setattr__(self, key: str, value: Any) -> None: + if key in self.__flattened_items: + if self.properties is None: + self.properties = self._attr_to_rest_field["properties"]._class_type() + setattr(self.properties, key, value) + else: + super().__setattr__(key, value) + + +class ScriptCheckNameRequest(_Model): + """A script name availability request. + + :ivar name: Script name. Required. + :vartype name: str + :ivar type: The type of resource, Microsoft.Kusto/clusters/databases/scripts. Required. Default + value is "Microsoft.Kusto/clusters/databases/scripts". + :vartype type: str + """ + + name: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Script name. Required.""" + type: Literal["Microsoft.Kusto/clusters/databases/scripts"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The type of resource, Microsoft.Kusto/clusters/databases/scripts. Required. Default value is + \"Microsoft.Kusto/clusters/databases/scripts\".""" + + @overload + def __init__( + self, + *, + name: str, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.type: Literal["Microsoft.Kusto/clusters/databases/scripts"] = "Microsoft.Kusto/clusters/databases/scripts" + + +class ScriptProperties(_Model): + """A class representing database script property. + + :ivar script_url: The url to the KQL script blob file. Must not be used together with + scriptContent property. + :vartype script_url: str + :ivar script_url_sas_token: The SaS token that provide read access to the file which contain + the script. Must be provided when using scriptUrl property. + :vartype script_url_sas_token: str + :ivar script_content: The script content. This property should be used when the script is + provide inline and not through file in a SA. Must not be used together with scriptUrl and + scriptUrlSasToken properties. + :vartype script_content: str + :ivar force_update_tag: A unique string. If changed the script will be applied again. + :vartype force_update_tag: str + :ivar continue_on_errors: Flag that indicates whether to continue if one of the command fails. + :vartype continue_on_errors: bool + :ivar provisioning_state: The provisioned state of the resource. Known values are: "Running", + "Creating", "Deleting", "Succeeded", "Failed", "Moving", and "Canceled". + :vartype provisioning_state: str or ~azure.mgmt.kusto.models.ProvisioningState + :ivar script_level: Differentiates between the type of script commands included - Database or + Cluster. The default is Database. Known values are: "Database" and "Cluster". + :vartype script_level: str or ~azure.mgmt.kusto.models.ScriptLevel + :ivar principal_permissions_action: Indicates if the permissions for the script caller are kept + following completion of the script. Known values are: "RetainPermissionOnScriptCompletion" and + "RemovePermissionOnScriptCompletion". + :vartype principal_permissions_action: str or + ~azure.mgmt.kusto.models.PrincipalPermissionsAction + :ivar managed_identity_resource_id: The resource identifier of the managed identity to be used. + When provided, the managed identity will be used to read the script content from the scriptUrl. + :vartype managed_identity_resource_id: str + """ + + script_url: Optional[str] = rest_field(name="scriptUrl", visibility=["read", "create", "update", "delete", "query"]) + """The url to the KQL script blob file. Must not be used together with scriptContent property.""" + script_url_sas_token: Optional[str] = rest_field(name="scriptUrlSasToken", visibility=["create"]) + """The SaS token that provide read access to the file which contain the script. Must be provided + when using scriptUrl property.""" + script_content: Optional[str] = rest_field(name="scriptContent", visibility=["create"]) + """The script content. This property should be used when the script is provide inline and not + through file in a SA. Must not be used together with scriptUrl and scriptUrlSasToken + properties.""" + force_update_tag: Optional[str] = rest_field( + name="forceUpdateTag", visibility=["read", "create", "update", "delete", "query"] + ) + """A unique string. If changed the script will be applied again.""" + continue_on_errors: Optional[bool] = rest_field( + name="continueOnErrors", visibility=["read", "create", "update", "delete", "query"] + ) + """Flag that indicates whether to continue if one of the command fails.""" + provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """The provisioned state of the resource. Known values are: \"Running\", \"Creating\", + \"Deleting\", \"Succeeded\", \"Failed\", \"Moving\", and \"Canceled\".""" + script_level: Optional[Union[str, "_models.ScriptLevel"]] = rest_field( + name="scriptLevel", visibility=["read", "create", "update", "delete", "query"] + ) + """Differentiates between the type of script commands included - Database or Cluster. The default + is Database. Known values are: \"Database\" and \"Cluster\".""" + principal_permissions_action: Optional[Union[str, "_models.PrincipalPermissionsAction"]] = rest_field( + name="principalPermissionsAction", visibility=["read", "create", "update", "delete", "query"] + ) + """Indicates if the permissions for the script caller are kept following completion of the script. + Known values are: \"RetainPermissionOnScriptCompletion\" and + \"RemovePermissionOnScriptCompletion\".""" + managed_identity_resource_id: Optional[str] = rest_field( + name="managedIdentityResourceId", visibility=["read", "create", "update", "delete", "query"] + ) + """The resource identifier of the managed identity to be used. When provided, the managed identity + will be used to read the script content from the scriptUrl.""" + + @overload + def __init__( + self, + *, + script_url: Optional[str] = None, + script_url_sas_token: Optional[str] = None, + script_content: Optional[str] = None, + force_update_tag: Optional[str] = None, + continue_on_errors: Optional[bool] = None, + script_level: Optional[Union[str, "_models.ScriptLevel"]] = None, + principal_permissions_action: Optional[Union[str, "_models.PrincipalPermissionsAction"]] = None, + managed_identity_resource_id: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class SkuDescription(_Model): + """The Kusto SKU description of given resource type. + + :ivar resource_type: The resource type. + :vartype resource_type: str + :ivar name: The name of the SKU. + :vartype name: str + :ivar tier: The tier of the SKU. + :vartype tier: str + :ivar locations: The set of locations that the SKU is available. + :vartype locations: list[str] + :ivar location_info: Locations and zones. + :vartype location_info: list[~azure.mgmt.kusto.models.SkuLocationInfoItem] + :ivar restrictions: The restrictions because of which SKU cannot be used. + :vartype restrictions: list[any] + """ + + resource_type: Optional[str] = rest_field(name="resourceType", visibility=["read"]) + """The resource type.""" + name: Optional[str] = rest_field(visibility=["read"]) + """The name of the SKU.""" + tier: Optional[str] = rest_field(visibility=["read"]) + """The tier of the SKU.""" + locations: Optional[list[str]] = rest_field(visibility=["read"]) + """The set of locations that the SKU is available.""" + location_info: Optional[list["_models.SkuLocationInfoItem"]] = rest_field(name="locationInfo", visibility=["read"]) + """Locations and zones.""" + restrictions: Optional[list[Any]] = rest_field(visibility=["read"]) + """The restrictions because of which SKU cannot be used.""" + + +class SkuLocationInfoItem(_Model): + """The locations and zones info for SKU. + + :ivar location: The available location of the SKU. Required. + :vartype location: str + :ivar zones: The available zone of the SKU. + :vartype zones: list[str] + :ivar zone_details: Gets details of capabilities available to a SKU in specific zones. + :vartype zone_details: list[~azure.mgmt.kusto.models.ResourceSkuZoneDetails] + """ + + location: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The available location of the SKU. Required.""" + zones: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The available zone of the SKU.""" + zone_details: Optional[list["_models.ResourceSkuZoneDetails"]] = rest_field( + name="zoneDetails", visibility=["read", "create", "update", "delete", "query"] + ) + """Gets details of capabilities available to a SKU in specific zones.""" + + @overload + def __init__( + self, + *, + location: str, + zones: Optional[list[str]] = None, + zone_details: Optional[list["_models.ResourceSkuZoneDetails"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class SuspensionDetails(_Model): + """The database suspension details. If the database is suspended, this object contains information + related to the database's suspension state. + + :ivar suspension_start_date: The starting date and time of the suspension state. + :vartype suspension_start_date: ~datetime.datetime + """ + + suspension_start_date: Optional[datetime.datetime] = rest_field( + name="suspensionStartDate", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The starting date and time of the suspension state.""" + + @overload + def __init__( + self, + *, + suspension_start_date: Optional[datetime.datetime] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class SystemData(_Model): + """Metadata pertaining to creation and last modification of the resource. + + :ivar created_by: The identity that created the resource. + :vartype created_by: str + :ivar created_by_type: The type of identity that created the resource. Known values are: + "User", "Application", "ManagedIdentity", and "Key". + :vartype created_by_type: str or ~azure.mgmt.kusto.models.CreatedByType + :ivar created_at: The timestamp of resource creation (UTC). + :vartype created_at: ~datetime.datetime + :ivar last_modified_by: The identity that last modified the resource. + :vartype last_modified_by: str + :ivar last_modified_by_type: The type of identity that last modified the resource. Known values + are: "User", "Application", "ManagedIdentity", and "Key". + :vartype last_modified_by_type: str or ~azure.mgmt.kusto.models.CreatedByType + :ivar last_modified_at: The timestamp of resource last modification (UTC). + :vartype last_modified_at: ~datetime.datetime + """ + + created_by: Optional[str] = rest_field(name="createdBy", visibility=["read", "create", "update", "delete", "query"]) + """The identity that created the resource.""" + created_by_type: Optional[Union[str, "_models.CreatedByType"]] = rest_field( + name="createdByType", visibility=["read", "create", "update", "delete", "query"] + ) + """The type of identity that created the resource. Known values are: \"User\", \"Application\", + \"ManagedIdentity\", and \"Key\".""" + created_at: Optional[datetime.datetime] = rest_field( + name="createdAt", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The timestamp of resource creation (UTC).""" + last_modified_by: Optional[str] = rest_field( + name="lastModifiedBy", visibility=["read", "create", "update", "delete", "query"] + ) + """The identity that last modified the resource.""" + last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = rest_field( + name="lastModifiedByType", visibility=["read", "create", "update", "delete", "query"] + ) + """The type of identity that last modified the resource. Known values are: \"User\", + \"Application\", \"ManagedIdentity\", and \"Key\".""" + last_modified_at: Optional[datetime.datetime] = rest_field( + name="lastModifiedAt", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The timestamp of resource last modification (UTC).""" + + @overload + def __init__( + self, + *, + created_by: Optional[str] = None, + created_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, + created_at: Optional[datetime.datetime] = None, + last_modified_by: Optional[str] = None, + last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, + last_modified_at: Optional[datetime.datetime] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class TableLevelSharingProperties(_Model): + """Tables that will be included and excluded in the follower database. + + :ivar tables_to_include: List of tables to include in the follower database. + :vartype tables_to_include: list[str] + :ivar tables_to_exclude: List of tables to exclude from the follower database. + :vartype tables_to_exclude: list[str] + :ivar external_tables_to_include: List of external tables to include in the follower database. + :vartype external_tables_to_include: list[str] + :ivar external_tables_to_exclude: List of external tables to exclude from the follower + database. + :vartype external_tables_to_exclude: list[str] + :ivar materialized_views_to_include: List of materialized views to include in the follower + database. + :vartype materialized_views_to_include: list[str] + :ivar materialized_views_to_exclude: List of materialized views to exclude from the follower + database. + :vartype materialized_views_to_exclude: list[str] + :ivar functions_to_include: List of functions to include in the follower database. + :vartype functions_to_include: list[str] + :ivar functions_to_exclude: List of functions to exclude from the follower database. + :vartype functions_to_exclude: list[str] + """ + + tables_to_include: Optional[list[str]] = rest_field( + name="tablesToInclude", visibility=["read", "create", "update", "delete", "query"] + ) + """List of tables to include in the follower database.""" + tables_to_exclude: Optional[list[str]] = rest_field( + name="tablesToExclude", visibility=["read", "create", "update", "delete", "query"] + ) + """List of tables to exclude from the follower database.""" + external_tables_to_include: Optional[list[str]] = rest_field( + name="externalTablesToInclude", visibility=["read", "create", "update", "delete", "query"] + ) + """List of external tables to include in the follower database.""" + external_tables_to_exclude: Optional[list[str]] = rest_field( + name="externalTablesToExclude", visibility=["read", "create", "update", "delete", "query"] + ) + """List of external tables to exclude from the follower database.""" + materialized_views_to_include: Optional[list[str]] = rest_field( + name="materializedViewsToInclude", visibility=["read", "create", "update", "delete", "query"] + ) + """List of materialized views to include in the follower database.""" + materialized_views_to_exclude: Optional[list[str]] = rest_field( + name="materializedViewsToExclude", visibility=["read", "create", "update", "delete", "query"] + ) + """List of materialized views to exclude from the follower database.""" + functions_to_include: Optional[list[str]] = rest_field( + name="functionsToInclude", visibility=["read", "create", "update", "delete", "query"] + ) + """List of functions to include in the follower database.""" + functions_to_exclude: Optional[list[str]] = rest_field( + name="functionsToExclude", visibility=["read", "create", "update", "delete", "query"] + ) + """List of functions to exclude from the follower database.""" + + @overload + def __init__( + self, + *, + tables_to_include: Optional[list[str]] = None, + tables_to_exclude: Optional[list[str]] = None, + external_tables_to_include: Optional[list[str]] = None, + external_tables_to_exclude: Optional[list[str]] = None, + materialized_views_to_include: Optional[list[str]] = None, + materialized_views_to_exclude: Optional[list[str]] = None, + functions_to_include: Optional[list[str]] = None, + functions_to_exclude: Optional[list[str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class TrustedExternalTenant(_Model): + """Represents a tenant ID that is trusted by the cluster. + + :ivar value: GUID representing an external tenant. + :vartype value: str + """ + + value: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """GUID representing an external tenant.""" + + @overload + def __init__( + self, + *, + value: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class VirtualNetworkConfiguration(_Model): + """A class that contains virtual network definition. + + :ivar subnet_id: The subnet resource id. Required. + :vartype subnet_id: str + :ivar engine_public_ip_id: Engine service's public IP address resource id. Required. + :vartype engine_public_ip_id: str + :ivar data_management_public_ip_id: Data management's service public IP address resource id. + Required. + :vartype data_management_public_ip_id: str + :ivar state: When enabled, the cluster is deployed into the configured subnet, when disabled it + will be removed from the subnet. Known values are: "Enabled" and "Disabled". + :vartype state: str or ~azure.mgmt.kusto.models.VnetState + """ + + subnet_id: str = rest_field(name="subnetId", visibility=["read", "create"]) + """The subnet resource id. Required.""" + engine_public_ip_id: str = rest_field(name="enginePublicIpId", visibility=["read", "create"]) + """Engine service's public IP address resource id. Required.""" + data_management_public_ip_id: str = rest_field(name="dataManagementPublicIpId", visibility=["read", "create"]) + """Data management's service public IP address resource id. Required.""" + state: Optional[Union[str, "_models.VnetState"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """When enabled, the cluster is deployed into the configured subnet, when disabled it will be + removed from the subnet. Known values are: \"Enabled\" and \"Disabled\".""" + + @overload + def __init__( + self, + *, + subnet_id: str, + engine_public_ip_id: str, + data_management_public_ip_id: str, + state: Optional[Union[str, "_models.VnetState"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/_models_py3.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/_models_py3.py deleted file mode 100644 index fcb6a51a152c..000000000000 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/_models_py3.py +++ /dev/null @@ -1,4945 +0,0 @@ -# pylint: disable=too-many-lines -# 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 datetime -import sys -from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union - -from .. import _serialization - -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore - -if TYPE_CHECKING: - from .. import models as _models -JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object - - -class AcceptedAudiences(_serialization.Model): - """Represents an accepted audience trusted by the cluster. - - :ivar value: GUID or valid URL representing an accepted audience. - :vartype value: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "str"}, - } - - def __init__(self, *, value: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword value: GUID or valid URL representing an accepted audience. - :paramtype value: str - """ - super().__init__(**kwargs) - self.value = value - - -class Resource(_serialization.Model): - """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 - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long - :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 - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.id = None - self.name = None - self.type = None - - -class ProxyResource(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 - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long - :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 - """ - - -class AttachedDatabaseConfiguration(ProxyResource): - """Class representing an attached database configuration. - - 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}. # pylint: disable=line-too-long - :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 provisioning_state: The provisioned state of the resource. Known values are: "Running", - "Creating", "Deleting", "Succeeded", "Failed", "Moving", and "Canceled". - :vartype provisioning_state: str or ~azure.mgmt.kusto.models.ProvisioningState - :ivar database_name: The name of the database which you would like to attach, use * if you want - to follow all current and future databases. - :vartype database_name: str - :ivar cluster_resource_id: The resource id of the cluster where the databases you would like to - attach reside. - :vartype cluster_resource_id: str - :ivar attached_database_names: The list of databases from the clusterResourceId which are - currently attached to the cluster. - :vartype attached_database_names: list[str] - :ivar default_principals_modification_kind: The default principals modification kind. Known - values are: "Union", "Replace", and "None". - :vartype default_principals_modification_kind: str or - ~azure.mgmt.kusto.models.DefaultPrincipalsModificationKind - :ivar table_level_sharing_properties: Table level sharing specifications. - :vartype table_level_sharing_properties: ~azure.mgmt.kusto.models.TableLevelSharingProperties - :ivar database_name_override: Overrides the original database name. Relevant only when - attaching to a specific database. - :vartype database_name_override: str - :ivar database_name_prefix: Adds a prefix to the attached databases name. When following an - entire cluster, that prefix would be added to all of the databases original names from leader - cluster. - :vartype database_name_prefix: str - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "provisioning_state": {"readonly": True}, - "attached_database_names": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "location": {"key": "location", "type": "str"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - "database_name": {"key": "properties.databaseName", "type": "str"}, - "cluster_resource_id": {"key": "properties.clusterResourceId", "type": "str"}, - "attached_database_names": {"key": "properties.attachedDatabaseNames", "type": "[str]"}, - "default_principals_modification_kind": {"key": "properties.defaultPrincipalsModificationKind", "type": "str"}, - "table_level_sharing_properties": { - "key": "properties.tableLevelSharingProperties", - "type": "TableLevelSharingProperties", - }, - "database_name_override": {"key": "properties.databaseNameOverride", "type": "str"}, - "database_name_prefix": {"key": "properties.databaseNamePrefix", "type": "str"}, - } - - def __init__( - self, - *, - location: Optional[str] = None, - database_name: Optional[str] = None, - cluster_resource_id: Optional[str] = None, - default_principals_modification_kind: Optional[Union[str, "_models.DefaultPrincipalsModificationKind"]] = None, - table_level_sharing_properties: Optional["_models.TableLevelSharingProperties"] = None, - database_name_override: Optional[str] = None, - database_name_prefix: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword location: Resource location. - :paramtype location: str - :keyword database_name: The name of the database which you would like to attach, use * if you - want to follow all current and future databases. - :paramtype database_name: str - :keyword cluster_resource_id: The resource id of the cluster where the databases you would like - to attach reside. - :paramtype cluster_resource_id: str - :keyword default_principals_modification_kind: The default principals modification kind. Known - values are: "Union", "Replace", and "None". - :paramtype default_principals_modification_kind: str or - ~azure.mgmt.kusto.models.DefaultPrincipalsModificationKind - :keyword table_level_sharing_properties: Table level sharing specifications. - :paramtype table_level_sharing_properties: ~azure.mgmt.kusto.models.TableLevelSharingProperties - :keyword database_name_override: Overrides the original database name. Relevant only when - attaching to a specific database. - :paramtype database_name_override: str - :keyword database_name_prefix: Adds a prefix to the attached databases name. When following an - entire cluster, that prefix would be added to all of the databases original names from leader - cluster. - :paramtype database_name_prefix: str - """ - super().__init__(**kwargs) - self.location = location - self.provisioning_state = None - self.database_name = database_name - self.cluster_resource_id = cluster_resource_id - self.attached_database_names = None - self.default_principals_modification_kind = default_principals_modification_kind - self.table_level_sharing_properties = table_level_sharing_properties - self.database_name_override = database_name_override - self.database_name_prefix = database_name_prefix - - -class AttachedDatabaseConfigurationListResult(_serialization.Model): - """The list attached database configurations operation response. - - :ivar value: The list of attached database configurations. - :vartype value: list[~azure.mgmt.kusto.models.AttachedDatabaseConfiguration] - """ - - _attribute_map = { - "value": {"key": "value", "type": "[AttachedDatabaseConfiguration]"}, - } - - def __init__(self, *, value: Optional[List["_models.AttachedDatabaseConfiguration"]] = None, **kwargs: Any) -> None: - """ - :keyword value: The list of attached database configurations. - :paramtype value: list[~azure.mgmt.kusto.models.AttachedDatabaseConfiguration] - """ - super().__init__(**kwargs) - self.value = value - - -class AttachedDatabaseConfigurationsCheckNameRequest(_serialization.Model): # pylint: disable=name-too-long - """The result returned from a AttachedDatabaseConfigurations check name availability request. - - 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 server. - - :ivar name: Attached database resource name. Required. - :vartype name: str - :ivar type: The type of resource, for instance - Microsoft.Kusto/clusters/attachedDatabaseConfigurations. Required. Default value is - "Microsoft.Kusto/clusters/attachedDatabaseConfigurations". - :vartype type: str - """ - - _validation = { - "name": {"required": True}, - "type": {"required": True, "constant": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - } - - type = "Microsoft.Kusto/clusters/attachedDatabaseConfigurations" - - def __init__(self, *, name: str, **kwargs: Any) -> None: - """ - :keyword name: Attached database resource name. Required. - :paramtype name: str - """ - super().__init__(**kwargs) - self.name = name - - -class AzureCapacity(_serialization.Model): - """Azure capacity definition. - - All required parameters must be populated in order to send to server. - - :ivar scale_type: Scale type. Required. Known values are: "automatic", "manual", and "none". - :vartype scale_type: str or ~azure.mgmt.kusto.models.AzureScaleType - :ivar minimum: Minimum allowed capacity. Required. - :vartype minimum: int - :ivar maximum: Maximum allowed capacity. Required. - :vartype maximum: int - :ivar default: The default capacity that would be used. Required. - :vartype default: int - """ - - _validation = { - "scale_type": {"required": True}, - "minimum": {"required": True}, - "maximum": {"required": True}, - "default": {"required": True}, - } - - _attribute_map = { - "scale_type": {"key": "scaleType", "type": "str"}, - "minimum": {"key": "minimum", "type": "int"}, - "maximum": {"key": "maximum", "type": "int"}, - "default": {"key": "default", "type": "int"}, - } - - def __init__( - self, - *, - scale_type: Union[str, "_models.AzureScaleType"], - minimum: int, - maximum: int, - default: int, - **kwargs: Any - ) -> None: - """ - :keyword scale_type: Scale type. Required. Known values are: "automatic", "manual", and "none". - :paramtype scale_type: str or ~azure.mgmt.kusto.models.AzureScaleType - :keyword minimum: Minimum allowed capacity. Required. - :paramtype minimum: int - :keyword maximum: Maximum allowed capacity. Required. - :paramtype maximum: int - :keyword default: The default capacity that would be used. Required. - :paramtype default: int - """ - super().__init__(**kwargs) - self.scale_type = scale_type - self.minimum = minimum - self.maximum = maximum - self.default = default - - -class AzureResourceSku(_serialization.Model): - """Azure resource SKU definition. - - :ivar resource_type: Resource Namespace and Type. - :vartype resource_type: str - :ivar sku: The SKU details. - :vartype sku: ~azure.mgmt.kusto.models.AzureSku - :ivar capacity: The number of instances of the cluster. - :vartype capacity: ~azure.mgmt.kusto.models.AzureCapacity - """ - - _attribute_map = { - "resource_type": {"key": "resourceType", "type": "str"}, - "sku": {"key": "sku", "type": "AzureSku"}, - "capacity": {"key": "capacity", "type": "AzureCapacity"}, - } - - def __init__( - self, - *, - resource_type: Optional[str] = None, - sku: Optional["_models.AzureSku"] = None, - capacity: Optional["_models.AzureCapacity"] = None, - **kwargs: Any - ) -> None: - """ - :keyword resource_type: Resource Namespace and Type. - :paramtype resource_type: str - :keyword sku: The SKU details. - :paramtype sku: ~azure.mgmt.kusto.models.AzureSku - :keyword capacity: The number of instances of the cluster. - :paramtype capacity: ~azure.mgmt.kusto.models.AzureCapacity - """ - super().__init__(**kwargs) - self.resource_type = resource_type - self.sku = sku - self.capacity = capacity - - -class AzureSku(_serialization.Model): - """Azure SKU definition. - - All required parameters must be populated in order to send to server. - - :ivar name: SKU name. Required. Known values are: "Dev(No SLA)_Standard_D11_v2", "Dev(No - SLA)_Standard_E2a_v4", "Standard_D11_v2", "Standard_D12_v2", "Standard_D13_v2", - "Standard_D14_v2", "Standard_D32d_v4", "Standard_D16d_v5", "Standard_D32d_v5", - "Standard_DS13_v2+1TB_PS", "Standard_DS13_v2+2TB_PS", "Standard_DS14_v2+3TB_PS", - "Standard_DS14_v2+4TB_PS", "Standard_L4s", "Standard_L8s", "Standard_L16s", "Standard_L8s_v2", - "Standard_L16s_v2", "Standard_L8s_v3", "Standard_L16s_v3", "Standard_L32s_v3", - "Standard_L8as_v3", "Standard_L16as_v3", "Standard_L32as_v3", "Standard_E64i_v3", - "Standard_E80ids_v4", "Standard_E2a_v4", "Standard_E4a_v4", "Standard_E8a_v4", - "Standard_E16a_v4", "Standard_E8as_v4+1TB_PS", "Standard_E8as_v4+2TB_PS", - "Standard_E16as_v4+3TB_PS", "Standard_E16as_v4+4TB_PS", "Standard_E8as_v5+1TB_PS", - "Standard_E8as_v5+2TB_PS", "Standard_E16as_v5+3TB_PS", "Standard_E16as_v5+4TB_PS", - "Standard_E2ads_v5", "Standard_E4ads_v5", "Standard_E8ads_v5", "Standard_E16ads_v5", - "Standard_EC8as_v5+1TB_PS", "Standard_EC8as_v5+2TB_PS", "Standard_EC16as_v5+3TB_PS", - "Standard_EC16as_v5+4TB_PS", "Standard_EC8ads_v5", "Standard_EC16ads_v5", - "Standard_E8s_v4+1TB_PS", "Standard_E8s_v4+2TB_PS", "Standard_E16s_v4+3TB_PS", - "Standard_E16s_v4+4TB_PS", "Standard_E8s_v5+1TB_PS", "Standard_E8s_v5+2TB_PS", - "Standard_E16s_v5+3TB_PS", "Standard_E16s_v5+4TB_PS", "Standard_E2d_v4", "Standard_E4d_v4", - "Standard_E8d_v4", "Standard_E16d_v4", "Standard_E2d_v5", "Standard_E4d_v5", "Standard_E8d_v5", - and "Standard_E16d_v5". - :vartype name: str or ~azure.mgmt.kusto.models.AzureSkuName - :ivar capacity: The number of instances of the cluster. - :vartype capacity: int - :ivar tier: SKU tier. Required. Known values are: "Basic" and "Standard". - :vartype tier: str or ~azure.mgmt.kusto.models.AzureSkuTier - """ - - _validation = { - "name": {"required": True}, - "tier": {"required": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "capacity": {"key": "capacity", "type": "int"}, - "tier": {"key": "tier", "type": "str"}, - } - - def __init__( - self, - *, - name: Union[str, "_models.AzureSkuName"], - tier: Union[str, "_models.AzureSkuTier"], - capacity: Optional[int] = None, - **kwargs: Any - ) -> None: - """ - :keyword name: SKU name. Required. Known values are: "Dev(No SLA)_Standard_D11_v2", "Dev(No - SLA)_Standard_E2a_v4", "Standard_D11_v2", "Standard_D12_v2", "Standard_D13_v2", - "Standard_D14_v2", "Standard_D32d_v4", "Standard_D16d_v5", "Standard_D32d_v5", - "Standard_DS13_v2+1TB_PS", "Standard_DS13_v2+2TB_PS", "Standard_DS14_v2+3TB_PS", - "Standard_DS14_v2+4TB_PS", "Standard_L4s", "Standard_L8s", "Standard_L16s", "Standard_L8s_v2", - "Standard_L16s_v2", "Standard_L8s_v3", "Standard_L16s_v3", "Standard_L32s_v3", - "Standard_L8as_v3", "Standard_L16as_v3", "Standard_L32as_v3", "Standard_E64i_v3", - "Standard_E80ids_v4", "Standard_E2a_v4", "Standard_E4a_v4", "Standard_E8a_v4", - "Standard_E16a_v4", "Standard_E8as_v4+1TB_PS", "Standard_E8as_v4+2TB_PS", - "Standard_E16as_v4+3TB_PS", "Standard_E16as_v4+4TB_PS", "Standard_E8as_v5+1TB_PS", - "Standard_E8as_v5+2TB_PS", "Standard_E16as_v5+3TB_PS", "Standard_E16as_v5+4TB_PS", - "Standard_E2ads_v5", "Standard_E4ads_v5", "Standard_E8ads_v5", "Standard_E16ads_v5", - "Standard_EC8as_v5+1TB_PS", "Standard_EC8as_v5+2TB_PS", "Standard_EC16as_v5+3TB_PS", - "Standard_EC16as_v5+4TB_PS", "Standard_EC8ads_v5", "Standard_EC16ads_v5", - "Standard_E8s_v4+1TB_PS", "Standard_E8s_v4+2TB_PS", "Standard_E16s_v4+3TB_PS", - "Standard_E16s_v4+4TB_PS", "Standard_E8s_v5+1TB_PS", "Standard_E8s_v5+2TB_PS", - "Standard_E16s_v5+3TB_PS", "Standard_E16s_v5+4TB_PS", "Standard_E2d_v4", "Standard_E4d_v4", - "Standard_E8d_v4", "Standard_E16d_v4", "Standard_E2d_v5", "Standard_E4d_v5", "Standard_E8d_v5", - and "Standard_E16d_v5". - :paramtype name: str or ~azure.mgmt.kusto.models.AzureSkuName - :keyword capacity: The number of instances of the cluster. - :paramtype capacity: int - :keyword tier: SKU tier. Required. Known values are: "Basic" and "Standard". - :paramtype tier: str or ~azure.mgmt.kusto.models.AzureSkuTier - """ - super().__init__(**kwargs) - self.name = name - self.capacity = capacity - self.tier = tier - - -class CalloutPoliciesList(_serialization.Model): - """A list of the service's callout policy objects. - - :ivar value: A list of the service's callout policies. - :vartype value: list[~azure.mgmt.kusto.models.CalloutPolicy] - :ivar next_link: The URL to get the next set of callout policies list results if there are any. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[CalloutPolicy]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, *, value: Optional[List["_models.CalloutPolicy"]] = None, next_link: Optional[str] = None, **kwargs: Any - ) -> None: - """ - :keyword value: A list of the service's callout policies. - :paramtype value: list[~azure.mgmt.kusto.models.CalloutPolicy] - :keyword next_link: The URL to get the next set of callout policies list results if there are - any. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class CalloutPolicy(_serialization.Model): - """Configuration for external callout policies, including URI patterns, access types, and service - types. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar callout_uri_regex: Regular expression or FQDN pattern for the callout URI. - :vartype callout_uri_regex: str - :ivar callout_type: Type of the callout service, specifying the kind of external resource or - service being accessed. Known values are: "kusto", "sql", "cosmosdb", "external_data", - "azure_digital_twins", "sandbox_artifacts", "webapi", "mysql", "postgresql", "genevametrics", - and "azure_openai". - :vartype callout_type: str or ~azure.mgmt.kusto.models.CalloutType - :ivar outbound_access: Indicates whether outbound access is permitted for the specified URI - pattern. Known values are: "Allow" and "Deny". - :vartype outbound_access: str or ~azure.mgmt.kusto.models.OutboundAccess - :ivar callout_id: Unique identifier for the callout configuration. - :vartype callout_id: str - """ - - _validation = { - "callout_id": {"readonly": True}, - } - - _attribute_map = { - "callout_uri_regex": {"key": "calloutUriRegex", "type": "str"}, - "callout_type": {"key": "calloutType", "type": "str"}, - "outbound_access": {"key": "outboundAccess", "type": "str"}, - "callout_id": {"key": "calloutId", "type": "str"}, - } - - def __init__( - self, - *, - callout_uri_regex: Optional[str] = None, - callout_type: Optional[Union[str, "_models.CalloutType"]] = None, - outbound_access: Optional[Union[str, "_models.OutboundAccess"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword callout_uri_regex: Regular expression or FQDN pattern for the callout URI. - :paramtype callout_uri_regex: str - :keyword callout_type: Type of the callout service, specifying the kind of external resource or - service being accessed. Known values are: "kusto", "sql", "cosmosdb", "external_data", - "azure_digital_twins", "sandbox_artifacts", "webapi", "mysql", "postgresql", "genevametrics", - and "azure_openai". - :paramtype callout_type: str or ~azure.mgmt.kusto.models.CalloutType - :keyword outbound_access: Indicates whether outbound access is permitted for the specified URI - pattern. Known values are: "Allow" and "Deny". - :paramtype outbound_access: str or ~azure.mgmt.kusto.models.OutboundAccess - """ - super().__init__(**kwargs) - self.callout_uri_regex = callout_uri_regex - self.callout_type = callout_type - self.outbound_access = outbound_access - self.callout_id = None - - -class CalloutPolicyToRemove(_serialization.Model): - """Configuration for an external callout policy to remove. - - :ivar callout_id: Unique identifier for the callout configuration. - :vartype callout_id: str - """ - - _attribute_map = { - "callout_id": {"key": "calloutId", "type": "str"}, - } - - def __init__(self, *, callout_id: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword callout_id: Unique identifier for the callout configuration. - :paramtype callout_id: str - """ - super().__init__(**kwargs) - self.callout_id = callout_id - - -class CheckNameRequest(_serialization.Model): - """The result returned from a database check name availability request. - - All required parameters must be populated in order to send to server. - - :ivar name: Resource name. Required. - :vartype name: str - :ivar type: The type of resource, for instance Microsoft.Kusto/clusters/databases. Required. - Known values are: "Microsoft.Kusto/clusters/databases" and - "Microsoft.Kusto/clusters/attachedDatabaseConfigurations". - :vartype type: str or ~azure.mgmt.kusto.models.Type - """ - - _validation = { - "name": {"required": True}, - "type": {"required": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - } - - def __init__(self, *, name: str, type: Union[str, "_models.Type"], **kwargs: Any) -> None: - """ - :keyword name: Resource name. Required. - :paramtype name: str - :keyword type: The type of resource, for instance Microsoft.Kusto/clusters/databases. Required. - Known values are: "Microsoft.Kusto/clusters/databases" and - "Microsoft.Kusto/clusters/attachedDatabaseConfigurations". - :paramtype type: str or ~azure.mgmt.kusto.models.Type - """ - super().__init__(**kwargs) - self.name = name - self.type = type - - -class CheckNameResult(_serialization.Model): - """The result returned from a check name availability request. - - :ivar name_available: Specifies a Boolean value that indicates if the name is available. - :vartype name_available: bool - :ivar name: The name that was checked. - :vartype name: str - :ivar message: Message indicating an unavailable name due to a conflict, or a description of - the naming rules that are violated. - :vartype message: str - :ivar reason: Message providing the reason why the given name is invalid. Known values are: - "Invalid" and "AlreadyExists". - :vartype reason: str or ~azure.mgmt.kusto.models.Reason - """ - - _attribute_map = { - "name_available": {"key": "nameAvailable", "type": "bool"}, - "name": {"key": "name", "type": "str"}, - "message": {"key": "message", "type": "str"}, - "reason": {"key": "reason", "type": "str"}, - } - - def __init__( - self, - *, - name_available: Optional[bool] = None, - name: Optional[str] = None, - message: Optional[str] = None, - reason: Optional[Union[str, "_models.Reason"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword name_available: Specifies a Boolean value that indicates if the name is available. - :paramtype name_available: bool - :keyword name: The name that was checked. - :paramtype name: str - :keyword message: Message indicating an unavailable name due to a conflict, or a description of - the naming rules that are violated. - :paramtype message: str - :keyword reason: Message providing the reason why the given name is invalid. Known values are: - "Invalid" and "AlreadyExists". - :paramtype reason: str or ~azure.mgmt.kusto.models.Reason - """ - super().__init__(**kwargs) - self.name_available = name_available - self.name = name - self.message = message - self.reason = reason - - -class TrackedResource(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 server. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long - :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 tags: Resource tags. - :vartype tags: dict[str, str] - :ivar location: The geo-location where the resource lives. Required. - :vartype location: str - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "location": {"required": 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"}, - } - - def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: - """ - :keyword tags: Resource tags. - :paramtype tags: dict[str, str] - :keyword location: The geo-location where the resource lives. Required. - :paramtype location: str - """ - super().__init__(**kwargs) - self.tags = tags - self.location = location - - -class Cluster(TrackedResource): - """Class representing a Kusto cluster. - - 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 server. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long - :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 tags: Resource tags. - :vartype tags: dict[str, str] - :ivar location: The geo-location where the resource lives. Required. - :vartype location: str - :ivar sku: The SKU of the cluster. Required. - :vartype sku: ~azure.mgmt.kusto.models.AzureSku - :ivar system_data: Metadata pertaining to creation and last modification of the resource. - :vartype system_data: ~azure.mgmt.kusto.models.SystemData - :ivar zones: The availability zones of the cluster. - :vartype zones: list[str] - :ivar identity: The identity of the cluster, if configured. - :vartype identity: ~azure.mgmt.kusto.models.Identity - :ivar etag: A unique read-only string that changes whenever the resource is updated. - :vartype etag: str - :ivar state: The state of the resource. Known values are: "Creating", "Unavailable", "Running", - "Deleting", "Deleted", "Stopping", "Stopped", "Starting", "Updating", and "Migrated". - :vartype state: str or ~azure.mgmt.kusto.models.State - :ivar provisioning_state: The provisioned state of the resource. Known values are: "Running", - "Creating", "Deleting", "Succeeded", "Failed", "Moving", and "Canceled". - :vartype provisioning_state: str or ~azure.mgmt.kusto.models.ProvisioningState - :ivar uri: The cluster URI. - :vartype uri: str - :ivar data_ingestion_uri: The cluster data ingestion URI. - :vartype data_ingestion_uri: str - :ivar state_reason: The reason for the cluster's current state. - :vartype state_reason: str - :ivar trusted_external_tenants: The cluster's external tenants. - :vartype trusted_external_tenants: list[~azure.mgmt.kusto.models.TrustedExternalTenant] - :ivar optimized_autoscale: Optimized auto scale definition. - :vartype optimized_autoscale: ~azure.mgmt.kusto.models.OptimizedAutoscale - :ivar enable_disk_encryption: A boolean value that indicates if the cluster's disks are - encrypted. - :vartype enable_disk_encryption: bool - :ivar enable_streaming_ingest: A boolean value that indicates if the streaming ingest is - enabled. - :vartype enable_streaming_ingest: bool - :ivar virtual_network_configuration: Virtual network definition. - :vartype virtual_network_configuration: ~azure.mgmt.kusto.models.VirtualNetworkConfiguration - :ivar key_vault_properties: KeyVault properties for the cluster encryption. - :vartype key_vault_properties: ~azure.mgmt.kusto.models.KeyVaultProperties - :ivar enable_purge: A boolean value that indicates if the purge operations are enabled. - :vartype enable_purge: bool - :ivar language_extensions: List of the cluster's language extensions. - :vartype language_extensions: ~azure.mgmt.kusto.models.LanguageExtensionsList - :ivar enable_double_encryption: A boolean value that indicates if double encryption is enabled. - :vartype enable_double_encryption: bool - :ivar public_network_access: Public network access to the cluster is enabled by default. When - disabled, only private endpoint connection to the cluster is allowed. Known values are: - "Enabled" and "Disabled". - :vartype public_network_access: str or ~azure.mgmt.kusto.models.PublicNetworkAccess - :ivar allowed_ip_range_list: The list of ips in the format of CIDR allowed to connect to the - cluster. - :vartype allowed_ip_range_list: list[str] - :ivar engine_type: The engine type. Known values are: "V2" and "V3". - :vartype engine_type: str or ~azure.mgmt.kusto.models.EngineType - :ivar accepted_audiences: The cluster's accepted audiences. - :vartype accepted_audiences: list[~azure.mgmt.kusto.models.AcceptedAudiences] - :ivar enable_auto_stop: A boolean value that indicates if the cluster could be automatically - stopped (due to lack of data or no activity for many days). - :vartype enable_auto_stop: bool - :ivar restrict_outbound_network_access: Whether or not to restrict outbound network access. - Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Known values are: - "Enabled" and "Disabled". - :vartype restrict_outbound_network_access: str or - ~azure.mgmt.kusto.models.ClusterNetworkAccessFlag - :ivar allowed_fqdn_list: List of allowed FQDNs(Fully Qualified Domain Name) for egress from - Cluster. - :vartype allowed_fqdn_list: list[str] - :ivar callout_policies: List of callout policies for egress from Cluster. - :vartype callout_policies: list[~azure.mgmt.kusto.models.CalloutPolicy] - :ivar public_ip_type: Indicates what public IP type to create - IPv4 (default), or DualStack - (both IPv4 and IPv6). Known values are: "IPv4" and "DualStack". - :vartype public_ip_type: str or ~azure.mgmt.kusto.models.PublicIPType - :ivar virtual_cluster_graduation_properties: Virtual Cluster graduation properties. - :vartype virtual_cluster_graduation_properties: str - :ivar private_endpoint_connections: A list of private endpoint connections. - :vartype private_endpoint_connections: list[~azure.mgmt.kusto.models.PrivateEndpointConnection] - :ivar migration_cluster: Properties of the peer cluster involved in a migration to/from this - cluster. - :vartype migration_cluster: ~azure.mgmt.kusto.models.MigrationClusterProperties - :ivar zone_status: Indicates whether the cluster is zonal or non-zonal. Known values are: - "NonZonal", "ZonalInconsistency", and "Zonal". - :vartype zone_status: str or ~azure.mgmt.kusto.models.ZoneStatus - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "location": {"required": True}, - "sku": {"required": True}, - "system_data": {"readonly": True}, - "etag": {"readonly": True}, - "state": {"readonly": True}, - "provisioning_state": {"readonly": True}, - "uri": {"readonly": True}, - "data_ingestion_uri": {"readonly": True}, - "state_reason": {"readonly": True}, - "private_endpoint_connections": {"readonly": True}, - "migration_cluster": {"readonly": True}, - "zone_status": {"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"}, - "sku": {"key": "sku", "type": "AzureSku"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "zones": {"key": "zones", "type": "[str]"}, - "identity": {"key": "identity", "type": "Identity"}, - "etag": {"key": "etag", "type": "str"}, - "state": {"key": "properties.state", "type": "str"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - "uri": {"key": "properties.uri", "type": "str"}, - "data_ingestion_uri": {"key": "properties.dataIngestionUri", "type": "str"}, - "state_reason": {"key": "properties.stateReason", "type": "str"}, - "trusted_external_tenants": {"key": "properties.trustedExternalTenants", "type": "[TrustedExternalTenant]"}, - "optimized_autoscale": {"key": "properties.optimizedAutoscale", "type": "OptimizedAutoscale"}, - "enable_disk_encryption": {"key": "properties.enableDiskEncryption", "type": "bool"}, - "enable_streaming_ingest": {"key": "properties.enableStreamingIngest", "type": "bool"}, - "virtual_network_configuration": { - "key": "properties.virtualNetworkConfiguration", - "type": "VirtualNetworkConfiguration", - }, - "key_vault_properties": {"key": "properties.keyVaultProperties", "type": "KeyVaultProperties"}, - "enable_purge": {"key": "properties.enablePurge", "type": "bool"}, - "language_extensions": {"key": "properties.languageExtensions", "type": "LanguageExtensionsList"}, - "enable_double_encryption": {"key": "properties.enableDoubleEncryption", "type": "bool"}, - "public_network_access": {"key": "properties.publicNetworkAccess", "type": "str"}, - "allowed_ip_range_list": {"key": "properties.allowedIpRangeList", "type": "[str]"}, - "engine_type": {"key": "properties.engineType", "type": "str"}, - "accepted_audiences": {"key": "properties.acceptedAudiences", "type": "[AcceptedAudiences]"}, - "enable_auto_stop": {"key": "properties.enableAutoStop", "type": "bool"}, - "restrict_outbound_network_access": {"key": "properties.restrictOutboundNetworkAccess", "type": "str"}, - "allowed_fqdn_list": {"key": "properties.allowedFqdnList", "type": "[str]"}, - "callout_policies": {"key": "properties.calloutPolicies", "type": "[CalloutPolicy]"}, - "public_ip_type": {"key": "properties.publicIPType", "type": "str"}, - "virtual_cluster_graduation_properties": { - "key": "properties.virtualClusterGraduationProperties", - "type": "str", - }, - "private_endpoint_connections": { - "key": "properties.privateEndpointConnections", - "type": "[PrivateEndpointConnection]", - }, - "migration_cluster": {"key": "properties.migrationCluster", "type": "MigrationClusterProperties"}, - "zone_status": {"key": "properties.zoneStatus", "type": "str"}, - } - - def __init__( # pylint: disable=too-many-locals - self, - *, - location: str, - sku: "_models.AzureSku", - tags: Optional[Dict[str, str]] = None, - zones: Optional[List[str]] = None, - identity: Optional["_models.Identity"] = None, - trusted_external_tenants: Optional[List["_models.TrustedExternalTenant"]] = None, - optimized_autoscale: Optional["_models.OptimizedAutoscale"] = None, - enable_disk_encryption: bool = False, - enable_streaming_ingest: bool = False, - virtual_network_configuration: Optional["_models.VirtualNetworkConfiguration"] = None, - key_vault_properties: Optional["_models.KeyVaultProperties"] = None, - enable_purge: bool = False, - language_extensions: Optional["_models.LanguageExtensionsList"] = None, - enable_double_encryption: bool = False, - public_network_access: Union[str, "_models.PublicNetworkAccess"] = "Enabled", - allowed_ip_range_list: Optional[List[str]] = None, - engine_type: Union[str, "_models.EngineType"] = "V3", - accepted_audiences: Optional[List["_models.AcceptedAudiences"]] = None, - enable_auto_stop: bool = True, - restrict_outbound_network_access: Union[str, "_models.ClusterNetworkAccessFlag"] = "Disabled", - allowed_fqdn_list: Optional[List[str]] = None, - callout_policies: Optional[List["_models.CalloutPolicy"]] = None, - public_ip_type: Union[str, "_models.PublicIPType"] = "IPv4", - virtual_cluster_graduation_properties: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword tags: Resource tags. - :paramtype tags: dict[str, str] - :keyword location: The geo-location where the resource lives. Required. - :paramtype location: str - :keyword sku: The SKU of the cluster. Required. - :paramtype sku: ~azure.mgmt.kusto.models.AzureSku - :keyword zones: The availability zones of the cluster. - :paramtype zones: list[str] - :keyword identity: The identity of the cluster, if configured. - :paramtype identity: ~azure.mgmt.kusto.models.Identity - :keyword trusted_external_tenants: The cluster's external tenants. - :paramtype trusted_external_tenants: list[~azure.mgmt.kusto.models.TrustedExternalTenant] - :keyword optimized_autoscale: Optimized auto scale definition. - :paramtype optimized_autoscale: ~azure.mgmt.kusto.models.OptimizedAutoscale - :keyword enable_disk_encryption: A boolean value that indicates if the cluster's disks are - encrypted. - :paramtype enable_disk_encryption: bool - :keyword enable_streaming_ingest: A boolean value that indicates if the streaming ingest is - enabled. - :paramtype enable_streaming_ingest: bool - :keyword virtual_network_configuration: Virtual network definition. - :paramtype virtual_network_configuration: ~azure.mgmt.kusto.models.VirtualNetworkConfiguration - :keyword key_vault_properties: KeyVault properties for the cluster encryption. - :paramtype key_vault_properties: ~azure.mgmt.kusto.models.KeyVaultProperties - :keyword enable_purge: A boolean value that indicates if the purge operations are enabled. - :paramtype enable_purge: bool - :keyword language_extensions: List of the cluster's language extensions. - :paramtype language_extensions: ~azure.mgmt.kusto.models.LanguageExtensionsList - :keyword enable_double_encryption: A boolean value that indicates if double encryption is - enabled. - :paramtype enable_double_encryption: bool - :keyword public_network_access: Public network access to the cluster is enabled by default. - When disabled, only private endpoint connection to the cluster is allowed. Known values are: - "Enabled" and "Disabled". - :paramtype public_network_access: str or ~azure.mgmt.kusto.models.PublicNetworkAccess - :keyword allowed_ip_range_list: The list of ips in the format of CIDR allowed to connect to the - cluster. - :paramtype allowed_ip_range_list: list[str] - :keyword engine_type: The engine type. Known values are: "V2" and "V3". - :paramtype engine_type: str or ~azure.mgmt.kusto.models.EngineType - :keyword accepted_audiences: The cluster's accepted audiences. - :paramtype accepted_audiences: list[~azure.mgmt.kusto.models.AcceptedAudiences] - :keyword enable_auto_stop: A boolean value that indicates if the cluster could be automatically - stopped (due to lack of data or no activity for many days). - :paramtype enable_auto_stop: bool - :keyword restrict_outbound_network_access: Whether or not to restrict outbound network access. - Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Known values are: - "Enabled" and "Disabled". - :paramtype restrict_outbound_network_access: str or - ~azure.mgmt.kusto.models.ClusterNetworkAccessFlag - :keyword allowed_fqdn_list: List of allowed FQDNs(Fully Qualified Domain Name) for egress from - Cluster. - :paramtype allowed_fqdn_list: list[str] - :keyword callout_policies: List of callout policies for egress from Cluster. - :paramtype callout_policies: list[~azure.mgmt.kusto.models.CalloutPolicy] - :keyword public_ip_type: Indicates what public IP type to create - IPv4 (default), or DualStack - (both IPv4 and IPv6). Known values are: "IPv4" and "DualStack". - :paramtype public_ip_type: str or ~azure.mgmt.kusto.models.PublicIPType - :keyword virtual_cluster_graduation_properties: Virtual Cluster graduation properties. - :paramtype virtual_cluster_graduation_properties: str - """ - super().__init__(tags=tags, location=location, **kwargs) - self.sku = sku - self.system_data = None - self.zones = zones - self.identity = identity - self.etag = None - self.state = None - self.provisioning_state = None - self.uri = None - self.data_ingestion_uri = None - self.state_reason = None - self.trusted_external_tenants = trusted_external_tenants - self.optimized_autoscale = optimized_autoscale - self.enable_disk_encryption = enable_disk_encryption - self.enable_streaming_ingest = enable_streaming_ingest - self.virtual_network_configuration = virtual_network_configuration - self.key_vault_properties = key_vault_properties - self.enable_purge = enable_purge - self.language_extensions = language_extensions - self.enable_double_encryption = enable_double_encryption - self.public_network_access = public_network_access - self.allowed_ip_range_list = allowed_ip_range_list - self.engine_type = engine_type - self.accepted_audiences = accepted_audiences - self.enable_auto_stop = enable_auto_stop - self.restrict_outbound_network_access = restrict_outbound_network_access - self.allowed_fqdn_list = allowed_fqdn_list - self.callout_policies = callout_policies - self.public_ip_type = public_ip_type - self.virtual_cluster_graduation_properties = virtual_cluster_graduation_properties - self.private_endpoint_connections = None - self.migration_cluster = None - self.zone_status = None - - -class ClusterCheckNameRequest(_serialization.Model): - """The result returned from a cluster check name availability request. - - 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 server. - - :ivar name: Cluster name. Required. - :vartype name: str - :ivar type: The type of resource, Microsoft.Kusto/clusters. Required. Default value is - "Microsoft.Kusto/clusters". - :vartype type: str - """ - - _validation = { - "name": {"required": True}, - "type": {"required": True, "constant": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - } - - type = "Microsoft.Kusto/clusters" - - def __init__(self, *, name: str, **kwargs: Any) -> None: - """ - :keyword name: Cluster name. Required. - :paramtype name: str - """ - super().__init__(**kwargs) - self.name = name - - -class ClusterListResult(_serialization.Model): - """The list Kusto clusters operation response. - - :ivar value: The list of Kusto clusters. - :vartype value: list[~azure.mgmt.kusto.models.Cluster] - """ - - _attribute_map = { - "value": {"key": "value", "type": "[Cluster]"}, - } - - def __init__(self, *, value: Optional[List["_models.Cluster"]] = None, **kwargs: Any) -> None: - """ - :keyword value: The list of Kusto clusters. - :paramtype value: list[~azure.mgmt.kusto.models.Cluster] - """ - super().__init__(**kwargs) - self.value = value - - -class ClusterMigrateRequest(_serialization.Model): - """A cluster migrate request. - - All required parameters must be populated in order to send to server. - - :ivar cluster_resource_id: Resource ID of the destination cluster or kusto pool. Required. - :vartype cluster_resource_id: str - """ - - _validation = { - "cluster_resource_id": {"required": True}, - } - - _attribute_map = { - "cluster_resource_id": {"key": "clusterResourceId", "type": "str"}, - } - - def __init__(self, *, cluster_resource_id: str, **kwargs: Any) -> None: - """ - :keyword cluster_resource_id: Resource ID of the destination cluster or kusto pool. Required. - :paramtype cluster_resource_id: str - """ - super().__init__(**kwargs) - self.cluster_resource_id = cluster_resource_id - - -class ClusterPrincipalAssignment(ProxyResource): - """Class representing a cluster principal assignment. - - 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}. # pylint: disable=line-too-long - :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 principal_id: The principal ID assigned to the cluster principal. It can be a user email, - application ID, or security group name. - :vartype principal_id: str - :ivar role: Cluster principal role. Known values are: "AllDatabasesAdmin", - "AllDatabasesViewer", and "AllDatabasesMonitor". - :vartype role: str or ~azure.mgmt.kusto.models.ClusterPrincipalRole - :ivar tenant_id: The tenant id of the principal. - :vartype tenant_id: str - :ivar principal_type: Principal type. Known values are: "App", "Group", and "User". - :vartype principal_type: str or ~azure.mgmt.kusto.models.PrincipalType - :ivar tenant_name: The tenant name of the principal. - :vartype tenant_name: str - :ivar principal_name: The principal name. - :vartype principal_name: str - :ivar provisioning_state: The provisioned state of the resource. Known values are: "Running", - "Creating", "Deleting", "Succeeded", "Failed", "Moving", and "Canceled". - :vartype provisioning_state: str or ~azure.mgmt.kusto.models.ProvisioningState - :ivar aad_object_id: The service principal object id in AAD (Azure active directory). - :vartype aad_object_id: str - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "tenant_name": {"readonly": True}, - "principal_name": {"readonly": True}, - "provisioning_state": {"readonly": True}, - "aad_object_id": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "principal_id": {"key": "properties.principalId", "type": "str"}, - "role": {"key": "properties.role", "type": "str"}, - "tenant_id": {"key": "properties.tenantId", "type": "str"}, - "principal_type": {"key": "properties.principalType", "type": "str"}, - "tenant_name": {"key": "properties.tenantName", "type": "str"}, - "principal_name": {"key": "properties.principalName", "type": "str"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - "aad_object_id": {"key": "properties.aadObjectId", "type": "str"}, - } - - def __init__( - self, - *, - principal_id: Optional[str] = None, - role: Optional[Union[str, "_models.ClusterPrincipalRole"]] = None, - tenant_id: Optional[str] = None, - principal_type: Optional[Union[str, "_models.PrincipalType"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword principal_id: The principal ID assigned to the cluster principal. It can be a user - email, application ID, or security group name. - :paramtype principal_id: str - :keyword role: Cluster principal role. Known values are: "AllDatabasesAdmin", - "AllDatabasesViewer", and "AllDatabasesMonitor". - :paramtype role: str or ~azure.mgmt.kusto.models.ClusterPrincipalRole - :keyword tenant_id: The tenant id of the principal. - :paramtype tenant_id: str - :keyword principal_type: Principal type. Known values are: "App", "Group", and "User". - :paramtype principal_type: str or ~azure.mgmt.kusto.models.PrincipalType - """ - super().__init__(**kwargs) - self.principal_id = principal_id - self.role = role - self.tenant_id = tenant_id - self.principal_type = principal_type - self.tenant_name = None - self.principal_name = None - self.provisioning_state = None - self.aad_object_id = None - - -class ClusterPrincipalAssignmentCheckNameRequest(_serialization.Model): # pylint: disable=name-too-long - """A principal assignment check name availability request. - - 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 server. - - :ivar name: Principal Assignment resource name. Required. - :vartype name: str - :ivar type: The type of resource, Microsoft.Kusto/clusters/principalAssignments. Required. - Default value is "Microsoft.Kusto/clusters/principalAssignments". - :vartype type: str - """ - - _validation = { - "name": {"required": True}, - "type": {"required": True, "constant": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - } - - type = "Microsoft.Kusto/clusters/principalAssignments" - - def __init__(self, *, name: str, **kwargs: Any) -> None: - """ - :keyword name: Principal Assignment resource name. Required. - :paramtype name: str - """ - super().__init__(**kwargs) - self.name = name - - -class ClusterPrincipalAssignmentListResult(_serialization.Model): - """The list Kusto cluster principal assignments operation response. - - :ivar value: The list of Kusto cluster principal assignments. - :vartype value: list[~azure.mgmt.kusto.models.ClusterPrincipalAssignment] - """ - - _attribute_map = { - "value": {"key": "value", "type": "[ClusterPrincipalAssignment]"}, - } - - def __init__(self, *, value: Optional[List["_models.ClusterPrincipalAssignment"]] = None, **kwargs: Any) -> None: - """ - :keyword value: The list of Kusto cluster principal assignments. - :paramtype value: list[~azure.mgmt.kusto.models.ClusterPrincipalAssignment] - """ - super().__init__(**kwargs) - self.value = value - - -class ClusterUpdate(Resource): - """Class representing an update to a Kusto cluster. - - 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}. # pylint: disable=line-too-long - :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 tags: Resource tags. - :vartype tags: dict[str, str] - :ivar location: Resource location. - :vartype location: str - :ivar sku: The SKU of the cluster. - :vartype sku: ~azure.mgmt.kusto.models.AzureSku - :ivar zones: The availability zones of the cluster. - :vartype zones: list[str] - :ivar identity: The identity of the cluster, if configured. - :vartype identity: ~azure.mgmt.kusto.models.Identity - :ivar state: The state of the resource. Known values are: "Creating", "Unavailable", "Running", - "Deleting", "Deleted", "Stopping", "Stopped", "Starting", "Updating", and "Migrated". - :vartype state: str or ~azure.mgmt.kusto.models.State - :ivar provisioning_state: The provisioned state of the resource. Known values are: "Running", - "Creating", "Deleting", "Succeeded", "Failed", "Moving", and "Canceled". - :vartype provisioning_state: str or ~azure.mgmt.kusto.models.ProvisioningState - :ivar uri: The cluster URI. - :vartype uri: str - :ivar data_ingestion_uri: The cluster data ingestion URI. - :vartype data_ingestion_uri: str - :ivar state_reason: The reason for the cluster's current state. - :vartype state_reason: str - :ivar trusted_external_tenants: The cluster's external tenants. - :vartype trusted_external_tenants: list[~azure.mgmt.kusto.models.TrustedExternalTenant] - :ivar optimized_autoscale: Optimized auto scale definition. - :vartype optimized_autoscale: ~azure.mgmt.kusto.models.OptimizedAutoscale - :ivar enable_disk_encryption: A boolean value that indicates if the cluster's disks are - encrypted. - :vartype enable_disk_encryption: bool - :ivar enable_streaming_ingest: A boolean value that indicates if the streaming ingest is - enabled. - :vartype enable_streaming_ingest: bool - :ivar virtual_network_configuration: Virtual network definition. - :vartype virtual_network_configuration: ~azure.mgmt.kusto.models.VirtualNetworkConfiguration - :ivar key_vault_properties: KeyVault properties for the cluster encryption. - :vartype key_vault_properties: ~azure.mgmt.kusto.models.KeyVaultProperties - :ivar enable_purge: A boolean value that indicates if the purge operations are enabled. - :vartype enable_purge: bool - :ivar language_extensions: List of the cluster's language extensions. - :vartype language_extensions: ~azure.mgmt.kusto.models.LanguageExtensionsList - :ivar enable_double_encryption: A boolean value that indicates if double encryption is enabled. - :vartype enable_double_encryption: bool - :ivar public_network_access: Public network access to the cluster is enabled by default. When - disabled, only private endpoint connection to the cluster is allowed. Known values are: - "Enabled" and "Disabled". - :vartype public_network_access: str or ~azure.mgmt.kusto.models.PublicNetworkAccess - :ivar allowed_ip_range_list: The list of ips in the format of CIDR allowed to connect to the - cluster. - :vartype allowed_ip_range_list: list[str] - :ivar engine_type: The engine type. Known values are: "V2" and "V3". - :vartype engine_type: str or ~azure.mgmt.kusto.models.EngineType - :ivar accepted_audiences: The cluster's accepted audiences. - :vartype accepted_audiences: list[~azure.mgmt.kusto.models.AcceptedAudiences] - :ivar enable_auto_stop: A boolean value that indicates if the cluster could be automatically - stopped (due to lack of data or no activity for many days). - :vartype enable_auto_stop: bool - :ivar restrict_outbound_network_access: Whether or not to restrict outbound network access. - Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Known values are: - "Enabled" and "Disabled". - :vartype restrict_outbound_network_access: str or - ~azure.mgmt.kusto.models.ClusterNetworkAccessFlag - :ivar allowed_fqdn_list: List of allowed FQDNs(Fully Qualified Domain Name) for egress from - Cluster. - :vartype allowed_fqdn_list: list[str] - :ivar callout_policies: List of callout policies for egress from Cluster. - :vartype callout_policies: list[~azure.mgmt.kusto.models.CalloutPolicy] - :ivar public_ip_type: Indicates what public IP type to create - IPv4 (default), or DualStack - (both IPv4 and IPv6). Known values are: "IPv4" and "DualStack". - :vartype public_ip_type: str or ~azure.mgmt.kusto.models.PublicIPType - :ivar virtual_cluster_graduation_properties: Virtual Cluster graduation properties. - :vartype virtual_cluster_graduation_properties: str - :ivar private_endpoint_connections: A list of private endpoint connections. - :vartype private_endpoint_connections: list[~azure.mgmt.kusto.models.PrivateEndpointConnection] - :ivar migration_cluster: Properties of the peer cluster involved in a migration to/from this - cluster. - :vartype migration_cluster: ~azure.mgmt.kusto.models.MigrationClusterProperties - :ivar zone_status: Indicates whether the cluster is zonal or non-zonal. Known values are: - "NonZonal", "ZonalInconsistency", and "Zonal". - :vartype zone_status: str or ~azure.mgmt.kusto.models.ZoneStatus - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "state": {"readonly": True}, - "provisioning_state": {"readonly": True}, - "uri": {"readonly": True}, - "data_ingestion_uri": {"readonly": True}, - "state_reason": {"readonly": True}, - "private_endpoint_connections": {"readonly": True}, - "migration_cluster": {"readonly": True}, - "zone_status": {"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"}, - "sku": {"key": "sku", "type": "AzureSku"}, - "zones": {"key": "zones", "type": "[str]"}, - "identity": {"key": "identity", "type": "Identity"}, - "state": {"key": "properties.state", "type": "str"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - "uri": {"key": "properties.uri", "type": "str"}, - "data_ingestion_uri": {"key": "properties.dataIngestionUri", "type": "str"}, - "state_reason": {"key": "properties.stateReason", "type": "str"}, - "trusted_external_tenants": {"key": "properties.trustedExternalTenants", "type": "[TrustedExternalTenant]"}, - "optimized_autoscale": {"key": "properties.optimizedAutoscale", "type": "OptimizedAutoscale"}, - "enable_disk_encryption": {"key": "properties.enableDiskEncryption", "type": "bool"}, - "enable_streaming_ingest": {"key": "properties.enableStreamingIngest", "type": "bool"}, - "virtual_network_configuration": { - "key": "properties.virtualNetworkConfiguration", - "type": "VirtualNetworkConfiguration", - }, - "key_vault_properties": {"key": "properties.keyVaultProperties", "type": "KeyVaultProperties"}, - "enable_purge": {"key": "properties.enablePurge", "type": "bool"}, - "language_extensions": {"key": "properties.languageExtensions", "type": "LanguageExtensionsList"}, - "enable_double_encryption": {"key": "properties.enableDoubleEncryption", "type": "bool"}, - "public_network_access": {"key": "properties.publicNetworkAccess", "type": "str"}, - "allowed_ip_range_list": {"key": "properties.allowedIpRangeList", "type": "[str]"}, - "engine_type": {"key": "properties.engineType", "type": "str"}, - "accepted_audiences": {"key": "properties.acceptedAudiences", "type": "[AcceptedAudiences]"}, - "enable_auto_stop": {"key": "properties.enableAutoStop", "type": "bool"}, - "restrict_outbound_network_access": {"key": "properties.restrictOutboundNetworkAccess", "type": "str"}, - "allowed_fqdn_list": {"key": "properties.allowedFqdnList", "type": "[str]"}, - "callout_policies": {"key": "properties.calloutPolicies", "type": "[CalloutPolicy]"}, - "public_ip_type": {"key": "properties.publicIPType", "type": "str"}, - "virtual_cluster_graduation_properties": { - "key": "properties.virtualClusterGraduationProperties", - "type": "str", - }, - "private_endpoint_connections": { - "key": "properties.privateEndpointConnections", - "type": "[PrivateEndpointConnection]", - }, - "migration_cluster": {"key": "properties.migrationCluster", "type": "MigrationClusterProperties"}, - "zone_status": {"key": "properties.zoneStatus", "type": "str"}, - } - - def __init__( # pylint: disable=too-many-locals - self, - *, - tags: Optional[Dict[str, str]] = None, - location: Optional[str] = None, - sku: Optional["_models.AzureSku"] = None, - zones: Optional[List[str]] = None, - identity: Optional["_models.Identity"] = None, - trusted_external_tenants: Optional[List["_models.TrustedExternalTenant"]] = None, - optimized_autoscale: Optional["_models.OptimizedAutoscale"] = None, - enable_disk_encryption: bool = False, - enable_streaming_ingest: bool = False, - virtual_network_configuration: Optional["_models.VirtualNetworkConfiguration"] = None, - key_vault_properties: Optional["_models.KeyVaultProperties"] = None, - enable_purge: bool = False, - language_extensions: Optional["_models.LanguageExtensionsList"] = None, - enable_double_encryption: bool = False, - public_network_access: Union[str, "_models.PublicNetworkAccess"] = "Enabled", - allowed_ip_range_list: Optional[List[str]] = None, - engine_type: Union[str, "_models.EngineType"] = "V3", - accepted_audiences: Optional[List["_models.AcceptedAudiences"]] = None, - enable_auto_stop: bool = True, - restrict_outbound_network_access: Union[str, "_models.ClusterNetworkAccessFlag"] = "Disabled", - allowed_fqdn_list: Optional[List[str]] = None, - callout_policies: Optional[List["_models.CalloutPolicy"]] = None, - public_ip_type: Union[str, "_models.PublicIPType"] = "IPv4", - virtual_cluster_graduation_properties: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword tags: Resource tags. - :paramtype tags: dict[str, str] - :keyword location: Resource location. - :paramtype location: str - :keyword sku: The SKU of the cluster. - :paramtype sku: ~azure.mgmt.kusto.models.AzureSku - :keyword zones: The availability zones of the cluster. - :paramtype zones: list[str] - :keyword identity: The identity of the cluster, if configured. - :paramtype identity: ~azure.mgmt.kusto.models.Identity - :keyword trusted_external_tenants: The cluster's external tenants. - :paramtype trusted_external_tenants: list[~azure.mgmt.kusto.models.TrustedExternalTenant] - :keyword optimized_autoscale: Optimized auto scale definition. - :paramtype optimized_autoscale: ~azure.mgmt.kusto.models.OptimizedAutoscale - :keyword enable_disk_encryption: A boolean value that indicates if the cluster's disks are - encrypted. - :paramtype enable_disk_encryption: bool - :keyword enable_streaming_ingest: A boolean value that indicates if the streaming ingest is - enabled. - :paramtype enable_streaming_ingest: bool - :keyword virtual_network_configuration: Virtual network definition. - :paramtype virtual_network_configuration: ~azure.mgmt.kusto.models.VirtualNetworkConfiguration - :keyword key_vault_properties: KeyVault properties for the cluster encryption. - :paramtype key_vault_properties: ~azure.mgmt.kusto.models.KeyVaultProperties - :keyword enable_purge: A boolean value that indicates if the purge operations are enabled. - :paramtype enable_purge: bool - :keyword language_extensions: List of the cluster's language extensions. - :paramtype language_extensions: ~azure.mgmt.kusto.models.LanguageExtensionsList - :keyword enable_double_encryption: A boolean value that indicates if double encryption is - enabled. - :paramtype enable_double_encryption: bool - :keyword public_network_access: Public network access to the cluster is enabled by default. - When disabled, only private endpoint connection to the cluster is allowed. Known values are: - "Enabled" and "Disabled". - :paramtype public_network_access: str or ~azure.mgmt.kusto.models.PublicNetworkAccess - :keyword allowed_ip_range_list: The list of ips in the format of CIDR allowed to connect to the - cluster. - :paramtype allowed_ip_range_list: list[str] - :keyword engine_type: The engine type. Known values are: "V2" and "V3". - :paramtype engine_type: str or ~azure.mgmt.kusto.models.EngineType - :keyword accepted_audiences: The cluster's accepted audiences. - :paramtype accepted_audiences: list[~azure.mgmt.kusto.models.AcceptedAudiences] - :keyword enable_auto_stop: A boolean value that indicates if the cluster could be automatically - stopped (due to lack of data or no activity for many days). - :paramtype enable_auto_stop: bool - :keyword restrict_outbound_network_access: Whether or not to restrict outbound network access. - Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Known values are: - "Enabled" and "Disabled". - :paramtype restrict_outbound_network_access: str or - ~azure.mgmt.kusto.models.ClusterNetworkAccessFlag - :keyword allowed_fqdn_list: List of allowed FQDNs(Fully Qualified Domain Name) for egress from - Cluster. - :paramtype allowed_fqdn_list: list[str] - :keyword callout_policies: List of callout policies for egress from Cluster. - :paramtype callout_policies: list[~azure.mgmt.kusto.models.CalloutPolicy] - :keyword public_ip_type: Indicates what public IP type to create - IPv4 (default), or DualStack - (both IPv4 and IPv6). Known values are: "IPv4" and "DualStack". - :paramtype public_ip_type: str or ~azure.mgmt.kusto.models.PublicIPType - :keyword virtual_cluster_graduation_properties: Virtual Cluster graduation properties. - :paramtype virtual_cluster_graduation_properties: str - """ - super().__init__(**kwargs) - self.tags = tags - self.location = location - self.sku = sku - self.zones = zones - self.identity = identity - self.state = None - self.provisioning_state = None - self.uri = None - self.data_ingestion_uri = None - self.state_reason = None - self.trusted_external_tenants = trusted_external_tenants - self.optimized_autoscale = optimized_autoscale - self.enable_disk_encryption = enable_disk_encryption - self.enable_streaming_ingest = enable_streaming_ingest - self.virtual_network_configuration = virtual_network_configuration - self.key_vault_properties = key_vault_properties - self.enable_purge = enable_purge - self.language_extensions = language_extensions - self.enable_double_encryption = enable_double_encryption - self.public_network_access = public_network_access - self.allowed_ip_range_list = allowed_ip_range_list - self.engine_type = engine_type - self.accepted_audiences = accepted_audiences - self.enable_auto_stop = enable_auto_stop - self.restrict_outbound_network_access = restrict_outbound_network_access - self.allowed_fqdn_list = allowed_fqdn_list - self.callout_policies = callout_policies - self.public_ip_type = public_ip_type - self.virtual_cluster_graduation_properties = virtual_cluster_graduation_properties - self.private_endpoint_connections = None - self.migration_cluster = None - self.zone_status = None - - -class ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties( - _serialization.Model -): # pylint: disable=name-too-long - """ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar principal_id: The principal id of user assigned identity. - :vartype principal_id: str - :ivar client_id: The client id of user assigned identity. - :vartype client_id: str - """ - - _validation = { - "principal_id": {"readonly": True}, - "client_id": {"readonly": True}, - } - - _attribute_map = { - "principal_id": {"key": "principalId", "type": "str"}, - "client_id": {"key": "clientId", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.principal_id = None - self.client_id = None - - -class DataConnection(ProxyResource): - """Class representing an data connection. - - You probably want to use the sub-classes and not this class directly. Known sub-classes are: - CosmosDbDataConnection, EventGridDataConnection, EventHubDataConnection, IotHubDataConnection - - 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 server. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long - :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 kind: Kind of the endpoint for the data connection. Required. Known values are: - "EventHub", "EventGrid", "IotHub", and "CosmosDb". - :vartype kind: str or ~azure.mgmt.kusto.models.DataConnectionKind - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "kind": {"required": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "location": {"key": "location", "type": "str"}, - "kind": {"key": "kind", "type": "str"}, - } - - _subtype_map = { - "kind": { - "CosmosDb": "CosmosDbDataConnection", - "EventGrid": "EventGridDataConnection", - "EventHub": "EventHubDataConnection", - "IotHub": "IotHubDataConnection", - } - } - - def __init__(self, *, location: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword location: Resource location. - :paramtype location: str - """ - super().__init__(**kwargs) - self.location = location - self.kind: Optional[str] = None - - -class CosmosDbDataConnection(DataConnection): - """Class representing a CosmosDb data connection. - - 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 server. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long - :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 kind: Kind of the endpoint for the data connection. Required. Known values are: - "EventHub", "EventGrid", "IotHub", and "CosmosDb". - :vartype kind: str or ~azure.mgmt.kusto.models.DataConnectionKind - :ivar table_name: The case-sensitive name of the existing target table in your cluster. - Retrieved data is ingested into this table. - :vartype table_name: str - :ivar mapping_rule_name: The name of an existing mapping rule to use when ingesting the - retrieved data. - :vartype mapping_rule_name: str - :ivar managed_identity_resource_id: The resource ID of a managed system or user-assigned - identity. The identity is used to authenticate with Cosmos DB. - :vartype managed_identity_resource_id: str - :ivar managed_identity_object_id: The object ID of the managed identity resource. - :vartype managed_identity_object_id: str - :ivar cosmos_db_account_resource_id: The resource ID of the Cosmos DB account used to create - the data connection. - :vartype cosmos_db_account_resource_id: str - :ivar cosmos_db_database: The name of an existing database in the Cosmos DB account. - :vartype cosmos_db_database: str - :ivar cosmos_db_container: The name of an existing container in the Cosmos DB database. - :vartype cosmos_db_container: str - :ivar retrieval_start_date: Optional. If defined, the data connection retrieves Cosmos DB - documents created or updated after the specified retrieval start date. - :vartype retrieval_start_date: ~datetime.datetime - :ivar provisioning_state: The provisioned state of the resource. Known values are: "Running", - "Creating", "Deleting", "Succeeded", "Failed", "Moving", and "Canceled". - :vartype provisioning_state: str or ~azure.mgmt.kusto.models.ProvisioningState - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "kind": {"required": True}, - "managed_identity_object_id": {"readonly": True}, - "provisioning_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"}, - "kind": {"key": "kind", "type": "str"}, - "table_name": {"key": "properties.tableName", "type": "str"}, - "mapping_rule_name": {"key": "properties.mappingRuleName", "type": "str"}, - "managed_identity_resource_id": {"key": "properties.managedIdentityResourceId", "type": "str"}, - "managed_identity_object_id": {"key": "properties.managedIdentityObjectId", "type": "str"}, - "cosmos_db_account_resource_id": {"key": "properties.cosmosDbAccountResourceId", "type": "str"}, - "cosmos_db_database": {"key": "properties.cosmosDbDatabase", "type": "str"}, - "cosmos_db_container": {"key": "properties.cosmosDbContainer", "type": "str"}, - "retrieval_start_date": {"key": "properties.retrievalStartDate", "type": "iso-8601"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - } - - def __init__( - self, - *, - location: Optional[str] = None, - table_name: Optional[str] = None, - mapping_rule_name: Optional[str] = None, - managed_identity_resource_id: Optional[str] = None, - cosmos_db_account_resource_id: Optional[str] = None, - cosmos_db_database: Optional[str] = None, - cosmos_db_container: Optional[str] = None, - retrieval_start_date: Optional[datetime.datetime] = None, - **kwargs: Any - ) -> None: - """ - :keyword location: Resource location. - :paramtype location: str - :keyword table_name: The case-sensitive name of the existing target table in your cluster. - Retrieved data is ingested into this table. - :paramtype table_name: str - :keyword mapping_rule_name: The name of an existing mapping rule to use when ingesting the - retrieved data. - :paramtype mapping_rule_name: str - :keyword managed_identity_resource_id: The resource ID of a managed system or user-assigned - identity. The identity is used to authenticate with Cosmos DB. - :paramtype managed_identity_resource_id: str - :keyword cosmos_db_account_resource_id: The resource ID of the Cosmos DB account used to create - the data connection. - :paramtype cosmos_db_account_resource_id: str - :keyword cosmos_db_database: The name of an existing database in the Cosmos DB account. - :paramtype cosmos_db_database: str - :keyword cosmos_db_container: The name of an existing container in the Cosmos DB database. - :paramtype cosmos_db_container: str - :keyword retrieval_start_date: Optional. If defined, the data connection retrieves Cosmos DB - documents created or updated after the specified retrieval start date. - :paramtype retrieval_start_date: ~datetime.datetime - """ - super().__init__(location=location, **kwargs) - self.kind: str = "CosmosDb" - self.table_name = table_name - self.mapping_rule_name = mapping_rule_name - self.managed_identity_resource_id = managed_identity_resource_id - self.managed_identity_object_id = None - self.cosmos_db_account_resource_id = cosmos_db_account_resource_id - self.cosmos_db_database = cosmos_db_database - self.cosmos_db_container = cosmos_db_container - self.retrieval_start_date = retrieval_start_date - self.provisioning_state = None - - -class Database(ProxyResource): - """Class representing a Kusto database. - - You probably want to use the sub-classes and not this class directly. Known sub-classes are: - ReadOnlyFollowingDatabase, ReadWriteDatabase - - 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 server. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long - :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 kind: Kind of the database. Required. Known values are: "ReadWrite" and - "ReadOnlyFollowing". - :vartype kind: str or ~azure.mgmt.kusto.models.Kind - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "kind": {"required": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "location": {"key": "location", "type": "str"}, - "kind": {"key": "kind", "type": "str"}, - } - - _subtype_map = {"kind": {"ReadOnlyFollowing": "ReadOnlyFollowingDatabase", "ReadWrite": "ReadWriteDatabase"}} - - def __init__(self, *, location: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword location: Resource location. - :paramtype location: str - """ - super().__init__(**kwargs) - self.location = location - self.kind: Optional[str] = None - - -class DatabaseInviteFollowerRequest(_serialization.Model): - """The request to invite a follower to a database. - - All required parameters must be populated in order to send to server. - - :ivar invitee_email: The email of the invited user for which the follower invitation is - generated. Required. - :vartype invitee_email: str - :ivar table_level_sharing_properties: Table level sharing specifications. - :vartype table_level_sharing_properties: ~azure.mgmt.kusto.models.TableLevelSharingProperties - """ - - _validation = { - "invitee_email": {"required": True}, - } - - _attribute_map = { - "invitee_email": {"key": "inviteeEmail", "type": "str"}, - "table_level_sharing_properties": {"key": "tableLevelSharingProperties", "type": "TableLevelSharingProperties"}, - } - - def __init__( - self, - *, - invitee_email: str, - table_level_sharing_properties: Optional["_models.TableLevelSharingProperties"] = None, - **kwargs: Any - ) -> None: - """ - :keyword invitee_email: The email of the invited user for which the follower invitation is - generated. Required. - :paramtype invitee_email: str - :keyword table_level_sharing_properties: Table level sharing specifications. - :paramtype table_level_sharing_properties: ~azure.mgmt.kusto.models.TableLevelSharingProperties - """ - super().__init__(**kwargs) - self.invitee_email = invitee_email - self.table_level_sharing_properties = table_level_sharing_properties - - -class DatabaseInviteFollowerResult(_serialization.Model): - """The result returned from a follower invitation generation request. - - :ivar generated_invitation: The generated invitation token. - :vartype generated_invitation: str - """ - - _attribute_map = { - "generated_invitation": {"key": "generatedInvitation", "type": "str"}, - } - - def __init__(self, *, generated_invitation: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword generated_invitation: The generated invitation token. - :paramtype generated_invitation: str - """ - super().__init__(**kwargs) - self.generated_invitation = generated_invitation - - -class DatabaseListResult(_serialization.Model): - """The list Kusto databases operation response. - - :ivar next_link: Link to the next page of results. - :vartype next_link: str - :ivar value: The list of Kusto databases. - :vartype value: list[~azure.mgmt.kusto.models.Database] - """ - - _attribute_map = { - "next_link": {"key": "nextLink", "type": "str"}, - "value": {"key": "value", "type": "[Database]"}, - } - - def __init__( - self, *, next_link: Optional[str] = None, value: Optional[List["_models.Database"]] = None, **kwargs: Any - ) -> None: - """ - :keyword next_link: Link to the next page of results. - :paramtype next_link: str - :keyword value: The list of Kusto databases. - :paramtype value: list[~azure.mgmt.kusto.models.Database] - """ - super().__init__(**kwargs) - self.next_link = next_link - self.value = value - - -class DatabasePrincipal(_serialization.Model): - """A class representing database principal entity. - - 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 server. - - :ivar role: Database principal role. Required. Known values are: "Admin", "Ingestor", - "Monitor", "User", "UnrestrictedViewer", and "Viewer". - :vartype role: str or ~azure.mgmt.kusto.models.DatabasePrincipalRole - :ivar name: Database principal name. Required. - :vartype name: str - :ivar type: Database principal type. Required. Known values are: "App", "Group", and "User". - :vartype type: str or ~azure.mgmt.kusto.models.DatabasePrincipalType - :ivar fqn: Database principal fully qualified name. - :vartype fqn: str - :ivar email: Database principal email if exists. - :vartype email: str - :ivar app_id: Application id - relevant only for application principal type. - :vartype app_id: str - :ivar tenant_name: The tenant name of the principal. - :vartype tenant_name: str - """ - - _validation = { - "role": {"required": True}, - "name": {"required": True}, - "type": {"required": True}, - "tenant_name": {"readonly": True}, - } - - _attribute_map = { - "role": {"key": "role", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "fqn": {"key": "fqn", "type": "str"}, - "email": {"key": "email", "type": "str"}, - "app_id": {"key": "appId", "type": "str"}, - "tenant_name": {"key": "tenantName", "type": "str"}, - } - - def __init__( - self, - *, - role: Union[str, "_models.DatabasePrincipalRole"], - name: str, - type: Union[str, "_models.DatabasePrincipalType"], - fqn: Optional[str] = None, - email: Optional[str] = None, - app_id: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword role: Database principal role. Required. Known values are: "Admin", "Ingestor", - "Monitor", "User", "UnrestrictedViewer", and "Viewer". - :paramtype role: str or ~azure.mgmt.kusto.models.DatabasePrincipalRole - :keyword name: Database principal name. Required. - :paramtype name: str - :keyword type: Database principal type. Required. Known values are: "App", "Group", and "User". - :paramtype type: str or ~azure.mgmt.kusto.models.DatabasePrincipalType - :keyword fqn: Database principal fully qualified name. - :paramtype fqn: str - :keyword email: Database principal email if exists. - :paramtype email: str - :keyword app_id: Application id - relevant only for application principal type. - :paramtype app_id: str - """ - super().__init__(**kwargs) - self.role = role - self.name = name - self.type = type - self.fqn = fqn - self.email = email - self.app_id = app_id - self.tenant_name = None - - -class DatabasePrincipalAssignment(ProxyResource): - """Class representing a database principal assignment. - - 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}. # pylint: disable=line-too-long - :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 principal_id: The principal ID assigned to the database principal. It can be a user - email, application ID, or security group name. - :vartype principal_id: str - :ivar role: Database principal role. Known values are: "Admin", "Ingestor", "Monitor", "User", - "UnrestrictedViewer", and "Viewer". - :vartype role: str or ~azure.mgmt.kusto.models.DatabasePrincipalRole - :ivar tenant_id: The tenant id of the principal. - :vartype tenant_id: str - :ivar principal_type: Principal type. Known values are: "App", "Group", and "User". - :vartype principal_type: str or ~azure.mgmt.kusto.models.PrincipalType - :ivar tenant_name: The tenant name of the principal. - :vartype tenant_name: str - :ivar principal_name: The principal name. - :vartype principal_name: str - :ivar provisioning_state: The provisioned state of the resource. Known values are: "Running", - "Creating", "Deleting", "Succeeded", "Failed", "Moving", and "Canceled". - :vartype provisioning_state: str or ~azure.mgmt.kusto.models.ProvisioningState - :ivar aad_object_id: The service principal object id in AAD (Azure active directory). - :vartype aad_object_id: str - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "tenant_name": {"readonly": True}, - "principal_name": {"readonly": True}, - "provisioning_state": {"readonly": True}, - "aad_object_id": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "principal_id": {"key": "properties.principalId", "type": "str"}, - "role": {"key": "properties.role", "type": "str"}, - "tenant_id": {"key": "properties.tenantId", "type": "str"}, - "principal_type": {"key": "properties.principalType", "type": "str"}, - "tenant_name": {"key": "properties.tenantName", "type": "str"}, - "principal_name": {"key": "properties.principalName", "type": "str"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - "aad_object_id": {"key": "properties.aadObjectId", "type": "str"}, - } - - def __init__( - self, - *, - principal_id: Optional[str] = None, - role: Optional[Union[str, "_models.DatabasePrincipalRole"]] = None, - tenant_id: Optional[str] = None, - principal_type: Optional[Union[str, "_models.PrincipalType"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword principal_id: The principal ID assigned to the database principal. It can be a user - email, application ID, or security group name. - :paramtype principal_id: str - :keyword role: Database principal role. Known values are: "Admin", "Ingestor", "Monitor", - "User", "UnrestrictedViewer", and "Viewer". - :paramtype role: str or ~azure.mgmt.kusto.models.DatabasePrincipalRole - :keyword tenant_id: The tenant id of the principal. - :paramtype tenant_id: str - :keyword principal_type: Principal type. Known values are: "App", "Group", and "User". - :paramtype principal_type: str or ~azure.mgmt.kusto.models.PrincipalType - """ - super().__init__(**kwargs) - self.principal_id = principal_id - self.role = role - self.tenant_id = tenant_id - self.principal_type = principal_type - self.tenant_name = None - self.principal_name = None - self.provisioning_state = None - self.aad_object_id = None - - -class DatabasePrincipalAssignmentCheckNameRequest(_serialization.Model): # pylint: disable=name-too-long - """A principal assignment check name availability request. - - 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 server. - - :ivar name: Principal Assignment resource name. Required. - :vartype name: str - :ivar type: The type of resource, Microsoft.Kusto/clusters/databases/principalAssignments. - Required. Default value is "Microsoft.Kusto/clusters/databases/principalAssignments". - :vartype type: str - """ - - _validation = { - "name": {"required": True}, - "type": {"required": True, "constant": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - } - - type = "Microsoft.Kusto/clusters/databases/principalAssignments" - - def __init__(self, *, name: str, **kwargs: Any) -> None: - """ - :keyword name: Principal Assignment resource name. Required. - :paramtype name: str - """ - super().__init__(**kwargs) - self.name = name - - -class DatabasePrincipalAssignmentListResult(_serialization.Model): - """The list Kusto database principal assignments operation response. - - :ivar value: The list of Kusto database principal assignments. - :vartype value: list[~azure.mgmt.kusto.models.DatabasePrincipalAssignment] - """ - - _attribute_map = { - "value": {"key": "value", "type": "[DatabasePrincipalAssignment]"}, - } - - def __init__(self, *, value: Optional[List["_models.DatabasePrincipalAssignment"]] = None, **kwargs: Any) -> None: - """ - :keyword value: The list of Kusto database principal assignments. - :paramtype value: list[~azure.mgmt.kusto.models.DatabasePrincipalAssignment] - """ - super().__init__(**kwargs) - self.value = value - - -class DatabasePrincipalListRequest(_serialization.Model): - """The list Kusto database principals operation request. - - :ivar value: The list of Kusto database principals. - :vartype value: list[~azure.mgmt.kusto.models.DatabasePrincipal] - """ - - _attribute_map = { - "value": {"key": "value", "type": "[DatabasePrincipal]"}, - } - - def __init__(self, *, value: Optional[List["_models.DatabasePrincipal"]] = None, **kwargs: Any) -> None: - """ - :keyword value: The list of Kusto database principals. - :paramtype value: list[~azure.mgmt.kusto.models.DatabasePrincipal] - """ - super().__init__(**kwargs) - self.value = value - - -class DatabasePrincipalListResult(_serialization.Model): - """The list Kusto database principals operation response. - - :ivar value: The list of Kusto database principals. - :vartype value: list[~azure.mgmt.kusto.models.DatabasePrincipal] - """ - - _attribute_map = { - "value": {"key": "value", "type": "[DatabasePrincipal]"}, - } - - def __init__(self, *, value: Optional[List["_models.DatabasePrincipal"]] = None, **kwargs: Any) -> None: - """ - :keyword value: The list of Kusto database principals. - :paramtype value: list[~azure.mgmt.kusto.models.DatabasePrincipal] - """ - super().__init__(**kwargs) - self.value = value - - -class DatabaseStatistics(_serialization.Model): - """A class that contains database statistics information. - - :ivar size: The database size - the total size of compressed data and index in bytes. - :vartype size: float - """ - - _attribute_map = { - "size": {"key": "size", "type": "float"}, - } - - def __init__(self, *, size: Optional[float] = None, **kwargs: Any) -> None: - """ - :keyword size: The database size - the total size of compressed data and index in bytes. - :paramtype size: float - """ - super().__init__(**kwargs) - self.size = size - - -class DataConnectionCheckNameRequest(_serialization.Model): - """A data connection check name availability request. - - 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 server. - - :ivar name: Data Connection name. Required. - :vartype name: str - :ivar type: The type of resource, Microsoft.Kusto/clusters/databases/dataConnections. Required. - Default value is "Microsoft.Kusto/clusters/databases/dataConnections". - :vartype type: str - """ - - _validation = { - "name": {"required": True}, - "type": {"required": True, "constant": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - } - - type = "Microsoft.Kusto/clusters/databases/dataConnections" - - def __init__(self, *, name: str, **kwargs: Any) -> None: - """ - :keyword name: Data Connection name. Required. - :paramtype name: str - """ - super().__init__(**kwargs) - self.name = name - - -class DataConnectionListResult(_serialization.Model): - """The list Kusto data connections operation response. - - :ivar value: The list of Kusto data connections. - :vartype value: list[~azure.mgmt.kusto.models.DataConnection] - """ - - _attribute_map = { - "value": {"key": "value", "type": "[DataConnection]"}, - } - - def __init__(self, *, value: Optional[List["_models.DataConnection"]] = None, **kwargs: Any) -> None: - """ - :keyword value: The list of Kusto data connections. - :paramtype value: list[~azure.mgmt.kusto.models.DataConnection] - """ - super().__init__(**kwargs) - self.value = value - - -class DataConnectionValidation(_serialization.Model): - """Class representing an data connection validation. - - :ivar data_connection_name: The name of the data connection. - :vartype data_connection_name: str - :ivar properties: The data connection properties to validate. - :vartype properties: ~azure.mgmt.kusto.models.DataConnection - """ - - _attribute_map = { - "data_connection_name": {"key": "dataConnectionName", "type": "str"}, - "properties": {"key": "properties", "type": "DataConnection"}, - } - - def __init__( - self, - *, - data_connection_name: Optional[str] = None, - properties: Optional["_models.DataConnection"] = None, - **kwargs: Any - ) -> None: - """ - :keyword data_connection_name: The name of the data connection. - :paramtype data_connection_name: str - :keyword properties: The data connection properties to validate. - :paramtype properties: ~azure.mgmt.kusto.models.DataConnection - """ - super().__init__(**kwargs) - self.data_connection_name = data_connection_name - self.properties = properties - - -class DataConnectionValidationListResult(_serialization.Model): - """The list Kusto data connection validation result. - - :ivar value: The list of Kusto data connection validation errors. - :vartype value: list[~azure.mgmt.kusto.models.DataConnectionValidationResult] - """ - - _attribute_map = { - "value": {"key": "value", "type": "[DataConnectionValidationResult]"}, - } - - def __init__( - self, *, value: Optional[List["_models.DataConnectionValidationResult"]] = None, **kwargs: Any - ) -> None: - """ - :keyword value: The list of Kusto data connection validation errors. - :paramtype value: list[~azure.mgmt.kusto.models.DataConnectionValidationResult] - """ - super().__init__(**kwargs) - self.value = value - - -class DataConnectionValidationResult(_serialization.Model): - """The result returned from a data connection validation request. - - :ivar error_message: A message which indicates a problem in data connection validation. - :vartype error_message: str - """ - - _attribute_map = { - "error_message": {"key": "errorMessage", "type": "str"}, - } - - def __init__(self, *, error_message: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword error_message: A message which indicates a problem in data connection validation. - :paramtype error_message: str - """ - super().__init__(**kwargs) - self.error_message = error_message - - -class DiagnoseVirtualNetworkResult(_serialization.Model): - """DiagnoseVirtualNetworkResult. - - :ivar findings: The list of network connectivity diagnostic finding. - :vartype findings: list[str] - """ - - _attribute_map = { - "findings": {"key": "findings", "type": "[str]"}, - } - - def __init__(self, *, findings: Optional[List[str]] = None, **kwargs: Any) -> None: - """ - :keyword findings: The list of network connectivity diagnostic finding. - :paramtype findings: list[str] - """ - super().__init__(**kwargs) - self.findings = findings - - -class EndpointDependency(_serialization.Model): - """A domain name that a service is reached at, including details of the current connection status. - - :ivar domain_name: The domain name of the dependency. - :vartype domain_name: str - :ivar endpoint_details: The ports used when connecting to DomainName. - :vartype endpoint_details: list[~azure.mgmt.kusto.models.EndpointDetail] - """ - - _attribute_map = { - "domain_name": {"key": "domainName", "type": "str"}, - "endpoint_details": {"key": "endpointDetails", "type": "[EndpointDetail]"}, - } - - def __init__( - self, - *, - domain_name: Optional[str] = None, - endpoint_details: Optional[List["_models.EndpointDetail"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword domain_name: The domain name of the dependency. - :paramtype domain_name: str - :keyword endpoint_details: The ports used when connecting to DomainName. - :paramtype endpoint_details: list[~azure.mgmt.kusto.models.EndpointDetail] - """ - super().__init__(**kwargs) - self.domain_name = domain_name - self.endpoint_details = endpoint_details - - -class EndpointDetail(_serialization.Model): - """Current TCP connectivity information from the Kusto cluster to a single endpoint. - - :ivar port: The port an endpoint is connected to. - :vartype port: int - :ivar ip_address: The ip address of the endpoint. - :vartype ip_address: str - """ - - _attribute_map = { - "port": {"key": "port", "type": "int"}, - "ip_address": {"key": "ipAddress", "type": "str"}, - } - - def __init__(self, *, port: Optional[int] = None, ip_address: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword port: The port an endpoint is connected to. - :paramtype port: int - :keyword ip_address: The ip address of the endpoint. - :paramtype ip_address: str - """ - super().__init__(**kwargs) - self.port = port - self.ip_address = ip_address - - -class ErrorAdditionalInfo(_serialization.Model): - """The resource management error additional info. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar type: The additional info type. - :vartype type: str - :ivar info: The additional info. - :vartype info: JSON - """ - - _validation = { - "type": {"readonly": True}, - "info": {"readonly": True}, - } - - _attribute_map = { - "type": {"key": "type", "type": "str"}, - "info": {"key": "info", "type": "object"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.type = None - self.info = None - - -class ErrorDetail(_serialization.Model): - """The error detail. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar code: The error code. - :vartype code: str - :ivar message: The error message. - :vartype message: str - :ivar target: The error target. - :vartype target: str - :ivar details: The error details. - :vartype details: list[~azure.mgmt.kusto.models.ErrorDetail] - :ivar additional_info: The error additional info. - :vartype additional_info: list[~azure.mgmt.kusto.models.ErrorAdditionalInfo] - """ - - _validation = { - "code": {"readonly": True}, - "message": {"readonly": True}, - "target": {"readonly": True}, - "details": {"readonly": True}, - "additional_info": {"readonly": True}, - } - - _attribute_map = { - "code": {"key": "code", "type": "str"}, - "message": {"key": "message", "type": "str"}, - "target": {"key": "target", "type": "str"}, - "details": {"key": "details", "type": "[ErrorDetail]"}, - "additional_info": {"key": "additionalInfo", "type": "[ErrorAdditionalInfo]"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.code = None - self.message = None - self.target = None - self.details = None - self.additional_info = None - - -class ErrorResponse(_serialization.Model): - """Common error response for all Azure Resource Manager APIs to return error details for failed - operations. (This also follows the OData error response format.). - - :ivar error: The error object. - :vartype error: ~azure.mgmt.kusto.models.ErrorDetail - """ - - _attribute_map = { - "error": {"key": "error", "type": "ErrorDetail"}, - } - - def __init__(self, *, error: Optional["_models.ErrorDetail"] = None, **kwargs: Any) -> None: - """ - :keyword error: The error object. - :paramtype error: ~azure.mgmt.kusto.models.ErrorDetail - """ - super().__init__(**kwargs) - self.error = error - - -class EventGridDataConnection(DataConnection): - """Class representing an Event Grid data connection. - - 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 server. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long - :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 kind: Kind of the endpoint for the data connection. Required. Known values are: - "EventHub", "EventGrid", "IotHub", and "CosmosDb". - :vartype kind: str or ~azure.mgmt.kusto.models.DataConnectionKind - :ivar storage_account_resource_id: The resource ID of the storage account where the data - resides. - :vartype storage_account_resource_id: str - :ivar event_grid_resource_id: The resource ID of the event grid that is subscribed to the - storage account events. - :vartype event_grid_resource_id: str - :ivar event_hub_resource_id: The resource ID where the event grid is configured to send events. - :vartype event_hub_resource_id: str - :ivar consumer_group: The event hub consumer group. - :vartype consumer_group: str - :ivar table_name: The table where the data should be ingested. Optionally the table information - can be added to each message. - :vartype table_name: str - :ivar mapping_rule_name: The mapping rule to be used to ingest the data. Optionally the mapping - information can be added to each message. - :vartype mapping_rule_name: str - :ivar data_format: The data format of the message. Optionally the data format can be added to - each message. Known values are: "MULTIJSON", "JSON", "CSV", "TSV", "SCSV", "SOHSV", "PSV", - "TXT", "RAW", "SINGLEJSON", "AVRO", "TSVE", "PARQUET", "ORC", "APACHEAVRO", and "W3CLOGFILE". - :vartype data_format: str or ~azure.mgmt.kusto.models.EventGridDataFormat - :ivar ignore_first_record: A Boolean value that, if set to true, indicates that ingestion - should ignore the first record of every file. - :vartype ignore_first_record: bool - :ivar blob_storage_event_type: The name of blob storage event type to process. Known values - are: "Microsoft.Storage.BlobCreated" and "Microsoft.Storage.BlobRenamed". - :vartype blob_storage_event_type: str or ~azure.mgmt.kusto.models.BlobStorageEventType - :ivar managed_identity_resource_id: The resource ID of a managed identity (system or user - assigned) to be used to authenticate with event hub and storage account. - :vartype managed_identity_resource_id: str - :ivar managed_identity_object_id: The object ID of managedIdentityResourceId. - :vartype managed_identity_object_id: str - :ivar database_routing: Indication for database routing information from the data connection, - by default only database routing information is allowed. Known values are: "Single" and - "Multi". - :vartype database_routing: str or ~azure.mgmt.kusto.models.DatabaseRouting - :ivar provisioning_state: The provisioned state of the resource. Known values are: "Running", - "Creating", "Deleting", "Succeeded", "Failed", "Moving", and "Canceled". - :vartype provisioning_state: str or ~azure.mgmt.kusto.models.ProvisioningState - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "kind": {"required": True}, - "managed_identity_object_id": {"readonly": True}, - "provisioning_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"}, - "kind": {"key": "kind", "type": "str"}, - "storage_account_resource_id": {"key": "properties.storageAccountResourceId", "type": "str"}, - "event_grid_resource_id": {"key": "properties.eventGridResourceId", "type": "str"}, - "event_hub_resource_id": {"key": "properties.eventHubResourceId", "type": "str"}, - "consumer_group": {"key": "properties.consumerGroup", "type": "str"}, - "table_name": {"key": "properties.tableName", "type": "str"}, - "mapping_rule_name": {"key": "properties.mappingRuleName", "type": "str"}, - "data_format": {"key": "properties.dataFormat", "type": "str"}, - "ignore_first_record": {"key": "properties.ignoreFirstRecord", "type": "bool"}, - "blob_storage_event_type": {"key": "properties.blobStorageEventType", "type": "str"}, - "managed_identity_resource_id": {"key": "properties.managedIdentityResourceId", "type": "str"}, - "managed_identity_object_id": {"key": "properties.managedIdentityObjectId", "type": "str"}, - "database_routing": {"key": "properties.databaseRouting", "type": "str"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - } - - def __init__( - self, - *, - location: Optional[str] = None, - storage_account_resource_id: Optional[str] = None, - event_grid_resource_id: Optional[str] = None, - event_hub_resource_id: Optional[str] = None, - consumer_group: Optional[str] = None, - table_name: Optional[str] = None, - mapping_rule_name: Optional[str] = None, - data_format: Optional[Union[str, "_models.EventGridDataFormat"]] = None, - ignore_first_record: Optional[bool] = None, - blob_storage_event_type: Optional[Union[str, "_models.BlobStorageEventType"]] = None, - managed_identity_resource_id: Optional[str] = None, - database_routing: Optional[Union[str, "_models.DatabaseRouting"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword location: Resource location. - :paramtype location: str - :keyword storage_account_resource_id: The resource ID of the storage account where the data - resides. - :paramtype storage_account_resource_id: str - :keyword event_grid_resource_id: The resource ID of the event grid that is subscribed to the - storage account events. - :paramtype event_grid_resource_id: str - :keyword event_hub_resource_id: The resource ID where the event grid is configured to send - events. - :paramtype event_hub_resource_id: str - :keyword consumer_group: The event hub consumer group. - :paramtype consumer_group: str - :keyword table_name: The table where the data should be ingested. Optionally the table - information can be added to each message. - :paramtype table_name: str - :keyword mapping_rule_name: The mapping rule to be used to ingest the data. Optionally the - mapping information can be added to each message. - :paramtype mapping_rule_name: str - :keyword data_format: The data format of the message. Optionally the data format can be added - to each message. Known values are: "MULTIJSON", "JSON", "CSV", "TSV", "SCSV", "SOHSV", "PSV", - "TXT", "RAW", "SINGLEJSON", "AVRO", "TSVE", "PARQUET", "ORC", "APACHEAVRO", and "W3CLOGFILE". - :paramtype data_format: str or ~azure.mgmt.kusto.models.EventGridDataFormat - :keyword ignore_first_record: A Boolean value that, if set to true, indicates that ingestion - should ignore the first record of every file. - :paramtype ignore_first_record: bool - :keyword blob_storage_event_type: The name of blob storage event type to process. Known values - are: "Microsoft.Storage.BlobCreated" and "Microsoft.Storage.BlobRenamed". - :paramtype blob_storage_event_type: str or ~azure.mgmt.kusto.models.BlobStorageEventType - :keyword managed_identity_resource_id: The resource ID of a managed identity (system or user - assigned) to be used to authenticate with event hub and storage account. - :paramtype managed_identity_resource_id: str - :keyword database_routing: Indication for database routing information from the data - connection, by default only database routing information is allowed. Known values are: "Single" - and "Multi". - :paramtype database_routing: str or ~azure.mgmt.kusto.models.DatabaseRouting - """ - super().__init__(location=location, **kwargs) - self.kind: str = "EventGrid" - self.storage_account_resource_id = storage_account_resource_id - self.event_grid_resource_id = event_grid_resource_id - self.event_hub_resource_id = event_hub_resource_id - self.consumer_group = consumer_group - self.table_name = table_name - self.mapping_rule_name = mapping_rule_name - self.data_format = data_format - self.ignore_first_record = ignore_first_record - self.blob_storage_event_type = blob_storage_event_type - self.managed_identity_resource_id = managed_identity_resource_id - self.managed_identity_object_id = None - self.database_routing = database_routing - self.provisioning_state = None - - -class EventHubDataConnection(DataConnection): - """Class representing an event hub data connection. - - 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 server. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long - :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 kind: Kind of the endpoint for the data connection. Required. Known values are: - "EventHub", "EventGrid", "IotHub", and "CosmosDb". - :vartype kind: str or ~azure.mgmt.kusto.models.DataConnectionKind - :ivar event_hub_resource_id: The resource ID of the event hub to be used to create a data - connection. - :vartype event_hub_resource_id: str - :ivar consumer_group: The event hub consumer group. - :vartype consumer_group: str - :ivar table_name: The table where the data should be ingested. Optionally the table information - can be added to each message. - :vartype table_name: str - :ivar mapping_rule_name: The mapping rule to be used to ingest the data. Optionally the mapping - information can be added to each message. - :vartype mapping_rule_name: str - :ivar data_format: The data format of the message. Optionally the data format can be added to - each message. Known values are: "MULTIJSON", "JSON", "CSV", "TSV", "SCSV", "SOHSV", "PSV", - "TXT", "RAW", "SINGLEJSON", "AVRO", "TSVE", "PARQUET", "ORC", "APACHEAVRO", and "W3CLOGFILE". - :vartype data_format: str or ~azure.mgmt.kusto.models.EventHubDataFormat - :ivar event_system_properties: System properties of the event hub. - :vartype event_system_properties: list[str] - :ivar compression: The event hub messages compression type. Known values are: "None" and - "GZip". - :vartype compression: str or ~azure.mgmt.kusto.models.Compression - :ivar provisioning_state: The provisioned state of the resource. Known values are: "Running", - "Creating", "Deleting", "Succeeded", "Failed", "Moving", and "Canceled". - :vartype provisioning_state: str or ~azure.mgmt.kusto.models.ProvisioningState - :ivar managed_identity_resource_id: The resource ID of a managed identity (system or user - assigned) to be used to authenticate with event hub. - :vartype managed_identity_resource_id: str - :ivar managed_identity_object_id: The object ID of the managedIdentityResourceId. - :vartype managed_identity_object_id: str - :ivar database_routing: Indication for database routing information from the data connection, - by default only database routing information is allowed. Known values are: "Single" and - "Multi". - :vartype database_routing: str or ~azure.mgmt.kusto.models.DatabaseRouting - :ivar retrieval_start_date: When defined, the data connection retrieves existing Event hub - events created since the Retrieval start date. It can only retrieve events retained by the - Event hub, based on its retention period. - :vartype retrieval_start_date: ~datetime.datetime - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "kind": {"required": True}, - "provisioning_state": {"readonly": True}, - "managed_identity_object_id": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "location": {"key": "location", "type": "str"}, - "kind": {"key": "kind", "type": "str"}, - "event_hub_resource_id": {"key": "properties.eventHubResourceId", "type": "str"}, - "consumer_group": {"key": "properties.consumerGroup", "type": "str"}, - "table_name": {"key": "properties.tableName", "type": "str"}, - "mapping_rule_name": {"key": "properties.mappingRuleName", "type": "str"}, - "data_format": {"key": "properties.dataFormat", "type": "str"}, - "event_system_properties": {"key": "properties.eventSystemProperties", "type": "[str]"}, - "compression": {"key": "properties.compression", "type": "str"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - "managed_identity_resource_id": {"key": "properties.managedIdentityResourceId", "type": "str"}, - "managed_identity_object_id": {"key": "properties.managedIdentityObjectId", "type": "str"}, - "database_routing": {"key": "properties.databaseRouting", "type": "str"}, - "retrieval_start_date": {"key": "properties.retrievalStartDate", "type": "iso-8601"}, - } - - def __init__( - self, - *, - location: Optional[str] = None, - event_hub_resource_id: Optional[str] = None, - consumer_group: Optional[str] = None, - table_name: Optional[str] = None, - mapping_rule_name: Optional[str] = None, - data_format: Optional[Union[str, "_models.EventHubDataFormat"]] = None, - event_system_properties: Optional[List[str]] = None, - compression: Union[str, "_models.Compression"] = "None", - managed_identity_resource_id: Optional[str] = None, - database_routing: Optional[Union[str, "_models.DatabaseRouting"]] = None, - retrieval_start_date: Optional[datetime.datetime] = None, - **kwargs: Any - ) -> None: - """ - :keyword location: Resource location. - :paramtype location: str - :keyword event_hub_resource_id: The resource ID of the event hub to be used to create a data - connection. - :paramtype event_hub_resource_id: str - :keyword consumer_group: The event hub consumer group. - :paramtype consumer_group: str - :keyword table_name: The table where the data should be ingested. Optionally the table - information can be added to each message. - :paramtype table_name: str - :keyword mapping_rule_name: The mapping rule to be used to ingest the data. Optionally the - mapping information can be added to each message. - :paramtype mapping_rule_name: str - :keyword data_format: The data format of the message. Optionally the data format can be added - to each message. Known values are: "MULTIJSON", "JSON", "CSV", "TSV", "SCSV", "SOHSV", "PSV", - "TXT", "RAW", "SINGLEJSON", "AVRO", "TSVE", "PARQUET", "ORC", "APACHEAVRO", and "W3CLOGFILE". - :paramtype data_format: str or ~azure.mgmt.kusto.models.EventHubDataFormat - :keyword event_system_properties: System properties of the event hub. - :paramtype event_system_properties: list[str] - :keyword compression: The event hub messages compression type. Known values are: "None" and - "GZip". - :paramtype compression: str or ~azure.mgmt.kusto.models.Compression - :keyword managed_identity_resource_id: The resource ID of a managed identity (system or user - assigned) to be used to authenticate with event hub. - :paramtype managed_identity_resource_id: str - :keyword database_routing: Indication for database routing information from the data - connection, by default only database routing information is allowed. Known values are: "Single" - and "Multi". - :paramtype database_routing: str or ~azure.mgmt.kusto.models.DatabaseRouting - :keyword retrieval_start_date: When defined, the data connection retrieves existing Event hub - events created since the Retrieval start date. It can only retrieve events retained by the - Event hub, based on its retention period. - :paramtype retrieval_start_date: ~datetime.datetime - """ - super().__init__(location=location, **kwargs) - self.kind: str = "EventHub" - self.event_hub_resource_id = event_hub_resource_id - self.consumer_group = consumer_group - self.table_name = table_name - self.mapping_rule_name = mapping_rule_name - self.data_format = data_format - self.event_system_properties = event_system_properties - self.compression = compression - self.provisioning_state = None - self.managed_identity_resource_id = managed_identity_resource_id - self.managed_identity_object_id = None - self.database_routing = database_routing - self.retrieval_start_date = retrieval_start_date - - -class FollowerDatabaseDefinition(_serialization.Model): - """A class representing follower database request. - - 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 server. - - :ivar cluster_resource_id: Resource id of the cluster that follows a database owned by this - cluster. Required. - :vartype cluster_resource_id: str - :ivar attached_database_configuration_name: Resource name of the attached database - configuration in the follower cluster. Required. - :vartype attached_database_configuration_name: str - :ivar database_name: The database name owned by this cluster that was followed. * in case - following all databases. - :vartype database_name: str - :ivar table_level_sharing_properties: Table level sharing specifications. - :vartype table_level_sharing_properties: ~azure.mgmt.kusto.models.TableLevelSharingProperties - :ivar database_share_origin: The origin of the following setup. Known values are: "Direct", - "DataShare", and "Other". - :vartype database_share_origin: str or ~azure.mgmt.kusto.models.DatabaseShareOrigin - """ - - _validation = { - "cluster_resource_id": {"required": True}, - "attached_database_configuration_name": {"required": True}, - "database_name": {"readonly": True}, - "table_level_sharing_properties": {"readonly": True}, - "database_share_origin": {"readonly": True}, - } - - _attribute_map = { - "cluster_resource_id": {"key": "clusterResourceId", "type": "str"}, - "attached_database_configuration_name": {"key": "attachedDatabaseConfigurationName", "type": "str"}, - "database_name": {"key": "databaseName", "type": "str"}, - "table_level_sharing_properties": {"key": "tableLevelSharingProperties", "type": "TableLevelSharingProperties"}, - "database_share_origin": {"key": "databaseShareOrigin", "type": "str"}, - } - - def __init__(self, *, cluster_resource_id: str, attached_database_configuration_name: str, **kwargs: Any) -> None: - """ - :keyword cluster_resource_id: Resource id of the cluster that follows a database owned by this - cluster. Required. - :paramtype cluster_resource_id: str - :keyword attached_database_configuration_name: Resource name of the attached database - configuration in the follower cluster. Required. - :paramtype attached_database_configuration_name: str - """ - super().__init__(**kwargs) - self.cluster_resource_id = cluster_resource_id - self.attached_database_configuration_name = attached_database_configuration_name - self.database_name = None - self.table_level_sharing_properties = None - self.database_share_origin = None - - -class FollowerDatabaseDefinitionGet(_serialization.Model): - """A class representing follower database object. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar cluster_resource_id: Resource id of the cluster that follows a database owned by this - cluster. - :vartype cluster_resource_id: str - :ivar attached_database_configuration_name: Resource name of the attached database - configuration in the follower cluster. - :vartype attached_database_configuration_name: str - :ivar database_name: The database name owned by this cluster that was followed. * in case - following all databases. - :vartype database_name: str - :ivar table_level_sharing_properties: Table level sharing specifications. - :vartype table_level_sharing_properties: ~azure.mgmt.kusto.models.TableLevelSharingProperties - :ivar database_share_origin: The origin of the following setup. Known values are: "Direct", - "DataShare", and "Other". - :vartype database_share_origin: str or ~azure.mgmt.kusto.models.DatabaseShareOrigin - """ - - _validation = { - "database_name": {"readonly": True}, - "table_level_sharing_properties": {"readonly": True}, - "database_share_origin": {"readonly": True}, - } - - _attribute_map = { - "cluster_resource_id": {"key": "properties.clusterResourceId", "type": "str"}, - "attached_database_configuration_name": {"key": "properties.attachedDatabaseConfigurationName", "type": "str"}, - "database_name": {"key": "properties.databaseName", "type": "str"}, - "table_level_sharing_properties": { - "key": "properties.tableLevelSharingProperties", - "type": "TableLevelSharingProperties", - }, - "database_share_origin": {"key": "properties.databaseShareOrigin", "type": "str"}, - } - - def __init__( - self, - *, - cluster_resource_id: Optional[str] = None, - attached_database_configuration_name: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword cluster_resource_id: Resource id of the cluster that follows a database owned by this - cluster. - :paramtype cluster_resource_id: str - :keyword attached_database_configuration_name: Resource name of the attached database - configuration in the follower cluster. - :paramtype attached_database_configuration_name: str - """ - super().__init__(**kwargs) - self.cluster_resource_id = cluster_resource_id - self.attached_database_configuration_name = attached_database_configuration_name - self.database_name = None - self.table_level_sharing_properties = None - self.database_share_origin = None - - -class FollowerDatabaseListResult(_serialization.Model): - """The list Kusto database principals operation response. - - :ivar value: The list of follower database result. - :vartype value: list[~azure.mgmt.kusto.models.FollowerDatabaseDefinition] - """ - - _attribute_map = { - "value": {"key": "value", "type": "[FollowerDatabaseDefinition]"}, - } - - def __init__(self, *, value: Optional[List["_models.FollowerDatabaseDefinition"]] = None, **kwargs: Any) -> None: - """ - :keyword value: The list of follower database result. - :paramtype value: list[~azure.mgmt.kusto.models.FollowerDatabaseDefinition] - """ - super().__init__(**kwargs) - self.value = value - - -class FollowerDatabaseListResultGet(_serialization.Model): - """The list Kusto database principals operation response. - - :ivar value: The list of follower database result. - :vartype value: list[~azure.mgmt.kusto.models.FollowerDatabaseDefinitionGet] - :ivar next_link: The URL to get the next set of follower databases list results if there are - any. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[FollowerDatabaseDefinitionGet]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, - *, - value: Optional[List["_models.FollowerDatabaseDefinitionGet"]] = None, - next_link: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword value: The list of follower database result. - :paramtype value: list[~azure.mgmt.kusto.models.FollowerDatabaseDefinitionGet] - :keyword next_link: The URL to get the next set of follower databases list results if there are - any. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class Identity(_serialization.Model): - """Identity for the resource. - - 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 server. - - :ivar principal_id: The principal ID of resource identity. - :vartype principal_id: str - :ivar tenant_id: The tenant ID of resource. - :vartype tenant_id: str - :ivar type: The type of managed identity used. The type 'SystemAssigned, UserAssigned' includes - both an implicitly created identity and a set of user-assigned identities. The type 'None' will - remove all identities. Required. Known values are: "None", "SystemAssigned", "UserAssigned", - and "SystemAssigned, UserAssigned". - :vartype type: str or ~azure.mgmt.kusto.models.IdentityType - :ivar user_assigned_identities: The list of user identities associated with the Kusto cluster. - The user identity dictionary key references will be ARM resource ids in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. # pylint: disable=line-too-long - :vartype user_assigned_identities: dict[str, - ~azure.mgmt.kusto.models.ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties] - """ - - _validation = { - "principal_id": {"readonly": True}, - "tenant_id": {"readonly": True}, - "type": {"required": True}, - } - - _attribute_map = { - "principal_id": {"key": "principalId", "type": "str"}, - "tenant_id": {"key": "tenantId", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "user_assigned_identities": { - "key": "userAssignedIdentities", - "type": "{ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties}", - }, - } - - def __init__( - self, - *, - type: Union[str, "_models.IdentityType"], - user_assigned_identities: Optional[ - Dict[str, "_models.ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties"] - ] = None, - **kwargs: Any - ) -> None: - """ - :keyword type: The type of managed identity used. The type 'SystemAssigned, UserAssigned' - includes both an implicitly created identity and a set of user-assigned identities. The type - 'None' will remove all identities. Required. Known values are: "None", "SystemAssigned", - "UserAssigned", and "SystemAssigned, UserAssigned". - :paramtype type: str or ~azure.mgmt.kusto.models.IdentityType - :keyword user_assigned_identities: The list of user identities associated with the Kusto - cluster. The user identity dictionary key references will be ARM resource ids in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. # pylint: disable=line-too-long - :paramtype user_assigned_identities: dict[str, - ~azure.mgmt.kusto.models.ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties] - """ - super().__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = type - self.user_assigned_identities = user_assigned_identities - - -class IotHubDataConnection(DataConnection): - """Class representing an iot hub data connection. - - 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 server. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long - :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 kind: Kind of the endpoint for the data connection. Required. Known values are: - "EventHub", "EventGrid", "IotHub", and "CosmosDb". - :vartype kind: str or ~azure.mgmt.kusto.models.DataConnectionKind - :ivar iot_hub_resource_id: The resource ID of the Iot hub to be used to create a data - connection. - :vartype iot_hub_resource_id: str - :ivar consumer_group: The iot hub consumer group. - :vartype consumer_group: str - :ivar table_name: The table where the data should be ingested. Optionally the table information - can be added to each message. - :vartype table_name: str - :ivar mapping_rule_name: The mapping rule to be used to ingest the data. Optionally the mapping - information can be added to each message. - :vartype mapping_rule_name: str - :ivar data_format: The data format of the message. Optionally the data format can be added to - each message. Known values are: "MULTIJSON", "JSON", "CSV", "TSV", "SCSV", "SOHSV", "PSV", - "TXT", "RAW", "SINGLEJSON", "AVRO", "TSVE", "PARQUET", "ORC", "APACHEAVRO", and "W3CLOGFILE". - :vartype data_format: str or ~azure.mgmt.kusto.models.IotHubDataFormat - :ivar event_system_properties: System properties of the iot hub. - :vartype event_system_properties: list[str] - :ivar shared_access_policy_name: The name of the share access policy. - :vartype shared_access_policy_name: str - :ivar database_routing: Indication for database routing information from the data connection, - by default only database routing information is allowed. Known values are: "Single" and - "Multi". - :vartype database_routing: str or ~azure.mgmt.kusto.models.DatabaseRouting - :ivar retrieval_start_date: When defined, the data connection retrieves existing Event hub - events created since the Retrieval start date. It can only retrieve events retained by the - Event hub, based on its retention period. - :vartype retrieval_start_date: ~datetime.datetime - :ivar provisioning_state: The provisioned state of the resource. Known values are: "Running", - "Creating", "Deleting", "Succeeded", "Failed", "Moving", and "Canceled". - :vartype provisioning_state: str or ~azure.mgmt.kusto.models.ProvisioningState - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "kind": {"required": True}, - "provisioning_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"}, - "kind": {"key": "kind", "type": "str"}, - "iot_hub_resource_id": {"key": "properties.iotHubResourceId", "type": "str"}, - "consumer_group": {"key": "properties.consumerGroup", "type": "str"}, - "table_name": {"key": "properties.tableName", "type": "str"}, - "mapping_rule_name": {"key": "properties.mappingRuleName", "type": "str"}, - "data_format": {"key": "properties.dataFormat", "type": "str"}, - "event_system_properties": {"key": "properties.eventSystemProperties", "type": "[str]"}, - "shared_access_policy_name": {"key": "properties.sharedAccessPolicyName", "type": "str"}, - "database_routing": {"key": "properties.databaseRouting", "type": "str"}, - "retrieval_start_date": {"key": "properties.retrievalStartDate", "type": "iso-8601"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - } - - def __init__( - self, - *, - location: Optional[str] = None, - iot_hub_resource_id: Optional[str] = None, - consumer_group: Optional[str] = None, - table_name: Optional[str] = None, - mapping_rule_name: Optional[str] = None, - data_format: Optional[Union[str, "_models.IotHubDataFormat"]] = None, - event_system_properties: Optional[List[str]] = None, - shared_access_policy_name: Optional[str] = None, - database_routing: Optional[Union[str, "_models.DatabaseRouting"]] = None, - retrieval_start_date: Optional[datetime.datetime] = None, - **kwargs: Any - ) -> None: - """ - :keyword location: Resource location. - :paramtype location: str - :keyword iot_hub_resource_id: The resource ID of the Iot hub to be used to create a data - connection. - :paramtype iot_hub_resource_id: str - :keyword consumer_group: The iot hub consumer group. - :paramtype consumer_group: str - :keyword table_name: The table where the data should be ingested. Optionally the table - information can be added to each message. - :paramtype table_name: str - :keyword mapping_rule_name: The mapping rule to be used to ingest the data. Optionally the - mapping information can be added to each message. - :paramtype mapping_rule_name: str - :keyword data_format: The data format of the message. Optionally the data format can be added - to each message. Known values are: "MULTIJSON", "JSON", "CSV", "TSV", "SCSV", "SOHSV", "PSV", - "TXT", "RAW", "SINGLEJSON", "AVRO", "TSVE", "PARQUET", "ORC", "APACHEAVRO", and "W3CLOGFILE". - :paramtype data_format: str or ~azure.mgmt.kusto.models.IotHubDataFormat - :keyword event_system_properties: System properties of the iot hub. - :paramtype event_system_properties: list[str] - :keyword shared_access_policy_name: The name of the share access policy. - :paramtype shared_access_policy_name: str - :keyword database_routing: Indication for database routing information from the data - connection, by default only database routing information is allowed. Known values are: "Single" - and "Multi". - :paramtype database_routing: str or ~azure.mgmt.kusto.models.DatabaseRouting - :keyword retrieval_start_date: When defined, the data connection retrieves existing Event hub - events created since the Retrieval start date. It can only retrieve events retained by the - Event hub, based on its retention period. - :paramtype retrieval_start_date: ~datetime.datetime - """ - super().__init__(location=location, **kwargs) - self.kind: str = "IotHub" - self.iot_hub_resource_id = iot_hub_resource_id - self.consumer_group = consumer_group - self.table_name = table_name - self.mapping_rule_name = mapping_rule_name - self.data_format = data_format - self.event_system_properties = event_system_properties - self.shared_access_policy_name = shared_access_policy_name - self.database_routing = database_routing - self.retrieval_start_date = retrieval_start_date - self.provisioning_state = None - - -class KeyVaultProperties(_serialization.Model): - """Properties of the key vault. - - :ivar key_name: The name of the key vault key. - :vartype key_name: str - :ivar key_version: The version of the key vault key. - :vartype key_version: str - :ivar key_vault_uri: The Uri of the key vault. - :vartype key_vault_uri: str - :ivar user_identity: The user assigned identity (ARM resource id) that has access to the key. - :vartype user_identity: str - """ - - _attribute_map = { - "key_name": {"key": "keyName", "type": "str"}, - "key_version": {"key": "keyVersion", "type": "str"}, - "key_vault_uri": {"key": "keyVaultUri", "type": "str"}, - "user_identity": {"key": "userIdentity", "type": "str"}, - } - - def __init__( - self, - *, - key_name: Optional[str] = None, - key_version: Optional[str] = None, - key_vault_uri: Optional[str] = None, - user_identity: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword key_name: The name of the key vault key. - :paramtype key_name: str - :keyword key_version: The version of the key vault key. - :paramtype key_version: str - :keyword key_vault_uri: The Uri of the key vault. - :paramtype key_vault_uri: str - :keyword user_identity: The user assigned identity (ARM resource id) that has access to the - key. - :paramtype user_identity: str - """ - super().__init__(**kwargs) - self.key_name = key_name - self.key_version = key_version - self.key_vault_uri = key_vault_uri - self.user_identity = user_identity - - -class LanguageExtension(_serialization.Model): - """The language extension object. - - :ivar language_extension_name: The language extension name. Known values are: "PYTHON" and "R". - :vartype language_extension_name: str or ~azure.mgmt.kusto.models.LanguageExtensionName - :ivar language_extension_image_name: The language extension image name. Known values are: "R", - "Python3_6_5", "Python3_10_8", "Python3_10_8_DL", "PythonCustomImage", "Python3_11_7", and - "Python3_11_7_DL". - :vartype language_extension_image_name: str or - ~azure.mgmt.kusto.models.LanguageExtensionImageName - :ivar language_extension_custom_image_name: The language extension custom image name. - :vartype language_extension_custom_image_name: str - """ - - _attribute_map = { - "language_extension_name": {"key": "languageExtensionName", "type": "str"}, - "language_extension_image_name": {"key": "languageExtensionImageName", "type": "str"}, - "language_extension_custom_image_name": {"key": "languageExtensionCustomImageName", "type": "str"}, - } - - def __init__( - self, - *, - language_extension_name: Optional[Union[str, "_models.LanguageExtensionName"]] = None, - language_extension_image_name: Optional[Union[str, "_models.LanguageExtensionImageName"]] = None, - language_extension_custom_image_name: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword language_extension_name: The language extension name. Known values are: "PYTHON" and - "R". - :paramtype language_extension_name: str or ~azure.mgmt.kusto.models.LanguageExtensionName - :keyword language_extension_image_name: The language extension image name. Known values are: - "R", "Python3_6_5", "Python3_10_8", "Python3_10_8_DL", "PythonCustomImage", "Python3_11_7", and - "Python3_11_7_DL". - :paramtype language_extension_image_name: str or - ~azure.mgmt.kusto.models.LanguageExtensionImageName - :keyword language_extension_custom_image_name: The language extension custom image name. - :paramtype language_extension_custom_image_name: str - """ - super().__init__(**kwargs) - self.language_extension_name = language_extension_name - self.language_extension_image_name = language_extension_image_name - self.language_extension_custom_image_name = language_extension_custom_image_name - - -class LanguageExtensionsList(_serialization.Model): - """The list of language extension objects. - - :ivar value: The list of language extensions. - :vartype value: list[~azure.mgmt.kusto.models.LanguageExtension] - """ - - _attribute_map = { - "value": {"key": "value", "type": "[LanguageExtension]"}, - } - - def __init__(self, *, value: Optional[List["_models.LanguageExtension"]] = None, **kwargs: Any) -> None: - """ - :keyword value: The list of language extensions. - :paramtype value: list[~azure.mgmt.kusto.models.LanguageExtension] - """ - super().__init__(**kwargs) - self.value = value - - -class ListResourceSkusResult(_serialization.Model): - """List of available SKUs for a Kusto Cluster. - - :ivar value: The collection of available SKUs for an existing resource. - :vartype value: list[~azure.mgmt.kusto.models.AzureResourceSku] - """ - - _attribute_map = { - "value": {"key": "value", "type": "[AzureResourceSku]"}, - } - - def __init__(self, *, value: Optional[List["_models.AzureResourceSku"]] = None, **kwargs: Any) -> None: - """ - :keyword value: The collection of available SKUs for an existing resource. - :paramtype value: list[~azure.mgmt.kusto.models.AzureResourceSku] - """ - super().__init__(**kwargs) - self.value = value - - -class ManagedPrivateEndpoint(ProxyResource): - """Class representing a managed private endpoint. - - 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}. # pylint: disable=line-too-long - :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 system_data: Metadata pertaining to creation and last modification of the resource. - :vartype system_data: ~azure.mgmt.kusto.models.SystemData - :ivar private_link_resource_id: The ARM resource ID of the resource for which the managed - private endpoint is created. - :vartype private_link_resource_id: str - :ivar private_link_resource_region: The region of the resource to which the managed private - endpoint is created. - :vartype private_link_resource_region: str - :ivar group_id: The groupId in which the managed private endpoint is created. - :vartype group_id: str - :ivar request_message: The user request message. - :vartype request_message: str - :ivar provisioning_state: The provisioned state of the resource. Known values are: "Running", - "Creating", "Deleting", "Succeeded", "Failed", "Moving", and "Canceled". - :vartype provisioning_state: str or ~azure.mgmt.kusto.models.ProvisioningState - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - "provisioning_state": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "private_link_resource_id": {"key": "properties.privateLinkResourceId", "type": "str"}, - "private_link_resource_region": {"key": "properties.privateLinkResourceRegion", "type": "str"}, - "group_id": {"key": "properties.groupId", "type": "str"}, - "request_message": {"key": "properties.requestMessage", "type": "str"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - } - - def __init__( - self, - *, - private_link_resource_id: Optional[str] = None, - private_link_resource_region: Optional[str] = None, - group_id: Optional[str] = None, - request_message: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword private_link_resource_id: The ARM resource ID of the resource for which the managed - private endpoint is created. - :paramtype private_link_resource_id: str - :keyword private_link_resource_region: The region of the resource to which the managed private - endpoint is created. - :paramtype private_link_resource_region: str - :keyword group_id: The groupId in which the managed private endpoint is created. - :paramtype group_id: str - :keyword request_message: The user request message. - :paramtype request_message: str - """ - super().__init__(**kwargs) - self.system_data = None - self.private_link_resource_id = private_link_resource_id - self.private_link_resource_region = private_link_resource_region - self.group_id = group_id - self.request_message = request_message - self.provisioning_state = None - - -class ManagedPrivateEndpointListResult(_serialization.Model): - """The list managed private endpoints operation response. - - :ivar value: The list of managed private endpoints. - :vartype value: list[~azure.mgmt.kusto.models.ManagedPrivateEndpoint] - """ - - _attribute_map = { - "value": {"key": "value", "type": "[ManagedPrivateEndpoint]"}, - } - - def __init__(self, *, value: Optional[List["_models.ManagedPrivateEndpoint"]] = None, **kwargs: Any) -> None: - """ - :keyword value: The list of managed private endpoints. - :paramtype value: list[~azure.mgmt.kusto.models.ManagedPrivateEndpoint] - """ - super().__init__(**kwargs) - self.value = value - - -class ManagedPrivateEndpointsCheckNameRequest(_serialization.Model): - """The result returned from a managedPrivateEndpoints check name availability request. - - 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 server. - - :ivar name: Managed private endpoint resource name. Required. - :vartype name: str - :ivar type: The type of resource, for instance - Microsoft.Kusto/clusters/managedPrivateEndpoints. Required. Default value is - "Microsoft.Kusto/clusters/managedPrivateEndpoints". - :vartype type: str - """ - - _validation = { - "name": {"required": True}, - "type": {"required": True, "constant": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - } - - type = "Microsoft.Kusto/clusters/managedPrivateEndpoints" - - def __init__(self, *, name: str, **kwargs: Any) -> None: - """ - :keyword name: Managed private endpoint resource name. Required. - :paramtype name: str - """ - super().__init__(**kwargs) - self.name = name - - -class MigrationClusterProperties(_serialization.Model): - """Represents a properties of a cluster that is part of a migration. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: The resource ID of the cluster. - :vartype id: str - :ivar uri: The public URL of the cluster. - :vartype uri: str - :ivar data_ingestion_uri: The public data ingestion URL of the cluster. - :vartype data_ingestion_uri: str - :ivar role: The role of the cluster in the migration process. Known values are: "Source" and - "Destination". - :vartype role: str or ~azure.mgmt.kusto.models.MigrationClusterRole - """ - - _validation = { - "id": {"readonly": True}, - "uri": {"readonly": True}, - "data_ingestion_uri": {"readonly": True}, - "role": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "uri": {"key": "uri", "type": "str"}, - "data_ingestion_uri": {"key": "dataIngestionUri", "type": "str"}, - "role": {"key": "role", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.id = None - self.uri = None - self.data_ingestion_uri = None - self.role = None - - -class Operation(_serialization.Model): - """A REST API operation. - - :ivar name: This is of the format {provider}/{resource}/{operation}. - :vartype name: str - :ivar display: The object that describes the operation. - :vartype display: ~azure.mgmt.kusto.models.OperationDisplay - :ivar origin: The intended executor of the operation. - :vartype origin: str - :ivar properties: Properties of the operation. - :vartype properties: JSON - """ - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "display": {"key": "display", "type": "OperationDisplay"}, - "origin": {"key": "origin", "type": "str"}, - "properties": {"key": "properties", "type": "object"}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - display: Optional["_models.OperationDisplay"] = None, - origin: Optional[str] = None, - properties: Optional[JSON] = None, - **kwargs: Any - ) -> None: - """ - :keyword name: This is of the format {provider}/{resource}/{operation}. - :paramtype name: str - :keyword display: The object that describes the operation. - :paramtype display: ~azure.mgmt.kusto.models.OperationDisplay - :keyword origin: The intended executor of the operation. - :paramtype origin: str - :keyword properties: Properties of the operation. - :paramtype properties: JSON - """ - super().__init__(**kwargs) - self.name = name - self.display = display - self.origin = origin - self.properties = properties - - -class OperationDisplay(_serialization.Model): - """The object that describes the operation. - - :ivar provider: Friendly name of the resource provider. - :vartype provider: str - :ivar operation: For example: read, write, delete. - :vartype operation: str - :ivar resource: The resource type on which the operation is performed. - :vartype resource: str - :ivar description: The friendly name of the operation. - :vartype description: str - """ - - _attribute_map = { - "provider": {"key": "provider", "type": "str"}, - "operation": {"key": "operation", "type": "str"}, - "resource": {"key": "resource", "type": "str"}, - "description": {"key": "description", "type": "str"}, - } - - def __init__( - self, - *, - provider: Optional[str] = None, - operation: Optional[str] = None, - resource: Optional[str] = None, - description: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword provider: Friendly name of the resource provider. - :paramtype provider: str - :keyword operation: For example: read, write, delete. - :paramtype operation: str - :keyword resource: The resource type on which the operation is performed. - :paramtype resource: str - :keyword description: The friendly name of the operation. - :paramtype description: str - """ - super().__init__(**kwargs) - self.provider = provider - self.operation = operation - self.resource = resource - self.description = description - - -class OperationListResult(_serialization.Model): - """Result of the request to list REST API operations. It contains a list of operations and a URL - nextLink to get the next set of results. - - :ivar value: The list of operations supported by the resource provider. - :vartype value: list[~azure.mgmt.kusto.models.Operation] - :ivar next_link: The URL to get the next set of operation list results if there are any. - :vartype next_link: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "[Operation]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, *, value: Optional[List["_models.Operation"]] = None, next_link: Optional[str] = None, **kwargs: Any - ) -> None: - """ - :keyword value: The list of operations supported by the resource provider. - :paramtype value: list[~azure.mgmt.kusto.models.Operation] - :keyword next_link: The URL to get the next set of operation list results if there are any. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class OperationResult(_serialization.Model): - """Operation Result Entity. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: ID of the resource. - :vartype id: str - :ivar name: Name of the resource. - :vartype name: str - :ivar status: status of the Operation result. Known values are: "Succeeded", "Canceled", - "Failed", and "Running". - :vartype status: str or ~azure.mgmt.kusto.models.Status - :ivar start_time: The operation start time. - :vartype start_time: ~datetime.datetime - :ivar end_time: The operation end time. - :vartype end_time: ~datetime.datetime - :ivar percent_complete: Percentage completed. - :vartype percent_complete: float - :ivar code: The code of the error. - :vartype code: str - :ivar message: The error message. - :vartype message: str - :ivar operation_kind: The kind of the operation. - :vartype operation_kind: str - :ivar provisioning_state: The provisioned state of the resource. Known values are: "Running", - "Creating", "Deleting", "Succeeded", "Failed", "Moving", and "Canceled". - :vartype provisioning_state: str or ~azure.mgmt.kusto.models.ProvisioningState - :ivar operation_state: The state of the operation. - :vartype operation_state: str - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "status": {"readonly": True}, - "percent_complete": {"maximum": 100, "minimum": 0}, - "provisioning_state": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "status": {"key": "status", "type": "str"}, - "start_time": {"key": "startTime", "type": "iso-8601"}, - "end_time": {"key": "endTime", "type": "iso-8601"}, - "percent_complete": {"key": "percentComplete", "type": "float"}, - "code": {"key": "error.code", "type": "str"}, - "message": {"key": "error.message", "type": "str"}, - "operation_kind": {"key": "properties.operationKind", "type": "str"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - "operation_state": {"key": "properties.operationState", "type": "str"}, - } - - def __init__( - self, - *, - start_time: Optional[datetime.datetime] = None, - end_time: Optional[datetime.datetime] = None, - percent_complete: Optional[float] = None, - code: Optional[str] = None, - message: Optional[str] = None, - operation_kind: Optional[str] = None, - operation_state: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword start_time: The operation start time. - :paramtype start_time: ~datetime.datetime - :keyword end_time: The operation end time. - :paramtype end_time: ~datetime.datetime - :keyword percent_complete: Percentage completed. - :paramtype percent_complete: float - :keyword code: The code of the error. - :paramtype code: str - :keyword message: The error message. - :paramtype message: str - :keyword operation_kind: The kind of the operation. - :paramtype operation_kind: str - :keyword operation_state: The state of the operation. - :paramtype operation_state: str - """ - super().__init__(**kwargs) - self.id = None - self.name = None - self.status = None - self.start_time = start_time - self.end_time = end_time - self.percent_complete = percent_complete - self.code = code - self.message = message - self.operation_kind = operation_kind - self.provisioning_state = None - self.operation_state = operation_state - - -class OptimizedAutoscale(_serialization.Model): - """A class that contains the optimized auto scale definition. - - All required parameters must be populated in order to send to server. - - :ivar version: The version of the template defined, for instance 1. Required. - :vartype version: int - :ivar is_enabled: A boolean value that indicate if the optimized autoscale feature is enabled - or not. Required. - :vartype is_enabled: bool - :ivar minimum: Minimum allowed instances count. Required. - :vartype minimum: int - :ivar maximum: Maximum allowed instances count. Required. - :vartype maximum: int - """ - - _validation = { - "version": {"required": True}, - "is_enabled": {"required": True}, - "minimum": {"required": True}, - "maximum": {"required": True}, - } - - _attribute_map = { - "version": {"key": "version", "type": "int"}, - "is_enabled": {"key": "isEnabled", "type": "bool"}, - "minimum": {"key": "minimum", "type": "int"}, - "maximum": {"key": "maximum", "type": "int"}, - } - - def __init__(self, *, version: int, is_enabled: bool, minimum: int, maximum: int, **kwargs: Any) -> None: - """ - :keyword version: The version of the template defined, for instance 1. Required. - :paramtype version: int - :keyword is_enabled: A boolean value that indicate if the optimized autoscale feature is - enabled or not. Required. - :paramtype is_enabled: bool - :keyword minimum: Minimum allowed instances count. Required. - :paramtype minimum: int - :keyword maximum: Maximum allowed instances count. Required. - :paramtype maximum: int - """ - super().__init__(**kwargs) - self.version = version - self.is_enabled = is_enabled - self.minimum = minimum - self.maximum = maximum - - -class OutboundNetworkDependenciesEndpoint(ProxyResource): - """Endpoints accessed for a common purpose that the Kusto Service Environment requires outbound - network access to. - - 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}. # pylint: disable=line-too-long - :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: A unique read-only string that changes whenever the resource is updated. - :vartype etag: str - :ivar category: The type of service accessed by the Kusto Service Environment, e.g., Azure - Storage, Azure SQL Database, and Azure Active Directory. - :vartype category: str - :ivar endpoints: The endpoints that the Kusto Service Environment reaches the service at. - :vartype endpoints: list[~azure.mgmt.kusto.models.EndpointDependency] - :ivar provisioning_state: The provisioned state of the resource. Known values are: "Running", - "Creating", "Deleting", "Succeeded", "Failed", "Moving", and "Canceled". - :vartype provisioning_state: str or ~azure.mgmt.kusto.models.ProvisioningState - """ - - _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"}, - "category": {"key": "properties.category", "type": "str"}, - "endpoints": {"key": "properties.endpoints", "type": "[EndpointDependency]"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - } - - def __init__( - self, - *, - category: Optional[str] = None, - endpoints: Optional[List["_models.EndpointDependency"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword category: The type of service accessed by the Kusto Service Environment, e.g., Azure - Storage, Azure SQL Database, and Azure Active Directory. - :paramtype category: str - :keyword endpoints: The endpoints that the Kusto Service Environment reaches the service at. - :paramtype endpoints: list[~azure.mgmt.kusto.models.EndpointDependency] - """ - super().__init__(**kwargs) - self.etag = None - self.category = category - self.endpoints = endpoints - self.provisioning_state = None - - -class OutboundNetworkDependenciesEndpointListResult(_serialization.Model): # pylint: disable=name-too-long - """Collection of Outbound Environment Endpoints. - - 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 server. - - :ivar value: Collection of resources. Required. - :vartype value: list[~azure.mgmt.kusto.models.OutboundNetworkDependenciesEndpoint] - :ivar next_link: Link to next page of resources. - :vartype next_link: str - """ - - _validation = { - "value": {"required": True}, - "next_link": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[OutboundNetworkDependenciesEndpoint]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, *, value: List["_models.OutboundNetworkDependenciesEndpoint"], **kwargs: Any) -> None: - """ - :keyword value: Collection of resources. Required. - :paramtype value: list[~azure.mgmt.kusto.models.OutboundNetworkDependenciesEndpoint] - """ - super().__init__(**kwargs) - self.value = value - self.next_link = None - - -class PrivateEndpointConnection(ProxyResource): - """A private endpoint connection. - - 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}. # pylint: disable=line-too-long - :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 system_data: Metadata pertaining to creation and last modification of the resource. - :vartype system_data: ~azure.mgmt.kusto.models.SystemData - :ivar private_endpoint: Private endpoint which the connection belongs to. - :vartype private_endpoint: ~azure.mgmt.kusto.models.PrivateEndpointProperty - :ivar private_link_service_connection_state: Connection State of the Private Endpoint - Connection. - :vartype private_link_service_connection_state: - ~azure.mgmt.kusto.models.PrivateLinkServiceConnectionStateProperty - :ivar group_id: Group id of the private endpoint. - :vartype group_id: str - :ivar provisioning_state: Provisioning state of the private endpoint. - :vartype provisioning_state: str - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - "private_endpoint": {"readonly": True}, - "group_id": {"readonly": True}, - "provisioning_state": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "private_endpoint": {"key": "properties.privateEndpoint", "type": "PrivateEndpointProperty"}, - "private_link_service_connection_state": { - "key": "properties.privateLinkServiceConnectionState", - "type": "PrivateLinkServiceConnectionStateProperty", - }, - "group_id": {"key": "properties.groupId", "type": "str"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - } - - def __init__( - self, - *, - private_link_service_connection_state: Optional["_models.PrivateLinkServiceConnectionStateProperty"] = None, - **kwargs: Any - ) -> None: - """ - :keyword private_link_service_connection_state: Connection State of the Private Endpoint - Connection. - :paramtype private_link_service_connection_state: - ~azure.mgmt.kusto.models.PrivateLinkServiceConnectionStateProperty - """ - super().__init__(**kwargs) - self.system_data = None - self.private_endpoint = None - self.private_link_service_connection_state = private_link_service_connection_state - self.group_id = None - self.provisioning_state = None - - -class PrivateEndpointConnectionListResult(_serialization.Model): - """A list of private endpoint connections. - - :ivar value: Array of private endpoint connections. - :vartype value: list[~azure.mgmt.kusto.models.PrivateEndpointConnection] - """ - - _attribute_map = { - "value": {"key": "value", "type": "[PrivateEndpointConnection]"}, - } - - def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs: Any) -> None: - """ - :keyword value: Array of private endpoint connections. - :paramtype value: list[~azure.mgmt.kusto.models.PrivateEndpointConnection] - """ - super().__init__(**kwargs) - self.value = value - - -class PrivateEndpointProperty(_serialization.Model): - """Private endpoint which the connection belongs to. - - 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 - """ - - _validation = { - "id": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.id = None - - -class PrivateLinkResource(Resource): - """A private link resource. - - 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}. # pylint: disable=line-too-long - :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 system_data: Metadata pertaining to creation and last modification of the resource. - :vartype system_data: ~azure.mgmt.kusto.models.SystemData - :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: The private link resource required zone names. - :vartype required_zone_names: list[str] - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - "group_id": {"readonly": True}, - "required_members": {"readonly": True}, - "required_zone_names": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "group_id": {"key": "properties.groupId", "type": "str"}, - "required_members": {"key": "properties.requiredMembers", "type": "[str]"}, - "required_zone_names": {"key": "properties.requiredZoneNames", "type": "[str]"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.system_data = None - self.group_id = None - self.required_members = None - self.required_zone_names = None - - -class PrivateLinkResourceListResult(_serialization.Model): - """A list of private link resources. - - :ivar value: Array of private link resources. - :vartype value: list[~azure.mgmt.kusto.models.PrivateLinkResource] - """ - - _attribute_map = { - "value": {"key": "value", "type": "[PrivateLinkResource]"}, - } - - def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs: Any) -> None: - """ - :keyword value: Array of private link resources. - :paramtype value: list[~azure.mgmt.kusto.models.PrivateLinkResource] - """ - super().__init__(**kwargs) - self.value = value - - -class PrivateLinkServiceConnectionStateProperty(_serialization.Model): # pylint: disable=name-too-long - """Connection State of the Private Endpoint Connection. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar status: The private link service connection status. - :vartype status: str - :ivar description: The private link service connection description. - :vartype description: str - :ivar actions_required: Any action that is required beyond basic workflow (approve/ reject/ - disconnect). - :vartype actions_required: str - """ - - _validation = { - "actions_required": {"readonly": True}, - } - - _attribute_map = { - "status": {"key": "status", "type": "str"}, - "description": {"key": "description", "type": "str"}, - "actions_required": {"key": "actionsRequired", "type": "str"}, - } - - def __init__(self, *, status: Optional[str] = None, description: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword status: The private link service connection status. - :paramtype status: str - :keyword description: The private link service connection description. - :paramtype description: str - """ - super().__init__(**kwargs) - self.status = status - self.description = description - self.actions_required = None - - -class ReadOnlyFollowingDatabase(Database): - """Class representing a read only following database. - - 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 server. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long - :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 kind: Kind of the database. Required. Known values are: "ReadWrite" and - "ReadOnlyFollowing". - :vartype kind: str or ~azure.mgmt.kusto.models.Kind - :ivar provisioning_state: The provisioned state of the resource. Known values are: "Running", - "Creating", "Deleting", "Succeeded", "Failed", "Moving", and "Canceled". - :vartype provisioning_state: str or ~azure.mgmt.kusto.models.ProvisioningState - :ivar soft_delete_period: The time the data should be kept before it stops being accessible to - queries in TimeSpan. - :vartype soft_delete_period: ~datetime.timedelta - :ivar hot_cache_period: The time the data should be kept in cache for fast queries in TimeSpan. - :vartype hot_cache_period: ~datetime.timedelta - :ivar statistics: The statistics of the database. - :vartype statistics: ~azure.mgmt.kusto.models.DatabaseStatistics - :ivar leader_cluster_resource_id: The name of the leader cluster. - :vartype leader_cluster_resource_id: str - :ivar attached_database_configuration_name: The name of the attached database configuration - cluster. - :vartype attached_database_configuration_name: str - :ivar principals_modification_kind: The principals modification kind of the database. Known - values are: "Union", "Replace", and "None". - :vartype principals_modification_kind: str or - ~azure.mgmt.kusto.models.PrincipalsModificationKind - :ivar table_level_sharing_properties: Table level sharing specifications. - :vartype table_level_sharing_properties: ~azure.mgmt.kusto.models.TableLevelSharingProperties - :ivar original_database_name: The original database name, before databaseNameOverride or - databaseNamePrefix where applied. - :vartype original_database_name: str - :ivar database_share_origin: The origin of the following setup. Known values are: "Direct", - "DataShare", and "Other". - :vartype database_share_origin: str or ~azure.mgmt.kusto.models.DatabaseShareOrigin - :ivar suspension_details: The database suspension details. If the database is suspended, this - object contains information related to the database's suspension state. - :vartype suspension_details: ~azure.mgmt.kusto.models.SuspensionDetails - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "kind": {"required": True}, - "provisioning_state": {"readonly": True}, - "soft_delete_period": {"readonly": True}, - "statistics": {"readonly": True}, - "leader_cluster_resource_id": {"readonly": True}, - "attached_database_configuration_name": {"readonly": True}, - "principals_modification_kind": {"readonly": True}, - "table_level_sharing_properties": {"readonly": True}, - "original_database_name": {"readonly": True}, - "database_share_origin": {"readonly": True}, - "suspension_details": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "location": {"key": "location", "type": "str"}, - "kind": {"key": "kind", "type": "str"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - "soft_delete_period": {"key": "properties.softDeletePeriod", "type": "duration"}, - "hot_cache_period": {"key": "properties.hotCachePeriod", "type": "duration"}, - "statistics": {"key": "properties.statistics", "type": "DatabaseStatistics"}, - "leader_cluster_resource_id": {"key": "properties.leaderClusterResourceId", "type": "str"}, - "attached_database_configuration_name": {"key": "properties.attachedDatabaseConfigurationName", "type": "str"}, - "principals_modification_kind": {"key": "properties.principalsModificationKind", "type": "str"}, - "table_level_sharing_properties": { - "key": "properties.tableLevelSharingProperties", - "type": "TableLevelSharingProperties", - }, - "original_database_name": {"key": "properties.originalDatabaseName", "type": "str"}, - "database_share_origin": {"key": "properties.databaseShareOrigin", "type": "str"}, - "suspension_details": {"key": "properties.suspensionDetails", "type": "SuspensionDetails"}, - } - - def __init__( - self, *, location: Optional[str] = None, hot_cache_period: Optional[datetime.timedelta] = None, **kwargs: Any - ) -> None: - """ - :keyword location: Resource location. - :paramtype location: str - :keyword hot_cache_period: The time the data should be kept in cache for fast queries in - TimeSpan. - :paramtype hot_cache_period: ~datetime.timedelta - """ - super().__init__(location=location, **kwargs) - self.kind: str = "ReadOnlyFollowing" - self.provisioning_state = None - self.soft_delete_period = None - self.hot_cache_period = hot_cache_period - self.statistics = None - self.leader_cluster_resource_id = None - self.attached_database_configuration_name = None - self.principals_modification_kind = None - self.table_level_sharing_properties = None - self.original_database_name = None - self.database_share_origin = None - self.suspension_details = None - - -class ReadWriteDatabase(Database): - """Class representing a read write database. - - 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 server. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long - :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 kind: Kind of the database. Required. Known values are: "ReadWrite" and - "ReadOnlyFollowing". - :vartype kind: str or ~azure.mgmt.kusto.models.Kind - :ivar provisioning_state: The provisioned state of the resource. Known values are: "Running", - "Creating", "Deleting", "Succeeded", "Failed", "Moving", and "Canceled". - :vartype provisioning_state: str or ~azure.mgmt.kusto.models.ProvisioningState - :ivar soft_delete_period: The time the data should be kept before it stops being accessible to - queries in TimeSpan. - :vartype soft_delete_period: ~datetime.timedelta - :ivar hot_cache_period: The time the data should be kept in cache for fast queries in TimeSpan. - :vartype hot_cache_period: ~datetime.timedelta - :ivar statistics: The statistics of the database. - :vartype statistics: ~azure.mgmt.kusto.models.DatabaseStatistics - :ivar is_followed: Indicates whether the database is followed. - :vartype is_followed: bool - :ivar key_vault_properties: KeyVault properties for the database encryption. - :vartype key_vault_properties: ~azure.mgmt.kusto.models.KeyVaultProperties - :ivar suspension_details: The database suspension details. If the database is suspended, this - object contains information related to the database's suspension state. - :vartype suspension_details: ~azure.mgmt.kusto.models.SuspensionDetails - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "kind": {"required": True}, - "provisioning_state": {"readonly": True}, - "statistics": {"readonly": True}, - "is_followed": {"readonly": True}, - "suspension_details": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "location": {"key": "location", "type": "str"}, - "kind": {"key": "kind", "type": "str"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - "soft_delete_period": {"key": "properties.softDeletePeriod", "type": "duration"}, - "hot_cache_period": {"key": "properties.hotCachePeriod", "type": "duration"}, - "statistics": {"key": "properties.statistics", "type": "DatabaseStatistics"}, - "is_followed": {"key": "properties.isFollowed", "type": "bool"}, - "key_vault_properties": {"key": "properties.keyVaultProperties", "type": "KeyVaultProperties"}, - "suspension_details": {"key": "properties.suspensionDetails", "type": "SuspensionDetails"}, - } - - def __init__( - self, - *, - location: Optional[str] = None, - soft_delete_period: Optional[datetime.timedelta] = None, - hot_cache_period: Optional[datetime.timedelta] = None, - key_vault_properties: Optional["_models.KeyVaultProperties"] = None, - **kwargs: Any - ) -> None: - """ - :keyword location: Resource location. - :paramtype location: str - :keyword soft_delete_period: The time the data should be kept before it stops being accessible - to queries in TimeSpan. - :paramtype soft_delete_period: ~datetime.timedelta - :keyword hot_cache_period: The time the data should be kept in cache for fast queries in - TimeSpan. - :paramtype hot_cache_period: ~datetime.timedelta - :keyword key_vault_properties: KeyVault properties for the database encryption. - :paramtype key_vault_properties: ~azure.mgmt.kusto.models.KeyVaultProperties - """ - super().__init__(location=location, **kwargs) - self.kind: str = "ReadWrite" - self.provisioning_state = None - self.soft_delete_period = soft_delete_period - self.hot_cache_period = hot_cache_period - self.statistics = None - self.is_followed = None - self.key_vault_properties = key_vault_properties - self.suspension_details = None - - -class ResourceSkuCapabilities(_serialization.Model): - """Describes The SKU capabilities object. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar name: An invariant to describe the feature. - :vartype name: str - :ivar value: An invariant if the feature is measured by quantity. - :vartype value: str - """ - - _validation = { - "name": {"readonly": True}, - "value": {"readonly": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "value": {"key": "value", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.name = None - self.value = None - - -class ResourceSkuZoneDetails(_serialization.Model): - """Describes The zonal capabilities of a SKU. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar name: The set of zones that the SKU is available in with the specified capabilities. - :vartype name: list[str] - :ivar capabilities: A list of capabilities that are available for the SKU in the specified list - of zones. - :vartype capabilities: list[~azure.mgmt.kusto.models.ResourceSkuCapabilities] - """ - - _validation = { - "name": {"readonly": True}, - "capabilities": {"readonly": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "[str]"}, - "capabilities": {"key": "capabilities", "type": "[ResourceSkuCapabilities]"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.name = None - self.capabilities = None - - -class SandboxCustomImage(ProxyResource): - """Class representing a Kusto sandbox custom image. - - 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}. # pylint: disable=line-too-long - :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 language: The language name, for example Python. "Python" - :vartype language: str or ~azure.mgmt.kusto.models.Language - :ivar language_version: The version of the language. Either this property or baseImageName - should be specified. - :vartype language_version: str - :ivar base_image_name: The base image name on which the custom image is built on top of. It can - be one of the LanguageExtensionImageName (e.g.: 'Python3_10_8', 'Python3_10_8_DL') or the name - of an existing custom image. Either this property or languageVersion should be specified. - :vartype base_image_name: str - :ivar requirements_file_content: The requirements file content. - :vartype requirements_file_content: str - :ivar provisioning_state: The provisioned state of the resource. Known values are: "Running", - "Creating", "Deleting", "Succeeded", "Failed", "Moving", and "Canceled". - :vartype provisioning_state: str or ~azure.mgmt.kusto.models.ProvisioningState - """ - - _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"}, - "language": {"key": "properties.language", "type": "str"}, - "language_version": {"key": "properties.languageVersion", "type": "str"}, - "base_image_name": {"key": "properties.baseImageName", "type": "str"}, - "requirements_file_content": {"key": "properties.requirementsFileContent", "type": "str"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - } - - def __init__( - self, - *, - language: Optional[Union[str, "_models.Language"]] = None, - language_version: Optional[str] = None, - base_image_name: Optional[str] = None, - requirements_file_content: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword language: The language name, for example Python. "Python" - :paramtype language: str or ~azure.mgmt.kusto.models.Language - :keyword language_version: The version of the language. Either this property or baseImageName - should be specified. - :paramtype language_version: str - :keyword base_image_name: The base image name on which the custom image is built on top of. It - can be one of the LanguageExtensionImageName (e.g.: 'Python3_10_8', 'Python3_10_8_DL') or the - name of an existing custom image. Either this property or languageVersion should be specified. - :paramtype base_image_name: str - :keyword requirements_file_content: The requirements file content. - :paramtype requirements_file_content: str - """ - super().__init__(**kwargs) - self.language = language - self.language_version = language_version - self.base_image_name = base_image_name - self.requirements_file_content = requirements_file_content - self.provisioning_state = None - - -class SandboxCustomImagesCheckNameRequest(_serialization.Model): - """The result returned from a sandboxCustomImage check name availability request. - - 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 server. - - :ivar name: Sandbox custom image resource name. Required. - :vartype name: str - :ivar type: The type of resource, for instance Microsoft.Kusto/clusters/sandboxCustomImages. - Required. Default value is "Microsoft.Kusto/clusters/sandboxCustomImages". - :vartype type: str - """ - - _validation = { - "name": {"required": True}, - "type": {"required": True, "constant": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - } - - type = "Microsoft.Kusto/clusters/sandboxCustomImages" - - def __init__(self, *, name: str, **kwargs: Any) -> None: - """ - :keyword name: Sandbox custom image resource name. Required. - :paramtype name: str - """ - super().__init__(**kwargs) - self.name = name - - -class SandboxCustomImagesListResult(_serialization.Model): - """The list Kusto sandbox custom images operation response. - - :ivar next_link: Link to the next page of results. - :vartype next_link: str - :ivar value: The list of Kusto sandbox custom images. - :vartype value: list[~azure.mgmt.kusto.models.SandboxCustomImage] - """ - - _attribute_map = { - "next_link": {"key": "nextLink", "type": "str"}, - "value": {"key": "value", "type": "[SandboxCustomImage]"}, - } - - def __init__( - self, - *, - next_link: Optional[str] = None, - value: Optional[List["_models.SandboxCustomImage"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword next_link: Link to the next page of results. - :paramtype next_link: str - :keyword value: The list of Kusto sandbox custom images. - :paramtype value: list[~azure.mgmt.kusto.models.SandboxCustomImage] - """ - super().__init__(**kwargs) - self.next_link = next_link - self.value = value - - -class Script(ProxyResource): - """Class representing a database script. - - 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}. # pylint: disable=line-too-long - :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 system_data: Metadata pertaining to creation and last modification of the resource. - :vartype system_data: ~azure.mgmt.kusto.models.SystemData - :ivar script_url: The url to the KQL script blob file. Must not be used together with - scriptContent property. - :vartype script_url: str - :ivar script_url_sas_token: The SaS token that provide read access to the file which contain - the script. Must be provided when using scriptUrl property. - :vartype script_url_sas_token: str - :ivar script_content: The script content. This property should be used when the script is - provide inline and not through file in a SA. Must not be used together with scriptUrl and - scriptUrlSasToken properties. - :vartype script_content: str - :ivar force_update_tag: A unique string. If changed the script will be applied again. - :vartype force_update_tag: str - :ivar continue_on_errors: Flag that indicates whether to continue if one of the command fails. - :vartype continue_on_errors: bool - :ivar provisioning_state: The provisioned state of the resource. Known values are: "Running", - "Creating", "Deleting", "Succeeded", "Failed", "Moving", and "Canceled". - :vartype provisioning_state: str or ~azure.mgmt.kusto.models.ProvisioningState - :ivar script_level: Differentiates between the type of script commands included - Database or - Cluster. The default is Database. Known values are: "Database" and "Cluster". - :vartype script_level: str or ~azure.mgmt.kusto.models.ScriptLevel - :ivar principal_permissions_action: Indicates if the permissions for the script caller are kept - following completion of the script. Known values are: "RetainPermissionOnScriptCompletion" and - "RemovePermissionOnScriptCompletion". - :vartype principal_permissions_action: str or - ~azure.mgmt.kusto.models.PrincipalPermissionsAction - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - "provisioning_state": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "script_url": {"key": "properties.scriptUrl", "type": "str"}, - "script_url_sas_token": {"key": "properties.scriptUrlSasToken", "type": "str"}, - "script_content": {"key": "properties.scriptContent", "type": "str"}, - "force_update_tag": {"key": "properties.forceUpdateTag", "type": "str"}, - "continue_on_errors": {"key": "properties.continueOnErrors", "type": "bool"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - "script_level": {"key": "properties.scriptLevel", "type": "str"}, - "principal_permissions_action": {"key": "properties.principalPermissionsAction", "type": "str"}, - } - - def __init__( - self, - *, - script_url: Optional[str] = None, - script_url_sas_token: Optional[str] = None, - script_content: Optional[str] = None, - force_update_tag: Optional[str] = None, - continue_on_errors: bool = False, - script_level: Optional[Union[str, "_models.ScriptLevel"]] = None, - principal_permissions_action: Optional[Union[str, "_models.PrincipalPermissionsAction"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword script_url: The url to the KQL script blob file. Must not be used together with - scriptContent property. - :paramtype script_url: str - :keyword script_url_sas_token: The SaS token that provide read access to the file which contain - the script. Must be provided when using scriptUrl property. - :paramtype script_url_sas_token: str - :keyword script_content: The script content. This property should be used when the script is - provide inline and not through file in a SA. Must not be used together with scriptUrl and - scriptUrlSasToken properties. - :paramtype script_content: str - :keyword force_update_tag: A unique string. If changed the script will be applied again. - :paramtype force_update_tag: str - :keyword continue_on_errors: Flag that indicates whether to continue if one of the command - fails. - :paramtype continue_on_errors: bool - :keyword script_level: Differentiates between the type of script commands included - Database - or Cluster. The default is Database. Known values are: "Database" and "Cluster". - :paramtype script_level: str or ~azure.mgmt.kusto.models.ScriptLevel - :keyword principal_permissions_action: Indicates if the permissions for the script caller are - kept following completion of the script. Known values are: "RetainPermissionOnScriptCompletion" - and "RemovePermissionOnScriptCompletion". - :paramtype principal_permissions_action: str or - ~azure.mgmt.kusto.models.PrincipalPermissionsAction - """ - super().__init__(**kwargs) - self.system_data = None - self.script_url = script_url - self.script_url_sas_token = script_url_sas_token - self.script_content = script_content - self.force_update_tag = force_update_tag - self.continue_on_errors = continue_on_errors - self.provisioning_state = None - self.script_level = script_level - self.principal_permissions_action = principal_permissions_action - - -class ScriptCheckNameRequest(_serialization.Model): - """A script name availability request. - - 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 server. - - :ivar name: Script name. Required. - :vartype name: str - :ivar type: The type of resource, Microsoft.Kusto/clusters/databases/scripts. Required. Default - value is "Microsoft.Kusto/clusters/databases/scripts". - :vartype type: str - """ - - _validation = { - "name": {"required": True}, - "type": {"required": True, "constant": True}, - } - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - } - - type = "Microsoft.Kusto/clusters/databases/scripts" - - def __init__(self, *, name: str, **kwargs: Any) -> None: - """ - :keyword name: Script name. Required. - :paramtype name: str - """ - super().__init__(**kwargs) - self.name = name - - -class ScriptListResult(_serialization.Model): - """The list Kusto database script operation response. - - :ivar value: The list of Kusto scripts. - :vartype value: list[~azure.mgmt.kusto.models.Script] - """ - - _attribute_map = { - "value": {"key": "value", "type": "[Script]"}, - } - - def __init__(self, *, value: Optional[List["_models.Script"]] = None, **kwargs: Any) -> None: - """ - :keyword value: The list of Kusto scripts. - :paramtype value: list[~azure.mgmt.kusto.models.Script] - """ - super().__init__(**kwargs) - self.value = value - - -class SkuDescription(_serialization.Model): - """The Kusto SKU description of given resource type. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar resource_type: The resource type. - :vartype resource_type: str - :ivar name: The name of the SKU. - :vartype name: str - :ivar tier: The tier of the SKU. - :vartype tier: str - :ivar locations: The set of locations that the SKU is available. - :vartype locations: list[str] - :ivar location_info: Locations and zones. - :vartype location_info: list[~azure.mgmt.kusto.models.SkuLocationInfoItem] - :ivar restrictions: The restrictions because of which SKU cannot be used. - :vartype restrictions: list[JSON] - """ - - _validation = { - "resource_type": {"readonly": True}, - "name": {"readonly": True}, - "tier": {"readonly": True}, - "locations": {"readonly": True}, - "location_info": {"readonly": True}, - "restrictions": {"readonly": True}, - } - - _attribute_map = { - "resource_type": {"key": "resourceType", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "tier": {"key": "tier", "type": "str"}, - "locations": {"key": "locations", "type": "[str]"}, - "location_info": {"key": "locationInfo", "type": "[SkuLocationInfoItem]"}, - "restrictions": {"key": "restrictions", "type": "[object]"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.resource_type = None - self.name = None - self.tier = None - self.locations = None - self.location_info = None - self.restrictions = None - - -class SkuDescriptionList(_serialization.Model): - """The list of the EngagementFabric SKU descriptions. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: SKU descriptions. - :vartype value: list[~azure.mgmt.kusto.models.SkuDescription] - """ - - _validation = { - "value": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[SkuDescription]"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.value = None - - -class SkuLocationInfoItem(_serialization.Model): - """The locations and zones info for SKU. - - All required parameters must be populated in order to send to server. - - :ivar location: The available location of the SKU. Required. - :vartype location: str - :ivar zones: The available zone of the SKU. - :vartype zones: list[str] - :ivar zone_details: Gets details of capabilities available to a SKU in specific zones. - :vartype zone_details: list[~azure.mgmt.kusto.models.ResourceSkuZoneDetails] - """ - - _validation = { - "location": {"required": True}, - } - - _attribute_map = { - "location": {"key": "location", "type": "str"}, - "zones": {"key": "zones", "type": "[str]"}, - "zone_details": {"key": "zoneDetails", "type": "[ResourceSkuZoneDetails]"}, - } - - def __init__( - self, - *, - location: str, - zones: Optional[List[str]] = None, - zone_details: Optional[List["_models.ResourceSkuZoneDetails"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword location: The available location of the SKU. Required. - :paramtype location: str - :keyword zones: The available zone of the SKU. - :paramtype zones: list[str] - :keyword zone_details: Gets details of capabilities available to a SKU in specific zones. - :paramtype zone_details: list[~azure.mgmt.kusto.models.ResourceSkuZoneDetails] - """ - super().__init__(**kwargs) - self.location = location - self.zones = zones - self.zone_details = zone_details - - -class SuspensionDetails(_serialization.Model): - """The database suspension details. If the database is suspended, this object contains information - related to the database's suspension state. - - :ivar suspension_start_date: The starting date and time of the suspension state. - :vartype suspension_start_date: ~datetime.datetime - """ - - _attribute_map = { - "suspension_start_date": {"key": "suspensionStartDate", "type": "iso-8601"}, - } - - def __init__(self, *, suspension_start_date: Optional[datetime.datetime] = None, **kwargs: Any) -> None: - """ - :keyword suspension_start_date: The starting date and time of the suspension state. - :paramtype suspension_start_date: ~datetime.datetime - """ - super().__init__(**kwargs) - self.suspension_start_date = suspension_start_date - - -class SystemData(_serialization.Model): - """Metadata pertaining to creation and last modification of the resource. - - :ivar created_by: The identity that created the resource. - :vartype created_by: str - :ivar created_by_type: The type of identity that created the resource. Known values are: - "User", "Application", "ManagedIdentity", and "Key". - :vartype created_by_type: str or ~azure.mgmt.kusto.models.CreatedByType - :ivar created_at: The timestamp of resource creation (UTC). - :vartype created_at: ~datetime.datetime - :ivar last_modified_by: The identity that last modified the resource. - :vartype last_modified_by: str - :ivar last_modified_by_type: The type of identity that last modified the resource. Known values - are: "User", "Application", "ManagedIdentity", and "Key". - :vartype last_modified_by_type: str or ~azure.mgmt.kusto.models.CreatedByType - :ivar last_modified_at: The timestamp of resource last modification (UTC). - :vartype last_modified_at: ~datetime.datetime - """ - - _attribute_map = { - "created_by": {"key": "createdBy", "type": "str"}, - "created_by_type": {"key": "createdByType", "type": "str"}, - "created_at": {"key": "createdAt", "type": "iso-8601"}, - "last_modified_by": {"key": "lastModifiedBy", "type": "str"}, - "last_modified_by_type": {"key": "lastModifiedByType", "type": "str"}, - "last_modified_at": {"key": "lastModifiedAt", "type": "iso-8601"}, - } - - def __init__( - self, - *, - created_by: Optional[str] = None, - created_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, - created_at: Optional[datetime.datetime] = None, - last_modified_by: Optional[str] = None, - last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, - last_modified_at: Optional[datetime.datetime] = None, - **kwargs: Any - ) -> None: - """ - :keyword created_by: The identity that created the resource. - :paramtype created_by: str - :keyword created_by_type: The type of identity that created the resource. Known values are: - "User", "Application", "ManagedIdentity", and "Key". - :paramtype created_by_type: str or ~azure.mgmt.kusto.models.CreatedByType - :keyword created_at: The timestamp of resource creation (UTC). - :paramtype created_at: ~datetime.datetime - :keyword last_modified_by: The identity that last modified the resource. - :paramtype last_modified_by: str - :keyword last_modified_by_type: The type of identity that last modified the resource. Known - values are: "User", "Application", "ManagedIdentity", and "Key". - :paramtype last_modified_by_type: str or ~azure.mgmt.kusto.models.CreatedByType - :keyword last_modified_at: The timestamp of resource last modification (UTC). - :paramtype last_modified_at: ~datetime.datetime - """ - super().__init__(**kwargs) - self.created_by = created_by - self.created_by_type = created_by_type - self.created_at = created_at - self.last_modified_by = last_modified_by - self.last_modified_by_type = last_modified_by_type - self.last_modified_at = last_modified_at - - -class TableLevelSharingProperties(_serialization.Model): - """Tables that will be included and excluded in the follower database. - - :ivar tables_to_include: List of tables to include in the follower database. - :vartype tables_to_include: list[str] - :ivar tables_to_exclude: List of tables to exclude from the follower database. - :vartype tables_to_exclude: list[str] - :ivar external_tables_to_include: List of external tables to include in the follower database. - :vartype external_tables_to_include: list[str] - :ivar external_tables_to_exclude: List of external tables to exclude from the follower - database. - :vartype external_tables_to_exclude: list[str] - :ivar materialized_views_to_include: List of materialized views to include in the follower - database. - :vartype materialized_views_to_include: list[str] - :ivar materialized_views_to_exclude: List of materialized views to exclude from the follower - database. - :vartype materialized_views_to_exclude: list[str] - :ivar functions_to_include: List of functions to include in the follower database. - :vartype functions_to_include: list[str] - :ivar functions_to_exclude: List of functions to exclude from the follower database. - :vartype functions_to_exclude: list[str] - """ - - _attribute_map = { - "tables_to_include": {"key": "tablesToInclude", "type": "[str]"}, - "tables_to_exclude": {"key": "tablesToExclude", "type": "[str]"}, - "external_tables_to_include": {"key": "externalTablesToInclude", "type": "[str]"}, - "external_tables_to_exclude": {"key": "externalTablesToExclude", "type": "[str]"}, - "materialized_views_to_include": {"key": "materializedViewsToInclude", "type": "[str]"}, - "materialized_views_to_exclude": {"key": "materializedViewsToExclude", "type": "[str]"}, - "functions_to_include": {"key": "functionsToInclude", "type": "[str]"}, - "functions_to_exclude": {"key": "functionsToExclude", "type": "[str]"}, - } - - def __init__( - self, - *, - tables_to_include: Optional[List[str]] = None, - tables_to_exclude: Optional[List[str]] = None, - external_tables_to_include: Optional[List[str]] = None, - external_tables_to_exclude: Optional[List[str]] = None, - materialized_views_to_include: Optional[List[str]] = None, - materialized_views_to_exclude: Optional[List[str]] = None, - functions_to_include: Optional[List[str]] = None, - functions_to_exclude: Optional[List[str]] = None, - **kwargs: Any - ) -> None: - """ - :keyword tables_to_include: List of tables to include in the follower database. - :paramtype tables_to_include: list[str] - :keyword tables_to_exclude: List of tables to exclude from the follower database. - :paramtype tables_to_exclude: list[str] - :keyword external_tables_to_include: List of external tables to include in the follower - database. - :paramtype external_tables_to_include: list[str] - :keyword external_tables_to_exclude: List of external tables to exclude from the follower - database. - :paramtype external_tables_to_exclude: list[str] - :keyword materialized_views_to_include: List of materialized views to include in the follower - database. - :paramtype materialized_views_to_include: list[str] - :keyword materialized_views_to_exclude: List of materialized views to exclude from the follower - database. - :paramtype materialized_views_to_exclude: list[str] - :keyword functions_to_include: List of functions to include in the follower database. - :paramtype functions_to_include: list[str] - :keyword functions_to_exclude: List of functions to exclude from the follower database. - :paramtype functions_to_exclude: list[str] - """ - super().__init__(**kwargs) - self.tables_to_include = tables_to_include - self.tables_to_exclude = tables_to_exclude - self.external_tables_to_include = external_tables_to_include - self.external_tables_to_exclude = external_tables_to_exclude - self.materialized_views_to_include = materialized_views_to_include - self.materialized_views_to_exclude = materialized_views_to_exclude - self.functions_to_include = functions_to_include - self.functions_to_exclude = functions_to_exclude - - -class TrustedExternalTenant(_serialization.Model): - """Represents a tenant ID that is trusted by the cluster. - - :ivar value: GUID representing an external tenant. - :vartype value: str - """ - - _attribute_map = { - "value": {"key": "value", "type": "str"}, - } - - def __init__(self, *, value: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword value: GUID representing an external tenant. - :paramtype value: str - """ - super().__init__(**kwargs) - self.value = value - - -class VirtualNetworkConfiguration(_serialization.Model): - """A class that contains virtual network definition. - - All required parameters must be populated in order to send to server. - - :ivar subnet_id: The subnet resource id. Required. - :vartype subnet_id: str - :ivar engine_public_ip_id: Engine service's public IP address resource id. Required. - :vartype engine_public_ip_id: str - :ivar data_management_public_ip_id: Data management's service public IP address resource id. - Required. - :vartype data_management_public_ip_id: str - :ivar state: When enabled, the cluster is deployed into the configured subnet, when disabled it - will be removed from the subnet. Known values are: "Enabled" and "Disabled". - :vartype state: str or ~azure.mgmt.kusto.models.VnetState - """ - - _validation = { - "subnet_id": {"required": True}, - "engine_public_ip_id": {"required": True}, - "data_management_public_ip_id": {"required": True}, - } - - _attribute_map = { - "subnet_id": {"key": "subnetId", "type": "str"}, - "engine_public_ip_id": {"key": "enginePublicIpId", "type": "str"}, - "data_management_public_ip_id": {"key": "dataManagementPublicIpId", "type": "str"}, - "state": {"key": "state", "type": "str"}, - } - - def __init__( - self, - *, - subnet_id: str, - engine_public_ip_id: str, - data_management_public_ip_id: str, - state: Union[str, "_models.VnetState"] = "Enabled", - **kwargs: Any - ) -> None: - """ - :keyword subnet_id: The subnet resource id. Required. - :paramtype subnet_id: str - :keyword engine_public_ip_id: Engine service's public IP address resource id. Required. - :paramtype engine_public_ip_id: str - :keyword data_management_public_ip_id: Data management's service public IP address resource id. - Required. - :paramtype data_management_public_ip_id: str - :keyword state: When enabled, the cluster is deployed into the configured subnet, when disabled - it will be removed from the subnet. Known values are: "Enabled" and "Disabled". - :paramtype state: str or ~azure.mgmt.kusto.models.VnetState - """ - super().__init__(**kwargs) - self.subnet_id = subnet_id - self.engine_public_ip_id = engine_public_ip_id - self.data_management_public_ip_id = data_management_public_ip_id - self.state = state diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/_patch.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/_patch.py index f7dd32510333..ea765788358a 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/_patch.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/models/_patch.py @@ -1,14 +1,14 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ +# 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. +# -------------------------------------------------------------------------- """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ -from typing import List -__all__: List[str] = [] # Add all objects you want publicly available to users at this package level +__all__: list[str] = [] # Add all objects you want publicly available to users at this package level def patch_sdk(): diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/__init__.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/__init__.py index e2da7c0b4ba8..4b17e5aede88 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/__init__.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/__init__.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # pylint: disable=wrong-import-position @@ -12,42 +12,42 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._clusters_operations import ClustersOperations # type: ignore -from ._cluster_principal_assignments_operations import ClusterPrincipalAssignmentsOperations # type: ignore -from ._skus_operations import SkusOperations # type: ignore -from ._databases_operations import DatabasesOperations # type: ignore -from ._attached_database_configurations_operations import AttachedDatabaseConfigurationsOperations # type: ignore -from ._managed_private_endpoints_operations import ManagedPrivateEndpointsOperations # type: ignore -from ._database_operations import DatabaseOperations # type: ignore -from ._database_principal_assignments_operations import DatabasePrincipalAssignmentsOperations # type: ignore -from ._scripts_operations import ScriptsOperations # type: ignore -from ._sandbox_custom_images_operations import SandboxCustomImagesOperations # type: ignore -from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations # type: ignore -from ._private_link_resources_operations import PrivateLinkResourcesOperations # type: ignore -from ._data_connections_operations import DataConnectionsOperations # type: ignore from ._operations import Operations # type: ignore -from ._operations_results_operations import OperationsResultsOperations # type: ignore -from ._operations_results_location_operations import OperationsResultsLocationOperations # type: ignore +from ._operations import ClusterPrincipalAssignmentsOperations # type: ignore +from ._operations import DatabasePrincipalAssignmentsOperations # type: ignore +from ._operations import ScriptsOperations # type: ignore +from ._operations import DataConnectionsOperations # type: ignore +from ._operations import DatabasesOperations # type: ignore +from ._operations import AttachedDatabaseConfigurationsOperations # type: ignore +from ._operations import ManagedPrivateEndpointsOperations # type: ignore +from ._operations import SandboxCustomImagesOperations # type: ignore +from ._operations import ClustersOperations # type: ignore +from ._operations import PrivateEndpointConnectionsOperations # type: ignore +from ._operations import PrivateLinkResourcesOperations # type: ignore +from ._operations import DatabaseOperations # type: ignore +from ._operations import SkusOperations # type: ignore +from ._operations import OperationsResultsOperations # type: ignore +from ._operations import OperationsResultsLocationOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "ClustersOperations", + "Operations", "ClusterPrincipalAssignmentsOperations", - "SkusOperations", + "DatabasePrincipalAssignmentsOperations", + "ScriptsOperations", + "DataConnectionsOperations", "DatabasesOperations", "AttachedDatabaseConfigurationsOperations", "ManagedPrivateEndpointsOperations", - "DatabaseOperations", - "DatabasePrincipalAssignmentsOperations", - "ScriptsOperations", "SandboxCustomImagesOperations", + "ClustersOperations", "PrivateEndpointConnectionsOperations", "PrivateLinkResourcesOperations", - "DataConnectionsOperations", - "Operations", + "DatabaseOperations", + "SkusOperations", "OperationsResultsOperations", "OperationsResultsLocationOperations", ] diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_attached_database_configurations_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_attached_database_configurations_operations.py deleted file mode 100644 index 404f65605828..000000000000 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_attached_database_configurations_operations.py +++ /dev/null @@ -1,869 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._serialization import Serializer - -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_check_name_availability_request( - resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/attachedDatabaseConfigurationCheckNameAvailability", - ) # pylint: disable=line-too-long - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_by_cluster_request( - resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/attachedDatabaseConfigurations", - ) # pylint: disable=line-too-long - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, - cluster_name: str, - attached_database_configuration_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/attachedDatabaseConfigurations/{attachedDatabaseConfigurationName}", - ) # pylint: disable=line-too-long - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - "attachedDatabaseConfigurationName": _SERIALIZER.url( - "attached_database_configuration_name", attached_database_configuration_name, "str", pattern=r"^.*$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - cluster_name: str, - attached_database_configuration_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/attachedDatabaseConfigurations/{attachedDatabaseConfigurationName}", - ) # pylint: disable=line-too-long - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - "attachedDatabaseConfigurationName": _SERIALIZER.url( - "attached_database_configuration_name", attached_database_configuration_name, "str", pattern=r"^.*$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - cluster_name: str, - attached_database_configuration_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/attachedDatabaseConfigurations/{attachedDatabaseConfigurationName}", - ) # pylint: disable=line-too-long - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - "attachedDatabaseConfigurationName": _SERIALIZER.url( - "attached_database_configuration_name", attached_database_configuration_name, "str", pattern=r"^.*$" - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class AttachedDatabaseConfigurationsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.kusto.KustoManagementClient`'s - :attr:`attached_database_configurations` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs): - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @overload - def check_name_availability( - self, - resource_group_name: str, - cluster_name: str, - resource_name: _models.AttachedDatabaseConfigurationsCheckNameRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CheckNameResult: - """Checks that the attached database configuration resource name is valid and is not already in - use. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param resource_name: The name of the resource. Required. - :type resource_name: ~azure.mgmt.kusto.models.AttachedDatabaseConfigurationsCheckNameRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: CheckNameResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.CheckNameResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def check_name_availability( - self, - resource_group_name: str, - cluster_name: str, - resource_name: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CheckNameResult: - """Checks that the attached database configuration resource name is valid and is not already in - use. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param resource_name: The name of the resource. Required. - :type resource_name: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: CheckNameResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.CheckNameResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def check_name_availability( - self, - resource_group_name: str, - cluster_name: str, - resource_name: Union[_models.AttachedDatabaseConfigurationsCheckNameRequest, IO[bytes]], - **kwargs: Any - ) -> _models.CheckNameResult: - """Checks that the attached database configuration resource name is valid and is not already in - use. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param resource_name: The name of the resource. Is either a - AttachedDatabaseConfigurationsCheckNameRequest type or a IO[bytes] type. Required. - :type resource_name: ~azure.mgmt.kusto.models.AttachedDatabaseConfigurationsCheckNameRequest or - IO[bytes] - :return: CheckNameResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.CheckNameResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CheckNameResult] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(resource_name, (IOBase, bytes)): - _content = resource_name - else: - _json = self._serialize.body(resource_name, "AttachedDatabaseConfigurationsCheckNameRequest") - - _request = build_check_name_availability_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("CheckNameResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def list_by_cluster( - self, resource_group_name: str, cluster_name: str, **kwargs: Any - ) -> Iterable["_models.AttachedDatabaseConfiguration"]: - """Returns the list of attached database configurations of the given Kusto cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :return: An iterator like instance of either AttachedDatabaseConfiguration or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.kusto.models.AttachedDatabaseConfiguration] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.AttachedDatabaseConfigurationListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_cluster_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("AttachedDatabaseConfigurationListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get( - self, resource_group_name: str, cluster_name: str, attached_database_configuration_name: str, **kwargs: Any - ) -> _models.AttachedDatabaseConfiguration: - """Returns an attached database configuration. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param attached_database_configuration_name: The name of the attached database configuration. - Required. - :type attached_database_configuration_name: str - :return: AttachedDatabaseConfiguration or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.AttachedDatabaseConfiguration - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.AttachedDatabaseConfiguration] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - attached_database_configuration_name=attached_database_configuration_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("AttachedDatabaseConfiguration", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _create_or_update_initial( - self, - resource_group_name: str, - cluster_name: str, - attached_database_configuration_name: str, - parameters: Union[_models.AttachedDatabaseConfiguration, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "AttachedDatabaseConfiguration") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - attached_database_configuration_name=attached_database_configuration_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - cluster_name: str, - attached_database_configuration_name: str, - parameters: _models.AttachedDatabaseConfiguration, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.AttachedDatabaseConfiguration]: - """Creates or updates an attached database configuration. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param attached_database_configuration_name: The name of the attached database configuration. - Required. - :type attached_database_configuration_name: str - :param parameters: The database parameters supplied to the CreateOrUpdate operation. Required. - :type parameters: ~azure.mgmt.kusto.models.AttachedDatabaseConfiguration - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either AttachedDatabaseConfiguration or the - result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.AttachedDatabaseConfiguration] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - cluster_name: str, - attached_database_configuration_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.AttachedDatabaseConfiguration]: - """Creates or updates an attached database configuration. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param attached_database_configuration_name: The name of the attached database configuration. - Required. - :type attached_database_configuration_name: str - :param parameters: The database parameters supplied to the CreateOrUpdate operation. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either AttachedDatabaseConfiguration or the - result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.AttachedDatabaseConfiguration] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create_or_update( - self, - resource_group_name: str, - cluster_name: str, - attached_database_configuration_name: str, - parameters: Union[_models.AttachedDatabaseConfiguration, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.AttachedDatabaseConfiguration]: - """Creates or updates an attached database configuration. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param attached_database_configuration_name: The name of the attached database configuration. - Required. - :type attached_database_configuration_name: str - :param parameters: The database parameters supplied to the CreateOrUpdate operation. Is either - a AttachedDatabaseConfiguration type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.kusto.models.AttachedDatabaseConfiguration or IO[bytes] - :return: An instance of LROPoller that returns either AttachedDatabaseConfiguration or the - result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.AttachedDatabaseConfiguration] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.AttachedDatabaseConfiguration] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - attached_database_configuration_name=attached_database_configuration_name, - parameters=parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("AttachedDatabaseConfiguration", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.AttachedDatabaseConfiguration].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.AttachedDatabaseConfiguration]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial( - self, resource_group_name: str, cluster_name: str, attached_database_configuration_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - attached_database_configuration_name=attached_database_configuration_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete( - self, resource_group_name: str, cluster_name: str, attached_database_configuration_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Deletes the attached database configuration with the given name. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param attached_database_configuration_name: The name of the attached database configuration. - Required. - :type attached_database_configuration_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - attached_database_configuration_name=attached_database_configuration_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_cluster_principal_assignments_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_cluster_principal_assignments_operations.py deleted file mode 100644 index 072a12a68ad4..000000000000 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_cluster_principal_assignments_operations.py +++ /dev/null @@ -1,844 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._serialization import Serializer - -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_check_name_availability_request( - resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/checkPrincipalAssignmentNameAvailability", - ) # pylint: disable=line-too-long - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, cluster_name: str, principal_assignment_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/principalAssignments/{principalAssignmentName}", - ) # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - "principalAssignmentName": _SERIALIZER.url( - "principal_assignment_name", principal_assignment_name, "str", pattern=r"^.*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, cluster_name: str, principal_assignment_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/principalAssignments/{principalAssignmentName}", - ) # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - "principalAssignmentName": _SERIALIZER.url( - "principal_assignment_name", principal_assignment_name, "str", pattern=r"^.*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, cluster_name: str, principal_assignment_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/principalAssignments/{principalAssignmentName}", - ) # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - "principalAssignmentName": _SERIALIZER.url( - "principal_assignment_name", principal_assignment_name, "str", pattern=r"^.*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_request(resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/principalAssignments", - ) # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class ClusterPrincipalAssignmentsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.kusto.KustoManagementClient`'s - :attr:`cluster_principal_assignments` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs): - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @overload - def check_name_availability( - self, - resource_group_name: str, - cluster_name: str, - principal_assignment_name: _models.ClusterPrincipalAssignmentCheckNameRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CheckNameResult: - """Checks that the principal assignment name is valid and is not already in use. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param principal_assignment_name: The name of the principal assignment. Required. - :type principal_assignment_name: - ~azure.mgmt.kusto.models.ClusterPrincipalAssignmentCheckNameRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: CheckNameResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.CheckNameResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def check_name_availability( - self, - resource_group_name: str, - cluster_name: str, - principal_assignment_name: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CheckNameResult: - """Checks that the principal assignment name is valid and is not already in use. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param principal_assignment_name: The name of the principal assignment. Required. - :type principal_assignment_name: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: CheckNameResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.CheckNameResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def check_name_availability( - self, - resource_group_name: str, - cluster_name: str, - principal_assignment_name: Union[_models.ClusterPrincipalAssignmentCheckNameRequest, IO[bytes]], - **kwargs: Any - ) -> _models.CheckNameResult: - """Checks that the principal assignment name is valid and is not already in use. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param principal_assignment_name: The name of the principal assignment. Is either a - ClusterPrincipalAssignmentCheckNameRequest type or a IO[bytes] type. Required. - :type principal_assignment_name: - ~azure.mgmt.kusto.models.ClusterPrincipalAssignmentCheckNameRequest or IO[bytes] - :return: CheckNameResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.CheckNameResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CheckNameResult] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(principal_assignment_name, (IOBase, bytes)): - _content = principal_assignment_name - else: - _json = self._serialize.body(principal_assignment_name, "ClusterPrincipalAssignmentCheckNameRequest") - - _request = build_check_name_availability_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("CheckNameResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def get( - self, resource_group_name: str, cluster_name: str, principal_assignment_name: str, **kwargs: Any - ) -> _models.ClusterPrincipalAssignment: - """Gets a Kusto cluster principalAssignment. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param principal_assignment_name: The name of the Kusto principalAssignment. Required. - :type principal_assignment_name: str - :return: ClusterPrincipalAssignment or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.ClusterPrincipalAssignment - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ClusterPrincipalAssignment] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - principal_assignment_name=principal_assignment_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ClusterPrincipalAssignment", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _create_or_update_initial( - self, - resource_group_name: str, - cluster_name: str, - principal_assignment_name: str, - parameters: Union[_models.ClusterPrincipalAssignment, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ClusterPrincipalAssignment") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - principal_assignment_name=principal_assignment_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - cluster_name: str, - principal_assignment_name: str, - parameters: _models.ClusterPrincipalAssignment, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ClusterPrincipalAssignment]: - """Create a Kusto cluster principalAssignment. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param principal_assignment_name: The name of the Kusto principalAssignment. Required. - :type principal_assignment_name: str - :param parameters: The Kusto cluster principalAssignment's parameters supplied for the - operation. Required. - :type parameters: ~azure.mgmt.kusto.models.ClusterPrincipalAssignment - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either ClusterPrincipalAssignment or the result - of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.ClusterPrincipalAssignment] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - cluster_name: str, - principal_assignment_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ClusterPrincipalAssignment]: - """Create a Kusto cluster principalAssignment. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param principal_assignment_name: The name of the Kusto principalAssignment. Required. - :type principal_assignment_name: str - :param parameters: The Kusto cluster principalAssignment's parameters supplied for the - operation. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either ClusterPrincipalAssignment or the result - of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.ClusterPrincipalAssignment] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create_or_update( - self, - resource_group_name: str, - cluster_name: str, - principal_assignment_name: str, - parameters: Union[_models.ClusterPrincipalAssignment, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.ClusterPrincipalAssignment]: - """Create a Kusto cluster principalAssignment. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param principal_assignment_name: The name of the Kusto principalAssignment. Required. - :type principal_assignment_name: str - :param parameters: The Kusto cluster principalAssignment's parameters supplied for the - operation. Is either a ClusterPrincipalAssignment type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.kusto.models.ClusterPrincipalAssignment or IO[bytes] - :return: An instance of LROPoller that returns either ClusterPrincipalAssignment or the result - of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.ClusterPrincipalAssignment] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ClusterPrincipalAssignment] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - principal_assignment_name=principal_assignment_name, - parameters=parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ClusterPrincipalAssignment", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.ClusterPrincipalAssignment].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.ClusterPrincipalAssignment]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial( - self, resource_group_name: str, cluster_name: str, principal_assignment_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - principal_assignment_name=principal_assignment_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete( - self, resource_group_name: str, cluster_name: str, principal_assignment_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Deletes a Kusto cluster principalAssignment. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param principal_assignment_name: The name of the Kusto principalAssignment. Required. - :type principal_assignment_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - principal_assignment_name=principal_assignment_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list( - self, resource_group_name: str, cluster_name: str, **kwargs: Any - ) -> Iterable["_models.ClusterPrincipalAssignment"]: - """Lists all Kusto cluster principalAssignments. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :return: An iterator like instance of either ClusterPrincipalAssignment or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.kusto.models.ClusterPrincipalAssignment] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ClusterPrincipalAssignmentListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("ClusterPrincipalAssignmentListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_clusters_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_clusters_operations.py deleted file mode 100644 index 0925a54a8fa1..000000000000 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_clusters_operations.py +++ /dev/null @@ -1,3792 +0,0 @@ -# pylint: disable=too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._serialization import Serializer - -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_get_request(resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}", - ) # pylint: disable=line-too-long - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - cluster_name: str, - subscription_id: str, - *, - if_match: Optional[str] = None, - if_none_match: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}", - ) # pylint: disable=line-too-long - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if if_none_match is not None: - _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, cluster_name: str, subscription_id: str, *, if_match: Optional[str] = None, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}", - ) # pylint: disable=line-too-long - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}", - ) # pylint: disable=line-too-long - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_stop_request(resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/stop", - ) # pylint: disable=line-too-long - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_start_request( - resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/start", - ) # pylint: disable=line-too-long - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_migrate_request( - resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/migrate", - ) # pylint: disable=line-too-long - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_follower_databases_get_request( # pylint: disable=name-too-long - resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/listFollowerDatabases", - ) # pylint: disable=line-too-long - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_follower_databases_request( - resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/listFollowerDatabases", - ) # pylint: disable=line-too-long - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_detach_follower_databases_request( - resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/detachFollowerDatabases", - ) # pylint: disable=line-too-long - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_diagnose_virtual_network_request( - resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/diagnoseVirtualNetwork", - ) # pylint: disable=line-too-long - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_by_resource_group_request(resource_group_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters", - ) # pylint: disable=line-too-long - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Kusto/clusters") - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_skus_request(subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Kusto/skus") - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_check_name_availability_request(location: str, subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/providers/Microsoft.Kusto/locations/{location}/checkNameAvailability", - ) # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - "location": _SERIALIZER.url("location", location, "str", min_length=1), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_skus_by_resource_request( - resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/skus", - ) # pylint: disable=line-too-long - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_outbound_network_dependencies_endpoints_request( # pylint: disable=name-too-long - resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/outboundNetworkDependenciesEndpoints", - ) # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_add_callout_policies_request( - resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/addCalloutPolicies", - ) # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_remove_callout_policy_request( - resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/removeCalloutPolicy", - ) # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_callout_policies_request( - resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/listCalloutPolicies", - ) # pylint: disable=line-too-long - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_language_extensions_request( - resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/listLanguageExtensions", - ) # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_add_language_extensions_request( - resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/addLanguageExtensions", - ) # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_remove_language_extensions_request( - resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/removeLanguageExtensions", - ) # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -class ClustersOperations: # pylint: disable=too-many-public-methods - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.kusto.KustoManagementClient`'s - :attr:`clusters` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs): - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def get(self, resource_group_name: str, cluster_name: str, **kwargs: Any) -> _models.Cluster: - """Gets a Kusto cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :return: Cluster or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.Cluster - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.Cluster] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("Cluster", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _create_or_update_initial( - self, - resource_group_name: str, - cluster_name: str, - parameters: Union[_models.Cluster, IO[bytes]], - if_match: Optional[str] = None, - if_none_match: Optional[str] = None, - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "Cluster") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - subscription_id=self._config.subscription_id, - if_match=if_match, - if_none_match=if_none_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - cluster_name: str, - parameters: _models.Cluster, - if_match: Optional[str] = None, - if_none_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Cluster]: - """Create or update a Kusto cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param parameters: The Kusto cluster parameters supplied to the CreateOrUpdate operation. - Required. - :type parameters: ~azure.mgmt.kusto.models.Cluster - :param if_match: The ETag of the cluster. Omit this value to always overwrite the current - cluster. Specify the last-seen ETag value to prevent accidentally overwriting concurrent - changes. Default value is None. - :type if_match: str - :param if_none_match: Set to '*' to allow a new cluster to be created, but to prevent updating - an existing cluster. Other values will result in a 412 Pre-condition Failed response. Default - value is None. - :type if_none_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either Cluster or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.Cluster] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - cluster_name: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - if_none_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Cluster]: - """Create or update a Kusto cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param parameters: The Kusto cluster parameters supplied to the CreateOrUpdate operation. - Required. - :type parameters: IO[bytes] - :param if_match: The ETag of the cluster. Omit this value to always overwrite the current - cluster. Specify the last-seen ETag value to prevent accidentally overwriting concurrent - changes. Default value is None. - :type if_match: str - :param if_none_match: Set to '*' to allow a new cluster to be created, but to prevent updating - an existing cluster. Other values will result in a 412 Pre-condition Failed response. Default - value is None. - :type if_none_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either Cluster or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.Cluster] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create_or_update( - self, - resource_group_name: str, - cluster_name: str, - parameters: Union[_models.Cluster, IO[bytes]], - if_match: Optional[str] = None, - if_none_match: Optional[str] = None, - **kwargs: Any - ) -> LROPoller[_models.Cluster]: - """Create or update a Kusto cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param parameters: The Kusto cluster parameters supplied to the CreateOrUpdate operation. Is - either a Cluster type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.kusto.models.Cluster or IO[bytes] - :param if_match: The ETag of the cluster. Omit this value to always overwrite the current - cluster. Specify the last-seen ETag value to prevent accidentally overwriting concurrent - changes. Default value is None. - :type if_match: str - :param if_none_match: Set to '*' to allow a new cluster to be created, but to prevent updating - an existing cluster. Other values will result in a 412 Pre-condition Failed response. Default - value is None. - :type if_none_match: str - :return: An instance of LROPoller that returns either Cluster or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.Cluster] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Cluster] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - parameters=parameters, - if_match=if_match, - if_none_match=if_none_match, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Cluster", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.Cluster].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.Cluster]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _update_initial( - self, - resource_group_name: str, - cluster_name: str, - parameters: Union[_models.ClusterUpdate, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ClusterUpdate") - - _request = build_update_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - subscription_id=self._config.subscription_id, - if_match=if_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 201: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update( - self, - resource_group_name: str, - cluster_name: str, - parameters: _models.ClusterUpdate, - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Cluster]: - """Update a Kusto cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param parameters: The Kusto cluster parameters supplied to the Update operation. Required. - :type parameters: ~azure.mgmt.kusto.models.ClusterUpdate - :param if_match: The ETag of the cluster. Omit this value to always overwrite the current - cluster. Specify the last-seen ETag value to prevent accidentally overwriting concurrent - changes. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either Cluster or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.Cluster] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update( - self, - resource_group_name: str, - cluster_name: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Cluster]: - """Update a Kusto cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param parameters: The Kusto cluster parameters supplied to the Update operation. Required. - :type parameters: IO[bytes] - :param if_match: The ETag of the cluster. Omit this value to always overwrite the current - cluster. Specify the last-seen ETag value to prevent accidentally overwriting concurrent - changes. Default value is None. - :type if_match: str - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either Cluster or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.Cluster] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update( - self, - resource_group_name: str, - cluster_name: str, - parameters: Union[_models.ClusterUpdate, IO[bytes]], - if_match: Optional[str] = None, - **kwargs: Any - ) -> LROPoller[_models.Cluster]: - """Update a Kusto cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param parameters: The Kusto cluster parameters supplied to the Update operation. Is either a - ClusterUpdate type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.kusto.models.ClusterUpdate or IO[bytes] - :param if_match: The ETag of the cluster. Omit this value to always overwrite the current - cluster. Specify the last-seen ETag value to prevent accidentally overwriting concurrent - changes. Default value is None. - :type if_match: str - :return: An instance of LROPoller that returns either Cluster or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.Cluster] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Cluster] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - parameters=parameters, - if_match=if_match, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Cluster", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.Cluster].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.Cluster]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial(self, resource_group_name: str, cluster_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete(self, resource_group_name: str, cluster_name: str, **kwargs: Any) -> LROPoller[None]: - """Deletes a Kusto cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - def _stop_initial(self, resource_group_name: str, cluster_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_stop_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_stop(self, resource_group_name: str, cluster_name: str, **kwargs: Any) -> LROPoller[None]: - """Stops a Kusto cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._stop_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - def _start_initial(self, resource_group_name: str, cluster_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_start_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_start(self, resource_group_name: str, cluster_name: str, **kwargs: Any) -> LROPoller[None]: - """Starts a Kusto cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._start_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - def _migrate_initial( - self, - resource_group_name: str, - cluster_name: str, - cluster_migrate_request: Union[_models.ClusterMigrateRequest, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(cluster_migrate_request, (IOBase, bytes)): - _content = cluster_migrate_request - else: - _json = self._serialize.body(cluster_migrate_request, "ClusterMigrateRequest") - - _request = build_migrate_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_migrate( - self, - resource_group_name: str, - cluster_name: str, - cluster_migrate_request: _models.ClusterMigrateRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: - """Migrate data from a Kusto cluster to another cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param cluster_migrate_request: The cluster migrate request parameters. Required. - :type cluster_migrate_request: ~azure.mgmt.kusto.models.ClusterMigrateRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_migrate( - self, - resource_group_name: str, - cluster_name: str, - cluster_migrate_request: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: - """Migrate data from a Kusto cluster to another cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param cluster_migrate_request: The cluster migrate request parameters. Required. - :type cluster_migrate_request: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_migrate( - self, - resource_group_name: str, - cluster_name: str, - cluster_migrate_request: Union[_models.ClusterMigrateRequest, IO[bytes]], - **kwargs: Any - ) -> LROPoller[None]: - """Migrate data from a Kusto cluster to another cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param cluster_migrate_request: The cluster migrate request parameters. Is either a - ClusterMigrateRequest type or a IO[bytes] type. Required. - :type cluster_migrate_request: ~azure.mgmt.kusto.models.ClusterMigrateRequest or IO[bytes] - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._migrate_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - cluster_migrate_request=cluster_migrate_request, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list_follower_databases_get( - self, resource_group_name: str, cluster_name: str, **kwargs: Any - ) -> Iterable["_models.FollowerDatabaseDefinitionGet"]: - """Returns a list of databases that are owned by this cluster and were followed by another - cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :return: An iterator like instance of either FollowerDatabaseDefinitionGet or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.kusto.models.FollowerDatabaseDefinitionGet] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.FollowerDatabaseListResultGet] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_follower_databases_get_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("FollowerDatabaseListResultGet", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def list_follower_databases( - self, resource_group_name: str, cluster_name: str, **kwargs: Any - ) -> Iterable["_models.FollowerDatabaseDefinition"]: - """Returns a list of databases that are owned by this cluster and were followed by another - cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :return: An iterator like instance of either FollowerDatabaseDefinition or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.kusto.models.FollowerDatabaseDefinition] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.FollowerDatabaseListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_follower_databases_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("FollowerDatabaseListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - def _detach_follower_databases_initial( - self, - resource_group_name: str, - cluster_name: str, - follower_database_to_remove: Union[_models.FollowerDatabaseDefinition, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(follower_database_to_remove, (IOBase, bytes)): - _content = follower_database_to_remove - else: - _json = self._serialize.body(follower_database_to_remove, "FollowerDatabaseDefinition") - - _request = build_detach_follower_databases_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_detach_follower_databases( - self, - resource_group_name: str, - cluster_name: str, - follower_database_to_remove: _models.FollowerDatabaseDefinition, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: - """Detaches all followers of a database owned by this cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param follower_database_to_remove: The follower databases properties to remove. Required. - :type follower_database_to_remove: ~azure.mgmt.kusto.models.FollowerDatabaseDefinition - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_detach_follower_databases( - self, - resource_group_name: str, - cluster_name: str, - follower_database_to_remove: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: - """Detaches all followers of a database owned by this cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param follower_database_to_remove: The follower databases properties to remove. Required. - :type follower_database_to_remove: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_detach_follower_databases( - self, - resource_group_name: str, - cluster_name: str, - follower_database_to_remove: Union[_models.FollowerDatabaseDefinition, IO[bytes]], - **kwargs: Any - ) -> LROPoller[None]: - """Detaches all followers of a database owned by this cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param follower_database_to_remove: The follower databases properties to remove. Is either a - FollowerDatabaseDefinition type or a IO[bytes] type. Required. - :type follower_database_to_remove: ~azure.mgmt.kusto.models.FollowerDatabaseDefinition or - IO[bytes] - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._detach_follower_databases_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - follower_database_to_remove=follower_database_to_remove, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - def _diagnose_virtual_network_initial( - self, resource_group_name: str, cluster_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_diagnose_virtual_network_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_diagnose_virtual_network( - self, resource_group_name: str, cluster_name: str, **kwargs: Any - ) -> LROPoller[_models.DiagnoseVirtualNetworkResult]: - """Diagnoses network connectivity status for external resources on which the service is dependent - on. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :return: An instance of LROPoller that returns either DiagnoseVirtualNetworkResult or the - result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.DiagnoseVirtualNetworkResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.DiagnoseVirtualNetworkResult] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._diagnose_virtual_network_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("DiagnoseVirtualNetworkResult", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.DiagnoseVirtualNetworkResult].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.DiagnoseVirtualNetworkResult]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace - def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Cluster"]: - """Lists all Kusto clusters within a resource group. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :return: An iterator like instance of either Cluster or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.kusto.models.Cluster] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ClusterListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_resource_group_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("ClusterListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def list(self, **kwargs: Any) -> Iterable["_models.Cluster"]: - """Lists all Kusto clusters within a subscription. - - :return: An iterator like instance of either Cluster or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.kusto.models.Cluster] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ClusterListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("ClusterListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def list_skus(self, **kwargs: Any) -> Iterable["_models.SkuDescription"]: - """Lists eligible SKUs for Kusto resource provider. - - :return: An iterator like instance of either SkuDescription or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.kusto.models.SkuDescription] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.SkuDescriptionList] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_skus_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("SkuDescriptionList", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @overload - def check_name_availability( - self, - location: str, - cluster_name: _models.ClusterCheckNameRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CheckNameResult: - """Checks that the cluster name is valid and is not already in use. - - :param location: The name of Azure region. Required. - :type location: str - :param cluster_name: The name of the cluster. Required. - :type cluster_name: ~azure.mgmt.kusto.models.ClusterCheckNameRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: CheckNameResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.CheckNameResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def check_name_availability( - self, location: str, cluster_name: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> _models.CheckNameResult: - """Checks that the cluster name is valid and is not already in use. - - :param location: The name of Azure region. Required. - :type location: str - :param cluster_name: The name of the cluster. Required. - :type cluster_name: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: CheckNameResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.CheckNameResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def check_name_availability( - self, location: str, cluster_name: Union[_models.ClusterCheckNameRequest, IO[bytes]], **kwargs: Any - ) -> _models.CheckNameResult: - """Checks that the cluster name is valid and is not already in use. - - :param location: The name of Azure region. Required. - :type location: str - :param cluster_name: The name of the cluster. Is either a ClusterCheckNameRequest type or a - IO[bytes] type. Required. - :type cluster_name: ~azure.mgmt.kusto.models.ClusterCheckNameRequest or IO[bytes] - :return: CheckNameResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.CheckNameResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CheckNameResult] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(cluster_name, (IOBase, bytes)): - _content = cluster_name - else: - _json = self._serialize.body(cluster_name, "ClusterCheckNameRequest") - - _request = build_check_name_availability_request( - location=location, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("CheckNameResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def list_skus_by_resource( - self, resource_group_name: str, cluster_name: str, **kwargs: Any - ) -> Iterable["_models.AzureResourceSku"]: - """Returns the SKUs available for the provided resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :return: An iterator like instance of either AzureResourceSku or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.kusto.models.AzureResourceSku] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ListResourceSkusResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_skus_by_resource_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("ListResourceSkusResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def list_outbound_network_dependencies_endpoints( # pylint: disable=name-too-long - self, resource_group_name: str, cluster_name: str, **kwargs: Any - ) -> Iterable["_models.OutboundNetworkDependenciesEndpoint"]: - """Gets the network endpoints of all outbound dependencies of a Kusto cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :return: An iterator like instance of either OutboundNetworkDependenciesEndpoint or the result - of cls(response) - :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.kusto.models.OutboundNetworkDependenciesEndpoint] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.OutboundNetworkDependenciesEndpointListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_outbound_network_dependencies_endpoints_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("OutboundNetworkDependenciesEndpointListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - def _add_callout_policies_initial( - self, - resource_group_name: str, - cluster_name: str, - callout_policies: Union[_models.CalloutPoliciesList, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(callout_policies, (IOBase, bytes)): - _content = callout_policies - else: - _json = self._serialize.body(callout_policies, "CalloutPoliciesList") - - _request = build_add_callout_policies_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_add_callout_policies( - self, - resource_group_name: str, - cluster_name: str, - callout_policies: _models.CalloutPoliciesList, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: - """Adds a list of callout policies for engine services. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param callout_policies: The callout policies to add. Required. - :type callout_policies: ~azure.mgmt.kusto.models.CalloutPoliciesList - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_add_callout_policies( - self, - resource_group_name: str, - cluster_name: str, - callout_policies: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: - """Adds a list of callout policies for engine services. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param callout_policies: The callout policies to add. Required. - :type callout_policies: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_add_callout_policies( - self, - resource_group_name: str, - cluster_name: str, - callout_policies: Union[_models.CalloutPoliciesList, IO[bytes]], - **kwargs: Any - ) -> LROPoller[None]: - """Adds a list of callout policies for engine services. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param callout_policies: The callout policies to add. Is either a CalloutPoliciesList type or a - IO[bytes] type. Required. - :type callout_policies: ~azure.mgmt.kusto.models.CalloutPoliciesList or IO[bytes] - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._add_callout_policies_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - callout_policies=callout_policies, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - def _remove_callout_policy_initial( - self, - resource_group_name: str, - cluster_name: str, - callout_policy: Union[_models.CalloutPolicyToRemove, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(callout_policy, (IOBase, bytes)): - _content = callout_policy - else: - _json = self._serialize.body(callout_policy, "CalloutPolicyToRemove") - - _request = build_remove_callout_policy_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_remove_callout_policy( - self, - resource_group_name: str, - cluster_name: str, - callout_policy: _models.CalloutPolicyToRemove, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: - """Removes callout policy for engine services. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param callout_policy: The callout policies to remove. Required. - :type callout_policy: ~azure.mgmt.kusto.models.CalloutPolicyToRemove - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_remove_callout_policy( - self, - resource_group_name: str, - cluster_name: str, - callout_policy: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: - """Removes callout policy for engine services. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param callout_policy: The callout policies to remove. Required. - :type callout_policy: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_remove_callout_policy( - self, - resource_group_name: str, - cluster_name: str, - callout_policy: Union[_models.CalloutPolicyToRemove, IO[bytes]], - **kwargs: Any - ) -> LROPoller[None]: - """Removes callout policy for engine services. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param callout_policy: The callout policies to remove. Is either a CalloutPolicyToRemove type - or a IO[bytes] type. Required. - :type callout_policy: ~azure.mgmt.kusto.models.CalloutPolicyToRemove or IO[bytes] - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._remove_callout_policy_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - callout_policy=callout_policy, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list_callout_policies( - self, resource_group_name: str, cluster_name: str, **kwargs: Any - ) -> Iterable["_models.CalloutPolicy"]: - """Returns the allowed callout policies for the specified service. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :return: An iterator like instance of either CalloutPolicy or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.kusto.models.CalloutPolicy] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.CalloutPoliciesList] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_callout_policies_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("CalloutPoliciesList", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def list_language_extensions( - self, resource_group_name: str, cluster_name: str, **kwargs: Any - ) -> Iterable["_models.LanguageExtension"]: - """Returns a list of language extensions that can run within KQL queries. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :return: An iterator like instance of either LanguageExtension or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.kusto.models.LanguageExtension] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.LanguageExtensionsList] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_language_extensions_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("LanguageExtensionsList", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - def _add_language_extensions_initial( - self, - resource_group_name: str, - cluster_name: str, - language_extensions_to_add: Union[_models.LanguageExtensionsList, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(language_extensions_to_add, (IOBase, bytes)): - _content = language_extensions_to_add - else: - _json = self._serialize.body(language_extensions_to_add, "LanguageExtensionsList") - - _request = build_add_language_extensions_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_add_language_extensions( - self, - resource_group_name: str, - cluster_name: str, - language_extensions_to_add: _models.LanguageExtensionsList, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: - """Add a list of language extensions that can run within KQL queries. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param language_extensions_to_add: The language extensions to add. Required. - :type language_extensions_to_add: ~azure.mgmt.kusto.models.LanguageExtensionsList - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_add_language_extensions( - self, - resource_group_name: str, - cluster_name: str, - language_extensions_to_add: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: - """Add a list of language extensions that can run within KQL queries. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param language_extensions_to_add: The language extensions to add. Required. - :type language_extensions_to_add: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_add_language_extensions( - self, - resource_group_name: str, - cluster_name: str, - language_extensions_to_add: Union[_models.LanguageExtensionsList, IO[bytes]], - **kwargs: Any - ) -> LROPoller[None]: - """Add a list of language extensions that can run within KQL queries. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param language_extensions_to_add: The language extensions to add. Is either a - LanguageExtensionsList type or a IO[bytes] type. Required. - :type language_extensions_to_add: ~azure.mgmt.kusto.models.LanguageExtensionsList or IO[bytes] - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._add_language_extensions_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - language_extensions_to_add=language_extensions_to_add, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - def _remove_language_extensions_initial( - self, - resource_group_name: str, - cluster_name: str, - language_extensions_to_remove: Union[_models.LanguageExtensionsList, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(language_extensions_to_remove, (IOBase, bytes)): - _content = language_extensions_to_remove - else: - _json = self._serialize.body(language_extensions_to_remove, "LanguageExtensionsList") - - _request = build_remove_language_extensions_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_remove_language_extensions( - self, - resource_group_name: str, - cluster_name: str, - language_extensions_to_remove: _models.LanguageExtensionsList, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: - """Remove a list of language extensions that can run within KQL queries. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param language_extensions_to_remove: The language extensions to remove. Required. - :type language_extensions_to_remove: ~azure.mgmt.kusto.models.LanguageExtensionsList - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_remove_language_extensions( - self, - resource_group_name: str, - cluster_name: str, - language_extensions_to_remove: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: - """Remove a list of language extensions that can run within KQL queries. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param language_extensions_to_remove: The language extensions to remove. Required. - :type language_extensions_to_remove: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_remove_language_extensions( - self, - resource_group_name: str, - cluster_name: str, - language_extensions_to_remove: Union[_models.LanguageExtensionsList, IO[bytes]], - **kwargs: Any - ) -> LROPoller[None]: - """Remove a list of language extensions that can run within KQL queries. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param language_extensions_to_remove: The language extensions to remove. Is either a - LanguageExtensionsList type or a IO[bytes] type. Required. - :type language_extensions_to_remove: ~azure.mgmt.kusto.models.LanguageExtensionsList or - IO[bytes] - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._remove_language_extensions_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - language_extensions_to_remove=language_extensions_to_remove, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_data_connections_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_data_connections_operations.py deleted file mode 100644 index ffe64ee917ed..000000000000 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_data_connections_operations.py +++ /dev/null @@ -1,1424 +0,0 @@ -# pylint: disable=too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._serialization import Serializer - -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_database_request( - resource_group_name: str, cluster_name: str, database_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/dataConnections", - ) # pylint: disable=line-too-long - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - "databaseName": _SERIALIZER.url("database_name", database_name, "str", pattern=r"^.*$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_data_connection_validation_request( - resource_group_name: str, cluster_name: str, database_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/dataConnectionValidation", - ) # pylint: disable=line-too-long - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - "databaseName": _SERIALIZER.url("database_name", database_name, "str", pattern=r"^.*$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_check_name_availability_request( - resource_group_name: str, cluster_name: str, database_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/checkNameAvailability", - ) # pylint: disable=line-too-long - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - "databaseName": _SERIALIZER.url("database_name", database_name, "str", pattern=r"^.*$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, - cluster_name: str, - database_name: str, - data_connection_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/dataConnections/{dataConnectionName}", - ) # pylint: disable=line-too-long - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - "databaseName": _SERIALIZER.url("database_name", database_name, "str", pattern=r"^.*$"), - "dataConnectionName": _SERIALIZER.url("data_connection_name", data_connection_name, "str", pattern=r"^.*$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - cluster_name: str, - database_name: str, - data_connection_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/dataConnections/{dataConnectionName}", - ) # pylint: disable=line-too-long - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - "databaseName": _SERIALIZER.url("database_name", database_name, "str", pattern=r"^.*$"), - "dataConnectionName": _SERIALIZER.url("data_connection_name", data_connection_name, "str", pattern=r"^.*$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, - cluster_name: str, - database_name: str, - data_connection_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/dataConnections/{dataConnectionName}", - ) # pylint: disable=line-too-long - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - "databaseName": _SERIALIZER.url("database_name", database_name, "str", pattern=r"^.*$"), - "dataConnectionName": _SERIALIZER.url("data_connection_name", data_connection_name, "str", pattern=r"^.*$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - cluster_name: str, - database_name: str, - data_connection_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/dataConnections/{dataConnectionName}", - ) # pylint: disable=line-too-long - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - "databaseName": _SERIALIZER.url("database_name", database_name, "str", pattern=r"^.*$"), - "dataConnectionName": _SERIALIZER.url("data_connection_name", data_connection_name, "str", pattern=r"^.*$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class DataConnectionsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.kusto.KustoManagementClient`'s - :attr:`data_connections` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs): - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_database( - self, resource_group_name: str, cluster_name: str, database_name: str, **kwargs: Any - ) -> Iterable["_models.DataConnection"]: - """Returns the list of data connections of the given Kusto database. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :return: An iterator like instance of either DataConnection or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.kusto.models.DataConnection] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.DataConnectionListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_database_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("DataConnectionListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - def _data_connection_validation_initial( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - parameters: Union[_models.DataConnectionValidation, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "DataConnectionValidation") - - _request = build_data_connection_validation_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_data_connection_validation( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - parameters: _models.DataConnectionValidation, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.DataConnectionValidationListResult]: - """Checks that the data connection parameters are valid. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param parameters: The data connection parameters supplied to the CreateOrUpdate operation. - Required. - :type parameters: ~azure.mgmt.kusto.models.DataConnectionValidation - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either DataConnectionValidationListResult or the - result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.DataConnectionValidationListResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_data_connection_validation( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.DataConnectionValidationListResult]: - """Checks that the data connection parameters are valid. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param parameters: The data connection parameters supplied to the CreateOrUpdate operation. - Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either DataConnectionValidationListResult or the - result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.DataConnectionValidationListResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_data_connection_validation( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - parameters: Union[_models.DataConnectionValidation, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.DataConnectionValidationListResult]: - """Checks that the data connection parameters are valid. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param parameters: The data connection parameters supplied to the CreateOrUpdate operation. Is - either a DataConnectionValidation type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.kusto.models.DataConnectionValidation or IO[bytes] - :return: An instance of LROPoller that returns either DataConnectionValidationListResult or the - result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.DataConnectionValidationListResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.DataConnectionValidationListResult] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._data_connection_validation_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - parameters=parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("DataConnectionValidationListResult", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.DataConnectionValidationListResult].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.DataConnectionValidationListResult]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @overload - def check_name_availability( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - data_connection_name: _models.DataConnectionCheckNameRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CheckNameResult: - """Checks that the data connection name is valid and is not already in use. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param data_connection_name: The name of the data connection. Required. - :type data_connection_name: ~azure.mgmt.kusto.models.DataConnectionCheckNameRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: CheckNameResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.CheckNameResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def check_name_availability( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - data_connection_name: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CheckNameResult: - """Checks that the data connection name is valid and is not already in use. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param data_connection_name: The name of the data connection. Required. - :type data_connection_name: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: CheckNameResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.CheckNameResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def check_name_availability( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - data_connection_name: Union[_models.DataConnectionCheckNameRequest, IO[bytes]], - **kwargs: Any - ) -> _models.CheckNameResult: - """Checks that the data connection name is valid and is not already in use. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param data_connection_name: The name of the data connection. Is either a - DataConnectionCheckNameRequest type or a IO[bytes] type. Required. - :type data_connection_name: ~azure.mgmt.kusto.models.DataConnectionCheckNameRequest or - IO[bytes] - :return: CheckNameResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.CheckNameResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CheckNameResult] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(data_connection_name, (IOBase, bytes)): - _content = data_connection_name - else: - _json = self._serialize.body(data_connection_name, "DataConnectionCheckNameRequest") - - _request = build_check_name_availability_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("CheckNameResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def get( - self, resource_group_name: str, cluster_name: str, database_name: str, data_connection_name: str, **kwargs: Any - ) -> _models.DataConnection: - """Returns a data connection. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param data_connection_name: The name of the data connection. Required. - :type data_connection_name: str - :return: DataConnection or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.DataConnection - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.DataConnection] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - data_connection_name=data_connection_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("DataConnection", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _create_or_update_initial( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - data_connection_name: str, - parameters: Union[_models.DataConnection, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "DataConnection") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - data_connection_name=data_connection_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - data_connection_name: str, - parameters: _models.DataConnection, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.DataConnection]: - """Creates or updates a data connection. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param data_connection_name: The name of the data connection. Required. - :type data_connection_name: str - :param parameters: The data connection parameters supplied to the CreateOrUpdate operation. - Required. - :type parameters: ~azure.mgmt.kusto.models.DataConnection - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either DataConnection or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.DataConnection] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - data_connection_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.DataConnection]: - """Creates or updates a data connection. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param data_connection_name: The name of the data connection. Required. - :type data_connection_name: str - :param parameters: The data connection parameters supplied to the CreateOrUpdate operation. - Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either DataConnection or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.DataConnection] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create_or_update( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - data_connection_name: str, - parameters: Union[_models.DataConnection, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.DataConnection]: - """Creates or updates a data connection. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param data_connection_name: The name of the data connection. Required. - :type data_connection_name: str - :param parameters: The data connection parameters supplied to the CreateOrUpdate operation. Is - either a DataConnection type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.kusto.models.DataConnection or IO[bytes] - :return: An instance of LROPoller that returns either DataConnection or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.DataConnection] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.DataConnection] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - data_connection_name=data_connection_name, - parameters=parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("DataConnection", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.DataConnection].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.DataConnection]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _update_initial( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - data_connection_name: str, - parameters: Union[_models.DataConnection, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "DataConnection") - - _request = build_update_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - data_connection_name=data_connection_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 201: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - data_connection_name: str, - parameters: _models.DataConnection, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.DataConnection]: - """Updates a data connection. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param data_connection_name: The name of the data connection. Required. - :type data_connection_name: str - :param parameters: The data connection parameters supplied to the Update operation. Required. - :type parameters: ~azure.mgmt.kusto.models.DataConnection - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either DataConnection or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.DataConnection] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - data_connection_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.DataConnection]: - """Updates a data connection. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param data_connection_name: The name of the data connection. Required. - :type data_connection_name: str - :param parameters: The data connection parameters supplied to the Update operation. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either DataConnection or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.DataConnection] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - data_connection_name: str, - parameters: Union[_models.DataConnection, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.DataConnection]: - """Updates a data connection. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param data_connection_name: The name of the data connection. Required. - :type data_connection_name: str - :param parameters: The data connection parameters supplied to the Update operation. Is either a - DataConnection type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.kusto.models.DataConnection or IO[bytes] - :return: An instance of LROPoller that returns either DataConnection or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.DataConnection] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.DataConnection] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - data_connection_name=data_connection_name, - parameters=parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("DataConnection", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.DataConnection].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.DataConnection]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial( - self, resource_group_name: str, cluster_name: str, database_name: str, data_connection_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - data_connection_name=data_connection_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete( - self, resource_group_name: str, cluster_name: str, database_name: str, data_connection_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Deletes the data connection with the given name. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param data_connection_name: The name of the data connection. Required. - :type data_connection_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - data_connection_name=data_connection_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_database_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_database_operations.py deleted file mode 100644 index 320c6605333b..000000000000 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_database_operations.py +++ /dev/null @@ -1,235 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload - -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._serialization import Serializer - -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_invite_follower_request( - resource_group_name: str, cluster_name: str, database_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/inviteFollower", - ) # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - "databaseName": _SERIALIZER.url("database_name", database_name, "str", pattern=r"^.*$"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -class DatabaseOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.kusto.KustoManagementClient`'s - :attr:`database` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs): - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @overload - def invite_follower( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - parameters: _models.DatabaseInviteFollowerRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.DatabaseInviteFollowerResult: - """Generates an invitation token that allows attaching a follower database to this database. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param parameters: The follower invitation request parameters. Required. - :type parameters: ~azure.mgmt.kusto.models.DatabaseInviteFollowerRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: DatabaseInviteFollowerResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.DatabaseInviteFollowerResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def invite_follower( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.DatabaseInviteFollowerResult: - """Generates an invitation token that allows attaching a follower database to this database. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param parameters: The follower invitation request parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: DatabaseInviteFollowerResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.DatabaseInviteFollowerResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def invite_follower( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - parameters: Union[_models.DatabaseInviteFollowerRequest, IO[bytes]], - **kwargs: Any - ) -> _models.DatabaseInviteFollowerResult: - """Generates an invitation token that allows attaching a follower database to this database. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param parameters: The follower invitation request parameters. Is either a - DatabaseInviteFollowerRequest type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.kusto.models.DatabaseInviteFollowerRequest or IO[bytes] - :return: DatabaseInviteFollowerResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.DatabaseInviteFollowerResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.DatabaseInviteFollowerResult] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "DatabaseInviteFollowerRequest") - - _request = build_invite_follower_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("DatabaseInviteFollowerResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_database_principal_assignments_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_database_principal_assignments_operations.py deleted file mode 100644 index b4a22d60203b..000000000000 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_database_principal_assignments_operations.py +++ /dev/null @@ -1,913 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._serialization import Serializer - -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_check_name_availability_request( - resource_group_name: str, cluster_name: str, database_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/checkPrincipalAssignmentNameAvailability", - ) # pylint: disable=line-too-long - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - "databaseName": _SERIALIZER.url("database_name", database_name, "str", pattern=r"^.*$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, - cluster_name: str, - database_name: str, - principal_assignment_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/principalAssignments/{principalAssignmentName}", - ) # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - "databaseName": _SERIALIZER.url("database_name", database_name, "str", pattern=r"^.*$"), - "principalAssignmentName": _SERIALIZER.url( - "principal_assignment_name", principal_assignment_name, "str", pattern=r"^.*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - cluster_name: str, - database_name: str, - principal_assignment_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/principalAssignments/{principalAssignmentName}", - ) # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - "databaseName": _SERIALIZER.url("database_name", database_name, "str", pattern=r"^.*$"), - "principalAssignmentName": _SERIALIZER.url( - "principal_assignment_name", principal_assignment_name, "str", pattern=r"^.*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - cluster_name: str, - database_name: str, - principal_assignment_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/principalAssignments/{principalAssignmentName}", - ) # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - "databaseName": _SERIALIZER.url("database_name", database_name, "str", pattern=r"^.*$"), - "principalAssignmentName": _SERIALIZER.url( - "principal_assignment_name", principal_assignment_name, "str", pattern=r"^.*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_request( - resource_group_name: str, cluster_name: str, database_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/principalAssignments", - ) # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - "databaseName": _SERIALIZER.url("database_name", database_name, "str", pattern=r"^.*$"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class DatabasePrincipalAssignmentsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.kusto.KustoManagementClient`'s - :attr:`database_principal_assignments` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs): - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @overload - def check_name_availability( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - principal_assignment_name: _models.DatabasePrincipalAssignmentCheckNameRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CheckNameResult: - """Checks that the database principal assignment is valid and is not already in use. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param principal_assignment_name: The name of the resource. Required. - :type principal_assignment_name: - ~azure.mgmt.kusto.models.DatabasePrincipalAssignmentCheckNameRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: CheckNameResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.CheckNameResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def check_name_availability( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - principal_assignment_name: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CheckNameResult: - """Checks that the database principal assignment is valid and is not already in use. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param principal_assignment_name: The name of the resource. Required. - :type principal_assignment_name: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: CheckNameResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.CheckNameResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def check_name_availability( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - principal_assignment_name: Union[_models.DatabasePrincipalAssignmentCheckNameRequest, IO[bytes]], - **kwargs: Any - ) -> _models.CheckNameResult: - """Checks that the database principal assignment is valid and is not already in use. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param principal_assignment_name: The name of the resource. Is either a - DatabasePrincipalAssignmentCheckNameRequest type or a IO[bytes] type. Required. - :type principal_assignment_name: - ~azure.mgmt.kusto.models.DatabasePrincipalAssignmentCheckNameRequest or IO[bytes] - :return: CheckNameResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.CheckNameResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CheckNameResult] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(principal_assignment_name, (IOBase, bytes)): - _content = principal_assignment_name - else: - _json = self._serialize.body(principal_assignment_name, "DatabasePrincipalAssignmentCheckNameRequest") - - _request = build_check_name_availability_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("CheckNameResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def get( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - principal_assignment_name: str, - **kwargs: Any - ) -> _models.DatabasePrincipalAssignment: - """Gets a Kusto cluster database principalAssignment. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param principal_assignment_name: The name of the Kusto principalAssignment. Required. - :type principal_assignment_name: str - :return: DatabasePrincipalAssignment or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.DatabasePrincipalAssignment - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.DatabasePrincipalAssignment] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - principal_assignment_name=principal_assignment_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("DatabasePrincipalAssignment", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _create_or_update_initial( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - principal_assignment_name: str, - parameters: Union[_models.DatabasePrincipalAssignment, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "DatabasePrincipalAssignment") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - principal_assignment_name=principal_assignment_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - principal_assignment_name: str, - parameters: _models.DatabasePrincipalAssignment, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.DatabasePrincipalAssignment]: - """Creates a Kusto cluster database principalAssignment. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param principal_assignment_name: The name of the Kusto principalAssignment. Required. - :type principal_assignment_name: str - :param parameters: The Kusto principalAssignments parameters supplied for the operation. - Required. - :type parameters: ~azure.mgmt.kusto.models.DatabasePrincipalAssignment - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either DatabasePrincipalAssignment or the result - of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.DatabasePrincipalAssignment] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - principal_assignment_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.DatabasePrincipalAssignment]: - """Creates a Kusto cluster database principalAssignment. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param principal_assignment_name: The name of the Kusto principalAssignment. Required. - :type principal_assignment_name: str - :param parameters: The Kusto principalAssignments parameters supplied for the operation. - Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either DatabasePrincipalAssignment or the result - of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.DatabasePrincipalAssignment] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create_or_update( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - principal_assignment_name: str, - parameters: Union[_models.DatabasePrincipalAssignment, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.DatabasePrincipalAssignment]: - """Creates a Kusto cluster database principalAssignment. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param principal_assignment_name: The name of the Kusto principalAssignment. Required. - :type principal_assignment_name: str - :param parameters: The Kusto principalAssignments parameters supplied for the operation. Is - either a DatabasePrincipalAssignment type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.kusto.models.DatabasePrincipalAssignment or IO[bytes] - :return: An instance of LROPoller that returns either DatabasePrincipalAssignment or the result - of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.DatabasePrincipalAssignment] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.DatabasePrincipalAssignment] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - principal_assignment_name=principal_assignment_name, - parameters=parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("DatabasePrincipalAssignment", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.DatabasePrincipalAssignment].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.DatabasePrincipalAssignment]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - principal_assignment_name: str, - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - principal_assignment_name=principal_assignment_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - principal_assignment_name: str, - **kwargs: Any - ) -> LROPoller[None]: - """Deletes a Kusto principalAssignment. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param principal_assignment_name: The name of the Kusto principalAssignment. Required. - :type principal_assignment_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - principal_assignment_name=principal_assignment_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list( - self, resource_group_name: str, cluster_name: str, database_name: str, **kwargs: Any - ) -> Iterable["_models.DatabasePrincipalAssignment"]: - """Lists all Kusto cluster database principalAssignments. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :return: An iterator like instance of either DatabasePrincipalAssignment or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.kusto.models.DatabasePrincipalAssignment] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.DatabasePrincipalAssignmentListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("DatabasePrincipalAssignmentListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_databases_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_databases_operations.py deleted file mode 100644 index eaee1fdc29a2..000000000000 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_databases_operations.py +++ /dev/null @@ -1,1644 +0,0 @@ -# pylint: disable=too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._serialization import Serializer - -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_check_name_availability_request( - resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/checkNameAvailability", - ) # pylint: disable=line-too-long - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_by_cluster_request( - resource_group_name: str, - cluster_name: str, - subscription_id: str, - *, - top: Optional[int] = None, - skiptoken: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases", - ) # pylint: disable=line-too-long - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - if top is not None: - _params["$top"] = _SERIALIZER.query("top", top, "int", maximum=1000, minimum=5) - if skiptoken is not None: - _params["$skiptoken"] = _SERIALIZER.query("skiptoken", skiptoken, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, cluster_name: str, database_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}", - ) # pylint: disable=line-too-long - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - "databaseName": _SERIALIZER.url("database_name", database_name, "str", pattern=r"^.*$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - cluster_name: str, - database_name: str, - subscription_id: str, - *, - caller_role: Union[str, _models.CallerRole] = "Admin", - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}", - ) # pylint: disable=line-too-long - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - "databaseName": _SERIALIZER.url("database_name", database_name, "str", pattern=r"^.*$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - if caller_role is not None: - _params["callerRole"] = _SERIALIZER.query("caller_role", caller_role, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, - cluster_name: str, - database_name: str, - subscription_id: str, - *, - caller_role: Union[str, _models.CallerRole] = "Admin", - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}", - ) # pylint: disable=line-too-long - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - "databaseName": _SERIALIZER.url("database_name", database_name, "str", pattern=r"^.*$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - if caller_role is not None: - _params["callerRole"] = _SERIALIZER.query("caller_role", caller_role, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, cluster_name: str, database_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}", - ) # pylint: disable=line-too-long - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - "databaseName": _SERIALIZER.url("database_name", database_name, "str", pattern=r"^.*$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_principals_request( - resource_group_name: str, cluster_name: str, database_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/listPrincipals", - ) # pylint: disable=line-too-long - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - "databaseName": _SERIALIZER.url("database_name", database_name, "str", pattern=r"^.*$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_add_principals_request( - resource_group_name: str, cluster_name: str, database_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/addPrincipals", - ) # pylint: disable=line-too-long - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - "databaseName": _SERIALIZER.url("database_name", database_name, "str", pattern=r"^.*$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_remove_principals_request( - resource_group_name: str, cluster_name: str, database_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/removePrincipals", - ) # pylint: disable=line-too-long - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - "databaseName": _SERIALIZER.url("database_name", database_name, "str", pattern=r"^.*$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -class DatabasesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.kusto.KustoManagementClient`'s - :attr:`databases` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs): - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @overload - def check_name_availability( - self, - resource_group_name: str, - cluster_name: str, - resource_name: _models.CheckNameRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CheckNameResult: - """Checks that the databases resource name is valid and is not already in use. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param resource_name: The name of the resource. Required. - :type resource_name: ~azure.mgmt.kusto.models.CheckNameRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: CheckNameResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.CheckNameResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def check_name_availability( - self, - resource_group_name: str, - cluster_name: str, - resource_name: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CheckNameResult: - """Checks that the databases resource name is valid and is not already in use. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param resource_name: The name of the resource. Required. - :type resource_name: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: CheckNameResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.CheckNameResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def check_name_availability( - self, - resource_group_name: str, - cluster_name: str, - resource_name: Union[_models.CheckNameRequest, IO[bytes]], - **kwargs: Any - ) -> _models.CheckNameResult: - """Checks that the databases resource name is valid and is not already in use. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param resource_name: The name of the resource. Is either a CheckNameRequest type or a - IO[bytes] type. Required. - :type resource_name: ~azure.mgmt.kusto.models.CheckNameRequest or IO[bytes] - :return: CheckNameResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.CheckNameResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CheckNameResult] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(resource_name, (IOBase, bytes)): - _content = resource_name - else: - _json = self._serialize.body(resource_name, "CheckNameRequest") - - _request = build_check_name_availability_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("CheckNameResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def list_by_cluster( - self, - resource_group_name: str, - cluster_name: str, - top: Optional[int] = None, - skiptoken: Optional[str] = None, - **kwargs: Any - ) -> Iterable["_models.Database"]: - """Returns the list of databases of the given Kusto cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param top: limit the number of results. Default value is None. - :type top: int - :param skiptoken: Skiptoken is only used if a previous operation returned a partial result. If - a previous response contains a nextLink element, the value of the nextLink element will include - a skiptoken parameter that specifies a starting point to use for subsequent calls. Default - value is None. - :type skiptoken: str - :return: An iterator like instance of either Database or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.kusto.models.Database] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.DatabaseListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_cluster_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - subscription_id=self._config.subscription_id, - top=top, - skiptoken=skiptoken, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("DatabaseListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get(self, resource_group_name: str, cluster_name: str, database_name: str, **kwargs: Any) -> _models.Database: - """Returns a database. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :return: Database or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.Database - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.Database] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("Database", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _create_or_update_initial( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - parameters: Union[_models.Database, IO[bytes]], - caller_role: Union[str, _models.CallerRole] = "Admin", - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "Database") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - subscription_id=self._config.subscription_id, - caller_role=caller_role, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - parameters: _models.Database, - caller_role: Union[str, _models.CallerRole] = "Admin", - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Database]: - """Creates or updates a database. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param parameters: The database parameters supplied to the CreateOrUpdate operation. Required. - :type parameters: ~azure.mgmt.kusto.models.Database - :param caller_role: By default, any user who run operation on a database become an Admin on it. - This property allows the caller to exclude the caller from Admins list. Known values are: - "Admin" and "None". Default value is "Admin". - :type caller_role: str or ~azure.mgmt.kusto.models.CallerRole - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either Database or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.Database] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - parameters: IO[bytes], - caller_role: Union[str, _models.CallerRole] = "Admin", - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Database]: - """Creates or updates a database. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param parameters: The database parameters supplied to the CreateOrUpdate operation. Required. - :type parameters: IO[bytes] - :param caller_role: By default, any user who run operation on a database become an Admin on it. - This property allows the caller to exclude the caller from Admins list. Known values are: - "Admin" and "None". Default value is "Admin". - :type caller_role: str or ~azure.mgmt.kusto.models.CallerRole - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either Database or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.Database] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create_or_update( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - parameters: Union[_models.Database, IO[bytes]], - caller_role: Union[str, _models.CallerRole] = "Admin", - **kwargs: Any - ) -> LROPoller[_models.Database]: - """Creates or updates a database. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param parameters: The database parameters supplied to the CreateOrUpdate operation. Is either - a Database type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.kusto.models.Database or IO[bytes] - :param caller_role: By default, any user who run operation on a database become an Admin on it. - This property allows the caller to exclude the caller from Admins list. Known values are: - "Admin" and "None". Default value is "Admin". - :type caller_role: str or ~azure.mgmt.kusto.models.CallerRole - :return: An instance of LROPoller that returns either Database or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.Database] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Database] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - parameters=parameters, - caller_role=caller_role, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Database", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.Database].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.Database]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _update_initial( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - parameters: Union[_models.Database, IO[bytes]], - caller_role: Union[str, _models.CallerRole] = "Admin", - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "Database") - - _request = build_update_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - subscription_id=self._config.subscription_id, - caller_role=caller_role, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 201: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - parameters: _models.Database, - caller_role: Union[str, _models.CallerRole] = "Admin", - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Database]: - """Updates a database. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param parameters: The database parameters supplied to the Update operation. Required. - :type parameters: ~azure.mgmt.kusto.models.Database - :param caller_role: By default, any user who run operation on a database become an Admin on it. - This property allows the caller to exclude the caller from Admins list. Known values are: - "Admin" and "None". Default value is "Admin". - :type caller_role: str or ~azure.mgmt.kusto.models.CallerRole - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either Database or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.Database] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - parameters: IO[bytes], - caller_role: Union[str, _models.CallerRole] = "Admin", - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Database]: - """Updates a database. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param parameters: The database parameters supplied to the Update operation. Required. - :type parameters: IO[bytes] - :param caller_role: By default, any user who run operation on a database become an Admin on it. - This property allows the caller to exclude the caller from Admins list. Known values are: - "Admin" and "None". Default value is "Admin". - :type caller_role: str or ~azure.mgmt.kusto.models.CallerRole - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either Database or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.Database] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - parameters: Union[_models.Database, IO[bytes]], - caller_role: Union[str, _models.CallerRole] = "Admin", - **kwargs: Any - ) -> LROPoller[_models.Database]: - """Updates a database. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param parameters: The database parameters supplied to the Update operation. Is either a - Database type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.kusto.models.Database or IO[bytes] - :param caller_role: By default, any user who run operation on a database become an Admin on it. - This property allows the caller to exclude the caller from Admins list. Known values are: - "Admin" and "None". Default value is "Admin". - :type caller_role: str or ~azure.mgmt.kusto.models.CallerRole - :return: An instance of LROPoller that returns either Database or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.Database] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Database] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - parameters=parameters, - caller_role=caller_role, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Database", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.Database].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.Database]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial( - self, resource_group_name: str, cluster_name: str, database_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete( - self, resource_group_name: str, cluster_name: str, database_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Deletes the database with the given name. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list_principals( - self, resource_group_name: str, cluster_name: str, database_name: str, **kwargs: Any - ) -> Iterable["_models.DatabasePrincipal"]: - """Returns a list of database principals of the given Kusto cluster and database. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :return: An iterator like instance of either DatabasePrincipal or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.kusto.models.DatabasePrincipal] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.DatabasePrincipalListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_principals_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("DatabasePrincipalListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @overload - def add_principals( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - database_principals_to_add: _models.DatabasePrincipalListRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.DatabasePrincipalListResult: - """Add Database principals permissions. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param database_principals_to_add: List of database principals to add. Required. - :type database_principals_to_add: ~azure.mgmt.kusto.models.DatabasePrincipalListRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: DatabasePrincipalListResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.DatabasePrincipalListResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def add_principals( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - database_principals_to_add: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.DatabasePrincipalListResult: - """Add Database principals permissions. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param database_principals_to_add: List of database principals to add. Required. - :type database_principals_to_add: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: DatabasePrincipalListResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.DatabasePrincipalListResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def add_principals( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - database_principals_to_add: Union[_models.DatabasePrincipalListRequest, IO[bytes]], - **kwargs: Any - ) -> _models.DatabasePrincipalListResult: - """Add Database principals permissions. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param database_principals_to_add: List of database principals to add. Is either a - DatabasePrincipalListRequest type or a IO[bytes] type. Required. - :type database_principals_to_add: ~azure.mgmt.kusto.models.DatabasePrincipalListRequest or - IO[bytes] - :return: DatabasePrincipalListResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.DatabasePrincipalListResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.DatabasePrincipalListResult] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(database_principals_to_add, (IOBase, bytes)): - _content = database_principals_to_add - else: - _json = self._serialize.body(database_principals_to_add, "DatabasePrincipalListRequest") - - _request = build_add_principals_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("DatabasePrincipalListResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def remove_principals( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - database_principals_to_remove: _models.DatabasePrincipalListRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.DatabasePrincipalListResult: - """Remove Database principals permissions. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param database_principals_to_remove: List of database principals to remove. Required. - :type database_principals_to_remove: ~azure.mgmt.kusto.models.DatabasePrincipalListRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: DatabasePrincipalListResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.DatabasePrincipalListResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def remove_principals( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - database_principals_to_remove: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.DatabasePrincipalListResult: - """Remove Database principals permissions. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param database_principals_to_remove: List of database principals to remove. Required. - :type database_principals_to_remove: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: DatabasePrincipalListResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.DatabasePrincipalListResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def remove_principals( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - database_principals_to_remove: Union[_models.DatabasePrincipalListRequest, IO[bytes]], - **kwargs: Any - ) -> _models.DatabasePrincipalListResult: - """Remove Database principals permissions. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param database_principals_to_remove: List of database principals to remove. Is either a - DatabasePrincipalListRequest type or a IO[bytes] type. Required. - :type database_principals_to_remove: ~azure.mgmt.kusto.models.DatabasePrincipalListRequest or - IO[bytes] - :return: DatabasePrincipalListResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.DatabasePrincipalListResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.DatabasePrincipalListResult] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(database_principals_to_remove, (IOBase, bytes)): - _content = database_principals_to_remove - else: - _json = self._serialize.body(database_principals_to_remove, "DatabasePrincipalListRequest") - - _request = build_remove_principals_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("DatabasePrincipalListResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_managed_private_endpoints_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_managed_private_endpoints_operations.py deleted file mode 100644 index f617c4063e2b..000000000000 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_managed_private_endpoints_operations.py +++ /dev/null @@ -1,1099 +0,0 @@ -# pylint: disable=too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._serialization import Serializer - -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_check_name_availability_request( - resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/managedPrivateEndpointsCheckNameAvailability", - ) # pylint: disable=line-too-long - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_request(resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/managedPrivateEndpoints", - ) # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, cluster_name: str, managed_private_endpoint_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/managedPrivateEndpoints/{managedPrivateEndpointName}", - ) # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - "managedPrivateEndpointName": _SERIALIZER.url( - "managed_private_endpoint_name", managed_private_endpoint_name, "str", pattern=r"^.*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, cluster_name: str, managed_private_endpoint_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/managedPrivateEndpoints/{managedPrivateEndpointName}", - ) # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - "managedPrivateEndpointName": _SERIALIZER.url( - "managed_private_endpoint_name", managed_private_endpoint_name, "str", pattern=r"^.*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, cluster_name: str, managed_private_endpoint_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/managedPrivateEndpoints/{managedPrivateEndpointName}", - ) # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - "managedPrivateEndpointName": _SERIALIZER.url( - "managed_private_endpoint_name", managed_private_endpoint_name, "str", pattern=r"^.*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, cluster_name: str, managed_private_endpoint_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/managedPrivateEndpoints/{managedPrivateEndpointName}", - ) # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - "managedPrivateEndpointName": _SERIALIZER.url( - "managed_private_endpoint_name", managed_private_endpoint_name, "str", pattern=r"^.*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class ManagedPrivateEndpointsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.kusto.KustoManagementClient`'s - :attr:`managed_private_endpoints` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs): - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @overload - def check_name_availability( - self, - resource_group_name: str, - cluster_name: str, - resource_name: _models.ManagedPrivateEndpointsCheckNameRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CheckNameResult: - """Checks that the managed private endpoints resource name is valid and is not already in use. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param resource_name: The name of the resource. Required. - :type resource_name: ~azure.mgmt.kusto.models.ManagedPrivateEndpointsCheckNameRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: CheckNameResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.CheckNameResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def check_name_availability( - self, - resource_group_name: str, - cluster_name: str, - resource_name: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CheckNameResult: - """Checks that the managed private endpoints resource name is valid and is not already in use. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param resource_name: The name of the resource. Required. - :type resource_name: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: CheckNameResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.CheckNameResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def check_name_availability( - self, - resource_group_name: str, - cluster_name: str, - resource_name: Union[_models.ManagedPrivateEndpointsCheckNameRequest, IO[bytes]], - **kwargs: Any - ) -> _models.CheckNameResult: - """Checks that the managed private endpoints resource name is valid and is not already in use. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param resource_name: The name of the resource. Is either a - ManagedPrivateEndpointsCheckNameRequest type or a IO[bytes] type. Required. - :type resource_name: ~azure.mgmt.kusto.models.ManagedPrivateEndpointsCheckNameRequest or - IO[bytes] - :return: CheckNameResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.CheckNameResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CheckNameResult] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(resource_name, (IOBase, bytes)): - _content = resource_name - else: - _json = self._serialize.body(resource_name, "ManagedPrivateEndpointsCheckNameRequest") - - _request = build_check_name_availability_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("CheckNameResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def list( - self, resource_group_name: str, cluster_name: str, **kwargs: Any - ) -> Iterable["_models.ManagedPrivateEndpoint"]: - """Returns the list of managed private endpoints. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :return: An iterator like instance of either ManagedPrivateEndpoint or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.kusto.models.ManagedPrivateEndpoint] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ManagedPrivateEndpointListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("ManagedPrivateEndpointListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get( - self, resource_group_name: str, cluster_name: str, managed_private_endpoint_name: str, **kwargs: Any - ) -> _models.ManagedPrivateEndpoint: - """Gets a managed private endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param managed_private_endpoint_name: The name of the managed private endpoint. Required. - :type managed_private_endpoint_name: str - :return: ManagedPrivateEndpoint or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.ManagedPrivateEndpoint - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ManagedPrivateEndpoint] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - managed_private_endpoint_name=managed_private_endpoint_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ManagedPrivateEndpoint", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _create_or_update_initial( - self, - resource_group_name: str, - cluster_name: str, - managed_private_endpoint_name: str, - parameters: Union[_models.ManagedPrivateEndpoint, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ManagedPrivateEndpoint") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - managed_private_endpoint_name=managed_private_endpoint_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - cluster_name: str, - managed_private_endpoint_name: str, - parameters: _models.ManagedPrivateEndpoint, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ManagedPrivateEndpoint]: - """Creates a managed private endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param managed_private_endpoint_name: The name of the managed private endpoint. Required. - :type managed_private_endpoint_name: str - :param parameters: The managed private endpoint parameters. Required. - :type parameters: ~azure.mgmt.kusto.models.ManagedPrivateEndpoint - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either ManagedPrivateEndpoint or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.ManagedPrivateEndpoint] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - cluster_name: str, - managed_private_endpoint_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ManagedPrivateEndpoint]: - """Creates a managed private endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param managed_private_endpoint_name: The name of the managed private endpoint. Required. - :type managed_private_endpoint_name: str - :param parameters: The managed private endpoint parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either ManagedPrivateEndpoint or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.ManagedPrivateEndpoint] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create_or_update( - self, - resource_group_name: str, - cluster_name: str, - managed_private_endpoint_name: str, - parameters: Union[_models.ManagedPrivateEndpoint, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.ManagedPrivateEndpoint]: - """Creates a managed private endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param managed_private_endpoint_name: The name of the managed private endpoint. Required. - :type managed_private_endpoint_name: str - :param parameters: The managed private endpoint parameters. Is either a ManagedPrivateEndpoint - type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.kusto.models.ManagedPrivateEndpoint or IO[bytes] - :return: An instance of LROPoller that returns either ManagedPrivateEndpoint or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.ManagedPrivateEndpoint] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ManagedPrivateEndpoint] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - managed_private_endpoint_name=managed_private_endpoint_name, - parameters=parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ManagedPrivateEndpoint", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.ManagedPrivateEndpoint].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.ManagedPrivateEndpoint]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _update_initial( - self, - resource_group_name: str, - cluster_name: str, - managed_private_endpoint_name: str, - parameters: Union[_models.ManagedPrivateEndpoint, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ManagedPrivateEndpoint") - - _request = build_update_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - managed_private_endpoint_name=managed_private_endpoint_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update( - self, - resource_group_name: str, - cluster_name: str, - managed_private_endpoint_name: str, - parameters: _models.ManagedPrivateEndpoint, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ManagedPrivateEndpoint]: - """Updates a managed private endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param managed_private_endpoint_name: The name of the managed private endpoint. Required. - :type managed_private_endpoint_name: str - :param parameters: The managed private endpoint parameters. Required. - :type parameters: ~azure.mgmt.kusto.models.ManagedPrivateEndpoint - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either ManagedPrivateEndpoint or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.ManagedPrivateEndpoint] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update( - self, - resource_group_name: str, - cluster_name: str, - managed_private_endpoint_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ManagedPrivateEndpoint]: - """Updates a managed private endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param managed_private_endpoint_name: The name of the managed private endpoint. Required. - :type managed_private_endpoint_name: str - :param parameters: The managed private endpoint parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either ManagedPrivateEndpoint or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.ManagedPrivateEndpoint] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update( - self, - resource_group_name: str, - cluster_name: str, - managed_private_endpoint_name: str, - parameters: Union[_models.ManagedPrivateEndpoint, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.ManagedPrivateEndpoint]: - """Updates a managed private endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param managed_private_endpoint_name: The name of the managed private endpoint. Required. - :type managed_private_endpoint_name: str - :param parameters: The managed private endpoint parameters. Is either a ManagedPrivateEndpoint - type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.kusto.models.ManagedPrivateEndpoint or IO[bytes] - :return: An instance of LROPoller that returns either ManagedPrivateEndpoint or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.ManagedPrivateEndpoint] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ManagedPrivateEndpoint] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - managed_private_endpoint_name=managed_private_endpoint_name, - parameters=parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("ManagedPrivateEndpoint", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.ManagedPrivateEndpoint].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.ManagedPrivateEndpoint]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial( - self, resource_group_name: str, cluster_name: str, managed_private_endpoint_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - managed_private_endpoint_name=managed_private_endpoint_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete( - self, resource_group_name: str, cluster_name: str, managed_private_endpoint_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Deletes a managed private endpoint. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param managed_private_endpoint_name: The name of the managed private endpoint. Required. - :type managed_private_endpoint_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - managed_private_endpoint_name=managed_private_endpoint_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_operations.py index d0f6ccfe53ca..a148f1fad315 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_operations.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_operations.py @@ -1,52 +1,62 @@ +# pylint: disable=line-too-long,useless-suppression,too-many-lines # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Iterable, Optional, TypeVar +from collections.abc import MutableMapping +from io import IOBase +import json +from typing import Any, Callable, IO, Iterator, Literal, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import MatchConditions, PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, ResourceExistsError, + ResourceModifiedError, ResourceNotFoundError, ResourceNotModifiedError, + StreamClosedError, + StreamConsumedError, map_error, ) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod from azure.core.rest import HttpRequest, HttpResponse from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer +from .._configuration import KustoManagementClientConfiguration +from .._utils.model_base import SdkJSONEncoder, _deserialize, _failsafe_deserialize +from .._utils.serialization import Deserializer, Serializer +from .._utils.utils import prep_if_match, prep_if_none_match -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] +JSON = MutableMapping[str, Any] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False -def build_list_request(**kwargs: Any) -> HttpRequest: +def build_operations_list_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = kwargs.pop("template_url", "/providers/Microsoft.Kusto/operations") + _url = "/providers/Microsoft.Kusto/operations" # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -57,6 +67,2510 @@ def build_list_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) +def build_cluster_principal_assignments_get_request( # pylint: disable=name-too-long + resource_group_name: str, cluster_name: str, principal_assignment_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/principalAssignments/{principalAssignmentName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + "principalAssignmentName": _SERIALIZER.url("principal_assignment_name", principal_assignment_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_cluster_principal_assignments_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, cluster_name: str, principal_assignment_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/principalAssignments/{principalAssignmentName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + "principalAssignmentName": _SERIALIZER.url("principal_assignment_name", principal_assignment_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_cluster_principal_assignments_delete_request( # pylint: disable=name-too-long + resource_group_name: str, cluster_name: str, principal_assignment_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/principalAssignments/{principalAssignmentName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + "principalAssignmentName": _SERIALIZER.url("principal_assignment_name", principal_assignment_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_cluster_principal_assignments_list_request( # pylint: disable=name-too-long + resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/principalAssignments" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_cluster_principal_assignments_check_name_availability_request( # pylint: disable=name-too-long + resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/checkPrincipalAssignmentNameAvailability" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_database_principal_assignments_get_request( # pylint: disable=name-too-long + resource_group_name: str, + cluster_name: str, + database_name: str, + principal_assignment_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/principalAssignments/{principalAssignmentName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + "principalAssignmentName": _SERIALIZER.url("principal_assignment_name", principal_assignment_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_database_principal_assignments_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + cluster_name: str, + database_name: str, + principal_assignment_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/principalAssignments/{principalAssignmentName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + "principalAssignmentName": _SERIALIZER.url("principal_assignment_name", principal_assignment_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_database_principal_assignments_delete_request( # pylint: disable=name-too-long + resource_group_name: str, + cluster_name: str, + database_name: str, + principal_assignment_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/principalAssignments/{principalAssignmentName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + "principalAssignmentName": _SERIALIZER.url("principal_assignment_name", principal_assignment_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_database_principal_assignments_list_request( # pylint: disable=name-too-long + resource_group_name: str, cluster_name: str, database_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/principalAssignments" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_database_principal_assignments_check_name_availability_request( # pylint: disable=name-too-long + resource_group_name: str, cluster_name: str, database_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/checkPrincipalAssignmentNameAvailability" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_scripts_get_request( + resource_group_name: str, + cluster_name: str, + database_name: str, + script_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/scripts/{scriptName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + "scriptName": _SERIALIZER.url("script_name", script_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_scripts_create_or_update_request( + resource_group_name: str, + cluster_name: str, + database_name: str, + script_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/scripts/{scriptName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + "scriptName": _SERIALIZER.url("script_name", script_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_scripts_update_request( + resource_group_name: str, + cluster_name: str, + database_name: str, + script_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/scripts/{scriptName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + "scriptName": _SERIALIZER.url("script_name", script_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_scripts_delete_request( + resource_group_name: str, + cluster_name: str, + database_name: str, + script_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/scripts/{scriptName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + "scriptName": _SERIALIZER.url("script_name", script_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_scripts_list_by_database_request( + resource_group_name: str, cluster_name: str, database_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/scripts" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_scripts_check_name_availability_request( # pylint: disable=name-too-long + resource_group_name: str, cluster_name: str, database_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/scriptsCheckNameAvailability" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_data_connections_get_request( + resource_group_name: str, + cluster_name: str, + database_name: str, + data_connection_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/dataConnections/{dataConnectionName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + "dataConnectionName": _SERIALIZER.url("data_connection_name", data_connection_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_data_connections_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + cluster_name: str, + database_name: str, + data_connection_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/dataConnections/{dataConnectionName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + "dataConnectionName": _SERIALIZER.url("data_connection_name", data_connection_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_data_connections_update_request( + resource_group_name: str, + cluster_name: str, + database_name: str, + data_connection_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/dataConnections/{dataConnectionName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + "dataConnectionName": _SERIALIZER.url("data_connection_name", data_connection_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_data_connections_delete_request( + resource_group_name: str, + cluster_name: str, + database_name: str, + data_connection_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/dataConnections/{dataConnectionName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + "dataConnectionName": _SERIALIZER.url("data_connection_name", data_connection_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_data_connections_list_by_database_request( # pylint: disable=name-too-long + resource_group_name: str, cluster_name: str, database_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/dataConnections" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_data_connections_data_connection_validation_request( # pylint: disable=name-too-long + resource_group_name: str, cluster_name: str, database_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/dataConnectionValidation" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_data_connections_check_name_availability_request( # pylint: disable=name-too-long + resource_group_name: str, cluster_name: str, database_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/checkNameAvailability" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_databases_get_request( + resource_group_name: str, cluster_name: str, database_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_databases_create_or_update_request( + resource_group_name: str, + cluster_name: str, + database_name: str, + subscription_id: str, + *, + caller_role: Optional[Union[str, _models.CallerRole]] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if caller_role is not None: + _params["callerRole"] = _SERIALIZER.query("caller_role", caller_role, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_databases_update_request( + resource_group_name: str, + cluster_name: str, + database_name: str, + subscription_id: str, + *, + caller_role: Optional[Union[str, _models.CallerRole]] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if caller_role is not None: + _params["callerRole"] = _SERIALIZER.query("caller_role", caller_role, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_databases_delete_request( + resource_group_name: str, cluster_name: str, database_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_databases_list_by_cluster_request( + resource_group_name: str, + cluster_name: str, + subscription_id: str, + *, + top: Optional[int] = None, + skiptoken: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if top is not None: + _params["$top"] = _SERIALIZER.query("top", top, "int") + if skiptoken is not None: + _params["$skiptoken"] = _SERIALIZER.query("skiptoken", skiptoken, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_databases_list_principals_request( + resource_group_name: str, cluster_name: str, database_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/listPrincipals" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_databases_add_principals_request( + resource_group_name: str, cluster_name: str, database_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/addPrincipals" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_databases_remove_principals_request( # pylint: disable=name-too-long + resource_group_name: str, cluster_name: str, database_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/removePrincipals" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_databases_check_name_availability_request( # pylint: disable=name-too-long + resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/checkNameAvailability" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_attached_database_configurations_get_request( # pylint: disable=name-too-long + resource_group_name: str, + cluster_name: str, + attached_database_configuration_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/attachedDatabaseConfigurations/{attachedDatabaseConfigurationName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + "attachedDatabaseConfigurationName": _SERIALIZER.url( + "attached_database_configuration_name", attached_database_configuration_name, "str" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_attached_database_configurations_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + cluster_name: str, + attached_database_configuration_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/attachedDatabaseConfigurations/{attachedDatabaseConfigurationName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + "attachedDatabaseConfigurationName": _SERIALIZER.url( + "attached_database_configuration_name", attached_database_configuration_name, "str" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_attached_database_configurations_delete_request( # pylint: disable=name-too-long + resource_group_name: str, + cluster_name: str, + attached_database_configuration_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/attachedDatabaseConfigurations/{attachedDatabaseConfigurationName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + "attachedDatabaseConfigurationName": _SERIALIZER.url( + "attached_database_configuration_name", attached_database_configuration_name, "str" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_attached_database_configurations_list_by_cluster_request( # pylint: disable=name-too-long + resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/attachedDatabaseConfigurations" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_attached_database_configurations_check_name_availability_request( # pylint: disable=name-too-long + resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/attachedDatabaseConfigurationCheckNameAvailability" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_managed_private_endpoints_get_request( # pylint: disable=name-too-long + resource_group_name: str, cluster_name: str, managed_private_endpoint_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/managedPrivateEndpoints/{managedPrivateEndpointName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + "managedPrivateEndpointName": _SERIALIZER.url( + "managed_private_endpoint_name", managed_private_endpoint_name, "str" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_managed_private_endpoints_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, cluster_name: str, managed_private_endpoint_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/managedPrivateEndpoints/{managedPrivateEndpointName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + "managedPrivateEndpointName": _SERIALIZER.url( + "managed_private_endpoint_name", managed_private_endpoint_name, "str" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_managed_private_endpoints_update_request( # pylint: disable=name-too-long + resource_group_name: str, cluster_name: str, managed_private_endpoint_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/managedPrivateEndpoints/{managedPrivateEndpointName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + "managedPrivateEndpointName": _SERIALIZER.url( + "managed_private_endpoint_name", managed_private_endpoint_name, "str" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_managed_private_endpoints_delete_request( # pylint: disable=name-too-long + resource_group_name: str, cluster_name: str, managed_private_endpoint_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/managedPrivateEndpoints/{managedPrivateEndpointName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + "managedPrivateEndpointName": _SERIALIZER.url( + "managed_private_endpoint_name", managed_private_endpoint_name, "str" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_managed_private_endpoints_list_request( # pylint: disable=name-too-long + resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/managedPrivateEndpoints" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_managed_private_endpoints_check_name_availability_request( # pylint: disable=name-too-long + resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/managedPrivateEndpointsCheckNameAvailability" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_sandbox_custom_images_get_request( + resource_group_name: str, cluster_name: str, sandbox_custom_image_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/sandboxCustomImages/{sandboxCustomImageName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + "sandboxCustomImageName": _SERIALIZER.url("sandbox_custom_image_name", sandbox_custom_image_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_sandbox_custom_images_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, cluster_name: str, sandbox_custom_image_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/sandboxCustomImages/{sandboxCustomImageName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + "sandboxCustomImageName": _SERIALIZER.url("sandbox_custom_image_name", sandbox_custom_image_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_sandbox_custom_images_update_request( # pylint: disable=name-too-long + resource_group_name: str, cluster_name: str, sandbox_custom_image_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/sandboxCustomImages/{sandboxCustomImageName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + "sandboxCustomImageName": _SERIALIZER.url("sandbox_custom_image_name", sandbox_custom_image_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_sandbox_custom_images_delete_request( # pylint: disable=name-too-long + resource_group_name: str, cluster_name: str, sandbox_custom_image_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/sandboxCustomImages/{sandboxCustomImageName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + "sandboxCustomImageName": _SERIALIZER.url("sandbox_custom_image_name", sandbox_custom_image_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_sandbox_custom_images_list_by_cluster_request( # pylint: disable=name-too-long + resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/sandboxCustomImages" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_sandbox_custom_images_check_name_availability_request( # pylint: disable=name-too-long + resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/sandboxCustomImagesCheckNameAvailability" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_clusters_get_request( + resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_clusters_create_or_update_request( + resource_group_name: str, + cluster_name: str, + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_clusters_update_request( + resource_group_name: str, + cluster_name: str, + subscription_id: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + if_match = prep_if_match(etag, match_condition) + if if_match is not None: + _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") + if_none_match = prep_if_none_match(etag, match_condition) + if if_none_match is not None: + _headers["if-none-match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_clusters_delete_request( + resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_clusters_list_by_resource_group_request( # pylint: disable=name-too-long + resource_group_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_clusters_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.Kusto/clusters" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_clusters_stop_request( + resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/stop" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="POST", url=_url, params=_params, **kwargs) + + +def build_clusters_start_request( + resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/start" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="POST", url=_url, params=_params, **kwargs) + + +def build_clusters_migrate_request( + resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/migrate" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_clusters_list_follower_databases_get_request( # pylint: disable=name-too-long + resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/listFollowerDatabases" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_clusters_list_follower_databases_request( # pylint: disable=name-too-long + resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/listFollowerDatabases" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_clusters_detach_follower_databases_request( # pylint: disable=name-too-long + resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/detachFollowerDatabases" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_clusters_diagnose_virtual_network_request( # pylint: disable=name-too-long + resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/diagnoseVirtualNetwork" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_clusters_list_skus_by_resource_request( # pylint: disable=name-too-long + resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/skus" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_clusters_list_outbound_network_dependencies_endpoints_request( # pylint: disable=name-too-long + resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/outboundNetworkDependenciesEndpoints" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_clusters_add_callout_policies_request( # pylint: disable=name-too-long + resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/addCalloutPolicies" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_clusters_remove_callout_policy_request( # pylint: disable=name-too-long + resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/removeCalloutPolicy" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_clusters_list_callout_policies_request( # pylint: disable=name-too-long + resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/listCalloutPolicies" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_clusters_list_language_extensions_request( # pylint: disable=name-too-long + resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/listLanguageExtensions" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_clusters_add_language_extensions_request( # pylint: disable=name-too-long + resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/addLanguageExtensions" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_clusters_remove_language_extensions_request( # pylint: disable=name-too-long + resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/removeLanguageExtensions" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_clusters_list_skus_request(subscription_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.Kusto/skus" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_clusters_check_name_availability_request( # pylint: disable=name-too-long + location: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.Kusto/locations/{location}/checkNameAvailability" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "location": _SERIALIZER.url("location", location, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_private_endpoint_connections_get_request( # pylint: disable=name-too-long + resource_group_name: str, + cluster_name: str, + private_endpoint_connection_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/privateEndpointConnections/{privateEndpointConnectionName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + "privateEndpointConnectionName": _SERIALIZER.url( + "private_endpoint_connection_name", private_endpoint_connection_name, "str" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_private_endpoint_connections_create_or_update_request( # pylint: disable=name-too-long + resource_group_name: str, + cluster_name: str, + private_endpoint_connection_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/privateEndpointConnections/{privateEndpointConnectionName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + "privateEndpointConnectionName": _SERIALIZER.url( + "private_endpoint_connection_name", private_endpoint_connection_name, "str" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_private_endpoint_connections_delete_request( # pylint: disable=name-too-long + resource_group_name: str, + cluster_name: str, + private_endpoint_connection_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/privateEndpointConnections/{privateEndpointConnectionName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + "privateEndpointConnectionName": _SERIALIZER.url( + "private_endpoint_connection_name", private_endpoint_connection_name, "str" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + + +def build_private_endpoint_connections_list_request( # pylint: disable=name-too-long + resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/privateEndpointConnections" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_private_link_resources_get_request( + resource_group_name: str, cluster_name: str, private_link_resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/privateLinkResources/{privateLinkResourceName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + "privateLinkResourceName": _SERIALIZER.url("private_link_resource_name", private_link_resource_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_private_link_resources_list_request( # pylint: disable=name-too-long + resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/privateLinkResources" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_database_invite_follower_request( + resource_group_name: str, cluster_name: str, database_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/inviteFollower" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"), + "databaseName": _SERIALIZER.url("database_name", database_name, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_skus_list_request(location: str, subscription_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.Kusto/locations/{location}/skus" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "location": _SERIALIZER.url("location", location, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_operations_results_get_request( + location: str, operation_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = ( + "/subscriptions/{subscriptionId}/providers/Microsoft.Kusto/locations/{location}/operationResults/{operationId}" + ) + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "location": _SERIALIZER.url("location", location, "str"), + "operationId": _SERIALIZER.url("operation_id", operation_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_operations_results_location_get_request( # pylint: disable=name-too-long + location: str, operation_id: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + operation_result_response_type: Literal["Location"] = kwargs.pop( + "operation_result_response_type", _params.pop("operationResultResponseType", "Location") + ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-14")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.Kusto/locations/{location}/operationResults/{operationId}?operationResultResponseType=Location" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "location": _SERIALIZER.url("location", location, "str"), + "operationId": _SERIALIZER.url("operation_id", operation_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + _params["operationResultResponseType"] = _SERIALIZER.query( + "operation_result_response_type", operation_result_response_type, "str" + ) + + return HttpRequest(method="GET", url=_url, params=_params, **kwargs) + + class Operations: """ .. warning:: @@ -64,31 +2578,12897 @@ class Operations: Instead, you should access the following operations through :class:`~azure.mgmt.kusto.KustoManagementClient`'s - :attr:`operations` attribute. + :attr:`operations` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: KustoManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list(self, **kwargs: Any) -> ItemPaged["_models.Operation"]: + """List the operations for the provider. + + :return: An iterator like instance of Operation + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.kusto.models.Operation] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.Operation]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_operations_list_request( + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.Operation], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class ClusterPrincipalAssignmentsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.kusto.KustoManagementClient`'s + :attr:`cluster_principal_assignments` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: KustoManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, cluster_name: str, principal_assignment_name: str, **kwargs: Any + ) -> _models.ClusterPrincipalAssignment: + """Gets a Kusto cluster principalAssignment. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param principal_assignment_name: The name of the Kusto principalAssignment. Required. + :type principal_assignment_name: str + :return: ClusterPrincipalAssignment. The ClusterPrincipalAssignment is compatible with + MutableMapping + :rtype: ~azure.mgmt.kusto.models.ClusterPrincipalAssignment + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ClusterPrincipalAssignment] = kwargs.pop("cls", None) + + _request = build_cluster_principal_assignments_get_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + principal_assignment_name=principal_assignment_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ClusterPrincipalAssignment, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_or_update_initial( + self, + resource_group_name: str, + cluster_name: str, + principal_assignment_name: str, + parameters: Union[_models.ClusterPrincipalAssignment, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_cluster_principal_assignments_create_or_update_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + principal_assignment_name=principal_assignment_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + principal_assignment_name: str, + parameters: _models.ClusterPrincipalAssignment, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ClusterPrincipalAssignment]: + """Create a Kusto cluster principalAssignment. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param principal_assignment_name: The name of the Kusto principalAssignment. Required. + :type principal_assignment_name: str + :param parameters: The Kusto cluster principalAssignment's parameters supplied for the + operation. Required. + :type parameters: ~azure.mgmt.kusto.models.ClusterPrincipalAssignment + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns ClusterPrincipalAssignment. The + ClusterPrincipalAssignment is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.ClusterPrincipalAssignment] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + principal_assignment_name: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ClusterPrincipalAssignment]: + """Create a Kusto cluster principalAssignment. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param principal_assignment_name: The name of the Kusto principalAssignment. Required. + :type principal_assignment_name: str + :param parameters: The Kusto cluster principalAssignment's parameters supplied for the + operation. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns ClusterPrincipalAssignment. The + ClusterPrincipalAssignment is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.ClusterPrincipalAssignment] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + principal_assignment_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ClusterPrincipalAssignment]: + """Create a Kusto cluster principalAssignment. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param principal_assignment_name: The name of the Kusto principalAssignment. Required. + :type principal_assignment_name: str + :param parameters: The Kusto cluster principalAssignment's parameters supplied for the + operation. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns ClusterPrincipalAssignment. The + ClusterPrincipalAssignment is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.ClusterPrincipalAssignment] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + principal_assignment_name: str, + parameters: Union[_models.ClusterPrincipalAssignment, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.ClusterPrincipalAssignment]: + """Create a Kusto cluster principalAssignment. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param principal_assignment_name: The name of the Kusto principalAssignment. Required. + :type principal_assignment_name: str + :param parameters: The Kusto cluster principalAssignment's parameters supplied for the + operation. Is one of the following types: ClusterPrincipalAssignment, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.kusto.models.ClusterPrincipalAssignment or JSON or IO[bytes] + :return: An instance of LROPoller that returns ClusterPrincipalAssignment. The + ClusterPrincipalAssignment is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.ClusterPrincipalAssignment] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ClusterPrincipalAssignment] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + principal_assignment_name=principal_assignment_name, + parameters=parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.ClusterPrincipalAssignment, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.ClusterPrincipalAssignment].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.ClusterPrincipalAssignment]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial( + self, resource_group_name: str, cluster_name: str, principal_assignment_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_cluster_principal_assignments_delete_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + principal_assignment_name=principal_assignment_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete( + self, resource_group_name: str, cluster_name: str, principal_assignment_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Deletes a Kusto cluster principalAssignment. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param principal_assignment_name: The name of the Kusto principalAssignment. Required. + :type principal_assignment_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + principal_assignment_name=principal_assignment_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list( + self, resource_group_name: str, cluster_name: str, **kwargs: Any + ) -> ItemPaged["_models.ClusterPrincipalAssignment"]: + """Lists all Kusto cluster principalAssignments. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :return: An iterator like instance of ClusterPrincipalAssignment + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.kusto.models.ClusterPrincipalAssignment] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ClusterPrincipalAssignment]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_cluster_principal_assignments_list_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ClusterPrincipalAssignment], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @overload + def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + principal_assignment_name: _models.ClusterPrincipalAssignmentCheckNameRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the principal assignment name is valid and is not already in use. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param principal_assignment_name: The name of the principal assignment. Required. + :type principal_assignment_name: + ~azure.mgmt.kusto.models.ClusterPrincipalAssignmentCheckNameRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + principal_assignment_name: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the principal assignment name is valid and is not already in use. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param principal_assignment_name: The name of the principal assignment. Required. + :type principal_assignment_name: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + principal_assignment_name: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the principal assignment name is valid and is not already in use. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param principal_assignment_name: The name of the principal assignment. Required. + :type principal_assignment_name: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + principal_assignment_name: Union[_models.ClusterPrincipalAssignmentCheckNameRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the principal assignment name is valid and is not already in use. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param principal_assignment_name: The name of the principal assignment. Is one of the following + types: ClusterPrincipalAssignmentCheckNameRequest, JSON, IO[bytes] Required. + :type principal_assignment_name: + ~azure.mgmt.kusto.models.ClusterPrincipalAssignmentCheckNameRequest or JSON or IO[bytes] + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CheckNameResult] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(principal_assignment_name, (IOBase, bytes)): + _content = principal_assignment_name + else: + _content = json.dumps(principal_assignment_name, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_cluster_principal_assignments_check_name_availability_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CheckNameResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class DatabasePrincipalAssignmentsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.kusto.KustoManagementClient`'s + :attr:`database_principal_assignments` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: KustoManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + principal_assignment_name: str, + **kwargs: Any + ) -> _models.DatabasePrincipalAssignment: + """Gets a Kusto cluster database principalAssignment. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param principal_assignment_name: The name of the Kusto principalAssignment. Required. + :type principal_assignment_name: str + :return: DatabasePrincipalAssignment. The DatabasePrincipalAssignment is compatible with + MutableMapping + :rtype: ~azure.mgmt.kusto.models.DatabasePrincipalAssignment + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.DatabasePrincipalAssignment] = kwargs.pop("cls", None) + + _request = build_database_principal_assignments_get_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + principal_assignment_name=principal_assignment_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.DatabasePrincipalAssignment, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_or_update_initial( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + principal_assignment_name: str, + parameters: Union[_models.DatabasePrincipalAssignment, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_database_principal_assignments_create_or_update_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + principal_assignment_name=principal_assignment_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + principal_assignment_name: str, + parameters: _models.DatabasePrincipalAssignment, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.DatabasePrincipalAssignment]: + """Creates a Kusto cluster database principalAssignment. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param principal_assignment_name: The name of the Kusto principalAssignment. Required. + :type principal_assignment_name: str + :param parameters: The Kusto principalAssignments parameters supplied for the operation. + Required. + :type parameters: ~azure.mgmt.kusto.models.DatabasePrincipalAssignment + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns DatabasePrincipalAssignment. The + DatabasePrincipalAssignment is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.DatabasePrincipalAssignment] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + principal_assignment_name: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.DatabasePrincipalAssignment]: + """Creates a Kusto cluster database principalAssignment. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param principal_assignment_name: The name of the Kusto principalAssignment. Required. + :type principal_assignment_name: str + :param parameters: The Kusto principalAssignments parameters supplied for the operation. + Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns DatabasePrincipalAssignment. The + DatabasePrincipalAssignment is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.DatabasePrincipalAssignment] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + principal_assignment_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.DatabasePrincipalAssignment]: + """Creates a Kusto cluster database principalAssignment. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param principal_assignment_name: The name of the Kusto principalAssignment. Required. + :type principal_assignment_name: str + :param parameters: The Kusto principalAssignments parameters supplied for the operation. + Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns DatabasePrincipalAssignment. The + DatabasePrincipalAssignment is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.DatabasePrincipalAssignment] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + principal_assignment_name: str, + parameters: Union[_models.DatabasePrincipalAssignment, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.DatabasePrincipalAssignment]: + """Creates a Kusto cluster database principalAssignment. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param principal_assignment_name: The name of the Kusto principalAssignment. Required. + :type principal_assignment_name: str + :param parameters: The Kusto principalAssignments parameters supplied for the operation. Is one + of the following types: DatabasePrincipalAssignment, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.kusto.models.DatabasePrincipalAssignment or JSON or IO[bytes] + :return: An instance of LROPoller that returns DatabasePrincipalAssignment. The + DatabasePrincipalAssignment is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.DatabasePrincipalAssignment] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.DatabasePrincipalAssignment] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + principal_assignment_name=principal_assignment_name, + parameters=parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.DatabasePrincipalAssignment, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.DatabasePrincipalAssignment].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.DatabasePrincipalAssignment]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + principal_assignment_name: str, + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_database_principal_assignments_delete_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + principal_assignment_name=principal_assignment_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + principal_assignment_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes a Kusto principalAssignment. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param principal_assignment_name: The name of the Kusto principalAssignment. Required. + :type principal_assignment_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + principal_assignment_name=principal_assignment_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list( + self, resource_group_name: str, cluster_name: str, database_name: str, **kwargs: Any + ) -> ItemPaged["_models.DatabasePrincipalAssignment"]: + """Lists all Kusto cluster database principalAssignments. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :return: An iterator like instance of DatabasePrincipalAssignment + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.kusto.models.DatabasePrincipalAssignment] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.DatabasePrincipalAssignment]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_database_principal_assignments_list_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.DatabasePrincipalAssignment], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @overload + def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + principal_assignment_name: _models.DatabasePrincipalAssignmentCheckNameRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the database principal assignment is valid and is not already in use. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param principal_assignment_name: The name of the resource. Required. + :type principal_assignment_name: + ~azure.mgmt.kusto.models.DatabasePrincipalAssignmentCheckNameRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + principal_assignment_name: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the database principal assignment is valid and is not already in use. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param principal_assignment_name: The name of the resource. Required. + :type principal_assignment_name: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + principal_assignment_name: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the database principal assignment is valid and is not already in use. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param principal_assignment_name: The name of the resource. Required. + :type principal_assignment_name: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + principal_assignment_name: Union[_models.DatabasePrincipalAssignmentCheckNameRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the database principal assignment is valid and is not already in use. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param principal_assignment_name: The name of the resource. Is one of the following types: + DatabasePrincipalAssignmentCheckNameRequest, JSON, IO[bytes] Required. + :type principal_assignment_name: + ~azure.mgmt.kusto.models.DatabasePrincipalAssignmentCheckNameRequest or JSON or IO[bytes] + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CheckNameResult] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(principal_assignment_name, (IOBase, bytes)): + _content = principal_assignment_name + else: + _content = json.dumps(principal_assignment_name, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_database_principal_assignments_check_name_availability_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CheckNameResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class ScriptsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.kusto.KustoManagementClient`'s + :attr:`scripts` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: KustoManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, cluster_name: str, database_name: str, script_name: str, **kwargs: Any + ) -> _models.Script: + """Gets a Kusto cluster database script. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param script_name: The name of the Kusto database script. Required. + :type script_name: str + :return: Script. The Script is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.Script + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.Script] = kwargs.pop("cls", None) + + _request = build_scripts_get_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + script_name=script_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.Script, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_or_update_initial( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + script_name: str, + parameters: Union[_models.Script, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_scripts_create_or_update_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + script_name=script_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + script_name: str, + parameters: _models.Script, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Script]: + """Creates a Kusto database script. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param script_name: The name of the Kusto database script. Required. + :type script_name: str + :param parameters: The Kusto Script parameters contains the KQL to run. Required. + :type parameters: ~azure.mgmt.kusto.models.Script + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Script. The Script is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.Script] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + script_name: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Script]: + """Creates a Kusto database script. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param script_name: The name of the Kusto database script. Required. + :type script_name: str + :param parameters: The Kusto Script parameters contains the KQL to run. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Script. The Script is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.Script] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + script_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Script]: + """Creates a Kusto database script. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param script_name: The name of the Kusto database script. Required. + :type script_name: str + :param parameters: The Kusto Script parameters contains the KQL to run. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Script. The Script is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.Script] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + script_name: str, + parameters: Union[_models.Script, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.Script]: + """Creates a Kusto database script. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param script_name: The name of the Kusto database script. Required. + :type script_name: str + :param parameters: The Kusto Script parameters contains the KQL to run. Is one of the following + types: Script, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.kusto.models.Script or JSON or IO[bytes] + :return: An instance of LROPoller that returns Script. The Script is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.Script] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Script] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + script_name=script_name, + parameters=parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.Script, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.Script].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.Script]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _update_initial( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + script_name: str, + parameters: Union[_models.Script, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_scripts_update_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + script_name=script_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + script_name: str, + parameters: _models.Script, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Script]: + """Updates a database script. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param script_name: The name of the Kusto database script. Required. + :type script_name: str + :param parameters: The Kusto Script parameters contains to the KQL to run. Required. + :type parameters: ~azure.mgmt.kusto.models.Script + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Script. The Script is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.Script] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + script_name: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Script]: + """Updates a database script. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param script_name: The name of the Kusto database script. Required. + :type script_name: str + :param parameters: The Kusto Script parameters contains to the KQL to run. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Script. The Script is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.Script] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + script_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Script]: + """Updates a database script. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param script_name: The name of the Kusto database script. Required. + :type script_name: str + :param parameters: The Kusto Script parameters contains to the KQL to run. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Script. The Script is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.Script] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_update( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + script_name: str, + parameters: Union[_models.Script, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.Script]: + """Updates a database script. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param script_name: The name of the Kusto database script. Required. + :type script_name: str + :param parameters: The Kusto Script parameters contains to the KQL to run. Is one of the + following types: Script, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.kusto.models.Script or JSON or IO[bytes] + :return: An instance of LROPoller that returns Script. The Script is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.Script] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Script] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + script_name=script_name, + parameters=parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.Script, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.Script].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.Script]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial( + self, resource_group_name: str, cluster_name: str, database_name: str, script_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_scripts_delete_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + script_name=script_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete( + self, resource_group_name: str, cluster_name: str, database_name: str, script_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Deletes a Kusto database script. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param script_name: The name of the Kusto database script. Required. + :type script_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + script_name=script_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_database( + self, resource_group_name: str, cluster_name: str, database_name: str, **kwargs: Any + ) -> ItemPaged["_models.Script"]: + """Returns the list of database scripts for given database. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :return: An iterator like instance of Script + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.kusto.models.Script] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.Script]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_scripts_list_by_database_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.Script], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @overload + def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + script_name: _models.ScriptCheckNameRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the script name is valid and is not already in use. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param script_name: The name of the script. Required. + :type script_name: ~azure.mgmt.kusto.models.ScriptCheckNameRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + script_name: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the script name is valid and is not already in use. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param script_name: The name of the script. Required. + :type script_name: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + script_name: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the script name is valid and is not already in use. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param script_name: The name of the script. Required. + :type script_name: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + script_name: Union[_models.ScriptCheckNameRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the script name is valid and is not already in use. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param script_name: The name of the script. Is one of the following types: + ScriptCheckNameRequest, JSON, IO[bytes] Required. + :type script_name: ~azure.mgmt.kusto.models.ScriptCheckNameRequest or JSON or IO[bytes] + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CheckNameResult] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(script_name, (IOBase, bytes)): + _content = script_name + else: + _content = json.dumps(script_name, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_scripts_check_name_availability_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CheckNameResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class DataConnectionsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.kusto.KustoManagementClient`'s + :attr:`data_connections` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: KustoManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, cluster_name: str, database_name: str, data_connection_name: str, **kwargs: Any + ) -> _models.DataConnection: + """Returns a data connection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param data_connection_name: The name of the data connection. Required. + :type data_connection_name: str + :return: DataConnection. The DataConnection is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.DataConnection + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.DataConnection] = kwargs.pop("cls", None) + + _request = build_data_connections_get_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + data_connection_name=data_connection_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.DataConnection, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_or_update_initial( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + data_connection_name: str, + parameters: Union[_models.DataConnection, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_data_connections_create_or_update_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + data_connection_name=data_connection_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + data_connection_name: str, + parameters: _models.DataConnection, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.DataConnection]: + """Creates or updates a data connection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param data_connection_name: The name of the data connection. Required. + :type data_connection_name: str + :param parameters: The data connection parameters supplied to the CreateOrUpdate operation. + Required. + :type parameters: ~azure.mgmt.kusto.models.DataConnection + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns DataConnection. The DataConnection is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.DataConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + data_connection_name: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.DataConnection]: + """Creates or updates a data connection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param data_connection_name: The name of the data connection. Required. + :type data_connection_name: str + :param parameters: The data connection parameters supplied to the CreateOrUpdate operation. + Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns DataConnection. The DataConnection is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.DataConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + data_connection_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.DataConnection]: + """Creates or updates a data connection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param data_connection_name: The name of the data connection. Required. + :type data_connection_name: str + :param parameters: The data connection parameters supplied to the CreateOrUpdate operation. + Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns DataConnection. The DataConnection is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.DataConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + data_connection_name: str, + parameters: Union[_models.DataConnection, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.DataConnection]: + """Creates or updates a data connection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param data_connection_name: The name of the data connection. Required. + :type data_connection_name: str + :param parameters: The data connection parameters supplied to the CreateOrUpdate operation. Is + one of the following types: DataConnection, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.kusto.models.DataConnection or JSON or IO[bytes] + :return: An instance of LROPoller that returns DataConnection. The DataConnection is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.DataConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.DataConnection] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + data_connection_name=data_connection_name, + parameters=parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.DataConnection, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.DataConnection].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.DataConnection]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _update_initial( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + data_connection_name: str, + parameters: Union[_models.DataConnection, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_data_connections_update_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + data_connection_name=data_connection_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + data_connection_name: str, + parameters: _models.DataConnection, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.DataConnection]: + """Updates a data connection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param data_connection_name: The name of the data connection. Required. + :type data_connection_name: str + :param parameters: The data connection parameters supplied to the Update operation. Required. + :type parameters: ~azure.mgmt.kusto.models.DataConnection + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns DataConnection. The DataConnection is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.DataConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + data_connection_name: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.DataConnection]: + """Updates a data connection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param data_connection_name: The name of the data connection. Required. + :type data_connection_name: str + :param parameters: The data connection parameters supplied to the Update operation. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns DataConnection. The DataConnection is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.DataConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + data_connection_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.DataConnection]: + """Updates a data connection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param data_connection_name: The name of the data connection. Required. + :type data_connection_name: str + :param parameters: The data connection parameters supplied to the Update operation. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns DataConnection. The DataConnection is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.DataConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_update( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + data_connection_name: str, + parameters: Union[_models.DataConnection, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.DataConnection]: + """Updates a data connection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param data_connection_name: The name of the data connection. Required. + :type data_connection_name: str + :param parameters: The data connection parameters supplied to the Update operation. Is one of + the following types: DataConnection, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.kusto.models.DataConnection or JSON or IO[bytes] + :return: An instance of LROPoller that returns DataConnection. The DataConnection is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.DataConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.DataConnection] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + data_connection_name=data_connection_name, + parameters=parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.DataConnection, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.DataConnection].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.DataConnection]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial( + self, resource_group_name: str, cluster_name: str, database_name: str, data_connection_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_data_connections_delete_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + data_connection_name=data_connection_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete( + self, resource_group_name: str, cluster_name: str, database_name: str, data_connection_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Deletes the data connection with the given name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param data_connection_name: The name of the data connection. Required. + :type data_connection_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + data_connection_name=data_connection_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_database( + self, resource_group_name: str, cluster_name: str, database_name: str, **kwargs: Any + ) -> ItemPaged["_models.DataConnection"]: + """Returns the list of data connections of the given Kusto database. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :return: An iterator like instance of DataConnection + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.kusto.models.DataConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.DataConnection]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_data_connections_list_by_database_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.DataConnection], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + def _data_connection_validation_initial( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + parameters: Union[_models.DataConnectionValidation, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_data_connections_data_connection_validation_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_data_connection_validation( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + parameters: _models.DataConnectionValidation, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.DataConnectionValidationListResult]: + """Checks that the data connection parameters are valid. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param parameters: The data connection parameters supplied to the CreateOrUpdate operation. + Required. + :type parameters: ~azure.mgmt.kusto.models.DataConnectionValidation + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns DataConnectionValidationListResult. The + DataConnectionValidationListResult is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.DataConnectionValidationListResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_data_connection_validation( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.DataConnectionValidationListResult]: + """Checks that the data connection parameters are valid. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param parameters: The data connection parameters supplied to the CreateOrUpdate operation. + Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns DataConnectionValidationListResult. The + DataConnectionValidationListResult is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.DataConnectionValidationListResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_data_connection_validation( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.DataConnectionValidationListResult]: + """Checks that the data connection parameters are valid. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param parameters: The data connection parameters supplied to the CreateOrUpdate operation. + Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns DataConnectionValidationListResult. The + DataConnectionValidationListResult is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.DataConnectionValidationListResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_data_connection_validation( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + parameters: Union[_models.DataConnectionValidation, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.DataConnectionValidationListResult]: + """Checks that the data connection parameters are valid. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param parameters: The data connection parameters supplied to the CreateOrUpdate operation. Is + one of the following types: DataConnectionValidation, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.kusto.models.DataConnectionValidation or JSON or IO[bytes] + :return: An instance of LROPoller that returns DataConnectionValidationListResult. The + DataConnectionValidationListResult is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.DataConnectionValidationListResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.DataConnectionValidationListResult] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._data_connection_validation_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + parameters=parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = _deserialize(_models.DataConnectionValidationListResult, response.json()) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.DataConnectionValidationListResult].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.DataConnectionValidationListResult]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @overload + def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + data_connection_name: _models.DataConnectionCheckNameRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the data connection name is valid and is not already in use. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param data_connection_name: The name of the data connection. Required. + :type data_connection_name: ~azure.mgmt.kusto.models.DataConnectionCheckNameRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + data_connection_name: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the data connection name is valid and is not already in use. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param data_connection_name: The name of the data connection. Required. + :type data_connection_name: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + data_connection_name: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the data connection name is valid and is not already in use. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param data_connection_name: The name of the data connection. Required. + :type data_connection_name: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + data_connection_name: Union[_models.DataConnectionCheckNameRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the data connection name is valid and is not already in use. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param data_connection_name: The name of the data connection. Is one of the following types: + DataConnectionCheckNameRequest, JSON, IO[bytes] Required. + :type data_connection_name: ~azure.mgmt.kusto.models.DataConnectionCheckNameRequest or JSON or + IO[bytes] + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CheckNameResult] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(data_connection_name, (IOBase, bytes)): + _content = data_connection_name + else: + _content = json.dumps(data_connection_name, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_data_connections_check_name_availability_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CheckNameResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class DatabasesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.kusto.KustoManagementClient`'s + :attr:`databases` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: KustoManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get(self, resource_group_name: str, cluster_name: str, database_name: str, **kwargs: Any) -> _models.Database: + """Returns a database. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :return: Database. The Database is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.Database + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.Database] = kwargs.pop("cls", None) + + _request = build_databases_get_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.Database, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_or_update_initial( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + parameters: Union[_models.Database, JSON, IO[bytes]], + *, + caller_role: Optional[Union[str, _models.CallerRole]] = None, + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_databases_create_or_update_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + subscription_id=self._config.subscription_id, + caller_role=caller_role, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + parameters: _models.Database, + *, + caller_role: Optional[Union[str, _models.CallerRole]] = None, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Database]: + """Creates or updates a database. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param parameters: The database parameters supplied to the CreateOrUpdate operation. Required. + :type parameters: ~azure.mgmt.kusto.models.Database + :keyword caller_role: By default, any user who run operation on a database become an Admin on + it. This property allows the caller to exclude the caller from Admins list. Known values are: + "Admin" and "None". Default value is None. + :paramtype caller_role: str or ~azure.mgmt.kusto.models.CallerRole + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Database. The Database is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.Database] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + parameters: JSON, + *, + caller_role: Optional[Union[str, _models.CallerRole]] = None, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Database]: + """Creates or updates a database. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param parameters: The database parameters supplied to the CreateOrUpdate operation. Required. + :type parameters: JSON + :keyword caller_role: By default, any user who run operation on a database become an Admin on + it. This property allows the caller to exclude the caller from Admins list. Known values are: + "Admin" and "None". Default value is None. + :paramtype caller_role: str or ~azure.mgmt.kusto.models.CallerRole + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Database. The Database is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.Database] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + parameters: IO[bytes], + *, + caller_role: Optional[Union[str, _models.CallerRole]] = None, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Database]: + """Creates or updates a database. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param parameters: The database parameters supplied to the CreateOrUpdate operation. Required. + :type parameters: IO[bytes] + :keyword caller_role: By default, any user who run operation on a database become an Admin on + it. This property allows the caller to exclude the caller from Admins list. Known values are: + "Admin" and "None". Default value is None. + :paramtype caller_role: str or ~azure.mgmt.kusto.models.CallerRole + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Database. The Database is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.Database] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + parameters: Union[_models.Database, JSON, IO[bytes]], + *, + caller_role: Optional[Union[str, _models.CallerRole]] = None, + **kwargs: Any + ) -> LROPoller[_models.Database]: + """Creates or updates a database. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param parameters: The database parameters supplied to the CreateOrUpdate operation. Is one of + the following types: Database, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.kusto.models.Database or JSON or IO[bytes] + :keyword caller_role: By default, any user who run operation on a database become an Admin on + it. This property allows the caller to exclude the caller from Admins list. Known values are: + "Admin" and "None". Default value is None. + :paramtype caller_role: str or ~azure.mgmt.kusto.models.CallerRole + :return: An instance of LROPoller that returns Database. The Database is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.Database] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Database] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + parameters=parameters, + caller_role=caller_role, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.Database, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.Database].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.Database]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _update_initial( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + parameters: Union[_models.Database, JSON, IO[bytes]], + *, + caller_role: Optional[Union[str, _models.CallerRole]] = None, + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_databases_update_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + subscription_id=self._config.subscription_id, + caller_role=caller_role, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + parameters: _models.Database, + *, + caller_role: Optional[Union[str, _models.CallerRole]] = None, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Database]: + """Updates a database. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param parameters: The database parameters supplied to the Update operation. Required. + :type parameters: ~azure.mgmt.kusto.models.Database + :keyword caller_role: By default, any user who run operation on a database become an Admin on + it. This property allows the caller to exclude the caller from Admins list. Known values are: + "Admin" and "None". Default value is None. + :paramtype caller_role: str or ~azure.mgmt.kusto.models.CallerRole + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Database. The Database is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.Database] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + parameters: JSON, + *, + caller_role: Optional[Union[str, _models.CallerRole]] = None, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Database]: + """Updates a database. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param parameters: The database parameters supplied to the Update operation. Required. + :type parameters: JSON + :keyword caller_role: By default, any user who run operation on a database become an Admin on + it. This property allows the caller to exclude the caller from Admins list. Known values are: + "Admin" and "None". Default value is None. + :paramtype caller_role: str or ~azure.mgmt.kusto.models.CallerRole + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Database. The Database is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.Database] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + parameters: IO[bytes], + *, + caller_role: Optional[Union[str, _models.CallerRole]] = None, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Database]: + """Updates a database. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param parameters: The database parameters supplied to the Update operation. Required. + :type parameters: IO[bytes] + :keyword caller_role: By default, any user who run operation on a database become an Admin on + it. This property allows the caller to exclude the caller from Admins list. Known values are: + "Admin" and "None". Default value is None. + :paramtype caller_role: str or ~azure.mgmt.kusto.models.CallerRole + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns Database. The Database is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.Database] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_update( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + parameters: Union[_models.Database, JSON, IO[bytes]], + *, + caller_role: Optional[Union[str, _models.CallerRole]] = None, + **kwargs: Any + ) -> LROPoller[_models.Database]: + """Updates a database. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param parameters: The database parameters supplied to the Update operation. Is one of the + following types: Database, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.kusto.models.Database or JSON or IO[bytes] + :keyword caller_role: By default, any user who run operation on a database become an Admin on + it. This property allows the caller to exclude the caller from Admins list. Known values are: + "Admin" and "None". Default value is None. + :paramtype caller_role: str or ~azure.mgmt.kusto.models.CallerRole + :return: An instance of LROPoller that returns Database. The Database is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.Database] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Database] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + parameters=parameters, + caller_role=caller_role, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.Database, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.Database].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.Database]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial( + self, resource_group_name: str, cluster_name: str, database_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_databases_delete_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete( + self, resource_group_name: str, cluster_name: str, database_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Deletes the database with the given name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_cluster( + self, + resource_group_name: str, + cluster_name: str, + *, + top: Optional[int] = None, + skiptoken: Optional[str] = None, + **kwargs: Any + ) -> ItemPaged["_models.Database"]: + """Returns the list of databases of the given Kusto cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :keyword top: limit the number of results. Default value is None. + :paramtype top: int + :keyword skiptoken: Skiptoken is only used if a previous operation returned a partial result. + If a previous response contains a nextLink element, the value of the nextLink element will + include a skiptoken parameter that specifies a starting point to use for subsequent calls. + Default value is None. + :paramtype skiptoken: str + :return: An iterator like instance of Database + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.kusto.models.Database] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.Database]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_databases_list_by_cluster_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + subscription_id=self._config.subscription_id, + top=top, + skiptoken=skiptoken, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.Database], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def list_principals( + self, resource_group_name: str, cluster_name: str, database_name: str, **kwargs: Any + ) -> ItemPaged["_models.DatabasePrincipal"]: + """Returns a list of database principals of the given Kusto cluster and database. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :return: An iterator like instance of DatabasePrincipal + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.kusto.models.DatabasePrincipal] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.DatabasePrincipal]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_databases_list_principals_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.DatabasePrincipal], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @overload + def add_principals( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + database_principals_to_add: _models.DatabasePrincipalListRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DatabasePrincipalListResult: + """Add Database principals permissions. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param database_principals_to_add: List of database principals to add. Required. + :type database_principals_to_add: ~azure.mgmt.kusto.models.DatabasePrincipalListRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: DatabasePrincipalListResult. The DatabasePrincipalListResult is compatible with + MutableMapping + :rtype: ~azure.mgmt.kusto.models.DatabasePrincipalListResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def add_principals( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + database_principals_to_add: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DatabasePrincipalListResult: + """Add Database principals permissions. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param database_principals_to_add: List of database principals to add. Required. + :type database_principals_to_add: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: DatabasePrincipalListResult. The DatabasePrincipalListResult is compatible with + MutableMapping + :rtype: ~azure.mgmt.kusto.models.DatabasePrincipalListResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def add_principals( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + database_principals_to_add: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DatabasePrincipalListResult: + """Add Database principals permissions. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param database_principals_to_add: List of database principals to add. Required. + :type database_principals_to_add: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: DatabasePrincipalListResult. The DatabasePrincipalListResult is compatible with + MutableMapping + :rtype: ~azure.mgmt.kusto.models.DatabasePrincipalListResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def add_principals( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + database_principals_to_add: Union[_models.DatabasePrincipalListRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.DatabasePrincipalListResult: + """Add Database principals permissions. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param database_principals_to_add: List of database principals to add. Is one of the following + types: DatabasePrincipalListRequest, JSON, IO[bytes] Required. + :type database_principals_to_add: ~azure.mgmt.kusto.models.DatabasePrincipalListRequest or JSON + or IO[bytes] + :return: DatabasePrincipalListResult. The DatabasePrincipalListResult is compatible with + MutableMapping + :rtype: ~azure.mgmt.kusto.models.DatabasePrincipalListResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.DatabasePrincipalListResult] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(database_principals_to_add, (IOBase, bytes)): + _content = database_principals_to_add + else: + _content = json.dumps(database_principals_to_add, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_databases_add_principals_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.DatabasePrincipalListResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def remove_principals( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + database_principals_to_remove: _models.DatabasePrincipalListRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DatabasePrincipalListResult: + """Remove Database principals permissions. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param database_principals_to_remove: List of database principals to remove. Required. + :type database_principals_to_remove: ~azure.mgmt.kusto.models.DatabasePrincipalListRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: DatabasePrincipalListResult. The DatabasePrincipalListResult is compatible with + MutableMapping + :rtype: ~azure.mgmt.kusto.models.DatabasePrincipalListResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def remove_principals( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + database_principals_to_remove: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DatabasePrincipalListResult: + """Remove Database principals permissions. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param database_principals_to_remove: List of database principals to remove. Required. + :type database_principals_to_remove: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: DatabasePrincipalListResult. The DatabasePrincipalListResult is compatible with + MutableMapping + :rtype: ~azure.mgmt.kusto.models.DatabasePrincipalListResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def remove_principals( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + database_principals_to_remove: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DatabasePrincipalListResult: + """Remove Database principals permissions. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param database_principals_to_remove: List of database principals to remove. Required. + :type database_principals_to_remove: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: DatabasePrincipalListResult. The DatabasePrincipalListResult is compatible with + MutableMapping + :rtype: ~azure.mgmt.kusto.models.DatabasePrincipalListResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def remove_principals( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + database_principals_to_remove: Union[_models.DatabasePrincipalListRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.DatabasePrincipalListResult: + """Remove Database principals permissions. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param database_principals_to_remove: List of database principals to remove. Is one of the + following types: DatabasePrincipalListRequest, JSON, IO[bytes] Required. + :type database_principals_to_remove: ~azure.mgmt.kusto.models.DatabasePrincipalListRequest or + JSON or IO[bytes] + :return: DatabasePrincipalListResult. The DatabasePrincipalListResult is compatible with + MutableMapping + :rtype: ~azure.mgmt.kusto.models.DatabasePrincipalListResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.DatabasePrincipalListResult] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(database_principals_to_remove, (IOBase, bytes)): + _content = database_principals_to_remove + else: + _content = json.dumps(database_principals_to_remove, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_databases_remove_principals_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.DatabasePrincipalListResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + resource_name: _models.CheckNameRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the databases resource name is valid and is not already in use. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param resource_name: The name of the resource. Required. + :type resource_name: ~azure.mgmt.kusto.models.CheckNameRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + resource_name: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the databases resource name is valid and is not already in use. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param resource_name: The name of the resource. Required. + :type resource_name: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + resource_name: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the databases resource name is valid and is not already in use. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param resource_name: The name of the resource. Required. + :type resource_name: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + resource_name: Union[_models.CheckNameRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the databases resource name is valid and is not already in use. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param resource_name: The name of the resource. Is one of the following types: + CheckNameRequest, JSON, IO[bytes] Required. + :type resource_name: ~azure.mgmt.kusto.models.CheckNameRequest or JSON or IO[bytes] + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CheckNameResult] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(resource_name, (IOBase, bytes)): + _content = resource_name + else: + _content = json.dumps(resource_name, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_databases_check_name_availability_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CheckNameResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class AttachedDatabaseConfigurationsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.kusto.KustoManagementClient`'s + :attr:`attached_database_configurations` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: KustoManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, cluster_name: str, attached_database_configuration_name: str, **kwargs: Any + ) -> _models.AttachedDatabaseConfiguration: + """Returns an attached database configuration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param attached_database_configuration_name: The name of the attached database configuration. + Required. + :type attached_database_configuration_name: str + :return: AttachedDatabaseConfiguration. The AttachedDatabaseConfiguration is compatible with + MutableMapping + :rtype: ~azure.mgmt.kusto.models.AttachedDatabaseConfiguration + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.AttachedDatabaseConfiguration] = kwargs.pop("cls", None) + + _request = build_attached_database_configurations_get_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + attached_database_configuration_name=attached_database_configuration_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.AttachedDatabaseConfiguration, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_or_update_initial( + self, + resource_group_name: str, + cluster_name: str, + attached_database_configuration_name: str, + parameters: Union[_models.AttachedDatabaseConfiguration, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_attached_database_configurations_create_or_update_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + attached_database_configuration_name=attached_database_configuration_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + attached_database_configuration_name: str, + parameters: _models.AttachedDatabaseConfiguration, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.AttachedDatabaseConfiguration]: + """Creates or updates an attached database configuration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param attached_database_configuration_name: The name of the attached database configuration. + Required. + :type attached_database_configuration_name: str + :param parameters: The database parameters supplied to the CreateOrUpdate operation. Required. + :type parameters: ~azure.mgmt.kusto.models.AttachedDatabaseConfiguration + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns AttachedDatabaseConfiguration. The + AttachedDatabaseConfiguration is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.AttachedDatabaseConfiguration] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + attached_database_configuration_name: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.AttachedDatabaseConfiguration]: + """Creates or updates an attached database configuration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param attached_database_configuration_name: The name of the attached database configuration. + Required. + :type attached_database_configuration_name: str + :param parameters: The database parameters supplied to the CreateOrUpdate operation. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns AttachedDatabaseConfiguration. The + AttachedDatabaseConfiguration is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.AttachedDatabaseConfiguration] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + attached_database_configuration_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.AttachedDatabaseConfiguration]: + """Creates or updates an attached database configuration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param attached_database_configuration_name: The name of the attached database configuration. + Required. + :type attached_database_configuration_name: str + :param parameters: The database parameters supplied to the CreateOrUpdate operation. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns AttachedDatabaseConfiguration. The + AttachedDatabaseConfiguration is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.AttachedDatabaseConfiguration] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + attached_database_configuration_name: str, + parameters: Union[_models.AttachedDatabaseConfiguration, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.AttachedDatabaseConfiguration]: + """Creates or updates an attached database configuration. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param attached_database_configuration_name: The name of the attached database configuration. + Required. + :type attached_database_configuration_name: str + :param parameters: The database parameters supplied to the CreateOrUpdate operation. Is one of + the following types: AttachedDatabaseConfiguration, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.kusto.models.AttachedDatabaseConfiguration or JSON or IO[bytes] + :return: An instance of LROPoller that returns AttachedDatabaseConfiguration. The + AttachedDatabaseConfiguration is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.AttachedDatabaseConfiguration] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.AttachedDatabaseConfiguration] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + attached_database_configuration_name=attached_database_configuration_name, + parameters=parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.AttachedDatabaseConfiguration, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.AttachedDatabaseConfiguration].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.AttachedDatabaseConfiguration]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial( + self, resource_group_name: str, cluster_name: str, attached_database_configuration_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_attached_database_configurations_delete_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + attached_database_configuration_name=attached_database_configuration_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete( + self, resource_group_name: str, cluster_name: str, attached_database_configuration_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Deletes the attached database configuration with the given name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param attached_database_configuration_name: The name of the attached database configuration. + Required. + :type attached_database_configuration_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + attached_database_configuration_name=attached_database_configuration_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_cluster( + self, resource_group_name: str, cluster_name: str, **kwargs: Any + ) -> ItemPaged["_models.AttachedDatabaseConfiguration"]: + """Returns the list of attached database configurations of the given Kusto cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :return: An iterator like instance of AttachedDatabaseConfiguration + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.kusto.models.AttachedDatabaseConfiguration] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.AttachedDatabaseConfiguration]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_attached_database_configurations_list_by_cluster_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.AttachedDatabaseConfiguration], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @overload + def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + resource_name: _models.AttachedDatabaseConfigurationsCheckNameRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the attached database configuration resource name is valid and is not already in + use. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param resource_name: The name of the resource. Required. + :type resource_name: ~azure.mgmt.kusto.models.AttachedDatabaseConfigurationsCheckNameRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + resource_name: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the attached database configuration resource name is valid and is not already in + use. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param resource_name: The name of the resource. Required. + :type resource_name: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + resource_name: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the attached database configuration resource name is valid and is not already in + use. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param resource_name: The name of the resource. Required. + :type resource_name: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + resource_name: Union[_models.AttachedDatabaseConfigurationsCheckNameRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the attached database configuration resource name is valid and is not already in + use. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param resource_name: The name of the resource. Is one of the following types: + AttachedDatabaseConfigurationsCheckNameRequest, JSON, IO[bytes] Required. + :type resource_name: ~azure.mgmt.kusto.models.AttachedDatabaseConfigurationsCheckNameRequest or + JSON or IO[bytes] + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CheckNameResult] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(resource_name, (IOBase, bytes)): + _content = resource_name + else: + _content = json.dumps(resource_name, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_attached_database_configurations_check_name_availability_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CheckNameResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class ManagedPrivateEndpointsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.kusto.KustoManagementClient`'s + :attr:`managed_private_endpoints` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: KustoManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, cluster_name: str, managed_private_endpoint_name: str, **kwargs: Any + ) -> _models.ManagedPrivateEndpoint: + """Gets a managed private endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param managed_private_endpoint_name: The name of the managed private endpoint. Required. + :type managed_private_endpoint_name: str + :return: ManagedPrivateEndpoint. The ManagedPrivateEndpoint is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.ManagedPrivateEndpoint + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ManagedPrivateEndpoint] = kwargs.pop("cls", None) + + _request = build_managed_private_endpoints_get_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + managed_private_endpoint_name=managed_private_endpoint_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ManagedPrivateEndpoint, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_or_update_initial( + self, + resource_group_name: str, + cluster_name: str, + managed_private_endpoint_name: str, + parameters: Union[_models.ManagedPrivateEndpoint, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_managed_private_endpoints_create_or_update_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + managed_private_endpoint_name=managed_private_endpoint_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + managed_private_endpoint_name: str, + parameters: _models.ManagedPrivateEndpoint, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ManagedPrivateEndpoint]: + """Creates a managed private endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param managed_private_endpoint_name: The name of the managed private endpoint. Required. + :type managed_private_endpoint_name: str + :param parameters: The managed private endpoint parameters. Required. + :type parameters: ~azure.mgmt.kusto.models.ManagedPrivateEndpoint + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns ManagedPrivateEndpoint. The + ManagedPrivateEndpoint is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.ManagedPrivateEndpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + managed_private_endpoint_name: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ManagedPrivateEndpoint]: + """Creates a managed private endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param managed_private_endpoint_name: The name of the managed private endpoint. Required. + :type managed_private_endpoint_name: str + :param parameters: The managed private endpoint parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns ManagedPrivateEndpoint. The + ManagedPrivateEndpoint is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.ManagedPrivateEndpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + managed_private_endpoint_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ManagedPrivateEndpoint]: + """Creates a managed private endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param managed_private_endpoint_name: The name of the managed private endpoint. Required. + :type managed_private_endpoint_name: str + :param parameters: The managed private endpoint parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns ManagedPrivateEndpoint. The + ManagedPrivateEndpoint is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.ManagedPrivateEndpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + managed_private_endpoint_name: str, + parameters: Union[_models.ManagedPrivateEndpoint, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.ManagedPrivateEndpoint]: + """Creates a managed private endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param managed_private_endpoint_name: The name of the managed private endpoint. Required. + :type managed_private_endpoint_name: str + :param parameters: The managed private endpoint parameters. Is one of the following types: + ManagedPrivateEndpoint, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.kusto.models.ManagedPrivateEndpoint or JSON or IO[bytes] + :return: An instance of LROPoller that returns ManagedPrivateEndpoint. The + ManagedPrivateEndpoint is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.ManagedPrivateEndpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ManagedPrivateEndpoint] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + managed_private_endpoint_name=managed_private_endpoint_name, + parameters=parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.ManagedPrivateEndpoint, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.ManagedPrivateEndpoint].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.ManagedPrivateEndpoint]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _update_initial( + self, + resource_group_name: str, + cluster_name: str, + managed_private_endpoint_name: str, + parameters: Union[_models.ManagedPrivateEndpoint, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_managed_private_endpoints_update_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + managed_private_endpoint_name=managed_private_endpoint_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update( + self, + resource_group_name: str, + cluster_name: str, + managed_private_endpoint_name: str, + parameters: _models.ManagedPrivateEndpoint, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ManagedPrivateEndpoint]: + """Updates a managed private endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param managed_private_endpoint_name: The name of the managed private endpoint. Required. + :type managed_private_endpoint_name: str + :param parameters: The managed private endpoint parameters. Required. + :type parameters: ~azure.mgmt.kusto.models.ManagedPrivateEndpoint + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns ManagedPrivateEndpoint. The + ManagedPrivateEndpoint is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.ManagedPrivateEndpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + cluster_name: str, + managed_private_endpoint_name: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ManagedPrivateEndpoint]: + """Updates a managed private endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param managed_private_endpoint_name: The name of the managed private endpoint. Required. + :type managed_private_endpoint_name: str + :param parameters: The managed private endpoint parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns ManagedPrivateEndpoint. The + ManagedPrivateEndpoint is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.ManagedPrivateEndpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + cluster_name: str, + managed_private_endpoint_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ManagedPrivateEndpoint]: + """Updates a managed private endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param managed_private_endpoint_name: The name of the managed private endpoint. Required. + :type managed_private_endpoint_name: str + :param parameters: The managed private endpoint parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns ManagedPrivateEndpoint. The + ManagedPrivateEndpoint is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.ManagedPrivateEndpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_update( + self, + resource_group_name: str, + cluster_name: str, + managed_private_endpoint_name: str, + parameters: Union[_models.ManagedPrivateEndpoint, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.ManagedPrivateEndpoint]: + """Updates a managed private endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param managed_private_endpoint_name: The name of the managed private endpoint. Required. + :type managed_private_endpoint_name: str + :param parameters: The managed private endpoint parameters. Is one of the following types: + ManagedPrivateEndpoint, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.kusto.models.ManagedPrivateEndpoint or JSON or IO[bytes] + :return: An instance of LROPoller that returns ManagedPrivateEndpoint. The + ManagedPrivateEndpoint is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.ManagedPrivateEndpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ManagedPrivateEndpoint] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + managed_private_endpoint_name=managed_private_endpoint_name, + parameters=parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.ManagedPrivateEndpoint, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.ManagedPrivateEndpoint].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.ManagedPrivateEndpoint]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial( + self, resource_group_name: str, cluster_name: str, managed_private_endpoint_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_managed_private_endpoints_delete_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + managed_private_endpoint_name=managed_private_endpoint_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete( + self, resource_group_name: str, cluster_name: str, managed_private_endpoint_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Deletes a managed private endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param managed_private_endpoint_name: The name of the managed private endpoint. Required. + :type managed_private_endpoint_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + managed_private_endpoint_name=managed_private_endpoint_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list( + self, resource_group_name: str, cluster_name: str, **kwargs: Any + ) -> ItemPaged["_models.ManagedPrivateEndpoint"]: + """Returns the list of managed private endpoints. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :return: An iterator like instance of ManagedPrivateEndpoint + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.kusto.models.ManagedPrivateEndpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ManagedPrivateEndpoint]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_managed_private_endpoints_list_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ManagedPrivateEndpoint], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @overload + def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + resource_name: _models.ManagedPrivateEndpointsCheckNameRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the managed private endpoints resource name is valid and is not already in use. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param resource_name: The name of the resource. Required. + :type resource_name: ~azure.mgmt.kusto.models.ManagedPrivateEndpointsCheckNameRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + resource_name: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the managed private endpoints resource name is valid and is not already in use. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param resource_name: The name of the resource. Required. + :type resource_name: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + resource_name: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the managed private endpoints resource name is valid and is not already in use. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param resource_name: The name of the resource. Required. + :type resource_name: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + resource_name: Union[_models.ManagedPrivateEndpointsCheckNameRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the managed private endpoints resource name is valid and is not already in use. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param resource_name: The name of the resource. Is one of the following types: + ManagedPrivateEndpointsCheckNameRequest, JSON, IO[bytes] Required. + :type resource_name: ~azure.mgmt.kusto.models.ManagedPrivateEndpointsCheckNameRequest or JSON + or IO[bytes] + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CheckNameResult] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(resource_name, (IOBase, bytes)): + _content = resource_name + else: + _content = json.dumps(resource_name, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_managed_private_endpoints_check_name_availability_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CheckNameResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class SandboxCustomImagesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.kusto.KustoManagementClient`'s + :attr:`sandbox_custom_images` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: KustoManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, cluster_name: str, sandbox_custom_image_name: str, **kwargs: Any + ) -> _models.SandboxCustomImage: + """Returns a sandbox custom image. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param sandbox_custom_image_name: The name of the sandbox custom image. Required. + :type sandbox_custom_image_name: str + :return: SandboxCustomImage. The SandboxCustomImage is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.SandboxCustomImage + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.SandboxCustomImage] = kwargs.pop("cls", None) + + _request = build_sandbox_custom_images_get_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + sandbox_custom_image_name=sandbox_custom_image_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.SandboxCustomImage, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_or_update_initial( + self, + resource_group_name: str, + cluster_name: str, + sandbox_custom_image_name: str, + parameters: Union[_models.SandboxCustomImage, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_sandbox_custom_images_create_or_update_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + sandbox_custom_image_name=sandbox_custom_image_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + sandbox_custom_image_name: str, + parameters: _models.SandboxCustomImage, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.SandboxCustomImage]: + """Creates or updates a sandbox custom image. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param sandbox_custom_image_name: The name of the sandbox custom image. Required. + :type sandbox_custom_image_name: str + :param parameters: The sandbox custom image parameters. Required. + :type parameters: ~azure.mgmt.kusto.models.SandboxCustomImage + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns SandboxCustomImage. The SandboxCustomImage is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.SandboxCustomImage] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + sandbox_custom_image_name: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.SandboxCustomImage]: + """Creates or updates a sandbox custom image. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param sandbox_custom_image_name: The name of the sandbox custom image. Required. + :type sandbox_custom_image_name: str + :param parameters: The sandbox custom image parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns SandboxCustomImage. The SandboxCustomImage is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.SandboxCustomImage] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + sandbox_custom_image_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.SandboxCustomImage]: + """Creates or updates a sandbox custom image. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param sandbox_custom_image_name: The name of the sandbox custom image. Required. + :type sandbox_custom_image_name: str + :param parameters: The sandbox custom image parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns SandboxCustomImage. The SandboxCustomImage is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.SandboxCustomImage] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + sandbox_custom_image_name: str, + parameters: Union[_models.SandboxCustomImage, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.SandboxCustomImage]: + """Creates or updates a sandbox custom image. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param sandbox_custom_image_name: The name of the sandbox custom image. Required. + :type sandbox_custom_image_name: str + :param parameters: The sandbox custom image parameters. Is one of the following types: + SandboxCustomImage, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.kusto.models.SandboxCustomImage or JSON or IO[bytes] + :return: An instance of LROPoller that returns SandboxCustomImage. The SandboxCustomImage is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.SandboxCustomImage] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.SandboxCustomImage] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + sandbox_custom_image_name=sandbox_custom_image_name, + parameters=parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.SandboxCustomImage, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.SandboxCustomImage].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.SandboxCustomImage]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _update_initial( + self, + resource_group_name: str, + cluster_name: str, + sandbox_custom_image_name: str, + parameters: Union[_models.SandboxCustomImage, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_sandbox_custom_images_update_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + sandbox_custom_image_name=sandbox_custom_image_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update( + self, + resource_group_name: str, + cluster_name: str, + sandbox_custom_image_name: str, + parameters: _models.SandboxCustomImage, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.SandboxCustomImage]: + """Updates a sandbox custom image. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param sandbox_custom_image_name: The name of the sandbox custom image. Required. + :type sandbox_custom_image_name: str + :param parameters: The sandbox custom image parameters. Required. + :type parameters: ~azure.mgmt.kusto.models.SandboxCustomImage + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns SandboxCustomImage. The SandboxCustomImage is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.SandboxCustomImage] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + cluster_name: str, + sandbox_custom_image_name: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.SandboxCustomImage]: + """Updates a sandbox custom image. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param sandbox_custom_image_name: The name of the sandbox custom image. Required. + :type sandbox_custom_image_name: str + :param parameters: The sandbox custom image parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns SandboxCustomImage. The SandboxCustomImage is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.SandboxCustomImage] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + cluster_name: str, + sandbox_custom_image_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.SandboxCustomImage]: + """Updates a sandbox custom image. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param sandbox_custom_image_name: The name of the sandbox custom image. Required. + :type sandbox_custom_image_name: str + :param parameters: The sandbox custom image parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns SandboxCustomImage. The SandboxCustomImage is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.SandboxCustomImage] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_update( + self, + resource_group_name: str, + cluster_name: str, + sandbox_custom_image_name: str, + parameters: Union[_models.SandboxCustomImage, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.SandboxCustomImage]: + """Updates a sandbox custom image. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param sandbox_custom_image_name: The name of the sandbox custom image. Required. + :type sandbox_custom_image_name: str + :param parameters: The sandbox custom image parameters. Is one of the following types: + SandboxCustomImage, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.kusto.models.SandboxCustomImage or JSON or IO[bytes] + :return: An instance of LROPoller that returns SandboxCustomImage. The SandboxCustomImage is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.SandboxCustomImage] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.SandboxCustomImage] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + sandbox_custom_image_name=sandbox_custom_image_name, + parameters=parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.SandboxCustomImage, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.SandboxCustomImage].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.SandboxCustomImage]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial( + self, resource_group_name: str, cluster_name: str, sandbox_custom_image_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_sandbox_custom_images_delete_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + sandbox_custom_image_name=sandbox_custom_image_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete( + self, resource_group_name: str, cluster_name: str, sandbox_custom_image_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Deletes a sandbox custom image. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param sandbox_custom_image_name: The name of the sandbox custom image. Required. + :type sandbox_custom_image_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + sandbox_custom_image_name=sandbox_custom_image_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_cluster( + self, resource_group_name: str, cluster_name: str, **kwargs: Any + ) -> ItemPaged["_models.SandboxCustomImage"]: + """Returns the list of the existing sandbox custom images of the given Kusto cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :return: An iterator like instance of SandboxCustomImage + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.kusto.models.SandboxCustomImage] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.SandboxCustomImage]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_sandbox_custom_images_list_by_cluster_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.SandboxCustomImage], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @overload + def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + resource_name: _models.SandboxCustomImagesCheckNameRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the sandbox custom image resource name is valid and is not already in use. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param resource_name: The name of the resource. Required. + :type resource_name: ~azure.mgmt.kusto.models.SandboxCustomImagesCheckNameRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + resource_name: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the sandbox custom image resource name is valid and is not already in use. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param resource_name: The name of the resource. Required. + :type resource_name: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + resource_name: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the sandbox custom image resource name is valid and is not already in use. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param resource_name: The name of the resource. Required. + :type resource_name: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def check_name_availability( + self, + resource_group_name: str, + cluster_name: str, + resource_name: Union[_models.SandboxCustomImagesCheckNameRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the sandbox custom image resource name is valid and is not already in use. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param resource_name: The name of the resource. Is one of the following types: + SandboxCustomImagesCheckNameRequest, JSON, IO[bytes] Required. + :type resource_name: ~azure.mgmt.kusto.models.SandboxCustomImagesCheckNameRequest or JSON or + IO[bytes] + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CheckNameResult] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(resource_name, (IOBase, bytes)): + _content = resource_name + else: + _content = json.dumps(resource_name, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_sandbox_custom_images_check_name_availability_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CheckNameResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class ClustersOperations: # pylint: disable=too-many-public-methods + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.kusto.KustoManagementClient`'s + :attr:`clusters` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: KustoManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get(self, resource_group_name: str, cluster_name: str, **kwargs: Any) -> _models.Cluster: + """Gets a Kusto cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :return: Cluster. The Cluster is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.Cluster + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.Cluster] = kwargs.pop("cls", None) + + _request = build_clusters_get_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.Cluster, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_or_update_initial( + self, + resource_group_name: str, + cluster_name: str, + parameters: Union[_models.Cluster, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_clusters_create_or_update_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + parameters: _models.Cluster, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.Cluster]: + """Create or update a Kusto cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param parameters: The Kusto cluster parameters supplied to the CreateOrUpdate operation. + Required. + :type parameters: ~azure.mgmt.kusto.models.Cluster + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns Cluster. The Cluster is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.Cluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.Cluster]: + """Create or update a Kusto cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param parameters: The Kusto cluster parameters supplied to the CreateOrUpdate operation. + Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns Cluster. The Cluster is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.Cluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.Cluster]: + """Create or update a Kusto cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param parameters: The Kusto cluster parameters supplied to the CreateOrUpdate operation. + Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns Cluster. The Cluster is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.Cluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + parameters: Union[_models.Cluster, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.Cluster]: + """Create or update a Kusto cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param parameters: The Kusto cluster parameters supplied to the CreateOrUpdate operation. Is + one of the following types: Cluster, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.kusto.models.Cluster or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns Cluster. The Cluster is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.Cluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Cluster] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + parameters=parameters, + etag=etag, + match_condition=match_condition, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.Cluster, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.Cluster].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.Cluster]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _update_initial( + self, + resource_group_name: str, + cluster_name: str, + parameters: Union[_models.ClusterUpdate, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_clusters_update_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_update( + self, + resource_group_name: str, + cluster_name: str, + parameters: _models.ClusterUpdate, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.Cluster]: + """Update a Kusto cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param parameters: The Kusto cluster parameters supplied to the Update operation. Required. + :type parameters: ~azure.mgmt.kusto.models.ClusterUpdate + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns Cluster. The Cluster is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.Cluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + cluster_name: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.Cluster]: + """Update a Kusto cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param parameters: The Kusto cluster parameters supplied to the Update operation. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns Cluster. The Cluster is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.Cluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update( + self, + resource_group_name: str, + cluster_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.Cluster]: + """Update a Kusto cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param parameters: The Kusto cluster parameters supplied to the Update operation. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns Cluster. The Cluster is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.Cluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_update( + self, + resource_group_name: str, + cluster_name: str, + parameters: Union[_models.ClusterUpdate, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.Cluster]: + """Update a Kusto cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param parameters: The Kusto cluster parameters supplied to the Update operation. Is one of the + following types: ClusterUpdate, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.kusto.models.ClusterUpdate or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns Cluster. The Cluster is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.Cluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Cluster] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + parameters=parameters, + etag=etag, + match_condition=match_condition, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.Cluster, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.Cluster].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.Cluster]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial(self, resource_group_name: str, cluster_name: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_clusters_delete_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete(self, resource_group_name: str, cluster_name: str, **kwargs: Any) -> LROPoller[None]: + """Deletes a Kusto cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> ItemPaged["_models.Cluster"]: + """Lists all Kusto clusters within a resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :return: An iterator like instance of Cluster + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.kusto.models.Cluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.Cluster]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_clusters_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.Cluster], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def list(self, **kwargs: Any) -> ItemPaged["_models.Cluster"]: + """Lists all Kusto clusters within a subscription. + + :return: An iterator like instance of Cluster + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.kusto.models.Cluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.Cluster]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_clusters_list_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.Cluster], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + def _stop_initial(self, resource_group_name: str, cluster_name: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_clusters_stop_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_stop(self, resource_group_name: str, cluster_name: str, **kwargs: Any) -> LROPoller[None]: + """Stops a Kusto cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._stop_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + def _start_initial(self, resource_group_name: str, cluster_name: str, **kwargs: Any) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_clusters_start_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_start(self, resource_group_name: str, cluster_name: str, **kwargs: Any) -> LROPoller[None]: + """Starts a Kusto cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._start_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + def _migrate_initial( + self, + resource_group_name: str, + cluster_name: str, + cluster_migrate_request: Union[_models.ClusterMigrateRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(cluster_migrate_request, (IOBase, bytes)): + _content = cluster_migrate_request + else: + _content = json.dumps(cluster_migrate_request, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_clusters_migrate_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_migrate( + self, + resource_group_name: str, + cluster_name: str, + cluster_migrate_request: _models.ClusterMigrateRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Migrate data from a Kusto cluster to another cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param cluster_migrate_request: The cluster migrate request parameters. Required. + :type cluster_migrate_request: ~azure.mgmt.kusto.models.ClusterMigrateRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_migrate( + self, + resource_group_name: str, + cluster_name: str, + cluster_migrate_request: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Migrate data from a Kusto cluster to another cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param cluster_migrate_request: The cluster migrate request parameters. Required. + :type cluster_migrate_request: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_migrate( + self, + resource_group_name: str, + cluster_name: str, + cluster_migrate_request: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Migrate data from a Kusto cluster to another cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param cluster_migrate_request: The cluster migrate request parameters. Required. + :type cluster_migrate_request: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_migrate( + self, + resource_group_name: str, + cluster_name: str, + cluster_migrate_request: Union[_models.ClusterMigrateRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[None]: + """Migrate data from a Kusto cluster to another cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param cluster_migrate_request: The cluster migrate request parameters. Is one of the following + types: ClusterMigrateRequest, JSON, IO[bytes] Required. + :type cluster_migrate_request: ~azure.mgmt.kusto.models.ClusterMigrateRequest or JSON or + IO[bytes] + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._migrate_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + cluster_migrate_request=cluster_migrate_request, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_follower_databases_get( + self, resource_group_name: str, cluster_name: str, **kwargs: Any + ) -> ItemPaged["_models.FollowerDatabaseDefinitionGet"]: + """Returns a list of databases that are owned by this cluster and were followed by another + cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :return: An iterator like instance of FollowerDatabaseDefinitionGet + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.kusto.models.FollowerDatabaseDefinitionGet] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.FollowerDatabaseDefinitionGet]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_clusters_list_follower_databases_get_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.FollowerDatabaseDefinitionGet], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def list_follower_databases( + self, resource_group_name: str, cluster_name: str, **kwargs: Any + ) -> ItemPaged["_models.FollowerDatabaseDefinition"]: + """Returns a list of databases that are owned by this cluster and were followed by another + cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :return: An iterator like instance of FollowerDatabaseDefinition + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.kusto.models.FollowerDatabaseDefinition] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.FollowerDatabaseDefinition]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_clusters_list_follower_databases_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.FollowerDatabaseDefinition], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + def _detach_follower_databases_initial( + self, + resource_group_name: str, + cluster_name: str, + follower_database_to_remove: Union[_models.FollowerDatabaseDefinition, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(follower_database_to_remove, (IOBase, bytes)): + _content = follower_database_to_remove + else: + _content = json.dumps(follower_database_to_remove, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_clusters_detach_follower_databases_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_detach_follower_databases( + self, + resource_group_name: str, + cluster_name: str, + follower_database_to_remove: _models.FollowerDatabaseDefinition, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Detaches all followers of a database owned by this cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param follower_database_to_remove: The follower databases properties to remove. Required. + :type follower_database_to_remove: ~azure.mgmt.kusto.models.FollowerDatabaseDefinition + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_detach_follower_databases( + self, + resource_group_name: str, + cluster_name: str, + follower_database_to_remove: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Detaches all followers of a database owned by this cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param follower_database_to_remove: The follower databases properties to remove. Required. + :type follower_database_to_remove: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_detach_follower_databases( + self, + resource_group_name: str, + cluster_name: str, + follower_database_to_remove: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Detaches all followers of a database owned by this cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param follower_database_to_remove: The follower databases properties to remove. Required. + :type follower_database_to_remove: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_detach_follower_databases( + self, + resource_group_name: str, + cluster_name: str, + follower_database_to_remove: Union[_models.FollowerDatabaseDefinition, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[None]: + """Detaches all followers of a database owned by this cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param follower_database_to_remove: The follower databases properties to remove. Is one of the + following types: FollowerDatabaseDefinition, JSON, IO[bytes] Required. + :type follower_database_to_remove: ~azure.mgmt.kusto.models.FollowerDatabaseDefinition or JSON + or IO[bytes] + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._detach_follower_databases_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + follower_database_to_remove=follower_database_to_remove, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + def _diagnose_virtual_network_initial( + self, resource_group_name: str, cluster_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_clusters_diagnose_virtual_network_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_diagnose_virtual_network( + self, resource_group_name: str, cluster_name: str, **kwargs: Any + ) -> LROPoller[_models.DiagnoseVirtualNetworkResult]: + """Diagnoses network connectivity status for external resources on which the service is dependent + on. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :return: An instance of LROPoller that returns DiagnoseVirtualNetworkResult. The + DiagnoseVirtualNetworkResult is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.DiagnoseVirtualNetworkResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.DiagnoseVirtualNetworkResult] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._diagnose_virtual_network_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = _deserialize(_models.DiagnoseVirtualNetworkResult, response.json()) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.DiagnoseVirtualNetworkResult].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.DiagnoseVirtualNetworkResult]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @distributed_trace + def list_skus_by_resource( + self, resource_group_name: str, cluster_name: str, **kwargs: Any + ) -> ItemPaged["_models.AzureResourceSku"]: + """Returns the SKUs available for the provided resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :return: An iterator like instance of AzureResourceSku + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.kusto.models.AzureResourceSku] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.AzureResourceSku]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_clusters_list_skus_by_resource_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.AzureResourceSku], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def list_outbound_network_dependencies_endpoints( # pylint: disable=name-too-long + self, resource_group_name: str, cluster_name: str, **kwargs: Any + ) -> ItemPaged["_models.OutboundNetworkDependenciesEndpoint"]: + """Gets the network endpoints of all outbound dependencies of a Kusto cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :return: An iterator like instance of OutboundNetworkDependenciesEndpoint + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.kusto.models.OutboundNetworkDependenciesEndpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.OutboundNetworkDependenciesEndpoint]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_clusters_list_outbound_network_dependencies_endpoints_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.OutboundNetworkDependenciesEndpoint], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + def _add_callout_policies_initial( + self, + resource_group_name: str, + cluster_name: str, + callout_policies: Union[_models.CalloutPoliciesList, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(callout_policies, (IOBase, bytes)): + _content = callout_policies + else: + _content = json.dumps(callout_policies, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_clusters_add_callout_policies_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_add_callout_policies( + self, + resource_group_name: str, + cluster_name: str, + callout_policies: _models.CalloutPoliciesList, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Adds a list of callout policies for engine services. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param callout_policies: The callout policies to add. Required. + :type callout_policies: ~azure.mgmt.kusto.models.CalloutPoliciesList + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_add_callout_policies( + self, + resource_group_name: str, + cluster_name: str, + callout_policies: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Adds a list of callout policies for engine services. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param callout_policies: The callout policies to add. Required. + :type callout_policies: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_add_callout_policies( + self, + resource_group_name: str, + cluster_name: str, + callout_policies: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Adds a list of callout policies for engine services. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param callout_policies: The callout policies to add. Required. + :type callout_policies: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_add_callout_policies( + self, + resource_group_name: str, + cluster_name: str, + callout_policies: Union[_models.CalloutPoliciesList, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[None]: + """Adds a list of callout policies for engine services. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param callout_policies: The callout policies to add. Is one of the following types: + CalloutPoliciesList, JSON, IO[bytes] Required. + :type callout_policies: ~azure.mgmt.kusto.models.CalloutPoliciesList or JSON or IO[bytes] + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._add_callout_policies_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + callout_policies=callout_policies, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + def _remove_callout_policy_initial( + self, + resource_group_name: str, + cluster_name: str, + callout_policy: Union[_models.CalloutPolicyToRemove, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(callout_policy, (IOBase, bytes)): + _content = callout_policy + else: + _content = json.dumps(callout_policy, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_clusters_remove_callout_policy_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_remove_callout_policy( + self, + resource_group_name: str, + cluster_name: str, + callout_policy: _models.CalloutPolicyToRemove, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Removes callout policy for engine services. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param callout_policy: The callout policies to remove. Required. + :type callout_policy: ~azure.mgmt.kusto.models.CalloutPolicyToRemove + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_remove_callout_policy( + self, + resource_group_name: str, + cluster_name: str, + callout_policy: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Removes callout policy for engine services. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param callout_policy: The callout policies to remove. Required. + :type callout_policy: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_remove_callout_policy( + self, + resource_group_name: str, + cluster_name: str, + callout_policy: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Removes callout policy for engine services. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param callout_policy: The callout policies to remove. Required. + :type callout_policy: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_remove_callout_policy( + self, + resource_group_name: str, + cluster_name: str, + callout_policy: Union[_models.CalloutPolicyToRemove, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[None]: + """Removes callout policy for engine services. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param callout_policy: The callout policies to remove. Is one of the following types: + CalloutPolicyToRemove, JSON, IO[bytes] Required. + :type callout_policy: ~azure.mgmt.kusto.models.CalloutPolicyToRemove or JSON or IO[bytes] + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._remove_callout_policy_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + callout_policy=callout_policy, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_callout_policies( + self, resource_group_name: str, cluster_name: str, **kwargs: Any + ) -> ItemPaged["_models.CalloutPolicy"]: + """Returns the allowed callout policies for the specified service. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :return: An iterator like instance of CalloutPolicy + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.kusto.models.CalloutPolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.CalloutPolicy]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_clusters_list_callout_policies_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.CalloutPolicy], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def list_language_extensions( + self, resource_group_name: str, cluster_name: str, **kwargs: Any + ) -> ItemPaged["_models.LanguageExtension"]: + """Returns a list of language extensions that can run within KQL queries. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :return: An iterator like instance of LanguageExtension + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.kusto.models.LanguageExtension] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.LanguageExtension]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_clusters_list_language_extensions_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.LanguageExtension], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + def _add_language_extensions_initial( + self, + resource_group_name: str, + cluster_name: str, + language_extensions_to_add: Union[_models.LanguageExtensionsList, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(language_extensions_to_add, (IOBase, bytes)): + _content = language_extensions_to_add + else: + _content = json.dumps(language_extensions_to_add, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_clusters_add_language_extensions_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_add_language_extensions( + self, + resource_group_name: str, + cluster_name: str, + language_extensions_to_add: _models.LanguageExtensionsList, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Add a list of language extensions that can run within KQL queries. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param language_extensions_to_add: The language extensions to add. Required. + :type language_extensions_to_add: ~azure.mgmt.kusto.models.LanguageExtensionsList + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_add_language_extensions( + self, + resource_group_name: str, + cluster_name: str, + language_extensions_to_add: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Add a list of language extensions that can run within KQL queries. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param language_extensions_to_add: The language extensions to add. Required. + :type language_extensions_to_add: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_add_language_extensions( + self, + resource_group_name: str, + cluster_name: str, + language_extensions_to_add: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Add a list of language extensions that can run within KQL queries. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param language_extensions_to_add: The language extensions to add. Required. + :type language_extensions_to_add: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_add_language_extensions( + self, + resource_group_name: str, + cluster_name: str, + language_extensions_to_add: Union[_models.LanguageExtensionsList, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[None]: + """Add a list of language extensions that can run within KQL queries. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param language_extensions_to_add: The language extensions to add. Is one of the following + types: LanguageExtensionsList, JSON, IO[bytes] Required. + :type language_extensions_to_add: ~azure.mgmt.kusto.models.LanguageExtensionsList or JSON or + IO[bytes] + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._add_language_extensions_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + language_extensions_to_add=language_extensions_to_add, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + def _remove_language_extensions_initial( + self, + resource_group_name: str, + cluster_name: str, + language_extensions_to_remove: Union[_models.LanguageExtensionsList, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(language_extensions_to_remove, (IOBase, bytes)): + _content = language_extensions_to_remove + else: + _content = json.dumps(language_extensions_to_remove, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_clusters_remove_language_extensions_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_remove_language_extensions( + self, + resource_group_name: str, + cluster_name: str, + language_extensions_to_remove: _models.LanguageExtensionsList, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Remove a list of language extensions that can run within KQL queries. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param language_extensions_to_remove: The language extensions to remove. Required. + :type language_extensions_to_remove: ~azure.mgmt.kusto.models.LanguageExtensionsList + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_remove_language_extensions( + self, + resource_group_name: str, + cluster_name: str, + language_extensions_to_remove: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Remove a list of language extensions that can run within KQL queries. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param language_extensions_to_remove: The language extensions to remove. Required. + :type language_extensions_to_remove: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_remove_language_extensions( + self, + resource_group_name: str, + cluster_name: str, + language_extensions_to_remove: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Remove a list of language extensions that can run within KQL queries. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param language_extensions_to_remove: The language extensions to remove. Required. + :type language_extensions_to_remove: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_remove_language_extensions( + self, + resource_group_name: str, + cluster_name: str, + language_extensions_to_remove: Union[_models.LanguageExtensionsList, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[None]: + """Remove a list of language extensions that can run within KQL queries. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param language_extensions_to_remove: The language extensions to remove. Is one of the + following types: LanguageExtensionsList, JSON, IO[bytes] Required. + :type language_extensions_to_remove: ~azure.mgmt.kusto.models.LanguageExtensionsList or JSON or + IO[bytes] + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._remove_language_extensions_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + language_extensions_to_remove=language_extensions_to_remove, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_skus(self, **kwargs: Any) -> ItemPaged["_models.SkuDescription"]: + """Lists eligible SKUs for Kusto resource provider. + + :return: An iterator like instance of SkuDescription + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.kusto.models.SkuDescription] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.SkuDescription]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_clusters_list_skus_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.SkuDescription], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @overload + def check_name_availability( + self, + location: str, + cluster_name: _models.ClusterCheckNameRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the cluster name is valid and is not already in use. + + :param location: The location name. Required. + :type location: str + :param cluster_name: The request body. Required. + :type cluster_name: ~azure.mgmt.kusto.models.ClusterCheckNameRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def check_name_availability( + self, location: str, cluster_name: JSON, *, content_type: str = "application/json", **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the cluster name is valid and is not already in use. + + :param location: The location name. Required. + :type location: str + :param cluster_name: The request body. Required. + :type cluster_name: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def check_name_availability( + self, location: str, cluster_name: IO[bytes], *, content_type: str = "application/json", **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the cluster name is valid and is not already in use. + + :param location: The location name. Required. + :type location: str + :param cluster_name: The request body. Required. + :type cluster_name: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def check_name_availability( + self, location: str, cluster_name: Union[_models.ClusterCheckNameRequest, JSON, IO[bytes]], **kwargs: Any + ) -> _models.CheckNameResult: + """Checks that the cluster name is valid and is not already in use. + + :param location: The location name. Required. + :type location: str + :param cluster_name: The request body. Is one of the following types: ClusterCheckNameRequest, + JSON, IO[bytes] Required. + :type cluster_name: ~azure.mgmt.kusto.models.ClusterCheckNameRequest or JSON or IO[bytes] + :return: CheckNameResult. The CheckNameResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.CheckNameResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CheckNameResult] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(cluster_name, (IOBase, bytes)): + _content = cluster_name + else: + _content = json.dumps(cluster_name, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_clusters_check_name_availability_request( + location=location, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CheckNameResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class PrivateEndpointConnectionsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.kusto.KustoManagementClient`'s + :attr:`private_endpoint_connections` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: KustoManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, cluster_name: str, private_endpoint_connection_name: str, **kwargs: Any + ) -> _models.PrivateEndpointConnection: + """Gets a private endpoint connection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :return: PrivateEndpointConnection. The PrivateEndpointConnection is compatible with + MutableMapping + :rtype: ~azure.mgmt.kusto.models.PrivateEndpointConnection + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) + + _request = build_private_endpoint_connections_get_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + private_endpoint_connection_name=private_endpoint_connection_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PrivateEndpointConnection, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_or_update_initial( + self, + resource_group_name: str, + cluster_name: str, + private_endpoint_connection_name: str, + parameters: Union[_models.PrivateEndpointConnection, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_private_endpoint_connections_create_or_update_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + private_endpoint_connection_name=private_endpoint_connection_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 201: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + private_endpoint_connection_name: str, + parameters: _models.PrivateEndpointConnection, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.PrivateEndpointConnection]: + """Approve or reject a private endpoint connection with a given name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :param parameters: Required. + :type parameters: ~azure.mgmt.kusto.models.PrivateEndpointConnection + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns PrivateEndpointConnection. The + PrivateEndpointConnection is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.PrivateEndpointConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + private_endpoint_connection_name: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.PrivateEndpointConnection]: + """Approve or reject a private endpoint connection with a given name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :param parameters: Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns PrivateEndpointConnection. The + PrivateEndpointConnection is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.PrivateEndpointConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + private_endpoint_connection_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.PrivateEndpointConnection]: + """Approve or reject a private endpoint connection with a given name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :param parameters: Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns PrivateEndpointConnection. The + PrivateEndpointConnection is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.PrivateEndpointConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + private_endpoint_connection_name: str, + parameters: Union[_models.PrivateEndpointConnection, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.PrivateEndpointConnection]: + """Approve or reject a private endpoint connection with a given name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :param parameters: Is one of the following types: PrivateEndpointConnection, JSON, IO[bytes] + Required. + :type parameters: ~azure.mgmt.kusto.models.PrivateEndpointConnection or JSON or IO[bytes] + :return: An instance of LROPoller that returns PrivateEndpointConnection. The + PrivateEndpointConnection is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.PrivateEndpointConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + private_endpoint_connection_name=private_endpoint_connection_name, + parameters=parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.PrivateEndpointConnection, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.PrivateEndpointConnection].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.PrivateEndpointConnection]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial( + self, resource_group_name: str, cluster_name: str, private_endpoint_connection_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_private_endpoint_connections_delete_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + private_endpoint_connection_name=private_endpoint_connection_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_delete( + self, resource_group_name: str, cluster_name: str, private_endpoint_connection_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Deletes a private endpoint connection with a given name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + private_endpoint_connection_name=private_endpoint_connection_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list( + self, resource_group_name: str, cluster_name: str, **kwargs: Any + ) -> ItemPaged["_models.PrivateEndpointConnection"]: + """Returns the list of private endpoint connections. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :return: An iterator like instance of PrivateEndpointConnection + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.kusto.models.PrivateEndpointConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.PrivateEndpointConnection]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_private_endpoint_connections_list_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.PrivateEndpointConnection], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class PrivateLinkResourcesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.kusto.KustoManagementClient`'s + :attr:`private_link_resources` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: KustoManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, cluster_name: str, private_link_resource_name: str, **kwargs: Any + ) -> _models.PrivateLinkResource: + """Gets a private link resource. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param private_link_resource_name: The name of the private link resource. Required. + :type private_link_resource_name: str + :return: PrivateLinkResource. The PrivateLinkResource is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.PrivateLinkResource + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.PrivateLinkResource] = kwargs.pop("cls", None) + + _request = build_private_link_resources_get_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + private_link_resource_name=private_link_resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PrivateLinkResource, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def list( + self, resource_group_name: str, cluster_name: str, **kwargs: Any + ) -> ItemPaged["_models.PrivateLinkResource"]: + """Returns the list of private link resources. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :return: An iterator like instance of PrivateLinkResource + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.kusto.models.PrivateLinkResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.PrivateLinkResource]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + _request = build_private_link_resources_list_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.PrivateLinkResource], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + +class DatabaseOperations: """ + .. warning:: + **DO NOT** instantiate this class directly. - models = _models + Instead, you should access the following operations through + :class:`~azure.mgmt.kusto.KustoManagementClient`'s + :attr:`database` attribute. + """ - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: KustoManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @overload + def invite_follower( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + parameters: _models.DatabaseInviteFollowerRequest, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DatabaseInviteFollowerResult: + """Generates an invitation token that allows attaching a follower database to this database. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param parameters: The follower invitation request parameters. Required. + :type parameters: ~azure.mgmt.kusto.models.DatabaseInviteFollowerRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: DatabaseInviteFollowerResult. The DatabaseInviteFollowerResult is compatible with + MutableMapping + :rtype: ~azure.mgmt.kusto.models.DatabaseInviteFollowerResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def invite_follower( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DatabaseInviteFollowerResult: + """Generates an invitation token that allows attaching a follower database to this database. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param parameters: The follower invitation request parameters. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: DatabaseInviteFollowerResult. The DatabaseInviteFollowerResult is compatible with + MutableMapping + :rtype: ~azure.mgmt.kusto.models.DatabaseInviteFollowerResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def invite_follower( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DatabaseInviteFollowerResult: + """Generates an invitation token that allows attaching a follower database to this database. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param parameters: The follower invitation request parameters. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: DatabaseInviteFollowerResult. The DatabaseInviteFollowerResult is compatible with + MutableMapping + :rtype: ~azure.mgmt.kusto.models.DatabaseInviteFollowerResult + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace - def list(self, **kwargs: Any) -> Iterable["_models.Operation"]: - """Lists available operations for the Microsoft.Kusto provider. + def invite_follower( + self, + resource_group_name: str, + cluster_name: str, + database_name: str, + parameters: Union[_models.DatabaseInviteFollowerRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> _models.DatabaseInviteFollowerResult: + """Generates an invitation token that allows attaching a follower database to this database. - :return: An iterator like instance of either Operation or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.kusto.models.Operation] + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param cluster_name: The name of the Kusto cluster. Required. + :type cluster_name: str + :param database_name: The name of the database in the Kusto cluster. Required. + :type database_name: str + :param parameters: The follower invitation request parameters. Is one of the following types: + DatabaseInviteFollowerRequest, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.kusto.models.DatabaseInviteFollowerRequest or JSON or IO[bytes] + :return: DatabaseInviteFollowerResult. The DatabaseInviteFollowerResult is compatible with + MutableMapping + :rtype: ~azure.mgmt.kusto.models.DatabaseInviteFollowerResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.DatabaseInviteFollowerResult] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_database_invite_follower_request( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + database_name=database_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.DatabaseInviteFollowerResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class SkusOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.kusto.KustoManagementClient`'s + :attr:`skus` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: KustoManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list(self, location: str, **kwargs: Any) -> ItemPaged["_models.SkuDescription"]: + """Lists eligible region SKUs for Kusto resource provider by Azure region. + + :param location: The location name. Required. + :type location: str + :return: An iterator like instance of SkuDescription + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.kusto.models.SkuDescription] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + _params = kwargs.pop("params", {}) or {} - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) + cls: ClsType[List[_models.SkuDescription]] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -101,12 +15481,19 @@ def list(self, **kwargs: Any) -> Iterable["_models.Operation"]: def prepare_request(next_link=None): if not next_link: - _request = build_list_request( - api_version=api_version, + _request = build_skus_list_request( + location=location, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, headers=_headers, params=_params, ) - _request.url = self._client.format_url(_request.url) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) else: # make call to next link with the client's api-version @@ -119,18 +15506,29 @@ def prepare_request(next_link=None): ) _next_request_params["api-version"] = self._config.api_version _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + "GET", + urllib.parse.urljoin(next_link, _parsed_next_link.path), + headers=_headers, + params=_next_request_params, ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + return _request def extract_data(pipeline_response): - deserialized = self._deserialize("OperationListResult", pipeline_response) - list_of_elem = deserialized.value + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.SkuDescription], + deserialized.get("value", []), + ) if cls: list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) + return deserialized.get("nextLink") or None, iter(list_of_elem) def get_next(next_link=None): _request = prepare_request(next_link) @@ -143,9 +15541,185 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged(get_next, extract_data) + + +class OperationsResultsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.kusto.KustoManagementClient`'s + :attr:`operations_results` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: KustoManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get(self, location: str, operation_id: str, **kwargs: Any) -> _models.OperationResult: + """Returns operation results. + + :param location: The name of the Azure region. Required. + :type location: str + :param operation_id: The ID of an ongoing async operation. Required. + :type operation_id: str + :return: OperationResult. The OperationResult is compatible with MutableMapping + :rtype: ~azure.mgmt.kusto.models.OperationResult + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.OperationResult] = kwargs.pop("cls", None) + + _request = build_operations_results_get_request( + location=location, + operation_id=operation_id, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.OperationResult, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class OperationsResultsLocationOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.kusto.KustoManagementClient`'s + :attr:`operations_results_location` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: KustoManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( # pylint: disable=inconsistent-return-statements + self, location: str, operation_id: str, **kwargs: Any + ) -> None: + """Returns operation results. + + :param location: The name of the Azure region. Required. + :type location: str + :param operation_id: The ID of an ongoing async operation. Required. + :type operation_id: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + operation_result_response_type: Literal["Location"] = kwargs.pop( + "operation_result_response_type", _params.pop("operationResultResponseType", "Location") + ) + cls: ClsType[None] = kwargs.pop("cls", None) + + _request = build_operations_results_location_get_request( + location=location, + operation_id=operation_id, + subscription_id=self._config.subscription_id, + operation_result_response_type=operation_result_response_type, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + + if cls: + return cls(pipeline_response, None, response_headers) # type: ignore diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_operations_results_location_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_operations_results_location_operations.py deleted file mode 100644 index 5e2493cdd23d..000000000000 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_operations_results_location_operations.py +++ /dev/null @@ -1,137 +0,0 @@ -# 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 sys -from typing import Any, Callable, Dict, Optional, TypeVar - -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._serialization import Serializer - -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_get_request(location: str, operation_id: str, subscription_id: str, **kwargs: Any) -> HttpRequest: - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/providers/Microsoft.Kusto/locations/{location}/operationResults/{operationId}", - ) # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - "location": _SERIALIZER.url("location", location, "str", min_length=1), - "operationId": _SERIALIZER.url("operation_id", operation_id, "str", min_length=1), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - return HttpRequest(method="GET", url=_url, params=_params, **kwargs) - - -class OperationsResultsLocationOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.kusto.KustoManagementClient`'s - :attr:`operations_results_location` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs): - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def get( # pylint: disable=inconsistent-return-statements - self, location: str, operation_id: str, **kwargs: Any - ) -> None: - """Returns operation results. - - :param location: The name of Azure region. Required. - :type location: str - :param operation_id: The ID of an ongoing async operation. Required. - :type operation_id: str - :return: None or the result of cls(response) - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_get_request( - location=location, - operation_id=operation_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - if cls: - return cls(pipeline_response, None, response_headers) # type: ignore diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_operations_results_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_operations_results_operations.py deleted file mode 100644 index e1643f73666c..000000000000 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_operations_results_operations.py +++ /dev/null @@ -1,140 +0,0 @@ -# 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 sys -from typing import Any, Callable, Dict, Optional, TypeVar - -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._serialization import Serializer - -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_get_request(location: str, operation_id: str, subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/providers/Microsoft.Kusto/locations/{location}/operationResults/{operationId}", - ) # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - "location": _SERIALIZER.url("location", location, "str", min_length=1), - "operationId": _SERIALIZER.url("operation_id", operation_id, "str", min_length=1), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class OperationsResultsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.kusto.KustoManagementClient`'s - :attr:`operations_results` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs): - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def get(self, location: str, operation_id: str, **kwargs: Any) -> _models.OperationResult: - """Returns operation results. - - :param location: The name of Azure region. Required. - :type location: str - :param operation_id: The ID of an ongoing async operation. Required. - :type operation_id: str - :return: OperationResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.OperationResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.OperationResult] = kwargs.pop("cls", None) - - _request = build_get_request( - location=location, - operation_id=operation_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("OperationResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_patch.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_patch.py index f7dd32510333..ea765788358a 100644 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_patch.py +++ b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_patch.py @@ -1,14 +1,14 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ +# 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. +# -------------------------------------------------------------------------- """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ -from typing import List -__all__: List[str] = [] # Add all objects you want publicly available to users at this package level +__all__: list[str] = [] # Add all objects you want publicly available to users at this package level def patch_sdk(): diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_private_endpoint_connections_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_private_endpoint_connections_operations.py deleted file mode 100644 index e6e40beeb3ac..000000000000 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_private_endpoint_connections_operations.py +++ /dev/null @@ -1,684 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._serialization import Serializer - -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_request(resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/privateEndpointConnections", - ) # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, - cluster_name: str, - private_endpoint_connection_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/privateEndpointConnections/{privateEndpointConnectionName}", - ) # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - "privateEndpointConnectionName": _SERIALIZER.url( - "private_endpoint_connection_name", private_endpoint_connection_name, "str", pattern=r"^.*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - cluster_name: str, - private_endpoint_connection_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/privateEndpointConnections/{privateEndpointConnectionName}", - ) # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - "privateEndpointConnectionName": _SERIALIZER.url( - "private_endpoint_connection_name", private_endpoint_connection_name, "str", pattern=r"^.*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - cluster_name: str, - private_endpoint_connection_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/privateEndpointConnections/{privateEndpointConnectionName}", - ) # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - "privateEndpointConnectionName": _SERIALIZER.url( - "private_endpoint_connection_name", private_endpoint_connection_name, "str", pattern=r"^.*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class PrivateEndpointConnectionsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.kusto.KustoManagementClient`'s - :attr:`private_endpoint_connections` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs): - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list( - self, resource_group_name: str, cluster_name: str, **kwargs: Any - ) -> Iterable["_models.PrivateEndpointConnection"]: - """Returns the list of private endpoint connections. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :return: An iterator like instance of either PrivateEndpointConnection or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.kusto.models.PrivateEndpointConnection] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("PrivateEndpointConnectionListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get( - self, resource_group_name: str, cluster_name: str, private_endpoint_connection_name: str, **kwargs: Any - ) -> _models.PrivateEndpointConnection: - """Gets a private endpoint connection. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param private_endpoint_connection_name: The name of the private endpoint connection. Required. - :type private_endpoint_connection_name: str - :return: PrivateEndpointConnection or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.PrivateEndpointConnection - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - private_endpoint_connection_name=private_endpoint_connection_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("PrivateEndpointConnection", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _create_or_update_initial( - self, - resource_group_name: str, - cluster_name: str, - private_endpoint_connection_name: str, - parameters: Union[_models.PrivateEndpointConnection, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "PrivateEndpointConnection") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - private_endpoint_connection_name=private_endpoint_connection_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - cluster_name: str, - private_endpoint_connection_name: str, - parameters: _models.PrivateEndpointConnection, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.PrivateEndpointConnection]: - """Approve or reject a private endpoint connection with a given name. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param private_endpoint_connection_name: The name of the private endpoint connection. Required. - :type private_endpoint_connection_name: str - :param parameters: Required. - :type parameters: ~azure.mgmt.kusto.models.PrivateEndpointConnection - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either PrivateEndpointConnection or the result - of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.PrivateEndpointConnection] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - cluster_name: str, - private_endpoint_connection_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.PrivateEndpointConnection]: - """Approve or reject a private endpoint connection with a given name. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param private_endpoint_connection_name: The name of the private endpoint connection. Required. - :type private_endpoint_connection_name: str - :param parameters: Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either PrivateEndpointConnection or the result - of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.PrivateEndpointConnection] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create_or_update( - self, - resource_group_name: str, - cluster_name: str, - private_endpoint_connection_name: str, - parameters: Union[_models.PrivateEndpointConnection, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.PrivateEndpointConnection]: - """Approve or reject a private endpoint connection with a given name. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param private_endpoint_connection_name: The name of the private endpoint connection. Required. - :type private_endpoint_connection_name: str - :param parameters: Is either a PrivateEndpointConnection type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.kusto.models.PrivateEndpointConnection or IO[bytes] - :return: An instance of LROPoller that returns either PrivateEndpointConnection or the result - of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.PrivateEndpointConnection] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - private_endpoint_connection_name=private_endpoint_connection_name, - parameters=parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("PrivateEndpointConnection", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.PrivateEndpointConnection].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.PrivateEndpointConnection]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial( - self, resource_group_name: str, cluster_name: str, private_endpoint_connection_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - private_endpoint_connection_name=private_endpoint_connection_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete( - self, resource_group_name: str, cluster_name: str, private_endpoint_connection_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Deletes a private endpoint connection with a given name. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param private_endpoint_connection_name: The name of the private endpoint connection. Required. - :type private_endpoint_connection_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - private_endpoint_connection_name=private_endpoint_connection_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_private_link_resources_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_private_link_resources_operations.py deleted file mode 100644 index d9765483e723..000000000000 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_private_link_resources_operations.py +++ /dev/null @@ -1,270 +0,0 @@ -# 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 sys -from typing import Any, Callable, Dict, Iterable, Optional, TypeVar -import urllib.parse - -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._serialization import Serializer - -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_request(resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/privateLinkResources", - ) # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, cluster_name: str, private_link_resource_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/privateLinkResources/{privateLinkResourceName}", - ) # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - "privateLinkResourceName": _SERIALIZER.url( - "private_link_resource_name", private_link_resource_name, "str", pattern=r"^.*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class PrivateLinkResourcesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.kusto.KustoManagementClient`'s - :attr:`private_link_resources` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs): - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list( - self, resource_group_name: str, cluster_name: str, **kwargs: Any - ) -> Iterable["_models.PrivateLinkResource"]: - """Returns the list of private link resources. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :return: An iterator like instance of either PrivateLinkResource or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.kusto.models.PrivateLinkResource] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PrivateLinkResourceListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("PrivateLinkResourceListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get( - self, resource_group_name: str, cluster_name: str, private_link_resource_name: str, **kwargs: Any - ) -> _models.PrivateLinkResource: - """Gets a private link resource. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param private_link_resource_name: The name of the private link resource. Required. - :type private_link_resource_name: str - :return: PrivateLinkResource or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.PrivateLinkResource - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.PrivateLinkResource] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - private_link_resource_name=private_link_resource_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("PrivateLinkResource", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_sandbox_custom_images_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_sandbox_custom_images_operations.py deleted file mode 100644 index a430f757c64d..000000000000 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_sandbox_custom_images_operations.py +++ /dev/null @@ -1,1093 +0,0 @@ -# pylint: disable=too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._serialization import Serializer - -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_cluster_request( - resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/sandboxCustomImages", - ) # pylint: disable=line-too-long - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, cluster_name: str, sandbox_custom_image_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/sandboxCustomImages/{sandboxCustomImageName}", - ) # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - "sandboxCustomImageName": _SERIALIZER.url( - "sandbox_custom_image_name", sandbox_custom_image_name, "str", pattern=r"^.*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, cluster_name: str, sandbox_custom_image_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/sandboxCustomImages/{sandboxCustomImageName}", - ) # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - "sandboxCustomImageName": _SERIALIZER.url( - "sandbox_custom_image_name", sandbox_custom_image_name, "str", pattern=r"^.*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, cluster_name: str, sandbox_custom_image_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/sandboxCustomImages/{sandboxCustomImageName}", - ) # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - "sandboxCustomImageName": _SERIALIZER.url( - "sandbox_custom_image_name", sandbox_custom_image_name, "str", pattern=r"^.*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, cluster_name: str, sandbox_custom_image_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/sandboxCustomImages/{sandboxCustomImageName}", - ) # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - "sandboxCustomImageName": _SERIALIZER.url( - "sandbox_custom_image_name", sandbox_custom_image_name, "str", pattern=r"^.*$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_check_name_availability_request( - resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/sandboxCustomImagesCheckNameAvailability", - ) # pylint: disable=line-too-long - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -class SandboxCustomImagesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.kusto.KustoManagementClient`'s - :attr:`sandbox_custom_images` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs): - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_cluster( - self, resource_group_name: str, cluster_name: str, **kwargs: Any - ) -> Iterable["_models.SandboxCustomImage"]: - """Returns the list of the existing sandbox custom images of the given Kusto cluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :return: An iterator like instance of either SandboxCustomImage or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.kusto.models.SandboxCustomImage] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.SandboxCustomImagesListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_cluster_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("SandboxCustomImagesListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get( - self, resource_group_name: str, cluster_name: str, sandbox_custom_image_name: str, **kwargs: Any - ) -> _models.SandboxCustomImage: - """Returns a sandbox custom image. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param sandbox_custom_image_name: The name of the sandbox custom image. Required. - :type sandbox_custom_image_name: str - :return: SandboxCustomImage or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.SandboxCustomImage - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.SandboxCustomImage] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - sandbox_custom_image_name=sandbox_custom_image_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("SandboxCustomImage", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _create_or_update_initial( - self, - resource_group_name: str, - cluster_name: str, - sandbox_custom_image_name: str, - parameters: Union[_models.SandboxCustomImage, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "SandboxCustomImage") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - sandbox_custom_image_name=sandbox_custom_image_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - cluster_name: str, - sandbox_custom_image_name: str, - parameters: _models.SandboxCustomImage, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.SandboxCustomImage]: - """Creates or updates a sandbox custom image. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param sandbox_custom_image_name: The name of the sandbox custom image. Required. - :type sandbox_custom_image_name: str - :param parameters: The sandbox custom image parameters. Required. - :type parameters: ~azure.mgmt.kusto.models.SandboxCustomImage - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either SandboxCustomImage or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.SandboxCustomImage] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - cluster_name: str, - sandbox_custom_image_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.SandboxCustomImage]: - """Creates or updates a sandbox custom image. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param sandbox_custom_image_name: The name of the sandbox custom image. Required. - :type sandbox_custom_image_name: str - :param parameters: The sandbox custom image parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either SandboxCustomImage or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.SandboxCustomImage] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create_or_update( - self, - resource_group_name: str, - cluster_name: str, - sandbox_custom_image_name: str, - parameters: Union[_models.SandboxCustomImage, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.SandboxCustomImage]: - """Creates or updates a sandbox custom image. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param sandbox_custom_image_name: The name of the sandbox custom image. Required. - :type sandbox_custom_image_name: str - :param parameters: The sandbox custom image parameters. Is either a SandboxCustomImage type or - a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.kusto.models.SandboxCustomImage or IO[bytes] - :return: An instance of LROPoller that returns either SandboxCustomImage or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.SandboxCustomImage] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.SandboxCustomImage] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - sandbox_custom_image_name=sandbox_custom_image_name, - parameters=parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("SandboxCustomImage", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.SandboxCustomImage].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.SandboxCustomImage]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _update_initial( - self, - resource_group_name: str, - cluster_name: str, - sandbox_custom_image_name: str, - parameters: Union[_models.SandboxCustomImage, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "SandboxCustomImage") - - _request = build_update_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - sandbox_custom_image_name=sandbox_custom_image_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update( - self, - resource_group_name: str, - cluster_name: str, - sandbox_custom_image_name: str, - parameters: _models.SandboxCustomImage, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.SandboxCustomImage]: - """Updates a sandbox custom image. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param sandbox_custom_image_name: The name of the sandbox custom image. Required. - :type sandbox_custom_image_name: str - :param parameters: The sandbox custom image parameters. Required. - :type parameters: ~azure.mgmt.kusto.models.SandboxCustomImage - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either SandboxCustomImage or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.SandboxCustomImage] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update( - self, - resource_group_name: str, - cluster_name: str, - sandbox_custom_image_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.SandboxCustomImage]: - """Updates a sandbox custom image. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param sandbox_custom_image_name: The name of the sandbox custom image. Required. - :type sandbox_custom_image_name: str - :param parameters: The sandbox custom image parameters. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either SandboxCustomImage or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.SandboxCustomImage] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update( - self, - resource_group_name: str, - cluster_name: str, - sandbox_custom_image_name: str, - parameters: Union[_models.SandboxCustomImage, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.SandboxCustomImage]: - """Updates a sandbox custom image. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param sandbox_custom_image_name: The name of the sandbox custom image. Required. - :type sandbox_custom_image_name: str - :param parameters: The sandbox custom image parameters. Is either a SandboxCustomImage type or - a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.kusto.models.SandboxCustomImage or IO[bytes] - :return: An instance of LROPoller that returns either SandboxCustomImage or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.SandboxCustomImage] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.SandboxCustomImage] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - sandbox_custom_image_name=sandbox_custom_image_name, - parameters=parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("SandboxCustomImage", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.SandboxCustomImage].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.SandboxCustomImage]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial( - self, resource_group_name: str, cluster_name: str, sandbox_custom_image_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - sandbox_custom_image_name=sandbox_custom_image_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete( - self, resource_group_name: str, cluster_name: str, sandbox_custom_image_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Deletes a sandbox custom image. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param sandbox_custom_image_name: The name of the sandbox custom image. Required. - :type sandbox_custom_image_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - sandbox_custom_image_name=sandbox_custom_image_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @overload - def check_name_availability( - self, - resource_group_name: str, - cluster_name: str, - resource_name: _models.SandboxCustomImagesCheckNameRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CheckNameResult: - """Checks that the sandbox custom image resource name is valid and is not already in use. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param resource_name: The name of the resource. Required. - :type resource_name: ~azure.mgmt.kusto.models.SandboxCustomImagesCheckNameRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: CheckNameResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.CheckNameResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def check_name_availability( - self, - resource_group_name: str, - cluster_name: str, - resource_name: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CheckNameResult: - """Checks that the sandbox custom image resource name is valid and is not already in use. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param resource_name: The name of the resource. Required. - :type resource_name: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: CheckNameResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.CheckNameResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def check_name_availability( - self, - resource_group_name: str, - cluster_name: str, - resource_name: Union[_models.SandboxCustomImagesCheckNameRequest, IO[bytes]], - **kwargs: Any - ) -> _models.CheckNameResult: - """Checks that the sandbox custom image resource name is valid and is not already in use. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param resource_name: The name of the resource. Is either a SandboxCustomImagesCheckNameRequest - type or a IO[bytes] type. Required. - :type resource_name: ~azure.mgmt.kusto.models.SandboxCustomImagesCheckNameRequest or IO[bytes] - :return: CheckNameResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.CheckNameResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CheckNameResult] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(resource_name, (IOBase, bytes)): - _content = resource_name - else: - _json = self._serialize.body(resource_name, "SandboxCustomImagesCheckNameRequest") - - _request = build_check_name_availability_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("CheckNameResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_scripts_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_scripts_operations.py deleted file mode 100644 index c00518839e9a..000000000000 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_scripts_operations.py +++ /dev/null @@ -1,1155 +0,0 @@ -# pylint: disable=too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._serialization import Serializer - -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_database_request( - resource_group_name: str, cluster_name: str, database_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/scripts", - ) # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - "databaseName": _SERIALIZER.url("database_name", database_name, "str", pattern=r"^.*$"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_get_request( - resource_group_name: str, - cluster_name: str, - database_name: str, - script_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/scripts/{scriptName}", - ) # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - "databaseName": _SERIALIZER.url("database_name", database_name, "str", pattern=r"^.*$"), - "scriptName": _SERIALIZER.url("script_name", script_name, "str", pattern=r"^.*$"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_create_or_update_request( - resource_group_name: str, - cluster_name: str, - database_name: str, - script_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/scripts/{scriptName}", - ) # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - "databaseName": _SERIALIZER.url("database_name", database_name, "str", pattern=r"^.*$"), - "scriptName": _SERIALIZER.url("script_name", script_name, "str", pattern=r"^.*$"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_update_request( - resource_group_name: str, - cluster_name: str, - database_name: str, - script_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/scripts/{scriptName}", - ) # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - "databaseName": _SERIALIZER.url("database_name", database_name, "str", pattern=r"^.*$"), - "scriptName": _SERIALIZER.url("script_name", script_name, "str", pattern=r"^.*$"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, - cluster_name: str, - database_name: str, - script_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/scripts/{scriptName}", - ) # pylint: disable=line-too-long - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - "databaseName": _SERIALIZER.url("database_name", database_name, "str", pattern=r"^.*$"), - "scriptName": _SERIALIZER.url("script_name", script_name, "str", pattern=r"^.*$"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_check_name_availability_request( - resource_group_name: str, cluster_name: str, database_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/scriptsCheckNameAvailability", - ) # pylint: disable=line-too-long - path_format_arguments = { - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str", pattern=r"^.*$"), - "databaseName": _SERIALIZER.url("database_name", database_name, "str", pattern=r"^.*$"), - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - -class ScriptsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.kusto.KustoManagementClient`'s - :attr:`scripts` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs): - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_by_database( - self, resource_group_name: str, cluster_name: str, database_name: str, **kwargs: Any - ) -> Iterable["_models.Script"]: - """Returns the list of database scripts for given database. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :return: An iterator like instance of either Script or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.kusto.models.Script] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ScriptListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_by_database_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("ScriptListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get( - self, resource_group_name: str, cluster_name: str, database_name: str, script_name: str, **kwargs: Any - ) -> _models.Script: - """Gets a Kusto cluster database script. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param script_name: The name of the Kusto database script. Required. - :type script_name: str - :return: Script or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.Script - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.Script] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - script_name=script_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("Script", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _create_or_update_initial( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - script_name: str, - parameters: Union[_models.Script, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "Script") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - script_name=script_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - script_name: str, - parameters: _models.Script, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Script]: - """Creates a Kusto database script. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param script_name: The name of the Kusto database script. Required. - :type script_name: str - :param parameters: The Kusto Script parameters contains the KQL to run. Required. - :type parameters: ~azure.mgmt.kusto.models.Script - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either Script or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.Script] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - script_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Script]: - """Creates a Kusto database script. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param script_name: The name of the Kusto database script. Required. - :type script_name: str - :param parameters: The Kusto Script parameters contains the KQL to run. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either Script or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.Script] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create_or_update( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - script_name: str, - parameters: Union[_models.Script, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.Script]: - """Creates a Kusto database script. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param script_name: The name of the Kusto database script. Required. - :type script_name: str - :param parameters: The Kusto Script parameters contains the KQL to run. Is either a Script type - or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.kusto.models.Script or IO[bytes] - :return: An instance of LROPoller that returns either Script or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.Script] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Script] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - script_name=script_name, - parameters=parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Script", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.Script].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.Script]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _update_initial( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - script_name: str, - parameters: Union[_models.Script, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "Script") - - _request = build_update_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - script_name=script_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - script_name: str, - parameters: _models.Script, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Script]: - """Updates a database script. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param script_name: The name of the Kusto database script. Required. - :type script_name: str - :param parameters: The Kusto Script parameters contains to the KQL to run. Required. - :type parameters: ~azure.mgmt.kusto.models.Script - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either Script or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.Script] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - script_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Script]: - """Updates a database script. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param script_name: The name of the Kusto database script. Required. - :type script_name: str - :param parameters: The Kusto Script parameters contains to the KQL to run. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns either Script or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.Script] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_update( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - script_name: str, - parameters: Union[_models.Script, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.Script]: - """Updates a database script. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param script_name: The name of the Kusto database script. Required. - :type script_name: str - :param parameters: The Kusto Script parameters contains to the KQL to run. Is either a Script - type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.kusto.models.Script or IO[bytes] - :return: An instance of LROPoller that returns either Script or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.kusto.models.Script] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Script] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._update_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - script_name=script_name, - parameters=parameters, - api_version=api_version, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize("Script", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.Script].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.Script]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial( - self, resource_group_name: str, cluster_name: str, database_name: str, script_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - script_name=script_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete( - self, resource_group_name: str, cluster_name: str, database_name: str, script_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Deletes a Kusto database script. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param script_name: The name of the Kusto database script. Required. - :type script_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) - lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) - cont_token: Optional[str] = kwargs.pop("continuation_token", None) - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - script_name=script_name, - api_version=api_version, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @overload - def check_name_availability( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - script_name: _models.ScriptCheckNameRequest, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CheckNameResult: - """Checks that the script name is valid and is not already in use. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param script_name: The name of the script. Required. - :type script_name: ~azure.mgmt.kusto.models.ScriptCheckNameRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: CheckNameResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.CheckNameResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def check_name_availability( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - script_name: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.CheckNameResult: - """Checks that the script name is valid and is not already in use. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param script_name: The name of the script. Required. - :type script_name: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: CheckNameResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.CheckNameResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def check_name_availability( - self, - resource_group_name: str, - cluster_name: str, - database_name: str, - script_name: Union[_models.ScriptCheckNameRequest, IO[bytes]], - **kwargs: Any - ) -> _models.CheckNameResult: - """Checks that the script name is valid and is not already in use. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param cluster_name: The name of the Kusto cluster. Required. - :type cluster_name: str - :param database_name: The name of the database in the Kusto cluster. Required. - :type database_name: str - :param script_name: The name of the script. Is either a ScriptCheckNameRequest type or a - IO[bytes] type. Required. - :type script_name: ~azure.mgmt.kusto.models.ScriptCheckNameRequest or IO[bytes] - :return: CheckNameResult or the result of cls(response) - :rtype: ~azure.mgmt.kusto.models.CheckNameResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.CheckNameResult] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(script_name, (IOBase, bytes)): - _content = script_name - else: - _json = self._serialize.body(script_name, "ScriptCheckNameRequest") - - _request = build_check_name_availability_request( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - database_name=database_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("CheckNameResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_skus_operations.py b/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_skus_operations.py deleted file mode 100644 index 12fc2b203920..000000000000 --- a/sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/operations/_skus_operations.py +++ /dev/null @@ -1,163 +0,0 @@ -# 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 sys -from typing import Any, Callable, Dict, Iterable, Optional, TypeVar -import urllib.parse - -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._serialization import Serializer - -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_request(location: str, subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-13")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Kusto/locations/{location}/skus" - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), - "location": _SERIALIZER.url("location", location, "str", min_length=1), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -class SkusOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.kusto.KustoManagementClient`'s - :attr:`skus` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs): - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list(self, location: str, **kwargs: Any) -> Iterable["_models.SkuDescription"]: - """Lists eligible region SKUs for Kusto resource provider by Azure region. - - :param location: The name of Azure region. Required. - :type location: str - :return: An iterator like instance of either SkuDescription or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.kusto.models.SkuDescription] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.SkuDescriptionList] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - _request = build_list_request( - location=location, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("SkuDescriptionList", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) diff --git a/sdk/kusto/azure-mgmt-kusto/code_report_swagger.json b/sdk/kusto/azure-mgmt-kusto/code_report_swagger.json new file mode 100644 index 000000000000..ab844847a778 --- /dev/null +++ b/sdk/kusto/azure-mgmt-kusto/code_report_swagger.json @@ -0,0 +1,28060 @@ +{ + "azure.mgmt.kusto": { + "class_nodes": { + "KustoManagementClient": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "credential": { + "default": null, + "param_type": "positional_or_keyword" + }, + "subscription_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "base_url": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "cloud_setting": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "close": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + } + }, + "properties": { + "client_side_validation": { + "attr_type": false + }, + "clusters": { + "attr_type": "ClustersOperations" + }, + "cluster_principal_assignments": { + "attr_type": "ClusterPrincipalAssignmentsOperations" + }, + "skus": { + "attr_type": "SkusOperations" + }, + "databases": { + "attr_type": "DatabasesOperations" + }, + "attached_database_configurations": { + "attr_type": "AttachedDatabaseConfigurationsOperations" + }, + "managed_private_endpoints": { + "attr_type": "ManagedPrivateEndpointsOperations" + }, + "database": { + "attr_type": "DatabaseOperations" + }, + "database_principal_assignments": { + "attr_type": "DatabasePrincipalAssignmentsOperations" + }, + "scripts": { + "attr_type": "ScriptsOperations" + }, + "sandbox_custom_images": { + "attr_type": "SandboxCustomImagesOperations" + }, + "private_endpoint_connections": { + "attr_type": "PrivateEndpointConnectionsOperations" + }, + "private_link_resources": { + "attr_type": "PrivateLinkResourcesOperations" + }, + "data_connections": { + "attr_type": "DataConnectionsOperations" + }, + "operations": { + "attr_type": "Operations" + }, + "operations_results": { + "attr_type": "OperationsResultsOperations" + }, + "operations_results_location": { + "attr_type": "OperationsResultsLocationOperations" + } + } + } + }, + "function_nodes": {} + }, + "azure.mgmt.kusto.aio": { + "class_nodes": { + "KustoManagementClient": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "credential": { + "default": null, + "param_type": "positional_or_keyword" + }, + "subscription_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "base_url": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "cloud_setting": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "close": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": true, + "return_type": "None", + "overloads": [] + } + }, + "properties": { + "client_side_validation": { + "attr_type": false + }, + "clusters": { + "attr_type": "ClustersOperations" + }, + "cluster_principal_assignments": { + "attr_type": "ClusterPrincipalAssignmentsOperations" + }, + "skus": { + "attr_type": "SkusOperations" + }, + "databases": { + "attr_type": "DatabasesOperations" + }, + "attached_database_configurations": { + "attr_type": "AttachedDatabaseConfigurationsOperations" + }, + "managed_private_endpoints": { + "attr_type": "ManagedPrivateEndpointsOperations" + }, + "database": { + "attr_type": "DatabaseOperations" + }, + "database_principal_assignments": { + "attr_type": "DatabasePrincipalAssignmentsOperations" + }, + "scripts": { + "attr_type": "ScriptsOperations" + }, + "sandbox_custom_images": { + "attr_type": "SandboxCustomImagesOperations" + }, + "private_endpoint_connections": { + "attr_type": "PrivateEndpointConnectionsOperations" + }, + "private_link_resources": { + "attr_type": "PrivateLinkResourcesOperations" + }, + "data_connections": { + "attr_type": "DataConnectionsOperations" + }, + "operations": { + "attr_type": "Operations" + }, + "operations_results": { + "attr_type": "OperationsResultsOperations" + }, + "operations_results_location": { + "attr_type": "OperationsResultsLocationOperations" + } + } + } + }, + "function_nodes": {} + }, + "azure.mgmt.kusto.aio.operations": { + "class_nodes": { + "AttachedDatabaseConfigurationsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "attached_database_configuration_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AttachedDatabaseConfiguration]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "attached_database_configuration_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "AttachedDatabaseConfiguration", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AttachedDatabaseConfiguration]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "attached_database_configuration_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AttachedDatabaseConfiguration]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "attached_database_configuration_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "check_name_availability": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "CheckNameResult", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "AttachedDatabaseConfigurationsCheckNameRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckNameResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckNameResult" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "attached_database_configuration_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AttachedDatabaseConfiguration", + "overloads": [] + }, + "list_by_cluster": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.AttachedDatabaseConfiguration]", + "overloads": [] + } + }, + "properties": {} + }, + "ClusterPrincipalAssignmentsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[ClusterPrincipalAssignment]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ClusterPrincipalAssignment", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[ClusterPrincipalAssignment]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[ClusterPrincipalAssignment]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "check_name_availability": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "CheckNameResult", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "type": "ClusterPrincipalAssignmentCheckNameRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckNameResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckNameResult" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "ClusterPrincipalAssignment", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.ClusterPrincipalAssignment]", + "overloads": [] + } + }, + "properties": {} + }, + "ClustersOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_add_callout_policies": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "callout_policies": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "callout_policies": { + "type": "CalloutPoliciesList", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "callout_policies": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]" + } + ] + }, + "begin_add_language_extensions": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "language_extensions_to_add": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "language_extensions_to_add": { + "type": "LanguageExtensionsList", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "language_extensions_to_add": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]" + } + ] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "if_none_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Cluster]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Cluster", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_none_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Cluster]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_none_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Cluster]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_detach_follower_databases": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "follower_database_to_remove": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "follower_database_to_remove": { + "type": "FollowerDatabaseDefinition", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "follower_database_to_remove": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]" + } + ] + }, + "begin_diagnose_virtual_network": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[DiagnoseVirtualNetworkResult]", + "overloads": [] + }, + "begin_migrate": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_migrate_request": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_migrate_request": { + "type": "ClusterMigrateRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_migrate_request": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]" + } + ] + }, + "begin_remove_callout_policy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "callout_policy": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "callout_policy": { + "type": "CalloutPolicyToRemove", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "callout_policy": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]" + } + ] + }, + "begin_remove_language_extensions": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "language_extensions_to_remove": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "language_extensions_to_remove": { + "type": "LanguageExtensionsList", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "language_extensions_to_remove": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]" + } + ] + }, + "begin_start": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_stop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Cluster]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ClusterUpdate", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Cluster]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Cluster]" + } + ] + }, + "check_name_availability": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "CheckNameResult", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "ClusterCheckNameRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckNameResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckNameResult" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "Cluster", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.Cluster]", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.Cluster]", + "overloads": [] + }, + "list_callout_policies": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.CalloutPolicy]", + "overloads": [] + }, + "list_follower_databases": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.FollowerDatabaseDefinition]", + "overloads": [] + }, + "list_follower_databases_get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.FollowerDatabaseDefinitionGet]", + "overloads": [] + }, + "list_language_extensions": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.LanguageExtension]", + "overloads": [] + }, + "list_outbound_network_dependencies_endpoints": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.OutboundNetworkDependenciesEndpoint]", + "overloads": [] + }, + "list_skus": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.SkuDescription]", + "overloads": [] + }, + "list_skus_by_resource": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.AzureResourceSku]", + "overloads": [] + } + }, + "properties": {} + }, + "DataConnectionsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "data_connection_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[DataConnection]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "data_connection_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DataConnection", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[DataConnection]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "data_connection_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[DataConnection]" + } + ] + }, + "begin_data_connection_validation": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[DataConnectionValidationListResult]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DataConnectionValidation", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[DataConnectionValidationListResult]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[DataConnectionValidationListResult]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "data_connection_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "data_connection_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[DataConnection]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "data_connection_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DataConnection", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[DataConnection]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "data_connection_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[DataConnection]" + } + ] + }, + "check_name_availability": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "data_connection_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "CheckNameResult", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "data_connection_name": { + "type": "DataConnectionCheckNameRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckNameResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "data_connection_name": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckNameResult" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "data_connection_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "DataConnection", + "overloads": [] + }, + "list_by_database": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.DataConnection]", + "overloads": [] + } + }, + "properties": {} + }, + "DatabaseOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "invite_follower": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "DatabaseInviteFollowerResult", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DatabaseInviteFollowerRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "DatabaseInviteFollowerResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "DatabaseInviteFollowerResult" + } + ] + } + }, + "properties": {} + }, + "DatabasePrincipalAssignmentsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[DatabasePrincipalAssignment]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DatabasePrincipalAssignment", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[DatabasePrincipalAssignment]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[DatabasePrincipalAssignment]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "check_name_availability": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "CheckNameResult", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "type": "DatabasePrincipalAssignmentCheckNameRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckNameResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckNameResult" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "DatabasePrincipalAssignment", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.DatabasePrincipalAssignment]", + "overloads": [] + } + }, + "properties": {} + }, + "DatabasesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "add_principals": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_principals_to_add": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "DatabasePrincipalListResult", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_principals_to_add": { + "type": "DatabasePrincipalListRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "DatabasePrincipalListResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_principals_to_add": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "DatabasePrincipalListResult" + } + ] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "caller_role": { + "default": "str", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Database]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Database", + "default": null, + "param_type": "positional_or_keyword" + }, + "caller_role": { + "type": "Union[str, CallerRole]", + "default": "Admin", + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Database]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "caller_role": { + "type": "Union[str, CallerRole]", + "default": "Admin", + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Database]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "caller_role": { + "default": "str", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Database]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Database", + "default": null, + "param_type": "positional_or_keyword" + }, + "caller_role": { + "type": "Union[str, CallerRole]", + "default": "Admin", + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Database]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "caller_role": { + "type": "Union[str, CallerRole]", + "default": "Admin", + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Database]" + } + ] + }, + "check_name_availability": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "CheckNameResult", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "CheckNameRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckNameResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckNameResult" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "Database", + "overloads": [] + }, + "list_by_cluster": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skiptoken": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.Database]", + "overloads": [] + }, + "list_principals": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.DatabasePrincipal]", + "overloads": [] + }, + "remove_principals": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_principals_to_remove": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "DatabasePrincipalListResult", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_principals_to_remove": { + "type": "DatabasePrincipalListRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "DatabasePrincipalListResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_principals_to_remove": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "DatabasePrincipalListResult" + } + ] + } + }, + "properties": {} + }, + "ManagedPrivateEndpointsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "managed_private_endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[ManagedPrivateEndpoint]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "managed_private_endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ManagedPrivateEndpoint", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[ManagedPrivateEndpoint]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "managed_private_endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[ManagedPrivateEndpoint]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "managed_private_endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "managed_private_endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[ManagedPrivateEndpoint]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "managed_private_endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ManagedPrivateEndpoint", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[ManagedPrivateEndpoint]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "managed_private_endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[ManagedPrivateEndpoint]" + } + ] + }, + "check_name_availability": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "CheckNameResult", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "ManagedPrivateEndpointsCheckNameRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckNameResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckNameResult" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "managed_private_endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "ManagedPrivateEndpoint", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.ManagedPrivateEndpoint]", + "overloads": [] + } + }, + "properties": {} + }, + "Operations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.Operation]", + "overloads": [] + } + }, + "properties": {} + }, + "OperationsResultsLocationOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "None", + "overloads": [] + } + }, + "properties": {} + }, + "OperationsResultsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "OperationResult", + "overloads": [] + } + }, + "properties": {} + }, + "PrivateEndpointConnectionsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[PrivateEndpointConnection]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PrivateEndpointConnection", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[PrivateEndpointConnection]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[PrivateEndpointConnection]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "PrivateEndpointConnection", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.PrivateEndpointConnection]", + "overloads": [] + } + }, + "properties": {} + }, + "PrivateLinkResourcesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "private_link_resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "PrivateLinkResource", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.PrivateLinkResource]", + "overloads": [] + } + }, + "properties": {} + }, + "SandboxCustomImagesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sandbox_custom_image_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[SandboxCustomImage]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "sandbox_custom_image_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "SandboxCustomImage", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[SandboxCustomImage]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "sandbox_custom_image_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[SandboxCustomImage]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sandbox_custom_image_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sandbox_custom_image_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[SandboxCustomImage]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "sandbox_custom_image_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "SandboxCustomImage", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[SandboxCustomImage]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "sandbox_custom_image_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[SandboxCustomImage]" + } + ] + }, + "check_name_availability": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "CheckNameResult", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "SandboxCustomImagesCheckNameRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckNameResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckNameResult" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sandbox_custom_image_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "SandboxCustomImage", + "overloads": [] + }, + "list_by_cluster": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.SandboxCustomImage]", + "overloads": [] + } + }, + "properties": {} + }, + "ScriptsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "script_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Script]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "script_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Script", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Script]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "script_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Script]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "script_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "script_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Script]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "script_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Script", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Script]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "script_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Script]" + } + ] + }, + "check_name_availability": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "script_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "CheckNameResult", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "script_name": { + "type": "ScriptCheckNameRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckNameResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "script_name": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckNameResult" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "script_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "Script", + "overloads": [] + }, + "list_by_database": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.Script]", + "overloads": [] + } + }, + "properties": {} + }, + "SkusOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.SkuDescription]", + "overloads": [] + } + }, + "properties": {} + } + }, + "function_nodes": {} + }, + "azure.mgmt.kusto.models": { + "class_nodes": { + "AcceptedAudiences": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AttachedDatabaseConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": "none", + "param_type": "keyword_only" + }, + "database_name": { + "default": "none", + "param_type": "keyword_only" + }, + "cluster_resource_id": { + "default": "none", + "param_type": "keyword_only" + }, + "default_principals_modification_kind": { + "default": "none", + "param_type": "keyword_only" + }, + "table_level_sharing_properties": { + "default": "none", + "param_type": "keyword_only" + }, + "database_name_override": { + "default": "none", + "param_type": "keyword_only" + }, + "database_name_prefix": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "location": { + "attr_type": "location" + }, + "provisioning_state": { + "attr_type": null + }, + "database_name": { + "attr_type": "database_name" + }, + "cluster_resource_id": { + "attr_type": "cluster_resource_id" + }, + "attached_database_names": { + "attr_type": null + }, + "default_principals_modification_kind": { + "attr_type": "default_principals_modification_kind" + }, + "table_level_sharing_properties": { + "attr_type": "table_level_sharing_properties" + }, + "database_name_override": { + "attr_type": "database_name_override" + }, + "database_name_prefix": { + "attr_type": "database_name_prefix" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AttachedDatabaseConfigurationListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AttachedDatabaseConfigurationsCheckNameRequest": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AzureCapacity": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "scale_type": { + "default": null, + "param_type": "keyword_only" + }, + "minimum": { + "default": null, + "param_type": "keyword_only" + }, + "maximum": { + "default": null, + "param_type": "keyword_only" + }, + "default": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "scale_type": { + "attr_type": "scale_type" + }, + "minimum": { + "attr_type": "minimum" + }, + "maximum": { + "attr_type": "maximum" + }, + "default": { + "attr_type": "default" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AzureResourceSku": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_type": { + "default": "none", + "param_type": "keyword_only" + }, + "sku": { + "default": "none", + "param_type": "keyword_only" + }, + "capacity": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "resource_type": { + "attr_type": "resource_type" + }, + "sku": { + "attr_type": "sku" + }, + "capacity": { + "attr_type": "capacity" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AzureScaleType": { + "type": "Enum", + "methods": {}, + "properties": { + "AUTOMATIC": "AUTOMATIC", + "MANUAL": "MANUAL", + "NONE": "NONE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "AzureSku": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "keyword_only" + }, + "tier": { + "default": null, + "param_type": "keyword_only" + }, + "capacity": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "capacity": { + "attr_type": "capacity" + }, + "tier": { + "attr_type": "tier" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "AzureSkuName": { + "type": "Enum", + "methods": {}, + "properties": { + "DEV_NO_SLA_STANDARD_D11_V2": "DEV_NO_SLA_STANDARD_D11_V2", + "DEV_NO_SLA_STANDARD_E2_A_V4": "DEV_NO_SLA_STANDARD_E2_A_V4", + "STANDARD_D11_V2": "STANDARD_D11_V2", + "STANDARD_D12_V2": "STANDARD_D12_V2", + "STANDARD_D13_V2": "STANDARD_D13_V2", + "STANDARD_D14_V2": "STANDARD_D14_V2", + "STANDARD_D16_D_V5": "STANDARD_D16_D_V5", + "STANDARD_D32_D_V4": "STANDARD_D32_D_V4", + "STANDARD_D32_D_V5": "STANDARD_D32_D_V5", + "STANDARD_DS13_V2_1_TB_PS": "STANDARD_DS13_V2_1_TB_PS", + "STANDARD_DS13_V2_2_TB_PS": "STANDARD_DS13_V2_2_TB_PS", + "STANDARD_DS14_V2_3_TB_PS": "STANDARD_DS14_V2_3_TB_PS", + "STANDARD_DS14_V2_4_TB_PS": "STANDARD_DS14_V2_4_TB_PS", + "STANDARD_E16_ADS_V5": "STANDARD_E16_ADS_V5", + "STANDARD_E16_AS_V4_3_TB_PS": "STANDARD_E16_AS_V4_3_TB_PS", + "STANDARD_E16_AS_V4_4_TB_PS": "STANDARD_E16_AS_V4_4_TB_PS", + "STANDARD_E16_AS_V5_3_TB_PS": "STANDARD_E16_AS_V5_3_TB_PS", + "STANDARD_E16_AS_V5_4_TB_PS": "STANDARD_E16_AS_V5_4_TB_PS", + "STANDARD_E16_A_V4": "STANDARD_E16_A_V4", + "STANDARD_E16_D_V4": "STANDARD_E16_D_V4", + "STANDARD_E16_D_V5": "STANDARD_E16_D_V5", + "STANDARD_E16_S_V4_3_TB_PS": "STANDARD_E16_S_V4_3_TB_PS", + "STANDARD_E16_S_V4_4_TB_PS": "STANDARD_E16_S_V4_4_TB_PS", + "STANDARD_E16_S_V5_3_TB_PS": "STANDARD_E16_S_V5_3_TB_PS", + "STANDARD_E16_S_V5_4_TB_PS": "STANDARD_E16_S_V5_4_TB_PS", + "STANDARD_E2_ADS_V5": "STANDARD_E2_ADS_V5", + "STANDARD_E2_A_V4": "STANDARD_E2_A_V4", + "STANDARD_E2_D_V4": "STANDARD_E2_D_V4", + "STANDARD_E2_D_V5": "STANDARD_E2_D_V5", + "STANDARD_E4_ADS_V5": "STANDARD_E4_ADS_V5", + "STANDARD_E4_A_V4": "STANDARD_E4_A_V4", + "STANDARD_E4_D_V4": "STANDARD_E4_D_V4", + "STANDARD_E4_D_V5": "STANDARD_E4_D_V5", + "STANDARD_E64_I_V3": "STANDARD_E64_I_V3", + "STANDARD_E80_IDS_V4": "STANDARD_E80_IDS_V4", + "STANDARD_E8_ADS_V5": "STANDARD_E8_ADS_V5", + "STANDARD_E8_AS_V4_1_TB_PS": "STANDARD_E8_AS_V4_1_TB_PS", + "STANDARD_E8_AS_V4_2_TB_PS": "STANDARD_E8_AS_V4_2_TB_PS", + "STANDARD_E8_AS_V5_1_TB_PS": "STANDARD_E8_AS_V5_1_TB_PS", + "STANDARD_E8_AS_V5_2_TB_PS": "STANDARD_E8_AS_V5_2_TB_PS", + "STANDARD_E8_A_V4": "STANDARD_E8_A_V4", + "STANDARD_E8_D_V4": "STANDARD_E8_D_V4", + "STANDARD_E8_D_V5": "STANDARD_E8_D_V5", + "STANDARD_E8_S_V4_1_TB_PS": "STANDARD_E8_S_V4_1_TB_PS", + "STANDARD_E8_S_V4_2_TB_PS": "STANDARD_E8_S_V4_2_TB_PS", + "STANDARD_E8_S_V5_1_TB_PS": "STANDARD_E8_S_V5_1_TB_PS", + "STANDARD_E8_S_V5_2_TB_PS": "STANDARD_E8_S_V5_2_TB_PS", + "STANDARD_EC16_ADS_V5": "STANDARD_EC16_ADS_V5", + "STANDARD_EC16_AS_V5_3_TB_PS": "STANDARD_EC16_AS_V5_3_TB_PS", + "STANDARD_EC16_AS_V5_4_TB_PS": "STANDARD_EC16_AS_V5_4_TB_PS", + "STANDARD_EC8_ADS_V5": "STANDARD_EC8_ADS_V5", + "STANDARD_EC8_AS_V5_1_TB_PS": "STANDARD_EC8_AS_V5_1_TB_PS", + "STANDARD_EC8_AS_V5_2_TB_PS": "STANDARD_EC8_AS_V5_2_TB_PS", + "STANDARD_L16_AS_V3": "STANDARD_L16_AS_V3", + "STANDARD_L16_S": "STANDARD_L16_S", + "STANDARD_L16_S_V2": "STANDARD_L16_S_V2", + "STANDARD_L16_S_V3": "STANDARD_L16_S_V3", + "STANDARD_L32_AS_V3": "STANDARD_L32_AS_V3", + "STANDARD_L32_S_V3": "STANDARD_L32_S_V3", + "STANDARD_L4_S": "STANDARD_L4_S", + "STANDARD_L8_AS_V3": "STANDARD_L8_AS_V3", + "STANDARD_L8_S": "STANDARD_L8_S", + "STANDARD_L8_S_V2": "STANDARD_L8_S_V2", + "STANDARD_L8_S_V3": "STANDARD_L8_S_V3", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "AzureSkuTier": { + "type": "Enum", + "methods": {}, + "properties": { + "BASIC": "BASIC", + "STANDARD": "STANDARD", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "BlobStorageEventType": { + "type": "Enum", + "methods": {}, + "properties": { + "MICROSOFT_STORAGE_BLOB_CREATED": "MICROSOFT_STORAGE_BLOB_CREATED", + "MICROSOFT_STORAGE_BLOB_RENAMED": "MICROSOFT_STORAGE_BLOB_RENAMED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "CallerRole": { + "type": "Enum", + "methods": {}, + "properties": { + "ADMIN": "ADMIN", + "NONE": "NONE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "CalloutPoliciesList": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CalloutPolicy": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "callout_uri_regex": { + "default": "none", + "param_type": "keyword_only" + }, + "callout_type": { + "default": "none", + "param_type": "keyword_only" + }, + "outbound_access": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "callout_uri_regex": { + "attr_type": "callout_uri_regex" + }, + "callout_type": { + "attr_type": "callout_type" + }, + "outbound_access": { + "attr_type": "outbound_access" + }, + "callout_id": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CalloutPolicyToRemove": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "callout_id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "callout_id": { + "attr_type": "callout_id" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CalloutType": { + "type": "Enum", + "methods": {}, + "properties": { + "AZURE_DIGITAL_TWINS": "AZURE_DIGITAL_TWINS", + "AZURE_OPENAI": "AZURE_OPENAI", + "COSMOSDB": "COSMOSDB", + "EXTERNAL_DATA": "EXTERNAL_DATA", + "GENEVAMETRICS": "GENEVAMETRICS", + "KUSTO": "KUSTO", + "MYSQL": "MYSQL", + "POSTGRESQL": "POSTGRESQL", + "SANDBOX_ARTIFACTS": "SANDBOX_ARTIFACTS", + "SQL": "SQL", + "WEBAPI": "WEBAPI", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "CheckNameRequest": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "keyword_only" + }, + "type": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "type": { + "attr_type": "type" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CheckNameResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name_available": { + "default": "none", + "param_type": "keyword_only" + }, + "name": { + "default": "none", + "param_type": "keyword_only" + }, + "message": { + "default": "none", + "param_type": "keyword_only" + }, + "reason": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name_available": { + "attr_type": "name_available" + }, + "name": { + "attr_type": "name" + }, + "message": { + "attr_type": "message" + }, + "reason": { + "attr_type": "reason" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "Cluster": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": null, + "param_type": "keyword_only" + }, + "sku": { + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "zones": { + "default": "none", + "param_type": "keyword_only" + }, + "identity": { + "default": "none", + "param_type": "keyword_only" + }, + "trusted_external_tenants": { + "default": "none", + "param_type": "keyword_only" + }, + "optimized_autoscale": { + "default": "none", + "param_type": "keyword_only" + }, + "enable_disk_encryption": { + "default": "bool", + "param_type": "keyword_only" + }, + "enable_streaming_ingest": { + "default": "bool", + "param_type": "keyword_only" + }, + "virtual_network_configuration": { + "default": "none", + "param_type": "keyword_only" + }, + "key_vault_properties": { + "default": "none", + "param_type": "keyword_only" + }, + "enable_purge": { + "default": "bool", + "param_type": "keyword_only" + }, + "language_extensions": { + "default": "none", + "param_type": "keyword_only" + }, + "enable_double_encryption": { + "default": "bool", + "param_type": "keyword_only" + }, + "public_network_access": { + "default": "str", + "param_type": "keyword_only" + }, + "allowed_ip_range_list": { + "default": "none", + "param_type": "keyword_only" + }, + "engine_type": { + "default": "str", + "param_type": "keyword_only" + }, + "accepted_audiences": { + "default": "none", + "param_type": "keyword_only" + }, + "enable_auto_stop": { + "default": "bool", + "param_type": "keyword_only" + }, + "restrict_outbound_network_access": { + "default": "str", + "param_type": "keyword_only" + }, + "allowed_fqdn_list": { + "default": "none", + "param_type": "keyword_only" + }, + "callout_policies": { + "default": "none", + "param_type": "keyword_only" + }, + "public_ip_type": { + "default": "str", + "param_type": "keyword_only" + }, + "virtual_cluster_graduation_properties": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "sku": { + "attr_type": "sku" + }, + "system_data": { + "attr_type": null + }, + "zones": { + "attr_type": "zones" + }, + "identity": { + "attr_type": "identity" + }, + "etag": { + "attr_type": null + }, + "state": { + "attr_type": null + }, + "provisioning_state": { + "attr_type": null + }, + "uri": { + "attr_type": null + }, + "data_ingestion_uri": { + "attr_type": null + }, + "state_reason": { + "attr_type": null + }, + "trusted_external_tenants": { + "attr_type": "trusted_external_tenants" + }, + "optimized_autoscale": { + "attr_type": "optimized_autoscale" + }, + "enable_disk_encryption": { + "attr_type": "enable_disk_encryption" + }, + "enable_streaming_ingest": { + "attr_type": "enable_streaming_ingest" + }, + "virtual_network_configuration": { + "attr_type": "virtual_network_configuration" + }, + "key_vault_properties": { + "attr_type": "key_vault_properties" + }, + "enable_purge": { + "attr_type": "enable_purge" + }, + "language_extensions": { + "attr_type": "language_extensions" + }, + "enable_double_encryption": { + "attr_type": "enable_double_encryption" + }, + "public_network_access": { + "attr_type": "public_network_access" + }, + "allowed_ip_range_list": { + "attr_type": "allowed_ip_range_list" + }, + "engine_type": { + "attr_type": "engine_type" + }, + "accepted_audiences": { + "attr_type": "accepted_audiences" + }, + "enable_auto_stop": { + "attr_type": "enable_auto_stop" + }, + "restrict_outbound_network_access": { + "attr_type": "restrict_outbound_network_access" + }, + "allowed_fqdn_list": { + "attr_type": "allowed_fqdn_list" + }, + "callout_policies": { + "attr_type": "callout_policies" + }, + "public_ip_type": { + "attr_type": "public_ip_type" + }, + "virtual_cluster_graduation_properties": { + "attr_type": "virtual_cluster_graduation_properties" + }, + "private_endpoint_connections": { + "attr_type": null + }, + "migration_cluster": { + "attr_type": null + }, + "zone_status": { + "attr_type": null + }, + "tags": { + "attr_type": "tags" + }, + "location": { + "attr_type": "location" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ClusterCheckNameRequest": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ClusterListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ClusterMigrateRequest": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_resource_id": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "cluster_resource_id": { + "attr_type": "cluster_resource_id" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ClusterNetworkAccessFlag": { + "type": "Enum", + "methods": {}, + "properties": { + "DISABLED": "DISABLED", + "ENABLED": "ENABLED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ClusterPrincipalAssignment": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_id": { + "default": "none", + "param_type": "keyword_only" + }, + "role": { + "default": "none", + "param_type": "keyword_only" + }, + "tenant_id": { + "default": "none", + "param_type": "keyword_only" + }, + "principal_type": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "principal_id": { + "attr_type": "principal_id" + }, + "role": { + "attr_type": "role" + }, + "tenant_id": { + "attr_type": "tenant_id" + }, + "principal_type": { + "attr_type": "principal_type" + }, + "tenant_name": { + "attr_type": null + }, + "principal_name": { + "attr_type": null + }, + "provisioning_state": { + "attr_type": null + }, + "aad_object_id": { + "attr_type": null + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ClusterPrincipalAssignmentCheckNameRequest": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ClusterPrincipalAssignmentListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ClusterPrincipalRole": { + "type": "Enum", + "methods": {}, + "properties": { + "ALL_DATABASES_ADMIN": "ALL_DATABASES_ADMIN", + "ALL_DATABASES_MONITOR": "ALL_DATABASES_MONITOR", + "ALL_DATABASES_VIEWER": "ALL_DATABASES_VIEWER", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ClusterUpdate": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "location": { + "default": "none", + "param_type": "keyword_only" + }, + "sku": { + "default": "none", + "param_type": "keyword_only" + }, + "zones": { + "default": "none", + "param_type": "keyword_only" + }, + "identity": { + "default": "none", + "param_type": "keyword_only" + }, + "trusted_external_tenants": { + "default": "none", + "param_type": "keyword_only" + }, + "optimized_autoscale": { + "default": "none", + "param_type": "keyword_only" + }, + "enable_disk_encryption": { + "default": "bool", + "param_type": "keyword_only" + }, + "enable_streaming_ingest": { + "default": "bool", + "param_type": "keyword_only" + }, + "virtual_network_configuration": { + "default": "none", + "param_type": "keyword_only" + }, + "key_vault_properties": { + "default": "none", + "param_type": "keyword_only" + }, + "enable_purge": { + "default": "bool", + "param_type": "keyword_only" + }, + "language_extensions": { + "default": "none", + "param_type": "keyword_only" + }, + "enable_double_encryption": { + "default": "bool", + "param_type": "keyword_only" + }, + "public_network_access": { + "default": "str", + "param_type": "keyword_only" + }, + "allowed_ip_range_list": { + "default": "none", + "param_type": "keyword_only" + }, + "engine_type": { + "default": "str", + "param_type": "keyword_only" + }, + "accepted_audiences": { + "default": "none", + "param_type": "keyword_only" + }, + "enable_auto_stop": { + "default": "bool", + "param_type": "keyword_only" + }, + "restrict_outbound_network_access": { + "default": "str", + "param_type": "keyword_only" + }, + "allowed_fqdn_list": { + "default": "none", + "param_type": "keyword_only" + }, + "callout_policies": { + "default": "none", + "param_type": "keyword_only" + }, + "public_ip_type": { + "default": "str", + "param_type": "keyword_only" + }, + "virtual_cluster_graduation_properties": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "tags": { + "attr_type": "tags" + }, + "location": { + "attr_type": "location" + }, + "sku": { + "attr_type": "sku" + }, + "zones": { + "attr_type": "zones" + }, + "identity": { + "attr_type": "identity" + }, + "state": { + "attr_type": null + }, + "provisioning_state": { + "attr_type": null + }, + "uri": { + "attr_type": null + }, + "data_ingestion_uri": { + "attr_type": null + }, + "state_reason": { + "attr_type": null + }, + "trusted_external_tenants": { + "attr_type": "trusted_external_tenants" + }, + "optimized_autoscale": { + "attr_type": "optimized_autoscale" + }, + "enable_disk_encryption": { + "attr_type": "enable_disk_encryption" + }, + "enable_streaming_ingest": { + "attr_type": "enable_streaming_ingest" + }, + "virtual_network_configuration": { + "attr_type": "virtual_network_configuration" + }, + "key_vault_properties": { + "attr_type": "key_vault_properties" + }, + "enable_purge": { + "attr_type": "enable_purge" + }, + "language_extensions": { + "attr_type": "language_extensions" + }, + "enable_double_encryption": { + "attr_type": "enable_double_encryption" + }, + "public_network_access": { + "attr_type": "public_network_access" + }, + "allowed_ip_range_list": { + "attr_type": "allowed_ip_range_list" + }, + "engine_type": { + "attr_type": "engine_type" + }, + "accepted_audiences": { + "attr_type": "accepted_audiences" + }, + "enable_auto_stop": { + "attr_type": "enable_auto_stop" + }, + "restrict_outbound_network_access": { + "attr_type": "restrict_outbound_network_access" + }, + "allowed_fqdn_list": { + "attr_type": "allowed_fqdn_list" + }, + "callout_policies": { + "attr_type": "callout_policies" + }, + "public_ip_type": { + "attr_type": "public_ip_type" + }, + "virtual_cluster_graduation_properties": { + "attr_type": "virtual_cluster_graduation_properties" + }, + "private_endpoint_connections": { + "attr_type": null + }, + "migration_cluster": { + "attr_type": null + }, + "zone_status": { + "attr_type": null + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "principal_id": { + "attr_type": null + }, + "client_id": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "Compression": { + "type": "Enum", + "methods": {}, + "properties": { + "G_ZIP": "G_ZIP", + "NONE": "NONE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "CosmosDbDataConnection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": "none", + "param_type": "keyword_only" + }, + "table_name": { + "default": "none", + "param_type": "keyword_only" + }, + "mapping_rule_name": { + "default": "none", + "param_type": "keyword_only" + }, + "managed_identity_resource_id": { + "default": "none", + "param_type": "keyword_only" + }, + "cosmos_db_account_resource_id": { + "default": "none", + "param_type": "keyword_only" + }, + "cosmos_db_database": { + "default": "none", + "param_type": "keyword_only" + }, + "cosmos_db_container": { + "default": "none", + "param_type": "keyword_only" + }, + "retrieval_start_date": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "kind": { + "attr_type": null + }, + "table_name": { + "attr_type": "table_name" + }, + "mapping_rule_name": { + "attr_type": "mapping_rule_name" + }, + "managed_identity_resource_id": { + "attr_type": "managed_identity_resource_id" + }, + "managed_identity_object_id": { + "attr_type": null + }, + "cosmos_db_account_resource_id": { + "attr_type": "cosmos_db_account_resource_id" + }, + "cosmos_db_database": { + "attr_type": "cosmos_db_database" + }, + "cosmos_db_container": { + "attr_type": "cosmos_db_container" + }, + "retrieval_start_date": { + "attr_type": "retrieval_start_date" + }, + "provisioning_state": { + "attr_type": null + }, + "location": { + "attr_type": "location" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "CreatedByType": { + "type": "Enum", + "methods": {}, + "properties": { + "APPLICATION": "APPLICATION", + "KEY": "KEY", + "MANAGED_IDENTITY": "MANAGED_IDENTITY", + "USER": "USER", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "DataConnection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "location": { + "attr_type": "location" + }, + "kind": { + "attr_type": null + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "DataConnectionCheckNameRequest": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "DataConnectionKind": { + "type": "Enum", + "methods": {}, + "properties": { + "COSMOS_DB": "COSMOS_DB", + "EVENT_GRID": "EVENT_GRID", + "EVENT_GRID_WITH_MANAGED_IDENTITY": "EVENT_GRID_WITH_MANAGED_IDENTITY", + "EVENT_HUB": "EVENT_HUB", + "EVENT_HUB_WITH_MANAGED_IDENTITY": "EVENT_HUB_WITH_MANAGED_IDENTITY", + "IOT_HUB": "IOT_HUB", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "DataConnectionListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "DataConnectionValidation": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "data_connection_name": { + "default": "none", + "param_type": "keyword_only" + }, + "properties": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "data_connection_name": { + "attr_type": "data_connection_name" + }, + "properties": { + "attr_type": "properties" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "DataConnectionValidationListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "DataConnectionValidationResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "error_message": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "error_message": { + "attr_type": "error_message" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "Database": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "location": { + "attr_type": "location" + }, + "kind": { + "attr_type": null + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "DatabaseInviteFollowerRequest": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "invitee_email": { + "default": null, + "param_type": "keyword_only" + }, + "table_level_sharing_properties": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "invitee_email": { + "attr_type": "invitee_email" + }, + "table_level_sharing_properties": { + "attr_type": "table_level_sharing_properties" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "DatabaseInviteFollowerResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "generated_invitation": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "generated_invitation": { + "attr_type": "generated_invitation" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "DatabaseListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "next_link": { + "attr_type": "next_link" + }, + "value": { + "attr_type": "value" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "DatabasePrincipal": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "role": { + "default": null, + "param_type": "keyword_only" + }, + "name": { + "default": null, + "param_type": "keyword_only" + }, + "type": { + "default": null, + "param_type": "keyword_only" + }, + "fqn": { + "default": "none", + "param_type": "keyword_only" + }, + "email": { + "default": "none", + "param_type": "keyword_only" + }, + "app_id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "role": { + "attr_type": "role" + }, + "name": { + "attr_type": "name" + }, + "type": { + "attr_type": "type" + }, + "fqn": { + "attr_type": "fqn" + }, + "email": { + "attr_type": "email" + }, + "app_id": { + "attr_type": "app_id" + }, + "tenant_name": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "DatabasePrincipalAssignment": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_id": { + "default": "none", + "param_type": "keyword_only" + }, + "role": { + "default": "none", + "param_type": "keyword_only" + }, + "tenant_id": { + "default": "none", + "param_type": "keyword_only" + }, + "principal_type": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "principal_id": { + "attr_type": "principal_id" + }, + "role": { + "attr_type": "role" + }, + "tenant_id": { + "attr_type": "tenant_id" + }, + "principal_type": { + "attr_type": "principal_type" + }, + "tenant_name": { + "attr_type": null + }, + "principal_name": { + "attr_type": null + }, + "provisioning_state": { + "attr_type": null + }, + "aad_object_id": { + "attr_type": null + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "DatabasePrincipalAssignmentCheckNameRequest": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "DatabasePrincipalAssignmentListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "DatabasePrincipalListRequest": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "DatabasePrincipalListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "DatabasePrincipalRole": { + "type": "Enum", + "methods": {}, + "properties": { + "ADMIN": "ADMIN", + "INGESTOR": "INGESTOR", + "MONITOR": "MONITOR", + "UNRESTRICTED_VIEWER": "UNRESTRICTED_VIEWER", + "USER": "USER", + "VIEWER": "VIEWER", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "DatabasePrincipalType": { + "type": "Enum", + "methods": {}, + "properties": { + "APP": "APP", + "GROUP": "GROUP", + "USER": "USER", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "DatabaseRouting": { + "type": "Enum", + "methods": {}, + "properties": { + "MULTI": "MULTI", + "SINGLE": "SINGLE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "DatabaseShareOrigin": { + "type": "Enum", + "methods": {}, + "properties": { + "DATA_SHARE": "DATA_SHARE", + "DIRECT": "DIRECT", + "OTHER": "OTHER", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "DatabaseStatistics": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "size": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "size": { + "attr_type": "size" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "DefaultPrincipalsModificationKind": { + "type": "Enum", + "methods": {}, + "properties": { + "NONE": "NONE", + "REPLACE": "REPLACE", + "UNION": "UNION", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "DiagnoseVirtualNetworkResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "findings": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "findings": { + "attr_type": "findings" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "EndpointDependency": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "domain_name": { + "default": "none", + "param_type": "keyword_only" + }, + "endpoint_details": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "domain_name": { + "attr_type": "domain_name" + }, + "endpoint_details": { + "attr_type": "endpoint_details" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "EndpointDetail": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "port": { + "default": "none", + "param_type": "keyword_only" + }, + "ip_address": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "port": { + "attr_type": "port" + }, + "ip_address": { + "attr_type": "ip_address" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "EngineType": { + "type": "Enum", + "methods": {}, + "properties": { + "V2": "V2", + "V3": "V3", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ErrorAdditionalInfo": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "type": { + "attr_type": null + }, + "info": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ErrorDetail": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "code": { + "attr_type": null + }, + "message": { + "attr_type": null + }, + "target": { + "attr_type": null + }, + "details": { + "attr_type": null + }, + "additional_info": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ErrorResponse": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "error": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "error": { + "attr_type": "error" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "EventGridDataConnection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": "none", + "param_type": "keyword_only" + }, + "storage_account_resource_id": { + "default": "none", + "param_type": "keyword_only" + }, + "event_grid_resource_id": { + "default": "none", + "param_type": "keyword_only" + }, + "event_hub_resource_id": { + "default": "none", + "param_type": "keyword_only" + }, + "consumer_group": { + "default": "none", + "param_type": "keyword_only" + }, + "table_name": { + "default": "none", + "param_type": "keyword_only" + }, + "mapping_rule_name": { + "default": "none", + "param_type": "keyword_only" + }, + "data_format": { + "default": "none", + "param_type": "keyword_only" + }, + "ignore_first_record": { + "default": "none", + "param_type": "keyword_only" + }, + "blob_storage_event_type": { + "default": "none", + "param_type": "keyword_only" + }, + "managed_identity_resource_id": { + "default": "none", + "param_type": "keyword_only" + }, + "database_routing": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "kind": { + "attr_type": null + }, + "storage_account_resource_id": { + "attr_type": "storage_account_resource_id" + }, + "event_grid_resource_id": { + "attr_type": "event_grid_resource_id" + }, + "event_hub_resource_id": { + "attr_type": "event_hub_resource_id" + }, + "consumer_group": { + "attr_type": "consumer_group" + }, + "table_name": { + "attr_type": "table_name" + }, + "mapping_rule_name": { + "attr_type": "mapping_rule_name" + }, + "data_format": { + "attr_type": "data_format" + }, + "ignore_first_record": { + "attr_type": "ignore_first_record" + }, + "blob_storage_event_type": { + "attr_type": "blob_storage_event_type" + }, + "managed_identity_resource_id": { + "attr_type": "managed_identity_resource_id" + }, + "managed_identity_object_id": { + "attr_type": null + }, + "database_routing": { + "attr_type": "database_routing" + }, + "provisioning_state": { + "attr_type": null + }, + "location": { + "attr_type": "location" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "EventGridDataConnectionWithManagedIdentity": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": "none", + "param_type": "keyword_only" + }, + "storage_account_resource_id_for_managed_identity": { + "default": "none", + "param_type": "keyword_only" + }, + "event_hub_resource_id_for_managed_identity": { + "default": "none", + "param_type": "keyword_only" + }, + "event_grid_resource_id": { + "default": "none", + "param_type": "keyword_only" + }, + "consumer_group": { + "default": "none", + "param_type": "keyword_only" + }, + "table_name": { + "default": "none", + "param_type": "keyword_only" + }, + "mapping_rule_name": { + "default": "none", + "param_type": "keyword_only" + }, + "data_format": { + "default": "none", + "param_type": "keyword_only" + }, + "ignore_first_record": { + "default": "none", + "param_type": "keyword_only" + }, + "blob_storage_event_type": { + "default": "none", + "param_type": "keyword_only" + }, + "managed_identity_resource_id": { + "default": "none", + "param_type": "keyword_only" + }, + "database_routing": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "kind": { + "attr_type": null + }, + "storage_account_resource_id_for_managed_identity": { + "attr_type": "storage_account_resource_id_for_managed_identity" + }, + "event_hub_resource_id_for_managed_identity": { + "attr_type": "event_hub_resource_id_for_managed_identity" + }, + "event_grid_resource_id": { + "attr_type": "event_grid_resource_id" + }, + "consumer_group": { + "attr_type": "consumer_group" + }, + "table_name": { + "attr_type": "table_name" + }, + "mapping_rule_name": { + "attr_type": "mapping_rule_name" + }, + "data_format": { + "attr_type": "data_format" + }, + "ignore_first_record": { + "attr_type": "ignore_first_record" + }, + "blob_storage_event_type": { + "attr_type": "blob_storage_event_type" + }, + "managed_identity_resource_id": { + "attr_type": "managed_identity_resource_id" + }, + "managed_identity_object_id": { + "attr_type": null + }, + "database_routing": { + "attr_type": "database_routing" + }, + "provisioning_state": { + "attr_type": null + }, + "location": { + "attr_type": "location" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "EventGridDataFormat": { + "type": "Enum", + "methods": {}, + "properties": { + "APACHEAVRO": "APACHEAVRO", + "AVRO": "AVRO", + "AZMONSTREAM": "AZMONSTREAM", + "CSV": "CSV", + "JSON": "JSON", + "MULTIJSON": "MULTIJSON", + "ORC": "ORC", + "PARQUET": "PARQUET", + "PSV": "PSV", + "RAW": "RAW", + "SCSV": "SCSV", + "SINGLEJSON": "SINGLEJSON", + "SOHSV": "SOHSV", + "TSV": "TSV", + "TSVE": "TSVE", + "TXT": "TXT", + "W3_CLOGFILE": "W3_CLOGFILE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "EventHubDataConnection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": "none", + "param_type": "keyword_only" + }, + "event_hub_resource_id": { + "default": "none", + "param_type": "keyword_only" + }, + "consumer_group": { + "default": "none", + "param_type": "keyword_only" + }, + "table_name": { + "default": "none", + "param_type": "keyword_only" + }, + "mapping_rule_name": { + "default": "none", + "param_type": "keyword_only" + }, + "data_format": { + "default": "none", + "param_type": "keyword_only" + }, + "event_system_properties": { + "default": "none", + "param_type": "keyword_only" + }, + "compression": { + "default": "str", + "param_type": "keyword_only" + }, + "managed_identity_resource_id": { + "default": "none", + "param_type": "keyword_only" + }, + "database_routing": { + "default": "none", + "param_type": "keyword_only" + }, + "retrieval_start_date": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "kind": { + "attr_type": null + }, + "event_hub_resource_id": { + "attr_type": "event_hub_resource_id" + }, + "consumer_group": { + "attr_type": "consumer_group" + }, + "table_name": { + "attr_type": "table_name" + }, + "mapping_rule_name": { + "attr_type": "mapping_rule_name" + }, + "data_format": { + "attr_type": "data_format" + }, + "event_system_properties": { + "attr_type": "event_system_properties" + }, + "compression": { + "attr_type": "compression" + }, + "provisioning_state": { + "attr_type": null + }, + "managed_identity_resource_id": { + "attr_type": "managed_identity_resource_id" + }, + "managed_identity_object_id": { + "attr_type": null + }, + "database_routing": { + "attr_type": "database_routing" + }, + "retrieval_start_date": { + "attr_type": "retrieval_start_date" + }, + "location": { + "attr_type": "location" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "EventHubDataConnectionWithManagedIdentity": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": "none", + "param_type": "keyword_only" + }, + "event_hub_resource_id_for_managed_identity": { + "default": "none", + "param_type": "keyword_only" + }, + "consumer_group": { + "default": "none", + "param_type": "keyword_only" + }, + "table_name": { + "default": "none", + "param_type": "keyword_only" + }, + "mapping_rule_name": { + "default": "none", + "param_type": "keyword_only" + }, + "data_format": { + "default": "none", + "param_type": "keyword_only" + }, + "event_system_properties": { + "default": "none", + "param_type": "keyword_only" + }, + "compression": { + "default": "str", + "param_type": "keyword_only" + }, + "managed_identity_resource_id": { + "default": "none", + "param_type": "keyword_only" + }, + "database_routing": { + "default": "none", + "param_type": "keyword_only" + }, + "retrieval_start_date": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "kind": { + "attr_type": null + }, + "event_hub_resource_id_for_managed_identity": { + "attr_type": "event_hub_resource_id_for_managed_identity" + }, + "consumer_group": { + "attr_type": "consumer_group" + }, + "table_name": { + "attr_type": "table_name" + }, + "mapping_rule_name": { + "attr_type": "mapping_rule_name" + }, + "data_format": { + "attr_type": "data_format" + }, + "event_system_properties": { + "attr_type": "event_system_properties" + }, + "compression": { + "attr_type": "compression" + }, + "provisioning_state": { + "attr_type": null + }, + "managed_identity_resource_id": { + "attr_type": "managed_identity_resource_id" + }, + "managed_identity_object_id": { + "attr_type": null + }, + "database_routing": { + "attr_type": "database_routing" + }, + "retrieval_start_date": { + "attr_type": "retrieval_start_date" + }, + "location": { + "attr_type": "location" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "EventHubDataFormat": { + "type": "Enum", + "methods": {}, + "properties": { + "APACHEAVRO": "APACHEAVRO", + "AVRO": "AVRO", + "AZMONSTREAM": "AZMONSTREAM", + "CSV": "CSV", + "JSON": "JSON", + "MULTIJSON": "MULTIJSON", + "ORC": "ORC", + "PARQUET": "PARQUET", + "PSV": "PSV", + "RAW": "RAW", + "SCSV": "SCSV", + "SINGLEJSON": "SINGLEJSON", + "SOHSV": "SOHSV", + "TSV": "TSV", + "TSVE": "TSVE", + "TXT": "TXT", + "W3_CLOGFILE": "W3_CLOGFILE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "FollowerDatabaseDefinition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_resource_id": { + "default": null, + "param_type": "keyword_only" + }, + "attached_database_configuration_name": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "cluster_resource_id": { + "attr_type": "cluster_resource_id" + }, + "attached_database_configuration_name": { + "attr_type": "attached_database_configuration_name" + }, + "database_name": { + "attr_type": null + }, + "table_level_sharing_properties": { + "attr_type": null + }, + "database_share_origin": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "FollowerDatabaseDefinitionGet": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_resource_id": { + "default": "none", + "param_type": "keyword_only" + }, + "attached_database_configuration_name": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "cluster_resource_id": { + "attr_type": "cluster_resource_id" + }, + "attached_database_configuration_name": { + "attr_type": "attached_database_configuration_name" + }, + "database_name": { + "attr_type": null + }, + "table_level_sharing_properties": { + "attr_type": null + }, + "database_share_origin": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "FollowerDatabaseListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "FollowerDatabaseListResultGet": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "Identity": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "default": null, + "param_type": "keyword_only" + }, + "user_assigned_identities": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "principal_id": { + "attr_type": null + }, + "tenant_id": { + "attr_type": null + }, + "type": { + "attr_type": "type" + }, + "user_assigned_identities": { + "attr_type": "user_assigned_identities" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "IdentityType": { + "type": "Enum", + "methods": {}, + "properties": { + "NONE": "NONE", + "SYSTEM_ASSIGNED": "SYSTEM_ASSIGNED", + "SYSTEM_ASSIGNED_USER_ASSIGNED": "SYSTEM_ASSIGNED_USER_ASSIGNED", + "USER_ASSIGNED": "USER_ASSIGNED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "IotHubDataConnection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": "none", + "param_type": "keyword_only" + }, + "iot_hub_resource_id": { + "default": "none", + "param_type": "keyword_only" + }, + "consumer_group": { + "default": "none", + "param_type": "keyword_only" + }, + "table_name": { + "default": "none", + "param_type": "keyword_only" + }, + "mapping_rule_name": { + "default": "none", + "param_type": "keyword_only" + }, + "data_format": { + "default": "none", + "param_type": "keyword_only" + }, + "event_system_properties": { + "default": "none", + "param_type": "keyword_only" + }, + "shared_access_policy_name": { + "default": "none", + "param_type": "keyword_only" + }, + "database_routing": { + "default": "none", + "param_type": "keyword_only" + }, + "retrieval_start_date": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "kind": { + "attr_type": null + }, + "iot_hub_resource_id": { + "attr_type": "iot_hub_resource_id" + }, + "consumer_group": { + "attr_type": "consumer_group" + }, + "table_name": { + "attr_type": "table_name" + }, + "mapping_rule_name": { + "attr_type": "mapping_rule_name" + }, + "data_format": { + "attr_type": "data_format" + }, + "event_system_properties": { + "attr_type": "event_system_properties" + }, + "shared_access_policy_name": { + "attr_type": "shared_access_policy_name" + }, + "database_routing": { + "attr_type": "database_routing" + }, + "retrieval_start_date": { + "attr_type": "retrieval_start_date" + }, + "provisioning_state": { + "attr_type": null + }, + "location": { + "attr_type": "location" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "IotHubDataFormat": { + "type": "Enum", + "methods": {}, + "properties": { + "APACHEAVRO": "APACHEAVRO", + "AVRO": "AVRO", + "AZMONSTREAM": "AZMONSTREAM", + "CSV": "CSV", + "JSON": "JSON", + "MULTIJSON": "MULTIJSON", + "ORC": "ORC", + "PARQUET": "PARQUET", + "PSV": "PSV", + "RAW": "RAW", + "SCSV": "SCSV", + "SINGLEJSON": "SINGLEJSON", + "SOHSV": "SOHSV", + "TSV": "TSV", + "TSVE": "TSVE", + "TXT": "TXT", + "W3_CLOGFILE": "W3_CLOGFILE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "IssueType": { + "type": "Enum", + "methods": {}, + "properties": { + "CONFIGURATION_PROPAGATION_FAILURE": "CONFIGURATION_PROPAGATION_FAILURE", + "UNKNOWN": "UNKNOWN", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "KeyVaultProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_name": { + "default": "none", + "param_type": "keyword_only" + }, + "key_version": { + "default": "none", + "param_type": "keyword_only" + }, + "key_vault_uri": { + "default": "none", + "param_type": "keyword_only" + }, + "user_identity": { + "default": "none", + "param_type": "keyword_only" + }, + "federated_identity_client_id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "key_name": { + "attr_type": "key_name" + }, + "key_version": { + "attr_type": "key_version" + }, + "key_vault_uri": { + "attr_type": "key_vault_uri" + }, + "user_identity": { + "attr_type": "user_identity" + }, + "federated_identity_client_id": { + "attr_type": "federated_identity_client_id" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "Kind": { + "type": "Enum", + "methods": {}, + "properties": { + "READ_ONLY_FOLLOWING": "READ_ONLY_FOLLOWING", + "READ_WRITE": "READ_WRITE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "Language": { + "type": "Enum", + "methods": {}, + "properties": { + "PYTHON": "PYTHON", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "LanguageExtension": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "language_extension_name": { + "default": "none", + "param_type": "keyword_only" + }, + "language_extension_image_name": { + "default": "none", + "param_type": "keyword_only" + }, + "language_extension_custom_image_name": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "language_extension_name": { + "attr_type": "language_extension_name" + }, + "language_extension_image_name": { + "attr_type": "language_extension_image_name" + }, + "language_extension_custom_image_name": { + "attr_type": "language_extension_custom_image_name" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "LanguageExtensionImageName": { + "type": "Enum", + "methods": {}, + "properties": { + "PYTHON3_10_8": "PYTHON3_10_8", + "PYTHON3_10_8_DL": "PYTHON3_10_8_DL", + "PYTHON3_11_7": "PYTHON3_11_7", + "PYTHON3_11_7_DL": "PYTHON3_11_7_DL", + "PYTHON3_6_5": "PYTHON3_6_5", + "PYTHON_CUSTOM_IMAGE": "PYTHON_CUSTOM_IMAGE", + "R": "R", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "LanguageExtensionName": { + "type": "Enum", + "methods": {}, + "properties": { + "PYTHON": "PYTHON", + "R": "R", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "LanguageExtensionsList": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ListResourceSkusResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ManagedPrivateEndpoint": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "private_link_resource_id": { + "default": "none", + "param_type": "keyword_only" + }, + "private_link_resource_region": { + "default": "none", + "param_type": "keyword_only" + }, + "group_id": { + "default": "none", + "param_type": "keyword_only" + }, + "request_message": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "system_data": { + "attr_type": null + }, + "private_link_resource_id": { + "attr_type": "private_link_resource_id" + }, + "private_link_resource_region": { + "attr_type": "private_link_resource_region" + }, + "group_id": { + "attr_type": "group_id" + }, + "request_message": { + "attr_type": "request_message" + }, + "provisioning_state": { + "attr_type": null + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ManagedPrivateEndpointListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ManagedPrivateEndpointsCheckNameRequest": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "MigrationClusterProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "id": { + "attr_type": null + }, + "uri": { + "attr_type": null + }, + "data_ingestion_uri": { + "attr_type": null + }, + "role": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "MigrationClusterRole": { + "type": "Enum", + "methods": {}, + "properties": { + "DESTINATION": "DESTINATION", + "SOURCE": "SOURCE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "NetworkSecurityPerimeter": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "default": "none", + "param_type": "keyword_only" + }, + "perimeter_guid": { + "default": "none", + "param_type": "keyword_only" + }, + "location": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "id": { + "attr_type": "id" + }, + "perimeter_guid": { + "attr_type": "perimeter_guid" + }, + "location": { + "attr_type": "location" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NetworkSecurityPerimeterConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "provisioning_state": { + "attr_type": null + }, + "provisioning_issues": { + "attr_type": null + }, + "network_security_perimeter": { + "attr_type": null + }, + "resource_association": { + "attr_type": null + }, + "profile": { + "attr_type": null + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NetworkSecurityPerimeterConfigurationList": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": null + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NetworkSecurityPerimeterConfigurationPropertiesProfile": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": "none", + "param_type": "keyword_only" + }, + "access_rules_version": { + "default": "none", + "param_type": "keyword_only" + }, + "access_rules": { + "default": "none", + "param_type": "keyword_only" + }, + "diagnostic_settings_version": { + "default": "none", + "param_type": "keyword_only" + }, + "enabled_log_categories": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "access_rules_version": { + "attr_type": "access_rules_version" + }, + "access_rules": { + "attr_type": "access_rules" + }, + "diagnostic_settings_version": { + "attr_type": "diagnostic_settings_version" + }, + "enabled_log_categories": { + "attr_type": "enabled_log_categories" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": "none", + "param_type": "keyword_only" + }, + "access_mode": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "access_mode": { + "attr_type": "access_mode" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NetworkSecurityPerimeterConfigurationProvisioningState": { + "type": "Enum", + "methods": {}, + "properties": { + "ACCEPTED": "ACCEPTED", + "CANCELED": "CANCELED", + "DELETING": "DELETING", + "FAILED": "FAILED", + "SUCCEEDED": "SUCCEEDED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "NspAccessRule": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "properties": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NspAccessRuleDirection": { + "type": "Enum", + "methods": {}, + "properties": { + "INBOUND": "INBOUND", + "OUTBOUND": "OUTBOUND", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "NspAccessRuleProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "direction": { + "default": "none", + "param_type": "keyword_only" + }, + "address_prefixes": { + "default": "none", + "param_type": "keyword_only" + }, + "subscriptions": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "direction": { + "attr_type": "direction" + }, + "address_prefixes": { + "attr_type": "address_prefixes" + }, + "subscriptions": { + "attr_type": "subscriptions" + }, + "network_security_perimeters": { + "attr_type": null + }, + "fully_qualified_domain_names": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "NspAccessRulePropertiesSubscriptionsItem": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "id": { + "attr_type": "id" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "Operation": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": "none", + "param_type": "keyword_only" + }, + "display": { + "default": "none", + "param_type": "keyword_only" + }, + "origin": { + "default": "none", + "param_type": "keyword_only" + }, + "properties": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "display": { + "attr_type": "display" + }, + "origin": { + "attr_type": "origin" + }, + "properties": { + "attr_type": "properties" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "OperationDisplay": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "provider": { + "default": "none", + "param_type": "keyword_only" + }, + "operation": { + "default": "none", + "param_type": "keyword_only" + }, + "resource": { + "default": "none", + "param_type": "keyword_only" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "provider": { + "attr_type": "provider" + }, + "operation": { + "attr_type": "operation" + }, + "resource": { + "attr_type": "resource" + }, + "description": { + "attr_type": "description" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "OperationListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "next_link": { + "attr_type": "next_link" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "OperationResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "start_time": { + "default": "none", + "param_type": "keyword_only" + }, + "end_time": { + "default": "none", + "param_type": "keyword_only" + }, + "percent_complete": { + "default": "none", + "param_type": "keyword_only" + }, + "code": { + "default": "none", + "param_type": "keyword_only" + }, + "message": { + "default": "none", + "param_type": "keyword_only" + }, + "operation_kind": { + "default": "none", + "param_type": "keyword_only" + }, + "operation_state": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "status": { + "attr_type": null + }, + "start_time": { + "attr_type": "start_time" + }, + "end_time": { + "attr_type": "end_time" + }, + "percent_complete": { + "attr_type": "percent_complete" + }, + "code": { + "attr_type": "code" + }, + "message": { + "attr_type": "message" + }, + "operation_kind": { + "attr_type": "operation_kind" + }, + "provisioning_state": { + "attr_type": null + }, + "operation_state": { + "attr_type": "operation_state" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "OptimizedAutoscale": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "version": { + "default": null, + "param_type": "keyword_only" + }, + "is_enabled": { + "default": null, + "param_type": "keyword_only" + }, + "minimum": { + "default": null, + "param_type": "keyword_only" + }, + "maximum": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "version": { + "attr_type": "version" + }, + "is_enabled": { + "attr_type": "is_enabled" + }, + "minimum": { + "attr_type": "minimum" + }, + "maximum": { + "attr_type": "maximum" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "OutboundAccess": { + "type": "Enum", + "methods": {}, + "properties": { + "ALLOW": "ALLOW", + "DENY": "DENY", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "OutboundNetworkDependenciesEndpoint": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "category": { + "default": "none", + "param_type": "keyword_only" + }, + "endpoints": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "etag": { + "attr_type": null + }, + "category": { + "attr_type": "category" + }, + "endpoints": { + "attr_type": "endpoints" + }, + "provisioning_state": { + "attr_type": null + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "OutboundNetworkDependenciesEndpointListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "next_link": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "PrincipalPermissionsAction": { + "type": "Enum", + "methods": {}, + "properties": { + "REMOVE_PERMISSION_ON_SCRIPT_COMPLETION": "REMOVE_PERMISSION_ON_SCRIPT_COMPLETION", + "RETAIN_PERMISSION_ON_SCRIPT_COMPLETION": "RETAIN_PERMISSION_ON_SCRIPT_COMPLETION", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "PrincipalType": { + "type": "Enum", + "methods": {}, + "properties": { + "APP": "APP", + "GROUP": "GROUP", + "USER": "USER", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "PrincipalsModificationKind": { + "type": "Enum", + "methods": {}, + "properties": { + "NONE": "NONE", + "REPLACE": "REPLACE", + "UNION": "UNION", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "PrivateEndpointConnection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "private_link_service_connection_state": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "system_data": { + "attr_type": null + }, + "private_endpoint": { + "attr_type": null + }, + "private_link_service_connection_state": { + "attr_type": "private_link_service_connection_state" + }, + "group_id": { + "attr_type": null + }, + "provisioning_state": { + "attr_type": null + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "PrivateEndpointConnectionListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "PrivateEndpointProperty": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "id": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "PrivateLinkResource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "system_data": { + "attr_type": null + }, + "group_id": { + "attr_type": null + }, + "required_members": { + "attr_type": null + }, + "required_zone_names": { + "attr_type": null + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "PrivateLinkResourceListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "PrivateLinkServiceConnectionStateProperty": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "status": { + "default": "none", + "param_type": "keyword_only" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "status": { + "attr_type": "status" + }, + "description": { + "attr_type": "description" + }, + "actions_required": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ProvisioningIssue": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "properties": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ProvisioningIssueProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "issue_type": { + "default": "none", + "param_type": "keyword_only" + }, + "severity": { + "default": "none", + "param_type": "keyword_only" + }, + "description": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "issue_type": { + "attr_type": "issue_type" + }, + "severity": { + "attr_type": "severity" + }, + "description": { + "attr_type": "description" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ProvisioningState": { + "type": "Enum", + "methods": {}, + "properties": { + "CANCELED": "CANCELED", + "CREATING": "CREATING", + "DELETING": "DELETING", + "FAILED": "FAILED", + "MOVING": "MOVING", + "RUNNING": "RUNNING", + "SUCCEEDED": "SUCCEEDED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ProxyResource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "PublicIPType": { + "type": "Enum", + "methods": {}, + "properties": { + "DUAL_STACK": "DUAL_STACK", + "I_PV4": "I_PV4", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "PublicNetworkAccess": { + "type": "Enum", + "methods": {}, + "properties": { + "DISABLED": "DISABLED", + "ENABLED": "ENABLED", + "SECURED_BY_PERIMETER": "SECURED_BY_PERIMETER", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ReadOnlyFollowingDatabase": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": "none", + "param_type": "keyword_only" + }, + "hot_cache_period": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "kind": { + "attr_type": null + }, + "provisioning_state": { + "attr_type": null + }, + "soft_delete_period": { + "attr_type": null + }, + "hot_cache_period": { + "attr_type": "hot_cache_period" + }, + "statistics": { + "attr_type": null + }, + "leader_cluster_resource_id": { + "attr_type": null + }, + "attached_database_configuration_name": { + "attr_type": null + }, + "principals_modification_kind": { + "attr_type": null + }, + "table_level_sharing_properties": { + "attr_type": null + }, + "original_database_name": { + "attr_type": null + }, + "database_share_origin": { + "attr_type": null + }, + "suspension_details": { + "attr_type": null + }, + "location": { + "attr_type": "location" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ReadWriteDatabase": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": "none", + "param_type": "keyword_only" + }, + "soft_delete_period": { + "default": "none", + "param_type": "keyword_only" + }, + "hot_cache_period": { + "default": "none", + "param_type": "keyword_only" + }, + "key_vault_properties": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "kind": { + "attr_type": null + }, + "provisioning_state": { + "attr_type": null + }, + "soft_delete_period": { + "attr_type": "soft_delete_period" + }, + "hot_cache_period": { + "attr_type": "hot_cache_period" + }, + "statistics": { + "attr_type": null + }, + "is_followed": { + "attr_type": null + }, + "key_vault_properties": { + "attr_type": "key_vault_properties" + }, + "suspension_details": { + "attr_type": null + }, + "location": { + "attr_type": "location" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "Reason": { + "type": "Enum", + "methods": {}, + "properties": { + "ALREADY_EXISTS": "ALREADY_EXISTS", + "INVALID": "INVALID", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "Resource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ResourceAssociationAccessMode": { + "type": "Enum", + "methods": {}, + "properties": { + "AUDIT": "AUDIT", + "ENFORCED": "ENFORCED", + "LEARNING": "LEARNING", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ResourceSkuCapabilities": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": null + }, + "value": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ResourceSkuZoneDetails": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": null + }, + "capabilities": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "SandboxCustomImage": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "language": { + "default": "none", + "param_type": "keyword_only" + }, + "language_version": { + "default": "none", + "param_type": "keyword_only" + }, + "base_image_name": { + "default": "none", + "param_type": "keyword_only" + }, + "requirements_file_content": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "language": { + "attr_type": "language" + }, + "language_version": { + "attr_type": "language_version" + }, + "base_image_name": { + "attr_type": "base_image_name" + }, + "requirements_file_content": { + "attr_type": "requirements_file_content" + }, + "provisioning_state": { + "attr_type": null + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "SandboxCustomImagesCheckNameRequest": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "SandboxCustomImagesListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "next_link": { + "default": "none", + "param_type": "keyword_only" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "next_link": { + "attr_type": "next_link" + }, + "value": { + "attr_type": "value" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "Script": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "script_url": { + "default": "none", + "param_type": "keyword_only" + }, + "script_url_sas_token": { + "default": "none", + "param_type": "keyword_only" + }, + "script_content": { + "default": "none", + "param_type": "keyword_only" + }, + "force_update_tag": { + "default": "none", + "param_type": "keyword_only" + }, + "continue_on_errors": { + "default": "bool", + "param_type": "keyword_only" + }, + "script_level": { + "default": "none", + "param_type": "keyword_only" + }, + "principal_permissions_action": { + "default": "none", + "param_type": "keyword_only" + }, + "managed_identity_resource_id": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "system_data": { + "attr_type": null + }, + "script_url": { + "attr_type": "script_url" + }, + "script_url_sas_token": { + "attr_type": "script_url_sas_token" + }, + "script_content": { + "attr_type": "script_content" + }, + "force_update_tag": { + "attr_type": "force_update_tag" + }, + "continue_on_errors": { + "attr_type": "continue_on_errors" + }, + "provisioning_state": { + "attr_type": null + }, + "script_level": { + "attr_type": "script_level" + }, + "principal_permissions_action": { + "attr_type": "principal_permissions_action" + }, + "managed_identity_resource_id": { + "attr_type": "managed_identity_resource_id" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ScriptCheckNameRequest": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "name": { + "attr_type": "name" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "ScriptLevel": { + "type": "Enum", + "methods": {}, + "properties": { + "CLUSTER": "CLUSTER", + "DATABASE": "DATABASE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ScriptListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "Severity": { + "type": "Enum", + "methods": {}, + "properties": { + "ERROR": "ERROR", + "WARNING": "WARNING", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "SkuDescription": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "resource_type": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "tier": { + "attr_type": null + }, + "locations": { + "attr_type": null + }, + "location_info": { + "attr_type": null + }, + "restrictions": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "SkuDescriptionList": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "SkuLocationInfoItem": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": null, + "param_type": "keyword_only" + }, + "zones": { + "default": "none", + "param_type": "keyword_only" + }, + "zone_details": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "location": { + "attr_type": "location" + }, + "zones": { + "attr_type": "zones" + }, + "zone_details": { + "attr_type": "zone_details" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "State": { + "type": "Enum", + "methods": {}, + "properties": { + "CREATING": "CREATING", + "DELETED": "DELETED", + "DELETING": "DELETING", + "MIGRATED": "MIGRATED", + "RUNNING": "RUNNING", + "STARTING": "STARTING", + "STOPPED": "STOPPED", + "STOPPING": "STOPPING", + "UNAVAILABLE": "UNAVAILABLE", + "UPDATING": "UPDATING", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "Status": { + "type": "Enum", + "methods": {}, + "properties": { + "CANCELED": "CANCELED", + "FAILED": "FAILED", + "RUNNING": "RUNNING", + "SUCCEEDED": "SUCCEEDED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "SuspensionDetails": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "suspension_start_date": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "suspension_start_date": { + "attr_type": "suspension_start_date" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "SystemData": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "created_by": { + "default": "none", + "param_type": "keyword_only" + }, + "created_by_type": { + "default": "none", + "param_type": "keyword_only" + }, + "created_at": { + "default": "none", + "param_type": "keyword_only" + }, + "last_modified_by": { + "default": "none", + "param_type": "keyword_only" + }, + "last_modified_by_type": { + "default": "none", + "param_type": "keyword_only" + }, + "last_modified_at": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "created_by": { + "attr_type": "created_by" + }, + "created_by_type": { + "attr_type": "created_by_type" + }, + "created_at": { + "attr_type": "created_at" + }, + "last_modified_by": { + "attr_type": "last_modified_by" + }, + "last_modified_by_type": { + "attr_type": "last_modified_by_type" + }, + "last_modified_at": { + "attr_type": "last_modified_at" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "TableLevelSharingProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "tables_to_include": { + "default": "none", + "param_type": "keyword_only" + }, + "tables_to_exclude": { + "default": "none", + "param_type": "keyword_only" + }, + "external_tables_to_include": { + "default": "none", + "param_type": "keyword_only" + }, + "external_tables_to_exclude": { + "default": "none", + "param_type": "keyword_only" + }, + "materialized_views_to_include": { + "default": "none", + "param_type": "keyword_only" + }, + "materialized_views_to_exclude": { + "default": "none", + "param_type": "keyword_only" + }, + "functions_to_include": { + "default": "none", + "param_type": "keyword_only" + }, + "functions_to_exclude": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "tables_to_include": { + "attr_type": "tables_to_include" + }, + "tables_to_exclude": { + "attr_type": "tables_to_exclude" + }, + "external_tables_to_include": { + "attr_type": "external_tables_to_include" + }, + "external_tables_to_exclude": { + "attr_type": "external_tables_to_exclude" + }, + "materialized_views_to_include": { + "attr_type": "materialized_views_to_include" + }, + "materialized_views_to_exclude": { + "attr_type": "materialized_views_to_exclude" + }, + "functions_to_include": { + "attr_type": "functions_to_include" + }, + "functions_to_exclude": { + "attr_type": "functions_to_exclude" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "TrackedResource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "tags": { + "attr_type": "tags" + }, + "location": { + "attr_type": "location" + }, + "id": { + "attr_type": null + }, + "name": { + "attr_type": null + }, + "type": { + "attr_type": null + }, + "additional_properties": { + "attr_type": null + } + } + }, + "TrustedExternalTenant": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "value": { + "attr_type": "value" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "Type": { + "type": "Enum", + "methods": {}, + "properties": { + "MICROSOFT_KUSTO_CLUSTERS_ATTACHED_DATABASE_CONFIGURATIONS": "MICROSOFT_KUSTO_CLUSTERS_ATTACHED_DATABASE_CONFIGURATIONS", + "MICROSOFT_KUSTO_CLUSTERS_DATABASES": "MICROSOFT_KUSTO_CLUSTERS_DATABASES", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "VirtualNetworkConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "subnet_id": { + "default": null, + "param_type": "keyword_only" + }, + "engine_public_ip_id": { + "default": null, + "param_type": "keyword_only" + }, + "data_management_public_ip_id": { + "default": null, + "param_type": "keyword_only" + }, + "state": { + "default": "str", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "key_transformer": { + "default": "attribute_transformer", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + }, + "deserialize": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "enable_additional_properties_sending": { + "parameters": {}, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "from_dict": { + "parameters": { + "data": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key_extractors": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "content_type": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Self", + "overloads": [] + }, + "is_xml_model": { + "parameters": {}, + "is_async": false, + "return_type": "bool", + "overloads": [] + }, + "serialize": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "keep_readonly": { + "default": "bool", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "JSON", + "overloads": [] + } + }, + "properties": { + "subnet_id": { + "attr_type": "subnet_id" + }, + "engine_public_ip_id": { + "attr_type": "engine_public_ip_id" + }, + "data_management_public_ip_id": { + "attr_type": "data_management_public_ip_id" + }, + "state": { + "attr_type": "state" + }, + "additional_properties": { + "attr_type": null + } + } + }, + "VnetState": { + "type": "Enum", + "methods": {}, + "properties": { + "DISABLED": "DISABLED", + "ENABLED": "ENABLED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ZoneStatus": { + "type": "Enum", + "methods": {}, + "properties": { + "NON_ZONAL": "NON_ZONAL", + "ZONAL": "ZONAL", + "ZONAL_INCONSISTENCY": "ZONAL_INCONSISTENCY", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + } + }, + "function_nodes": {} + }, + "azure.mgmt.kusto.operations": { + "class_nodes": { + "AttachedDatabaseConfigurationsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "attached_database_configuration_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[AttachedDatabaseConfiguration]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "attached_database_configuration_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "AttachedDatabaseConfiguration", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[AttachedDatabaseConfiguration]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "attached_database_configuration_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[AttachedDatabaseConfiguration]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "attached_database_configuration_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "check_name_availability": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "CheckNameResult", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "AttachedDatabaseConfigurationsCheckNameRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckNameResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckNameResult" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "attached_database_configuration_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AttachedDatabaseConfiguration", + "overloads": [] + }, + "list_by_cluster": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.AttachedDatabaseConfiguration]", + "overloads": [] + } + }, + "properties": {} + }, + "ClusterPrincipalAssignmentsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[ClusterPrincipalAssignment]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ClusterPrincipalAssignment", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[ClusterPrincipalAssignment]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[ClusterPrincipalAssignment]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "check_name_availability": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "CheckNameResult", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "type": "ClusterPrincipalAssignmentCheckNameRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckNameResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckNameResult" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ClusterPrincipalAssignment", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.ClusterPrincipalAssignment]", + "overloads": [] + } + }, + "properties": {} + }, + "ClustersOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_add_callout_policies": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "callout_policies": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "callout_policies": { + "type": "CalloutPoliciesList", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[None]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "callout_policies": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[None]" + } + ] + }, + "begin_add_language_extensions": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "language_extensions_to_add": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "language_extensions_to_add": { + "type": "LanguageExtensionsList", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[None]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "language_extensions_to_add": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[None]" + } + ] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "if_none_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[Cluster]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Cluster", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_none_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Cluster]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_none_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Cluster]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_detach_follower_databases": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "follower_database_to_remove": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "follower_database_to_remove": { + "type": "FollowerDatabaseDefinition", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[None]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "follower_database_to_remove": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[None]" + } + ] + }, + "begin_diagnose_virtual_network": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[DiagnoseVirtualNetworkResult]", + "overloads": [] + }, + "begin_migrate": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_migrate_request": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_migrate_request": { + "type": "ClusterMigrateRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[None]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_migrate_request": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[None]" + } + ] + }, + "begin_remove_callout_policy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "callout_policy": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "callout_policy": { + "type": "CalloutPolicyToRemove", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[None]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "callout_policy": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[None]" + } + ] + }, + "begin_remove_language_extensions": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "language_extensions_to_remove": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "language_extensions_to_remove": { + "type": "LanguageExtensionsList", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[None]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "language_extensions_to_remove": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[None]" + } + ] + }, + "begin_start": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_stop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[Cluster]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ClusterUpdate", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Cluster]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "if_match": { + "type": "Optional[str]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Cluster]" + } + ] + }, + "check_name_availability": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "CheckNameResult", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "ClusterCheckNameRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckNameResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckNameResult" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "Cluster", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.Cluster]", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.Cluster]", + "overloads": [] + }, + "list_callout_policies": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.CalloutPolicy]", + "overloads": [] + }, + "list_follower_databases": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.FollowerDatabaseDefinition]", + "overloads": [] + }, + "list_follower_databases_get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.FollowerDatabaseDefinitionGet]", + "overloads": [] + }, + "list_language_extensions": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.LanguageExtension]", + "overloads": [] + }, + "list_outbound_network_dependencies_endpoints": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.OutboundNetworkDependenciesEndpoint]", + "overloads": [] + }, + "list_skus": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.SkuDescription]", + "overloads": [] + }, + "list_skus_by_resource": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.AzureResourceSku]", + "overloads": [] + } + }, + "properties": {} + }, + "DataConnectionsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "data_connection_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[DataConnection]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "data_connection_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DataConnection", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[DataConnection]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "data_connection_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[DataConnection]" + } + ] + }, + "begin_data_connection_validation": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[DataConnectionValidationListResult]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DataConnectionValidation", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[DataConnectionValidationListResult]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[DataConnectionValidationListResult]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "data_connection_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "data_connection_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[DataConnection]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "data_connection_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DataConnection", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[DataConnection]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "data_connection_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[DataConnection]" + } + ] + }, + "check_name_availability": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "data_connection_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "CheckNameResult", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "data_connection_name": { + "type": "DataConnectionCheckNameRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckNameResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "data_connection_name": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckNameResult" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "data_connection_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "DataConnection", + "overloads": [] + }, + "list_by_database": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.DataConnection]", + "overloads": [] + } + }, + "properties": {} + }, + "DatabaseOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "invite_follower": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "DatabaseInviteFollowerResult", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DatabaseInviteFollowerRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "DatabaseInviteFollowerResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "DatabaseInviteFollowerResult" + } + ] + } + }, + "properties": {} + }, + "DatabasePrincipalAssignmentsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[DatabasePrincipalAssignment]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DatabasePrincipalAssignment", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[DatabasePrincipalAssignment]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[DatabasePrincipalAssignment]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "check_name_availability": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "CheckNameResult", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "type": "DatabasePrincipalAssignmentCheckNameRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckNameResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckNameResult" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "DatabasePrincipalAssignment", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.DatabasePrincipalAssignment]", + "overloads": [] + } + }, + "properties": {} + }, + "DatabasesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "add_principals": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_principals_to_add": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "DatabasePrincipalListResult", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_principals_to_add": { + "type": "DatabasePrincipalListRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "DatabasePrincipalListResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_principals_to_add": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "DatabasePrincipalListResult" + } + ] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "caller_role": { + "default": "str", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[Database]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Database", + "default": null, + "param_type": "positional_or_keyword" + }, + "caller_role": { + "type": "Union[str, CallerRole]", + "default": "Admin", + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Database]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "caller_role": { + "type": "Union[str, CallerRole]", + "default": "Admin", + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Database]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "caller_role": { + "default": "str", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[Database]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Database", + "default": null, + "param_type": "positional_or_keyword" + }, + "caller_role": { + "type": "Union[str, CallerRole]", + "default": "Admin", + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Database]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "caller_role": { + "type": "Union[str, CallerRole]", + "default": "Admin", + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Database]" + } + ] + }, + "check_name_availability": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "CheckNameResult", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "CheckNameRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckNameResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckNameResult" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "Database", + "overloads": [] + }, + "list_by_cluster": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "skiptoken": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.Database]", + "overloads": [] + }, + "list_principals": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.DatabasePrincipal]", + "overloads": [] + }, + "remove_principals": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_principals_to_remove": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "DatabasePrincipalListResult", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_principals_to_remove": { + "type": "DatabasePrincipalListRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "DatabasePrincipalListResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_principals_to_remove": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "DatabasePrincipalListResult" + } + ] + } + }, + "properties": {} + }, + "ManagedPrivateEndpointsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "managed_private_endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[ManagedPrivateEndpoint]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "managed_private_endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ManagedPrivateEndpoint", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[ManagedPrivateEndpoint]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "managed_private_endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[ManagedPrivateEndpoint]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "managed_private_endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "managed_private_endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[ManagedPrivateEndpoint]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "managed_private_endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ManagedPrivateEndpoint", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[ManagedPrivateEndpoint]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "managed_private_endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[ManagedPrivateEndpoint]" + } + ] + }, + "check_name_availability": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "CheckNameResult", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "ManagedPrivateEndpointsCheckNameRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckNameResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckNameResult" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "managed_private_endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ManagedPrivateEndpoint", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.ManagedPrivateEndpoint]", + "overloads": [] + } + }, + "properties": {} + }, + "Operations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.Operation]", + "overloads": [] + } + }, + "properties": {} + }, + "OperationsResultsLocationOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + } + }, + "properties": {} + }, + "OperationsResultsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "OperationResult", + "overloads": [] + } + }, + "properties": {} + }, + "PrivateEndpointConnectionsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[PrivateEndpointConnection]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PrivateEndpointConnection", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[PrivateEndpointConnection]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[PrivateEndpointConnection]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "PrivateEndpointConnection", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.PrivateEndpointConnection]", + "overloads": [] + } + }, + "properties": {} + }, + "PrivateLinkResourcesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "private_link_resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "PrivateLinkResource", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.PrivateLinkResource]", + "overloads": [] + } + }, + "properties": {} + }, + "SandboxCustomImagesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sandbox_custom_image_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[SandboxCustomImage]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "sandbox_custom_image_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "SandboxCustomImage", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[SandboxCustomImage]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "sandbox_custom_image_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[SandboxCustomImage]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sandbox_custom_image_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sandbox_custom_image_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[SandboxCustomImage]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "sandbox_custom_image_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "SandboxCustomImage", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[SandboxCustomImage]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "sandbox_custom_image_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[SandboxCustomImage]" + } + ] + }, + "check_name_availability": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "CheckNameResult", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "SandboxCustomImagesCheckNameRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckNameResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckNameResult" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sandbox_custom_image_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "SandboxCustomImage", + "overloads": [] + }, + "list_by_cluster": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.SandboxCustomImage]", + "overloads": [] + } + }, + "properties": {} + }, + "ScriptsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "script_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[Script]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "script_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Script", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Script]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "script_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Script]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "script_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "script_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[Script]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "script_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Script", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Script]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "script_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Script]" + } + ] + }, + "check_name_availability": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "script_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "CheckNameResult", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "script_name": { + "type": "ScriptCheckNameRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckNameResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "script_name": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckNameResult" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "script_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "Script", + "overloads": [] + }, + "list_by_database": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.Script]", + "overloads": [] + } + }, + "properties": {} + }, + "SkusOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.SkuDescription]", + "overloads": [] + } + }, + "properties": {} + } + }, + "function_nodes": {} + } +} \ No newline at end of file diff --git a/sdk/kusto/azure-mgmt-kusto/code_report_typespec.json b/sdk/kusto/azure-mgmt-kusto/code_report_typespec.json new file mode 100644 index 000000000000..75e18f985c1f --- /dev/null +++ b/sdk/kusto/azure-mgmt-kusto/code_report_typespec.json @@ -0,0 +1,48969 @@ +{ + "azure.mgmt.kusto": { + "class_nodes": { + "KustoManagementClient": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "credential": { + "default": null, + "param_type": "positional_or_keyword" + }, + "subscription_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "base_url": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "cloud_setting": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "close": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "send_request": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "request": { + "default": null, + "param_type": "positional_or_keyword" + }, + "stream": { + "default": "bool", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "HttpResponse", + "overloads": [] + } + }, + "properties": { + "client_side_validation": { + "attr_type": false + }, + "operations": { + "attr_type": "Operations" + }, + "cluster_principal_assignments": { + "attr_type": "ClusterPrincipalAssignmentsOperations" + }, + "database_principal_assignments": { + "attr_type": "DatabasePrincipalAssignmentsOperations" + }, + "scripts": { + "attr_type": "ScriptsOperations" + }, + "data_connections": { + "attr_type": "DataConnectionsOperations" + }, + "databases": { + "attr_type": "DatabasesOperations" + }, + "attached_database_configurations": { + "attr_type": "AttachedDatabaseConfigurationsOperations" + }, + "managed_private_endpoints": { + "attr_type": "ManagedPrivateEndpointsOperations" + }, + "sandbox_custom_images": { + "attr_type": "SandboxCustomImagesOperations" + }, + "clusters": { + "attr_type": "ClustersOperations" + }, + "private_endpoint_connections": { + "attr_type": "PrivateEndpointConnectionsOperations" + }, + "private_link_resources": { + "attr_type": "PrivateLinkResourcesOperations" + }, + "database": { + "attr_type": "DatabaseOperations" + }, + "skus": { + "attr_type": "SkusOperations" + }, + "operations_results": { + "attr_type": "OperationsResultsOperations" + }, + "operations_results_location": { + "attr_type": "OperationsResultsLocationOperations" + } + } + } + }, + "function_nodes": {} + }, + "azure.mgmt.kusto.aio": { + "class_nodes": { + "KustoManagementClient": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "credential": { + "default": null, + "param_type": "positional_or_keyword" + }, + "subscription_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "base_url": { + "default": "none", + "param_type": "positional_or_keyword" + }, + "cloud_setting": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "close": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": true, + "return_type": "None", + "overloads": [] + }, + "send_request": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "request": { + "default": null, + "param_type": "positional_or_keyword" + }, + "stream": { + "default": "bool", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "Awaitable[AsyncHttpResponse]", + "overloads": [] + } + }, + "properties": { + "client_side_validation": { + "attr_type": false + }, + "operations": { + "attr_type": "Operations" + }, + "cluster_principal_assignments": { + "attr_type": "ClusterPrincipalAssignmentsOperations" + }, + "database_principal_assignments": { + "attr_type": "DatabasePrincipalAssignmentsOperations" + }, + "scripts": { + "attr_type": "ScriptsOperations" + }, + "data_connections": { + "attr_type": "DataConnectionsOperations" + }, + "databases": { + "attr_type": "DatabasesOperations" + }, + "attached_database_configurations": { + "attr_type": "AttachedDatabaseConfigurationsOperations" + }, + "managed_private_endpoints": { + "attr_type": "ManagedPrivateEndpointsOperations" + }, + "sandbox_custom_images": { + "attr_type": "SandboxCustomImagesOperations" + }, + "clusters": { + "attr_type": "ClustersOperations" + }, + "private_endpoint_connections": { + "attr_type": "PrivateEndpointConnectionsOperations" + }, + "private_link_resources": { + "attr_type": "PrivateLinkResourcesOperations" + }, + "database": { + "attr_type": "DatabaseOperations" + }, + "skus": { + "attr_type": "SkusOperations" + }, + "operations_results": { + "attr_type": "OperationsResultsOperations" + }, + "operations_results_location": { + "attr_type": "OperationsResultsLocationOperations" + } + } + } + }, + "function_nodes": {} + }, + "azure.mgmt.kusto.aio.operations": { + "class_nodes": { + "AttachedDatabaseConfigurationsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "attached_database_configuration_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AttachedDatabaseConfiguration]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "attached_database_configuration_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "AttachedDatabaseConfiguration", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AttachedDatabaseConfiguration]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "attached_database_configuration_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AttachedDatabaseConfiguration]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "attached_database_configuration_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[AttachedDatabaseConfiguration]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "attached_database_configuration_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "check_name_availability": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "CheckNameResult", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "AttachedDatabaseConfigurationsCheckNameRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckNameResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckNameResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckNameResult" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "attached_database_configuration_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AttachedDatabaseConfiguration", + "overloads": [] + }, + "list_by_cluster": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.AttachedDatabaseConfiguration]", + "overloads": [] + } + }, + "properties": {} + }, + "ClusterPrincipalAssignmentsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[ClusterPrincipalAssignment]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ClusterPrincipalAssignment", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[ClusterPrincipalAssignment]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[ClusterPrincipalAssignment]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[ClusterPrincipalAssignment]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "check_name_availability": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "CheckNameResult", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "type": "ClusterPrincipalAssignmentCheckNameRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckNameResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckNameResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckNameResult" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "ClusterPrincipalAssignment", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.ClusterPrincipalAssignment]", + "overloads": [] + } + }, + "properties": {} + }, + "ClustersOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_add_callout_policies": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "callout_policies": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "callout_policies": { + "type": "CalloutPoliciesList", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "callout_policies": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "callout_policies": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]" + } + ] + }, + "begin_add_language_extensions": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "language_extensions_to_add": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "language_extensions_to_add": { + "type": "LanguageExtensionsList", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "language_extensions_to_add": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "language_extensions_to_add": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]" + } + ] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Cluster]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Cluster", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Cluster]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Cluster]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Cluster]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_detach_follower_databases": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "follower_database_to_remove": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "follower_database_to_remove": { + "type": "FollowerDatabaseDefinition", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "follower_database_to_remove": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "follower_database_to_remove": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]" + } + ] + }, + "begin_diagnose_virtual_network": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[DiagnoseVirtualNetworkResult]", + "overloads": [] + }, + "begin_migrate": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_migrate_request": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_migrate_request": { + "type": "ClusterMigrateRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_migrate_request": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_migrate_request": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]" + } + ] + }, + "begin_remove_callout_policy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "callout_policy": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "callout_policy": { + "type": "CalloutPolicyToRemove", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "callout_policy": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "callout_policy": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]" + } + ] + }, + "begin_remove_language_extensions": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "language_extensions_to_remove": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "language_extensions_to_remove": { + "type": "LanguageExtensionsList", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "language_extensions_to_remove": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "language_extensions_to_remove": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]" + } + ] + }, + "begin_start": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_stop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Cluster]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ClusterUpdate", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Cluster]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Cluster]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Cluster]" + } + ] + }, + "check_name_availability": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "CheckNameResult", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "ClusterCheckNameRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckNameResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckNameResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckNameResult" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "Cluster", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.Cluster]", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.Cluster]", + "overloads": [] + }, + "list_callout_policies": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.CalloutPolicy]", + "overloads": [] + }, + "list_follower_databases": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.FollowerDatabaseDefinition]", + "overloads": [] + }, + "list_follower_databases_get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.FollowerDatabaseDefinitionGet]", + "overloads": [] + }, + "list_language_extensions": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.LanguageExtension]", + "overloads": [] + }, + "list_outbound_network_dependencies_endpoints": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.OutboundNetworkDependenciesEndpoint]", + "overloads": [] + }, + "list_skus": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.SkuDescription]", + "overloads": [] + }, + "list_skus_by_resource": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.AzureResourceSku]", + "overloads": [] + } + }, + "properties": {} + }, + "DataConnectionsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "data_connection_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[DataConnection]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "data_connection_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DataConnection", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[DataConnection]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "data_connection_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[DataConnection]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "data_connection_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[DataConnection]" + } + ] + }, + "begin_data_connection_validation": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[DataConnectionValidationListResult]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DataConnectionValidation", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[DataConnectionValidationListResult]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[DataConnectionValidationListResult]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[DataConnectionValidationListResult]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "data_connection_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "data_connection_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[DataConnection]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "data_connection_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DataConnection", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[DataConnection]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "data_connection_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[DataConnection]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "data_connection_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[DataConnection]" + } + ] + }, + "check_name_availability": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "data_connection_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "CheckNameResult", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "data_connection_name": { + "type": "DataConnectionCheckNameRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckNameResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "data_connection_name": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckNameResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "data_connection_name": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckNameResult" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "data_connection_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "DataConnection", + "overloads": [] + }, + "list_by_database": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.DataConnection]", + "overloads": [] + } + }, + "properties": {} + }, + "DatabaseOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "invite_follower": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "DatabaseInviteFollowerResult", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DatabaseInviteFollowerRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "DatabaseInviteFollowerResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "DatabaseInviteFollowerResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "DatabaseInviteFollowerResult" + } + ] + } + }, + "properties": {} + }, + "DatabasePrincipalAssignmentsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[DatabasePrincipalAssignment]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DatabasePrincipalAssignment", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[DatabasePrincipalAssignment]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[DatabasePrincipalAssignment]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[DatabasePrincipalAssignment]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "check_name_availability": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "CheckNameResult", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "type": "DatabasePrincipalAssignmentCheckNameRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckNameResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckNameResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckNameResult" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "DatabasePrincipalAssignment", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.DatabasePrincipalAssignment]", + "overloads": [] + } + }, + "properties": {} + }, + "DatabasesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "add_principals": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_principals_to_add": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "DatabasePrincipalListResult", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_principals_to_add": { + "type": "DatabasePrincipalListRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "DatabasePrincipalListResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_principals_to_add": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "DatabasePrincipalListResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_principals_to_add": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "DatabasePrincipalListResult" + } + ] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "caller_role": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Database]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Database", + "default": null, + "param_type": "positional_or_keyword" + }, + "caller_role": { + "type": "Optional[Union[str, CallerRole]]", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Database]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "caller_role": { + "type": "Optional[Union[str, CallerRole]]", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Database]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "caller_role": { + "type": "Optional[Union[str, CallerRole]]", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Database]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "caller_role": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Database]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Database", + "default": null, + "param_type": "positional_or_keyword" + }, + "caller_role": { + "type": "Optional[Union[str, CallerRole]]", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Database]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "caller_role": { + "type": "Optional[Union[str, CallerRole]]", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Database]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "caller_role": { + "type": "Optional[Union[str, CallerRole]]", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Database]" + } + ] + }, + "check_name_availability": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "CheckNameResult", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "CheckNameRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckNameResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckNameResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckNameResult" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "Database", + "overloads": [] + }, + "list_by_cluster": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skiptoken": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.Database]", + "overloads": [] + }, + "list_principals": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.DatabasePrincipal]", + "overloads": [] + }, + "remove_principals": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_principals_to_remove": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "DatabasePrincipalListResult", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_principals_to_remove": { + "type": "DatabasePrincipalListRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "DatabasePrincipalListResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_principals_to_remove": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "DatabasePrincipalListResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_principals_to_remove": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "DatabasePrincipalListResult" + } + ] + } + }, + "properties": {} + }, + "ManagedPrivateEndpointsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "managed_private_endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[ManagedPrivateEndpoint]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "managed_private_endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ManagedPrivateEndpoint", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[ManagedPrivateEndpoint]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "managed_private_endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[ManagedPrivateEndpoint]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "managed_private_endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[ManagedPrivateEndpoint]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "managed_private_endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "managed_private_endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[ManagedPrivateEndpoint]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "managed_private_endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ManagedPrivateEndpoint", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[ManagedPrivateEndpoint]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "managed_private_endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[ManagedPrivateEndpoint]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "managed_private_endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[ManagedPrivateEndpoint]" + } + ] + }, + "check_name_availability": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "CheckNameResult", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "ManagedPrivateEndpointsCheckNameRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckNameResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckNameResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckNameResult" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "managed_private_endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "ManagedPrivateEndpoint", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.ManagedPrivateEndpoint]", + "overloads": [] + } + }, + "properties": {} + }, + "Operations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.Operation]", + "overloads": [] + } + }, + "properties": {} + }, + "OperationsResultsLocationOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "None", + "overloads": [] + } + }, + "properties": {} + }, + "OperationsResultsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "OperationResult", + "overloads": [] + } + }, + "properties": {} + }, + "PrivateEndpointConnectionsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[PrivateEndpointConnection]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PrivateEndpointConnection", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[PrivateEndpointConnection]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[PrivateEndpointConnection]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[PrivateEndpointConnection]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "PrivateEndpointConnection", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.PrivateEndpointConnection]", + "overloads": [] + } + }, + "properties": {} + }, + "PrivateLinkResourcesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "private_link_resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "PrivateLinkResource", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.PrivateLinkResource]", + "overloads": [] + } + }, + "properties": {} + }, + "SandboxCustomImagesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sandbox_custom_image_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[SandboxCustomImage]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "sandbox_custom_image_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "SandboxCustomImage", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[SandboxCustomImage]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "sandbox_custom_image_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[SandboxCustomImage]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "sandbox_custom_image_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[SandboxCustomImage]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sandbox_custom_image_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sandbox_custom_image_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[SandboxCustomImage]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "sandbox_custom_image_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "SandboxCustomImage", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[SandboxCustomImage]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "sandbox_custom_image_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[SandboxCustomImage]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "sandbox_custom_image_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[SandboxCustomImage]" + } + ] + }, + "check_name_availability": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "CheckNameResult", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "SandboxCustomImagesCheckNameRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckNameResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckNameResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckNameResult" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sandbox_custom_image_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "SandboxCustomImage", + "overloads": [] + }, + "list_by_cluster": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.SandboxCustomImage]", + "overloads": [] + } + }, + "properties": {} + }, + "ScriptsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "script_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Script]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "script_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Script", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Script]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "script_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Script]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "script_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Script]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "script_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "script_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Script]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "script_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Script", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Script]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "script_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Script]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "script_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "AsyncLROPoller[Script]" + } + ] + }, + "check_name_availability": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "script_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "CheckNameResult", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "script_name": { + "type": "ScriptCheckNameRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckNameResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "script_name": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckNameResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "script_name": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": true, + "return_type": "CheckNameResult" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "script_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true, + "return_type": "Script", + "overloads": [] + }, + "list_by_database": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.Script]", + "overloads": [] + } + }, + "properties": {} + }, + "SkusOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AsyncItemPaged[_models.SkuDescription]", + "overloads": [] + } + }, + "properties": {} + } + }, + "function_nodes": {} + }, + "azure.mgmt.kusto.models": { + "class_nodes": { + "AcceptedAudiences": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "value": "Optional" + } + }, + "AttachedDatabaseConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.AttachedDatabaseConfigurationProperties]", + "default": null, + "param_type": "keyword_only" + }, + "location": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "location": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "AttachedDatabaseConfigurationProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "cluster_resource_id": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "default_principals_modification_kind": { + "type": "Union[str, _models.DefaultPrincipalsModificationKind]", + "default": null, + "param_type": "keyword_only" + }, + "table_level_sharing_properties": { + "type": "Optional[_models.TableLevelSharingProperties]", + "default": null, + "param_type": "keyword_only" + }, + "database_name_override": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "database_name_prefix": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "provisioning_state": "Optional", + "database_name": null, + "cluster_resource_id": null, + "attached_database_names": "Optional", + "default_principals_modification_kind": "Union", + "table_level_sharing_properties": "Optional", + "database_name_override": "Optional", + "database_name_prefix": "Optional" + } + }, + "AttachedDatabaseConfigurationsCheckNameRequest": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "name": null, + "type": "Literal" + } + }, + "AzureCapacity": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "scale_type": { + "type": "Union[str, _models.AzureScaleType]", + "default": null, + "param_type": "keyword_only" + }, + "minimum": { + "type": "int", + "default": null, + "param_type": "keyword_only" + }, + "maximum": { + "type": "int", + "default": null, + "param_type": "keyword_only" + }, + "default": { + "type": "int", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "scale_type": "Union", + "minimum": null, + "maximum": null, + "default": null + } + }, + "AzureResourceSku": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_type": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "sku": { + "type": "Optional[_models.AzureSku]", + "default": null, + "param_type": "keyword_only" + }, + "capacity": { + "type": "Optional[_models.AzureCapacity]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "resource_type": "Optional", + "sku": "Optional", + "capacity": "Optional" + } + }, + "AzureScaleType": { + "type": "Enum", + "methods": {}, + "properties": { + "AUTOMATIC": "AUTOMATIC", + "MANUAL": "MANUAL", + "NONE": "NONE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "AzureSku": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "Union[str, _models.AzureSkuName]", + "default": null, + "param_type": "keyword_only" + }, + "tier": { + "type": "Union[str, _models.AzureSkuTier]", + "default": null, + "param_type": "keyword_only" + }, + "capacity": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "name": "Union", + "capacity": "Optional", + "tier": "Union" + } + }, + "AzureSkuName": { + "type": "Enum", + "methods": {}, + "properties": { + "DEV_NO_SLA_STANDARD_D11_V2": "DEV_NO_SLA_STANDARD_D11_V2", + "DEV_NO_SLA_STANDARD_E2_A_V4": "DEV_NO_SLA_STANDARD_E2_A_V4", + "STANDARD_D11_V2": "STANDARD_D11_V2", + "STANDARD_D12_V2": "STANDARD_D12_V2", + "STANDARD_D13_V2": "STANDARD_D13_V2", + "STANDARD_D14_V2": "STANDARD_D14_V2", + "STANDARD_D16_D_V5": "STANDARD_D16_D_V5", + "STANDARD_D32_D_V4": "STANDARD_D32_D_V4", + "STANDARD_D32_D_V5": "STANDARD_D32_D_V5", + "STANDARD_DS13_V2_1_TB_PS": "STANDARD_DS13_V2_1_TB_PS", + "STANDARD_DS13_V2_2_TB_PS": "STANDARD_DS13_V2_2_TB_PS", + "STANDARD_DS14_V2_3_TB_PS": "STANDARD_DS14_V2_3_TB_PS", + "STANDARD_DS14_V2_4_TB_PS": "STANDARD_DS14_V2_4_TB_PS", + "STANDARD_E16_ADS_V5": "STANDARD_E16_ADS_V5", + "STANDARD_E16_AS_V4_3_TB_PS": "STANDARD_E16_AS_V4_3_TB_PS", + "STANDARD_E16_AS_V4_4_TB_PS": "STANDARD_E16_AS_V4_4_TB_PS", + "STANDARD_E16_AS_V5_3_TB_PS": "STANDARD_E16_AS_V5_3_TB_PS", + "STANDARD_E16_AS_V5_4_TB_PS": "STANDARD_E16_AS_V5_4_TB_PS", + "STANDARD_E16_A_V4": "STANDARD_E16_A_V4", + "STANDARD_E16_D_V4": "STANDARD_E16_D_V4", + "STANDARD_E16_D_V5": "STANDARD_E16_D_V5", + "STANDARD_E16_S_V4_3_TB_PS": "STANDARD_E16_S_V4_3_TB_PS", + "STANDARD_E16_S_V4_4_TB_PS": "STANDARD_E16_S_V4_4_TB_PS", + "STANDARD_E16_S_V5_3_TB_PS": "STANDARD_E16_S_V5_3_TB_PS", + "STANDARD_E16_S_V5_4_TB_PS": "STANDARD_E16_S_V5_4_TB_PS", + "STANDARD_E2_ADS_V5": "STANDARD_E2_ADS_V5", + "STANDARD_E2_A_V4": "STANDARD_E2_A_V4", + "STANDARD_E2_D_V4": "STANDARD_E2_D_V4", + "STANDARD_E2_D_V5": "STANDARD_E2_D_V5", + "STANDARD_E4_ADS_V5": "STANDARD_E4_ADS_V5", + "STANDARD_E4_A_V4": "STANDARD_E4_A_V4", + "STANDARD_E4_D_V4": "STANDARD_E4_D_V4", + "STANDARD_E4_D_V5": "STANDARD_E4_D_V5", + "STANDARD_E64_I_V3": "STANDARD_E64_I_V3", + "STANDARD_E80_IDS_V4": "STANDARD_E80_IDS_V4", + "STANDARD_E8_ADS_V5": "STANDARD_E8_ADS_V5", + "STANDARD_E8_AS_V4_1_TB_PS": "STANDARD_E8_AS_V4_1_TB_PS", + "STANDARD_E8_AS_V4_2_TB_PS": "STANDARD_E8_AS_V4_2_TB_PS", + "STANDARD_E8_AS_V5_1_TB_PS": "STANDARD_E8_AS_V5_1_TB_PS", + "STANDARD_E8_AS_V5_2_TB_PS": "STANDARD_E8_AS_V5_2_TB_PS", + "STANDARD_E8_A_V4": "STANDARD_E8_A_V4", + "STANDARD_E8_D_V4": "STANDARD_E8_D_V4", + "STANDARD_E8_D_V5": "STANDARD_E8_D_V5", + "STANDARD_E8_S_V4_1_TB_PS": "STANDARD_E8_S_V4_1_TB_PS", + "STANDARD_E8_S_V4_2_TB_PS": "STANDARD_E8_S_V4_2_TB_PS", + "STANDARD_E8_S_V5_1_TB_PS": "STANDARD_E8_S_V5_1_TB_PS", + "STANDARD_E8_S_V5_2_TB_PS": "STANDARD_E8_S_V5_2_TB_PS", + "STANDARD_EC16_ADS_V5": "STANDARD_EC16_ADS_V5", + "STANDARD_EC16_AS_V5_3_TB_PS": "STANDARD_EC16_AS_V5_3_TB_PS", + "STANDARD_EC16_AS_V5_4_TB_PS": "STANDARD_EC16_AS_V5_4_TB_PS", + "STANDARD_EC8_ADS_V5": "STANDARD_EC8_ADS_V5", + "STANDARD_EC8_AS_V5_1_TB_PS": "STANDARD_EC8_AS_V5_1_TB_PS", + "STANDARD_EC8_AS_V5_2_TB_PS": "STANDARD_EC8_AS_V5_2_TB_PS", + "STANDARD_L16_AS_V3": "STANDARD_L16_AS_V3", + "STANDARD_L16_S": "STANDARD_L16_S", + "STANDARD_L16_S_V2": "STANDARD_L16_S_V2", + "STANDARD_L16_S_V3": "STANDARD_L16_S_V3", + "STANDARD_L32_AS_V3": "STANDARD_L32_AS_V3", + "STANDARD_L32_S_V3": "STANDARD_L32_S_V3", + "STANDARD_L4_S": "STANDARD_L4_S", + "STANDARD_L8_AS_V3": "STANDARD_L8_AS_V3", + "STANDARD_L8_S": "STANDARD_L8_S", + "STANDARD_L8_S_V2": "STANDARD_L8_S_V2", + "STANDARD_L8_S_V3": "STANDARD_L8_S_V3", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "AzureSkuTier": { + "type": "Enum", + "methods": {}, + "properties": { + "BASIC": "BASIC", + "STANDARD": "STANDARD", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "BlobStorageEventType": { + "type": "Enum", + "methods": {}, + "properties": { + "MICROSOFT_STORAGE_BLOB_CREATED": "MICROSOFT_STORAGE_BLOB_CREATED", + "MICROSOFT_STORAGE_BLOB_RENAMED": "MICROSOFT_STORAGE_BLOB_RENAMED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "CallerRole": { + "type": "Enum", + "methods": {}, + "properties": { + "ADMIN": "ADMIN", + "NONE": "NONE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "CalloutPoliciesList": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "type": "list[_models.CalloutPolicy]", + "default": null, + "param_type": "keyword_only" + }, + "next_link": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "value": "list", + "next_link": "Optional" + } + }, + "CalloutPolicy": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "callout_uri_regex": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "callout_type": { + "type": "Optional[Union[str, _models.CalloutType]]", + "default": null, + "param_type": "keyword_only" + }, + "outbound_access": { + "type": "Optional[Union[str, _models.OutboundAccess]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "callout_uri_regex": "Optional", + "callout_type": "Optional", + "outbound_access": "Optional", + "callout_id": "Optional" + } + }, + "CalloutPolicyToRemove": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "callout_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "callout_id": "Optional" + } + }, + "CalloutType": { + "type": "Enum", + "methods": {}, + "properties": { + "AZURE_DIGITAL_TWINS": "AZURE_DIGITAL_TWINS", + "AZURE_OPENAI": "AZURE_OPENAI", + "COSMOSDB": "COSMOSDB", + "EXTERNAL_DATA": "EXTERNAL_DATA", + "GENEVAMETRICS": "GENEVAMETRICS", + "KUSTO": "KUSTO", + "MYSQL": "MYSQL", + "POSTGRESQL": "POSTGRESQL", + "SANDBOX_ARTIFACTS": "SANDBOX_ARTIFACTS", + "SQL": "SQL", + "WEBAPI": "WEBAPI", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "CheckNameRequest": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "type": { + "type": "Union[str, _models.Type]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "name": null, + "type": "Union" + } + }, + "CheckNameResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name_available": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "message": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "reason": { + "type": "Optional[Union[str, _models.Reason]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "name_available": "Optional", + "name": "Optional", + "message": "Optional", + "reason": "Optional" + } + }, + "Cluster": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "sku": { + "type": "_models.AzureSku", + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[_models.ClusterProperties]", + "default": null, + "param_type": "keyword_only" + }, + "zones": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "identity": { + "type": "Optional[_models.Identity]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "sku": null, + "zones": "Optional", + "identity": "Optional", + "etag": "Optional", + "tags": "Optional", + "location": null, + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "ClusterCheckNameRequest": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "name": null, + "type": "Literal" + } + }, + "ClusterMigrateRequest": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_resource_id": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "cluster_resource_id": null + } + }, + "ClusterNetworkAccessFlag": { + "type": "Enum", + "methods": {}, + "properties": { + "DISABLED": "DISABLED", + "ENABLED": "ENABLED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ClusterPrincipalAssignment": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.ClusterPrincipalProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "ClusterPrincipalAssignmentCheckNameRequest": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "name": null, + "type": "Literal" + } + }, + "ClusterPrincipalProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_id": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "role": { + "type": "Union[str, _models.ClusterPrincipalRole]", + "default": null, + "param_type": "keyword_only" + }, + "principal_type": { + "type": "Union[str, _models.PrincipalType]", + "default": null, + "param_type": "keyword_only" + }, + "tenant_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "principal_id": null, + "role": "Union", + "tenant_id": "Optional", + "principal_type": "Union", + "tenant_name": "Optional", + "principal_name": "Optional", + "provisioning_state": "Optional", + "aad_object_id": "Optional" + } + }, + "ClusterPrincipalRole": { + "type": "Enum", + "methods": {}, + "properties": { + "ALL_DATABASES_ADMIN": "ALL_DATABASES_ADMIN", + "ALL_DATABASES_MONITOR": "ALL_DATABASES_MONITOR", + "ALL_DATABASES_VIEWER": "ALL_DATABASES_VIEWER", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ClusterProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "trusted_external_tenants": { + "type": "Optional[list[_models.TrustedExternalTenant]]", + "default": null, + "param_type": "keyword_only" + }, + "optimized_autoscale": { + "type": "Optional[_models.OptimizedAutoscale]", + "default": null, + "param_type": "keyword_only" + }, + "enable_disk_encryption": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "enable_streaming_ingest": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "virtual_network_configuration": { + "type": "Optional[_models.VirtualNetworkConfiguration]", + "default": null, + "param_type": "keyword_only" + }, + "key_vault_properties": { + "type": "Optional[_models.KeyVaultProperties]", + "default": null, + "param_type": "keyword_only" + }, + "enable_purge": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "language_extensions": { + "type": "Optional[_models.LanguageExtensionsList]", + "default": null, + "param_type": "keyword_only" + }, + "enable_double_encryption": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "public_network_access": { + "type": "Optional[Union[str, _models.PublicNetworkAccess]]", + "default": null, + "param_type": "keyword_only" + }, + "allowed_ip_range_list": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "engine_type": { + "type": "Optional[Union[str, _models.EngineType]]", + "default": null, + "param_type": "keyword_only" + }, + "accepted_audiences": { + "type": "Optional[list[_models.AcceptedAudiences]]", + "default": null, + "param_type": "keyword_only" + }, + "enable_auto_stop": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "restrict_outbound_network_access": { + "type": "Optional[Union[str, _models.ClusterNetworkAccessFlag]]", + "default": null, + "param_type": "keyword_only" + }, + "allowed_fqdn_list": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "callout_policies": { + "type": "Optional[list[_models.CalloutPolicy]]", + "default": null, + "param_type": "keyword_only" + }, + "public_ip_type": { + "type": "Optional[Union[str, _models.PublicIPType]]", + "default": null, + "param_type": "keyword_only" + }, + "virtual_cluster_graduation_properties": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "state": "Optional", + "provisioning_state": "Optional", + "uri": "Optional", + "data_ingestion_uri": "Optional", + "state_reason": "Optional", + "trusted_external_tenants": "Optional", + "optimized_autoscale": "Optional", + "enable_disk_encryption": "Optional", + "enable_streaming_ingest": "Optional", + "virtual_network_configuration": "Optional", + "key_vault_properties": "Optional", + "enable_purge": "Optional", + "language_extensions": "Optional", + "enable_double_encryption": "Optional", + "public_network_access": "Optional", + "allowed_ip_range_list": "Optional", + "engine_type": "Optional", + "accepted_audiences": "Optional", + "enable_auto_stop": "Optional", + "restrict_outbound_network_access": "Optional", + "allowed_fqdn_list": "Optional", + "callout_policies": "Optional", + "public_ip_type": "Optional", + "virtual_cluster_graduation_properties": "Optional", + "private_endpoint_connections": "Optional", + "migration_cluster": "Optional", + "zone_status": "Optional" + } + }, + "ClusterUpdate": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + }, + "location": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "sku": { + "type": "Optional[_models.AzureSku]", + "default": null, + "param_type": "keyword_only" + }, + "zones": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "identity": { + "type": "Optional[_models.Identity]", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[_models.ClusterProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "tags": "Optional", + "location": "Optional", + "sku": "Optional", + "zones": "Optional", + "identity": "Optional", + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "principal_id": "Optional", + "client_id": "Optional" + } + }, + "Compression": { + "type": "Enum", + "methods": {}, + "properties": { + "G_ZIP": "G_ZIP", + "NONE": "NONE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "CosmosDbDataConnection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[_models.CosmosDbDataConnectionProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "kind": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "location": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "kind": null, + "location": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "CosmosDbDataConnectionProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "table_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "managed_identity_resource_id": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "cosmos_db_account_resource_id": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "cosmos_db_database": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "cosmos_db_container": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "mapping_rule_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "retrieval_start_date": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "table_name": null, + "mapping_rule_name": "Optional", + "managed_identity_resource_id": null, + "managed_identity_object_id": "Optional", + "cosmos_db_account_resource_id": null, + "cosmos_db_database": null, + "cosmos_db_container": null, + "retrieval_start_date": "Optional", + "provisioning_state": "Optional" + } + }, + "CreatedByType": { + "type": "Enum", + "methods": {}, + "properties": { + "APPLICATION": "APPLICATION", + "KEY": "KEY", + "MANAGED_IDENTITY": "MANAGED_IDENTITY", + "USER": "USER", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "DataConnection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "kind": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "location": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "location": "Optional", + "kind": null, + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "DataConnectionCheckNameRequest": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "name": null, + "type": "Literal" + } + }, + "DataConnectionKind": { + "type": "Enum", + "methods": {}, + "properties": { + "COSMOS_DB": "COSMOS_DB", + "EVENT_GRID": "EVENT_GRID", + "EVENT_GRID_WITH_MANAGED_IDENTITY": "EVENT_GRID_WITH_MANAGED_IDENTITY", + "EVENT_HUB": "EVENT_HUB", + "EVENT_HUB_WITH_MANAGED_IDENTITY": "EVENT_HUB_WITH_MANAGED_IDENTITY", + "IOT_HUB": "IOT_HUB", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "DataConnectionValidation": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "data_connection_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[_models.DataConnection]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "data_connection_name": "Optional", + "properties": "Optional" + } + }, + "DataConnectionValidationListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "type": "Optional[list[_models.DataConnectionValidationResult]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "value": "Optional" + } + }, + "DataConnectionValidationResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "error_message": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "error_message": "Optional" + } + }, + "Database": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "kind": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "location": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "location": "Optional", + "kind": null, + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "DatabaseInviteFollowerRequest": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "invitee_email": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "table_level_sharing_properties": { + "type": "Optional[_models.TableLevelSharingProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "invitee_email": null, + "table_level_sharing_properties": "Optional" + } + }, + "DatabaseInviteFollowerResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "generated_invitation": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "generated_invitation": "Optional" + } + }, + "DatabasePrincipal": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "role": { + "type": "Union[str, _models.DatabasePrincipalRole]", + "default": null, + "param_type": "keyword_only" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "type": { + "type": "Union[str, _models.DatabasePrincipalType]", + "default": null, + "param_type": "keyword_only" + }, + "fqn": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "email": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "app_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "role": "Union", + "name": null, + "type": "Union", + "fqn": "Optional", + "email": "Optional", + "app_id": "Optional", + "tenant_name": "Optional" + } + }, + "DatabasePrincipalAssignment": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.DatabasePrincipalProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "DatabasePrincipalAssignmentCheckNameRequest": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "name": null, + "type": "Literal" + } + }, + "DatabasePrincipalListRequest": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "type": "Optional[list[_models.DatabasePrincipal]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "value": "Optional" + } + }, + "DatabasePrincipalListResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "type": "Optional[list[_models.DatabasePrincipal]]", + "default": null, + "param_type": "keyword_only" + }, + "next_link": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "value": "Optional", + "next_link": "Optional" + } + }, + "DatabasePrincipalProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_id": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "role": { + "type": "Union[str, _models.DatabasePrincipalRole]", + "default": null, + "param_type": "keyword_only" + }, + "principal_type": { + "type": "Union[str, _models.PrincipalType]", + "default": null, + "param_type": "keyword_only" + }, + "tenant_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "principal_id": null, + "role": "Union", + "tenant_id": "Optional", + "principal_type": "Union", + "tenant_name": "Optional", + "principal_name": "Optional", + "provisioning_state": "Optional", + "aad_object_id": "Optional" + } + }, + "DatabasePrincipalRole": { + "type": "Enum", + "methods": {}, + "properties": { + "ADMIN": "ADMIN", + "INGESTOR": "INGESTOR", + "MONITOR": "MONITOR", + "UNRESTRICTED_VIEWER": "UNRESTRICTED_VIEWER", + "USER": "USER", + "VIEWER": "VIEWER", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "DatabasePrincipalType": { + "type": "Enum", + "methods": {}, + "properties": { + "APP": "APP", + "GROUP": "GROUP", + "USER": "USER", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "DatabaseRouting": { + "type": "Enum", + "methods": {}, + "properties": { + "MULTI": "MULTI", + "SINGLE": "SINGLE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "DatabaseShareOrigin": { + "type": "Enum", + "methods": {}, + "properties": { + "DATA_SHARE": "DATA_SHARE", + "DIRECT": "DIRECT", + "OTHER": "OTHER", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "DatabaseStatistics": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "size": { + "type": "Optional[float]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "size": "Optional" + } + }, + "DefaultPrincipalsModificationKind": { + "type": "Enum", + "methods": {}, + "properties": { + "NONE": "NONE", + "REPLACE": "REPLACE", + "UNION": "UNION", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "DiagnoseVirtualNetworkResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "findings": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "findings": "Optional" + } + }, + "EndpointDependency": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "domain_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "endpoint_details": { + "type": "Optional[list[_models.EndpointDetail]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "domain_name": "Optional", + "endpoint_details": "Optional" + } + }, + "EndpointDetail": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "port": { + "type": "Optional[int]", + "default": null, + "param_type": "keyword_only" + }, + "ip_address": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "port": "Optional", + "ip_address": "Optional" + } + }, + "EngineType": { + "type": "Enum", + "methods": {}, + "properties": { + "V2": "V2", + "V3": "V3", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ErrorAdditionalInfo": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "type": "Optional", + "info": "Optional" + } + }, + "ErrorDetail": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "code": "Optional", + "message": "Optional", + "target": "Optional", + "details": "Optional", + "additional_info": "Optional" + } + }, + "ErrorResponse": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "error": { + "type": "Optional[_models.ErrorDetail]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "error": "Optional" + } + }, + "EventGridConnectionProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "storage_account_resource_id": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "event_hub_resource_id": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "consumer_group": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "event_grid_resource_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "table_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "mapping_rule_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "data_format": { + "type": "Optional[Union[str, _models.EventGridDataFormat]]", + "default": null, + "param_type": "keyword_only" + }, + "ignore_first_record": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "blob_storage_event_type": { + "type": "Optional[Union[str, _models.BlobStorageEventType]]", + "default": null, + "param_type": "keyword_only" + }, + "managed_identity_resource_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "database_routing": { + "type": "Optional[Union[str, _models.DatabaseRouting]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "storage_account_resource_id": null, + "event_grid_resource_id": "Optional", + "event_hub_resource_id": null, + "consumer_group": null, + "table_name": "Optional", + "mapping_rule_name": "Optional", + "data_format": "Optional", + "ignore_first_record": "Optional", + "blob_storage_event_type": "Optional", + "managed_identity_resource_id": "Optional", + "managed_identity_object_id": "Optional", + "database_routing": "Optional", + "provisioning_state": "Optional" + } + }, + "EventGridConnectionWithManagedIdentityProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "storage_account_resource_id_for_managed_identity": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "event_hub_resource_id_for_managed_identity": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "consumer_group": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "managed_identity_resource_id": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "event_grid_resource_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "table_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "mapping_rule_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "data_format": { + "type": "Optional[Union[str, _models.EventGridDataFormat]]", + "default": null, + "param_type": "keyword_only" + }, + "ignore_first_record": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "blob_storage_event_type": { + "type": "Optional[Union[str, _models.BlobStorageEventType]]", + "default": null, + "param_type": "keyword_only" + }, + "database_routing": { + "type": "Optional[Union[str, _models.DatabaseRouting]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "storage_account_resource_id_for_managed_identity": null, + "event_hub_resource_id_for_managed_identity": null, + "event_grid_resource_id": "Optional", + "consumer_group": null, + "table_name": "Optional", + "mapping_rule_name": "Optional", + "data_format": "Optional", + "ignore_first_record": "Optional", + "blob_storage_event_type": "Optional", + "managed_identity_resource_id": null, + "managed_identity_object_id": "Optional", + "database_routing": "Optional", + "provisioning_state": "Optional" + } + }, + "EventGridDataConnection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[_models.EventGridConnectionProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "kind": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "location": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "kind": null, + "location": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "EventGridDataConnectionWithManagedIdentity": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[_models.EventGridConnectionWithManagedIdentityProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "kind": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "location": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "kind": null, + "location": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "EventGridDataFormat": { + "type": "Enum", + "methods": {}, + "properties": { + "APACHEAVRO": "APACHEAVRO", + "AVRO": "AVRO", + "AZMONSTREAM": "AZMONSTREAM", + "CSV": "CSV", + "JSON": "JSON", + "MULTIJSON": "MULTIJSON", + "ORC": "ORC", + "PARQUET": "PARQUET", + "PSV": "PSV", + "RAW": "RAW", + "SCSV": "SCSV", + "SINGLEJSON": "SINGLEJSON", + "SOHSV": "SOHSV", + "TSV": "TSV", + "TSVE": "TSVE", + "TXT": "TXT", + "W3_CLOGFILE": "W3_CLOGFILE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "EventHubConnectionProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "event_hub_resource_id": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "consumer_group": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "table_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "mapping_rule_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "data_format": { + "type": "Optional[Union[str, _models.EventHubDataFormat]]", + "default": null, + "param_type": "keyword_only" + }, + "event_system_properties": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "compression": { + "type": "Optional[Union[str, _models.Compression]]", + "default": null, + "param_type": "keyword_only" + }, + "managed_identity_resource_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "database_routing": { + "type": "Optional[Union[str, _models.DatabaseRouting]]", + "default": null, + "param_type": "keyword_only" + }, + "retrieval_start_date": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "event_hub_resource_id": null, + "consumer_group": null, + "table_name": "Optional", + "mapping_rule_name": "Optional", + "data_format": "Optional", + "event_system_properties": "Optional", + "compression": "Optional", + "provisioning_state": "Optional", + "managed_identity_resource_id": "Optional", + "managed_identity_object_id": "Optional", + "database_routing": "Optional", + "retrieval_start_date": "Optional" + } + }, + "EventHubConnectionWithManagedIdentityProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "event_hub_resource_id_for_managed_identity": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "consumer_group": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "managed_identity_resource_id": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "table_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "mapping_rule_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "data_format": { + "type": "Optional[Union[str, _models.EventHubDataFormat]]", + "default": null, + "param_type": "keyword_only" + }, + "event_system_properties": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "compression": { + "type": "Optional[Union[str, _models.Compression]]", + "default": null, + "param_type": "keyword_only" + }, + "database_routing": { + "type": "Optional[Union[str, _models.DatabaseRouting]]", + "default": null, + "param_type": "keyword_only" + }, + "retrieval_start_date": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "event_hub_resource_id_for_managed_identity": null, + "consumer_group": null, + "table_name": "Optional", + "mapping_rule_name": "Optional", + "data_format": "Optional", + "event_system_properties": "Optional", + "compression": "Optional", + "provisioning_state": "Optional", + "managed_identity_resource_id": null, + "managed_identity_object_id": "Optional", + "database_routing": "Optional", + "retrieval_start_date": "Optional" + } + }, + "EventHubDataConnection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[_models.EventHubConnectionProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "kind": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "location": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "kind": null, + "location": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "EventHubDataConnectionWithManagedIdentity": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[_models.EventHubConnectionWithManagedIdentityProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "kind": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "location": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "kind": null, + "location": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "EventHubDataFormat": { + "type": "Enum", + "methods": {}, + "properties": { + "APACHEAVRO": "APACHEAVRO", + "AVRO": "AVRO", + "AZMONSTREAM": "AZMONSTREAM", + "CSV": "CSV", + "JSON": "JSON", + "MULTIJSON": "MULTIJSON", + "ORC": "ORC", + "PARQUET": "PARQUET", + "PSV": "PSV", + "RAW": "RAW", + "SCSV": "SCSV", + "SINGLEJSON": "SINGLEJSON", + "SOHSV": "SOHSV", + "TSV": "TSV", + "TSVE": "TSVE", + "TXT": "TXT", + "W3_CLOGFILE": "W3_CLOGFILE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "FollowerDatabaseDefinition": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_resource_id": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "attached_database_configuration_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "cluster_resource_id": null, + "attached_database_configuration_name": null, + "database_name": "Optional", + "table_level_sharing_properties": "Optional", + "database_share_origin": "Optional" + } + }, + "FollowerDatabaseDefinitionGet": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.FollowerDatabaseProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional" + } + }, + "FollowerDatabaseProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_resource_id": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "attached_database_configuration_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "cluster_resource_id": null, + "attached_database_configuration_name": null, + "database_name": "Optional", + "table_level_sharing_properties": "Optional", + "database_share_origin": "Optional" + } + }, + "Identity": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "type": { + "type": "Union[str, _models.IdentityType]", + "default": null, + "param_type": "keyword_only" + }, + "user_assigned_identities": { + "type": "Optional[dict[str, _models.ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "principal_id": "Optional", + "tenant_id": "Optional", + "type": "Union", + "user_assigned_identities": "Optional" + } + }, + "IdentityType": { + "type": "Enum", + "methods": {}, + "properties": { + "NONE": "NONE", + "SYSTEM_ASSIGNED": "SYSTEM_ASSIGNED", + "SYSTEM_ASSIGNED_USER_ASSIGNED": "SYSTEM_ASSIGNED_USER_ASSIGNED", + "USER_ASSIGNED": "USER_ASSIGNED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "IotHubConnectionProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "iot_hub_resource_id": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "consumer_group": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "shared_access_policy_name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "table_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "mapping_rule_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "data_format": { + "type": "Optional[Union[str, _models.IotHubDataFormat]]", + "default": null, + "param_type": "keyword_only" + }, + "event_system_properties": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "database_routing": { + "type": "Optional[Union[str, _models.DatabaseRouting]]", + "default": null, + "param_type": "keyword_only" + }, + "retrieval_start_date": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "iot_hub_resource_id": null, + "consumer_group": null, + "table_name": "Optional", + "mapping_rule_name": "Optional", + "data_format": "Optional", + "event_system_properties": "Optional", + "shared_access_policy_name": null, + "database_routing": "Optional", + "retrieval_start_date": "Optional", + "provisioning_state": "Optional" + } + }, + "IotHubDataConnection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[_models.IotHubConnectionProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "kind": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "location": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "kind": null, + "location": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "IotHubDataFormat": { + "type": "Enum", + "methods": {}, + "properties": { + "APACHEAVRO": "APACHEAVRO", + "AVRO": "AVRO", + "AZMONSTREAM": "AZMONSTREAM", + "CSV": "CSV", + "JSON": "JSON", + "MULTIJSON": "MULTIJSON", + "ORC": "ORC", + "PARQUET": "PARQUET", + "PSV": "PSV", + "RAW": "RAW", + "SCSV": "SCSV", + "SINGLEJSON": "SINGLEJSON", + "SOHSV": "SOHSV", + "TSV": "TSV", + "TSVE": "TSVE", + "TXT": "TXT", + "W3_CLOGFILE": "W3_CLOGFILE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "KeyVaultProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "key_version": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "key_vault_uri": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "user_identity": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "federated_identity_client_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "key_name": "Optional", + "key_version": "Optional", + "key_vault_uri": "Optional", + "user_identity": "Optional", + "federated_identity_client_id": "Optional" + } + }, + "Kind": { + "type": "Enum", + "methods": {}, + "properties": { + "READ_ONLY_FOLLOWING": "READ_ONLY_FOLLOWING", + "READ_WRITE": "READ_WRITE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "Language": { + "type": "Enum", + "methods": {}, + "properties": { + "PYTHON": "PYTHON", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "LanguageExtension": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "language_extension_name": { + "type": "Optional[Union[str, _models.LanguageExtensionName]]", + "default": null, + "param_type": "keyword_only" + }, + "language_extension_image_name": { + "type": "Optional[Union[str, _models.LanguageExtensionImageName]]", + "default": null, + "param_type": "keyword_only" + }, + "language_extension_custom_image_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "language_extension_name": "Optional", + "language_extension_image_name": "Optional", + "language_extension_custom_image_name": "Optional" + } + }, + "LanguageExtensionImageName": { + "type": "Enum", + "methods": {}, + "properties": { + "PYTHON3_10_8": "PYTHON3_10_8", + "PYTHON3_10_8_DL": "PYTHON3_10_8_DL", + "PYTHON3_11_7": "PYTHON3_11_7", + "PYTHON3_11_7_DL": "PYTHON3_11_7_DL", + "PYTHON3_6_5": "PYTHON3_6_5", + "PYTHON_CUSTOM_IMAGE": "PYTHON_CUSTOM_IMAGE", + "R": "R", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "LanguageExtensionName": { + "type": "Enum", + "methods": {}, + "properties": { + "PYTHON": "PYTHON", + "R": "R", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "LanguageExtensionsList": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "type": "Optional[list[_models.LanguageExtension]]", + "default": null, + "param_type": "keyword_only" + }, + "next_link": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "value": "Optional", + "next_link": "Optional" + } + }, + "ManagedPrivateEndpoint": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.ManagedPrivateEndpointProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "ManagedPrivateEndpointProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "private_link_resource_id": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "group_id": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "private_link_resource_region": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "request_message": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "private_link_resource_id": null, + "private_link_resource_region": "Optional", + "group_id": null, + "request_message": "Optional", + "provisioning_state": "Optional" + } + }, + "ManagedPrivateEndpointsCheckNameRequest": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "name": null, + "type": "Literal" + } + }, + "MigrationClusterProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "uri": "Optional", + "data_ingestion_uri": "Optional", + "role": "Optional" + } + }, + "MigrationClusterRole": { + "type": "Enum", + "methods": {}, + "properties": { + "DESTINATION": "DESTINATION", + "SOURCE": "SOURCE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "Operation": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "display": { + "type": "Optional[_models.OperationDisplay]", + "default": null, + "param_type": "keyword_only" + }, + "origin": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[Any]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "name": "Optional", + "display": "Optional", + "origin": "Optional", + "properties": "Optional" + } + }, + "OperationDisplay": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "provider": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "operation": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "resource": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "provider": "Optional", + "operation": "Optional", + "resource": "Optional", + "description": "Optional" + } + }, + "OperationResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "start_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "end_time": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "percent_complete": { + "type": "Optional[float]", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[_models.OperationResultProperties]", + "default": null, + "param_type": "keyword_only" + }, + "error": { + "type": "Optional[_models.OperationResultErrorProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "name": "Optional", + "status": "Optional", + "start_time": "Optional", + "end_time": "Optional", + "percent_complete": "Optional", + "properties": "Optional", + "error": "Optional" + } + }, + "OperationResultErrorProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "code": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "message": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "code": "Optional", + "message": "Optional" + } + }, + "OperationResultProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_kind": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "operation_state": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "operation_kind": "Optional", + "provisioning_state": "Optional", + "operation_state": "Optional" + } + }, + "OptimizedAutoscale": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "version": { + "type": "int", + "default": null, + "param_type": "keyword_only" + }, + "is_enabled": { + "type": "bool", + "default": null, + "param_type": "keyword_only" + }, + "minimum": { + "type": "int", + "default": null, + "param_type": "keyword_only" + }, + "maximum": { + "type": "int", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "version": null, + "is_enabled": null, + "minimum": null, + "maximum": null + } + }, + "OutboundAccess": { + "type": "Enum", + "methods": {}, + "properties": { + "ALLOW": "ALLOW", + "DENY": "DENY", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "OutboundNetworkDependenciesEndpoint": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.OutboundNetworkDependenciesEndpointProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "etag": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "OutboundNetworkDependenciesEndpointProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "category": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "endpoints": { + "type": "Optional[list[_models.EndpointDependency]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "category": "Optional", + "endpoints": "Optional", + "provisioning_state": "Optional" + } + }, + "PrincipalPermissionsAction": { + "type": "Enum", + "methods": {}, + "properties": { + "REMOVE_PERMISSION_ON_SCRIPT_COMPLETION": "REMOVE_PERMISSION_ON_SCRIPT_COMPLETION", + "RETAIN_PERMISSION_ON_SCRIPT_COMPLETION": "RETAIN_PERMISSION_ON_SCRIPT_COMPLETION", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "PrincipalType": { + "type": "Enum", + "methods": {}, + "properties": { + "APP": "APP", + "GROUP": "GROUP", + "USER": "USER", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "PrincipalsModificationKind": { + "type": "Enum", + "methods": {}, + "properties": { + "NONE": "NONE", + "REPLACE": "REPLACE", + "UNION": "UNION", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "PrivateEndpointConnection": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.PrivateEndpointConnectionProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "PrivateEndpointConnectionProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "private_link_service_connection_state": { + "type": "_models.PrivateLinkServiceConnectionStateProperty", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "private_endpoint": "Optional", + "private_link_service_connection_state": null, + "group_id": "Optional", + "provisioning_state": "Optional" + } + }, + "PrivateEndpointProperty": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "id": "Optional" + } + }, + "PrivateLinkResource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.PrivateLinkResourceProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "PrivateLinkResourceProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "group_id": "Optional", + "required_members": "Optional", + "required_zone_names": "Optional" + } + }, + "PrivateLinkServiceConnectionStateProperty": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "status": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "description": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "status": "Optional", + "description": "Optional", + "actions_required": "Optional" + } + }, + "ProvisioningState": { + "type": "Enum", + "methods": {}, + "properties": { + "CANCELED": "CANCELED", + "CREATING": "CREATING", + "DELETING": "DELETING", + "FAILED": "FAILED", + "MOVING": "MOVING", + "RUNNING": "RUNNING", + "SUCCEEDED": "SUCCEEDED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ProxyResource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "PublicIPType": { + "type": "Enum", + "methods": {}, + "properties": { + "DUAL_STACK": "DUAL_STACK", + "I_PV4": "I_PV4", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "PublicNetworkAccess": { + "type": "Enum", + "methods": {}, + "properties": { + "DISABLED": "DISABLED", + "ENABLED": "ENABLED", + "SECURED_BY_PERIMETER": "SECURED_BY_PERIMETER", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ReadOnlyFollowingDatabase": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[_models.ReadOnlyFollowingDatabaseProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "kind": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "location": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "kind": null, + "location": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "ReadOnlyFollowingDatabaseProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "hot_cache_period": { + "type": "Optional[timedelta]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "provisioning_state": "Optional", + "soft_delete_period": "Optional", + "hot_cache_period": "Optional", + "statistics": "Optional", + "leader_cluster_resource_id": "Optional", + "attached_database_configuration_name": "Optional", + "principals_modification_kind": "Optional", + "table_level_sharing_properties": "Optional", + "original_database_name": "Optional", + "database_share_origin": "Optional", + "suspension_details": "Optional" + } + }, + "ReadWriteDatabase": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "properties": { + "type": "Optional[_models.ReadWriteDatabaseProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "kind": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "location": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "kind": null, + "location": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "ReadWriteDatabaseProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "soft_delete_period": { + "type": "Optional[timedelta]", + "default": null, + "param_type": "keyword_only" + }, + "hot_cache_period": { + "type": "Optional[timedelta]", + "default": null, + "param_type": "keyword_only" + }, + "key_vault_properties": { + "type": "Optional[_models.KeyVaultProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "provisioning_state": "Optional", + "soft_delete_period": "Optional", + "hot_cache_period": "Optional", + "statistics": "Optional", + "is_followed": "Optional", + "key_vault_properties": "Optional", + "suspension_details": "Optional" + } + }, + "Reason": { + "type": "Enum", + "methods": {}, + "properties": { + "ALREADY_EXISTS": "ALREADY_EXISTS", + "INVALID": "INVALID", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "Resource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "ResourceSkuCapabilities": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "name": "Optional", + "value": "Optional" + } + }, + "ResourceSkuZoneDetails": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "name": "Optional", + "capabilities": "Optional" + } + }, + "SandboxCustomImage": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.SandboxCustomImageProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "SandboxCustomImageProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "language": { + "type": "Union[str, _models.Language]", + "default": null, + "param_type": "keyword_only" + }, + "language_version": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "base_image_name": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "requirements_file_content": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "language": "Union", + "language_version": "Optional", + "base_image_name": "Optional", + "requirements_file_content": "Optional", + "provisioning_state": "Optional" + } + }, + "SandboxCustomImagesCheckNameRequest": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "name": null, + "type": "Literal" + } + }, + "Script": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "properties": { + "type": "Optional[_models.ScriptProperties]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "properties": "Optional", + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "ScriptCheckNameRequest": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "name": { + "type": "str", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "name": null, + "type": "Literal" + } + }, + "ScriptLevel": { + "type": "Enum", + "methods": {}, + "properties": { + "CLUSTER": "CLUSTER", + "DATABASE": "DATABASE", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ScriptProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "script_url": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "script_url_sas_token": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "script_content": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "force_update_tag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "continue_on_errors": { + "type": "Optional[bool]", + "default": null, + "param_type": "keyword_only" + }, + "script_level": { + "type": "Optional[Union[str, _models.ScriptLevel]]", + "default": null, + "param_type": "keyword_only" + }, + "principal_permissions_action": { + "type": "Optional[Union[str, _models.PrincipalPermissionsAction]]", + "default": null, + "param_type": "keyword_only" + }, + "managed_identity_resource_id": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "script_url": "Optional", + "script_url_sas_token": "Optional", + "script_content": "Optional", + "force_update_tag": "Optional", + "continue_on_errors": "Optional", + "provisioning_state": "Optional", + "script_level": "Optional", + "principal_permissions_action": "Optional", + "managed_identity_resource_id": "Optional" + } + }, + "SkuDescription": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "resource_type": "Optional", + "name": "Optional", + "tier": "Optional", + "locations": "Optional", + "location_info": "Optional", + "restrictions": "Optional" + } + }, + "SkuLocationInfoItem": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "zones": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "zone_details": { + "type": "Optional[list[_models.ResourceSkuZoneDetails]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "location": null, + "zones": "Optional", + "zone_details": "Optional" + } + }, + "State": { + "type": "Enum", + "methods": {}, + "properties": { + "CREATING": "CREATING", + "DELETED": "DELETED", + "DELETING": "DELETING", + "MIGRATED": "MIGRATED", + "RUNNING": "RUNNING", + "STARTING": "STARTING", + "STOPPED": "STOPPED", + "STOPPING": "STOPPING", + "UNAVAILABLE": "UNAVAILABLE", + "UPDATING": "UPDATING", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "Status": { + "type": "Enum", + "methods": {}, + "properties": { + "CANCELED": "CANCELED", + "FAILED": "FAILED", + "RUNNING": "RUNNING", + "SUCCEEDED": "SUCCEEDED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "SuspensionDetails": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "suspension_start_date": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "suspension_start_date": "Optional" + } + }, + "SystemData": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "created_by": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "created_by_type": { + "type": "Optional[Union[str, _models.CreatedByType]]", + "default": null, + "param_type": "keyword_only" + }, + "created_at": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + }, + "last_modified_by": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "last_modified_by_type": { + "type": "Optional[Union[str, _models.CreatedByType]]", + "default": null, + "param_type": "keyword_only" + }, + "last_modified_at": { + "type": "Optional[datetime]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "created_by": "Optional", + "created_by_type": "Optional", + "created_at": "Optional", + "last_modified_by": "Optional", + "last_modified_by_type": "Optional", + "last_modified_at": "Optional" + } + }, + "TableLevelSharingProperties": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "tables_to_include": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "tables_to_exclude": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "external_tables_to_include": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "external_tables_to_exclude": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "materialized_views_to_include": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "materialized_views_to_exclude": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "functions_to_include": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + }, + "functions_to_exclude": { + "type": "Optional[list[str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "tables_to_include": "Optional", + "tables_to_exclude": "Optional", + "external_tables_to_include": "Optional", + "external_tables_to_exclude": "Optional", + "materialized_views_to_include": "Optional", + "materialized_views_to_exclude": "Optional", + "functions_to_include": "Optional", + "functions_to_exclude": "Optional" + } + }, + "TrackedResource": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "tags": { + "type": "Optional[dict[str, str]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "tags": "Optional", + "location": null, + "id": "Optional", + "name": "Optional", + "type": "Optional", + "system_data": "Optional" + } + }, + "TrustedExternalTenant": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "value": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "value": "Optional" + } + }, + "Type": { + "type": "Enum", + "methods": {}, + "properties": { + "MICROSOFT_KUSTO_CLUSTERS_ATTACHED_DATABASE_CONFIGURATIONS": "MICROSOFT_KUSTO_CLUSTERS_ATTACHED_DATABASE_CONFIGURATIONS", + "MICROSOFT_KUSTO_CLUSTERS_DATABASES": "MICROSOFT_KUSTO_CLUSTERS_DATABASES", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "VirtualNetworkConfiguration": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "subnet_id": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "engine_public_ip_id": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "data_management_public_ip_id": { + "type": "str", + "default": null, + "param_type": "keyword_only" + }, + "state": { + "type": "Optional[Union[str, _models.VnetState]]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "mapping": { + "type": "Mapping[str, Any]", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + } + ] + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": "bool", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "dict[str, Any]", + "overloads": [] + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Model", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [] + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ItemsView[str, Any]", + "overloads": [] + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "KeysView[str]", + "overloads": [] + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "_T", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "_T" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "tuple[str, Any]", + "overloads": [] + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "None", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "None" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "type": "Any", + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "Any" + } + ] + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false, + "return_type": "ValuesView[Any]", + "overloads": [] + } + }, + "properties": { + "subnet_id": null, + "engine_public_ip_id": null, + "data_management_public_ip_id": null, + "state": "Optional" + } + }, + "VnetState": { + "type": "Enum", + "methods": {}, + "properties": { + "DISABLED": "DISABLED", + "ENABLED": "ENABLED", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + }, + "ZoneStatus": { + "type": "Enum", + "methods": {}, + "properties": { + "NON_ZONAL": "NON_ZONAL", + "ZONAL": "ZONAL", + "ZONAL_INCONSISTENCY": "ZONAL_INCONSISTENCY", + "capitalize": "capitalize", + "casefold": "casefold", + "center": "center", + "count": "count", + "encode": "encode", + "endswith": "endswith", + "expandtabs": "expandtabs", + "find": "find", + "format": "format", + "format_map": "format_map", + "index": "index", + "isalnum": "isalnum", + "isalpha": "isalpha", + "isascii": "isascii", + "isdecimal": "isdecimal", + "isdigit": "isdigit", + "isidentifier": "isidentifier", + "islower": "islower", + "isnumeric": "isnumeric", + "isprintable": "isprintable", + "isspace": "isspace", + "istitle": "istitle", + "isupper": "isupper", + "join": "join", + "ljust": "ljust", + "lower": "lower", + "lstrip": "lstrip", + "maketrans": "maketrans", + "partition": "partition", + "removeprefix": "removeprefix", + "removesuffix": "removesuffix", + "replace": "replace", + "rfind": "rfind", + "rindex": "rindex", + "rjust": "rjust", + "rpartition": "rpartition", + "rsplit": "rsplit", + "rstrip": "rstrip", + "split": "split", + "splitlines": "splitlines", + "startswith": "startswith", + "strip": "strip", + "swapcase": "swapcase", + "title": "title", + "translate": "translate", + "upper": "upper", + "zfill": "zfill" + } + } + }, + "function_nodes": {} + }, + "azure.mgmt.kusto.operations": { + "class_nodes": { + "AttachedDatabaseConfigurationsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "attached_database_configuration_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[AttachedDatabaseConfiguration]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "attached_database_configuration_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "AttachedDatabaseConfiguration", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[AttachedDatabaseConfiguration]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "attached_database_configuration_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[AttachedDatabaseConfiguration]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "attached_database_configuration_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[AttachedDatabaseConfiguration]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "attached_database_configuration_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "check_name_availability": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "CheckNameResult", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "AttachedDatabaseConfigurationsCheckNameRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckNameResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckNameResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckNameResult" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "attached_database_configuration_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "AttachedDatabaseConfiguration", + "overloads": [] + }, + "list_by_cluster": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.AttachedDatabaseConfiguration]", + "overloads": [] + } + }, + "properties": {} + }, + "ClusterPrincipalAssignmentsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[ClusterPrincipalAssignment]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ClusterPrincipalAssignment", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[ClusterPrincipalAssignment]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[ClusterPrincipalAssignment]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[ClusterPrincipalAssignment]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "check_name_availability": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "CheckNameResult", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "type": "ClusterPrincipalAssignmentCheckNameRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckNameResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckNameResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckNameResult" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ClusterPrincipalAssignment", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.ClusterPrincipalAssignment]", + "overloads": [] + } + }, + "properties": {} + }, + "ClustersOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_add_callout_policies": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "callout_policies": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "callout_policies": { + "type": "CalloutPoliciesList", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[None]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "callout_policies": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[None]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "callout_policies": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[None]" + } + ] + }, + "begin_add_language_extensions": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "language_extensions_to_add": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "language_extensions_to_add": { + "type": "LanguageExtensionsList", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[None]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "language_extensions_to_add": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[None]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "language_extensions_to_add": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[None]" + } + ] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[Cluster]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Cluster", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Cluster]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Cluster]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Cluster]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_detach_follower_databases": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "follower_database_to_remove": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "follower_database_to_remove": { + "type": "FollowerDatabaseDefinition", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[None]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "follower_database_to_remove": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[None]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "follower_database_to_remove": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[None]" + } + ] + }, + "begin_diagnose_virtual_network": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[DiagnoseVirtualNetworkResult]", + "overloads": [] + }, + "begin_migrate": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_migrate_request": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_migrate_request": { + "type": "ClusterMigrateRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[None]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_migrate_request": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[None]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_migrate_request": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[None]" + } + ] + }, + "begin_remove_callout_policy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "callout_policy": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "callout_policy": { + "type": "CalloutPolicyToRemove", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[None]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "callout_policy": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[None]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "callout_policy": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[None]" + } + ] + }, + "begin_remove_language_extensions": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "language_extensions_to_remove": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "language_extensions_to_remove": { + "type": "LanguageExtensionsList", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[None]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "language_extensions_to_remove": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[None]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "language_extensions_to_remove": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[None]" + } + ] + }, + "begin_start": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_stop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "etag": { + "default": "none", + "param_type": "keyword_only" + }, + "match_condition": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[Cluster]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ClusterUpdate", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Cluster]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Cluster]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + }, + "etag": { + "type": "Optional[str]", + "default": null, + "param_type": "keyword_only" + }, + "match_condition": { + "type": "Optional[MatchConditions]", + "default": null, + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Cluster]" + } + ] + }, + "check_name_availability": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "CheckNameResult", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "ClusterCheckNameRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckNameResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckNameResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckNameResult" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "Cluster", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.Cluster]", + "overloads": [] + }, + "list_by_resource_group": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.Cluster]", + "overloads": [] + }, + "list_callout_policies": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.CalloutPolicy]", + "overloads": [] + }, + "list_follower_databases": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.FollowerDatabaseDefinition]", + "overloads": [] + }, + "list_follower_databases_get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.FollowerDatabaseDefinitionGet]", + "overloads": [] + }, + "list_language_extensions": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.LanguageExtension]", + "overloads": [] + }, + "list_outbound_network_dependencies_endpoints": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.OutboundNetworkDependenciesEndpoint]", + "overloads": [] + }, + "list_skus": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.SkuDescription]", + "overloads": [] + }, + "list_skus_by_resource": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.AzureResourceSku]", + "overloads": [] + } + }, + "properties": {} + }, + "DataConnectionsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "data_connection_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[DataConnection]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "data_connection_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DataConnection", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[DataConnection]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "data_connection_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[DataConnection]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "data_connection_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[DataConnection]" + } + ] + }, + "begin_data_connection_validation": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[DataConnectionValidationListResult]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DataConnectionValidation", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[DataConnectionValidationListResult]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[DataConnectionValidationListResult]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[DataConnectionValidationListResult]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "data_connection_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "data_connection_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[DataConnection]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "data_connection_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DataConnection", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[DataConnection]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "data_connection_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[DataConnection]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "data_connection_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[DataConnection]" + } + ] + }, + "check_name_availability": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "data_connection_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "CheckNameResult", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "data_connection_name": { + "type": "DataConnectionCheckNameRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckNameResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "data_connection_name": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckNameResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "data_connection_name": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckNameResult" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "data_connection_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "DataConnection", + "overloads": [] + }, + "list_by_database": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.DataConnection]", + "overloads": [] + } + }, + "properties": {} + }, + "DatabaseOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "invite_follower": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "DatabaseInviteFollowerResult", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DatabaseInviteFollowerRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "DatabaseInviteFollowerResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "DatabaseInviteFollowerResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "DatabaseInviteFollowerResult" + } + ] + } + }, + "properties": {} + }, + "DatabasePrincipalAssignmentsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[DatabasePrincipalAssignment]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "DatabasePrincipalAssignment", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[DatabasePrincipalAssignment]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[DatabasePrincipalAssignment]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[DatabasePrincipalAssignment]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "check_name_availability": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "CheckNameResult", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "type": "DatabasePrincipalAssignmentCheckNameRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckNameResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckNameResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckNameResult" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "principal_assignment_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "DatabasePrincipalAssignment", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.DatabasePrincipalAssignment]", + "overloads": [] + } + }, + "properties": {} + }, + "DatabasesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "add_principals": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_principals_to_add": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "DatabasePrincipalListResult", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_principals_to_add": { + "type": "DatabasePrincipalListRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "DatabasePrincipalListResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_principals_to_add": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "DatabasePrincipalListResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_principals_to_add": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "DatabasePrincipalListResult" + } + ] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "caller_role": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[Database]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Database", + "default": null, + "param_type": "positional_or_keyword" + }, + "caller_role": { + "type": "Optional[Union[str, CallerRole]]", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Database]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "caller_role": { + "type": "Optional[Union[str, CallerRole]]", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Database]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "caller_role": { + "type": "Optional[Union[str, CallerRole]]", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Database]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "caller_role": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[Database]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Database", + "default": null, + "param_type": "positional_or_keyword" + }, + "caller_role": { + "type": "Optional[Union[str, CallerRole]]", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Database]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "caller_role": { + "type": "Optional[Union[str, CallerRole]]", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Database]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "caller_role": { + "type": "Optional[Union[str, CallerRole]]", + "default": null, + "param_type": "keyword_only" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Database]" + } + ] + }, + "check_name_availability": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "CheckNameResult", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "CheckNameRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckNameResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckNameResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckNameResult" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "Database", + "overloads": [] + }, + "list_by_cluster": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skiptoken": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.Database]", + "overloads": [] + }, + "list_principals": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.DatabasePrincipal]", + "overloads": [] + }, + "remove_principals": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_principals_to_remove": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "DatabasePrincipalListResult", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_principals_to_remove": { + "type": "DatabasePrincipalListRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "DatabasePrincipalListResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_principals_to_remove": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "DatabasePrincipalListResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_principals_to_remove": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "DatabasePrincipalListResult" + } + ] + } + }, + "properties": {} + }, + "ManagedPrivateEndpointsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "managed_private_endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[ManagedPrivateEndpoint]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "managed_private_endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ManagedPrivateEndpoint", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[ManagedPrivateEndpoint]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "managed_private_endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[ManagedPrivateEndpoint]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "managed_private_endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[ManagedPrivateEndpoint]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "managed_private_endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "managed_private_endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[ManagedPrivateEndpoint]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "managed_private_endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "ManagedPrivateEndpoint", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[ManagedPrivateEndpoint]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "managed_private_endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[ManagedPrivateEndpoint]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "managed_private_endpoint_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[ManagedPrivateEndpoint]" + } + ] + }, + "check_name_availability": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "CheckNameResult", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "ManagedPrivateEndpointsCheckNameRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckNameResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckNameResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckNameResult" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "managed_private_endpoint_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ManagedPrivateEndpoint", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.ManagedPrivateEndpoint]", + "overloads": [] + } + }, + "properties": {} + }, + "Operations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.Operation]", + "overloads": [] + } + }, + "properties": {} + }, + "OperationsResultsLocationOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + } + }, + "properties": {} + }, + "OperationsResultsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": null, + "param_type": "positional_or_keyword" + }, + "operation_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "OperationResult", + "overloads": [] + } + }, + "properties": {} + }, + "PrivateEndpointConnectionsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[PrivateEndpointConnection]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "PrivateEndpointConnection", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[PrivateEndpointConnection]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[PrivateEndpointConnection]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[PrivateEndpointConnection]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "private_endpoint_connection_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "PrivateEndpointConnection", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.PrivateEndpointConnection]", + "overloads": [] + } + }, + "properties": {} + }, + "PrivateLinkResourcesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "private_link_resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "PrivateLinkResource", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.PrivateLinkResource]", + "overloads": [] + } + }, + "properties": {} + }, + "SandboxCustomImagesOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sandbox_custom_image_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[SandboxCustomImage]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "sandbox_custom_image_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "SandboxCustomImage", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[SandboxCustomImage]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "sandbox_custom_image_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[SandboxCustomImage]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "sandbox_custom_image_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[SandboxCustomImage]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sandbox_custom_image_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sandbox_custom_image_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[SandboxCustomImage]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "sandbox_custom_image_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "SandboxCustomImage", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[SandboxCustomImage]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "sandbox_custom_image_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[SandboxCustomImage]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "sandbox_custom_image_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[SandboxCustomImage]" + } + ] + }, + "check_name_availability": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "CheckNameResult", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "SandboxCustomImagesCheckNameRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckNameResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckNameResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_name": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckNameResult" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "sandbox_custom_image_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "SandboxCustomImage", + "overloads": [] + }, + "list_by_cluster": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.SandboxCustomImage]", + "overloads": [] + } + }, + "properties": {} + }, + "ScriptsOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "begin_create_or_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "script_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[Script]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "script_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Script", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Script]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "script_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Script]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "script_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Script]" + } + ] + }, + "begin_delete": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "script_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[None]", + "overloads": [] + }, + "begin_update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "script_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "LROPoller[Script]", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "script_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "Script", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Script]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "script_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Script]" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "script_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "parameters": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "LROPoller[Script]" + } + ] + }, + "check_name_availability": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "script_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "CheckNameResult", + "overloads": [ + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "script_name": { + "type": "ScriptCheckNameRequest", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckNameResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "script_name": { + "type": "JSON", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckNameResult" + }, + { + "parameters": { + "self": { + "type": null, + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "type": "str", + "default": null, + "param_type": "positional_or_keyword" + }, + "script_name": { + "type": "IO[bytes]", + "default": null, + "param_type": "positional_or_keyword" + }, + "content_type": { + "type": "str", + "default": "application/json", + "param_type": "keyword_only" + } + }, + "is_async": false, + "return_type": "CheckNameResult" + } + ] + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "script_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "Script", + "overloads": [] + }, + "list_by_database": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "resource_group_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "cluster_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "database_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.Script]", + "overloads": [] + } + }, + "properties": {} + }, + "SkusOperations": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "None", + "overloads": [] + }, + "list": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "location": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false, + "return_type": "ItemPaged[_models.SkuDescription]", + "overloads": [] + } + }, + "properties": {} + } + }, + "function_nodes": {} + } +} \ No newline at end of file diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_attached_database_configuration_check_name_availability.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_attached_database_configuration_check_name_availability.py index 7538310af2f5..73ec78d60c10 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_attached_database_configuration_check_name_availability.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_attached_database_configuration_check_name_availability.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.attached_database_configurations.check_name_availability( @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoAttachedDatabaseConfigurationCheckNameAvailability.json +# x-ms-original-file: 2025-02-14/KustoAttachedDatabaseConfigurationCheckNameAvailability.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_attached_database_configurations_create_or_update.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_attached_database_configurations_create_or_update.py index 8e277c000361..e135ff1db6fc 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_attached_database_configurations_create_or_update.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_attached_database_configurations_create_or_update.py @@ -1,8 +1,9 @@ +# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +28,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.attached_database_configurations.begin_create_or_update( @@ -55,6 +56,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoAttachedDatabaseConfigurationsCreateOrUpdate.json +# x-ms-original-file: 2025-02-14/KustoAttachedDatabaseConfigurationsCreateOrUpdate.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_attached_database_configurations_delete.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_attached_database_configurations_delete.py index deb8dc8fa187..47782a46fdf9 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_attached_database_configurations_delete.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_attached_database_configurations_delete.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) client.attached_database_configurations.begin_delete( @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoAttachedDatabaseConfigurationsDelete.json +# x-ms-original-file: 2025-02-14/KustoAttachedDatabaseConfigurationsDelete.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_attached_database_configurations_get.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_attached_database_configurations_get.py index 432002cbeffb..a9352b5001da 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_attached_database_configurations_get.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_attached_database_configurations_get.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.attached_database_configurations.get( @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoAttachedDatabaseConfigurationsGet.json +# x-ms-original-file: 2025-02-14/KustoAttachedDatabaseConfigurationsGet.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_attached_database_configurations_list_by_cluster.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_attached_database_configurations_list_by_cluster.py index 2b7411fdbe0c..08fbd6106d77 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_attached_database_configurations_list_by_cluster.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_attached_database_configurations_list_by_cluster.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.attached_database_configurations.list_by_cluster( @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoAttachedDatabaseConfigurationsListByCluster.json +# x-ms-original-file: 2025-02-14/KustoAttachedDatabaseConfigurationsListByCluster.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_add_callout_policies.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_add_callout_policies.py index 4593f252e690..087f1e08f5cb 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_add_callout_policies.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_add_callout_policies.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) client.clusters.begin_add_callout_policies( @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoClusterAddCalloutPolicies.json +# x-ms-original-file: 2025-02-14/KustoClusterAddCalloutPolicies.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_add_language_extensions.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_add_language_extensions.py index caa67e12ac6c..f04a24e14e79 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_add_language_extensions.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_add_language_extensions.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) client.clusters.begin_add_language_extensions( @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoClusterAddLanguageExtensions.json +# x-ms-original-file: 2025-02-14/KustoClusterAddLanguageExtensions.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_create_with_cmk_federated_identity.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_create_with_cmk_federated_identity.py new file mode 100644 index 000000000000..b63f7e98e397 --- /dev/null +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_create_with_cmk_federated_identity.py @@ -0,0 +1,70 @@ +# pylint: disable=line-too-long,useless-suppression +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.kusto import KustoManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-kusto +# USAGE + python kusto_cluster_create_with_cmk_federated_identity.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = KustoManagementClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.clusters.begin_create_or_update( + resource_group_name="kustoRgTest", + cluster_name="kustoClusterCMK", + parameters={ + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustoRgTest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/kustoClusterIdentity": {} + }, + }, + "location": "westus", + "properties": { + "enableAutoStop": True, + "enableDoubleEncryption": False, + "enablePurge": True, + "enableStreamingIngest": True, + "engineType": "V3", + "keyVaultProperties": { + "federatedIdentityClientId": "11111111-2222-3333-4444-555555555555", + "keyName": "myClusterCMKKey", + "keyVaultUri": "https://myvault.vault.azure.net", + "keyVersion": "12345678-1234-1234-1234-123456789098", + "userIdentity": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustoRgTest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/kustoClusterIdentity", + }, + "publicIPType": "IPv4", + "publicNetworkAccess": "Enabled", + "restrictOutboundNetworkAccess": "Disabled", + }, + "sku": {"capacity": 2, "name": "Standard_L16as_v3", "tier": "Standard"}, + }, + ).result() + print(response) + + +# x-ms-original-file: 2025-02-14/KustoClusterCreateWithCMKFederatedIdentity.json +if __name__ == "__main__": + main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_create_with_cmk_user_assigned_identity.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_create_with_cmk_user_assigned_identity.py new file mode 100644 index 000000000000..a8c2f9710cb4 --- /dev/null +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_create_with_cmk_user_assigned_identity.py @@ -0,0 +1,69 @@ +# pylint: disable=line-too-long,useless-suppression +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.kusto import KustoManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-kusto +# USAGE + python kusto_cluster_create_with_cmk_user_assigned_identity.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = KustoManagementClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.clusters.begin_create_or_update( + resource_group_name="kustoRgTest", + cluster_name="kustoClusterCMK", + parameters={ + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustoRgTest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/kustoClusterIdentity": {} + }, + }, + "location": "westus", + "properties": { + "enableAutoStop": True, + "enableDoubleEncryption": False, + "enablePurge": True, + "enableStreamingIngest": True, + "engineType": "V3", + "keyVaultProperties": { + "keyName": "myClusterCMKKey", + "keyVaultUri": "https://myvault.vault.azure.net", + "keyVersion": "12345678-1234-1234-1234-123456789098", + "userIdentity": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustoRgTest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/kustoClusterIdentity", + }, + "publicIPType": "IPv4", + "publicNetworkAccess": "Enabled", + "restrictOutboundNetworkAccess": "Disabled", + }, + "sku": {"capacity": 2, "name": "Standard_L16as_v3", "tier": "Standard"}, + }, + ).result() + print(response) + + +# x-ms-original-file: 2025-02-14/KustoClusterCreateWithCMKUserAssignedIdentity.json +if __name__ == "__main__": + main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_detach_follower_databases.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_detach_follower_databases.py index 24effeffa110..ae5d80eede6c 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_detach_follower_databases.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_detach_follower_databases.py @@ -1,8 +1,9 @@ +# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +28,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) client.clusters.begin_detach_follower_databases( @@ -40,6 +41,6 @@ def main(): ).result() -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoClusterDetachFollowerDatabases.json +# x-ms-original-file: 2025-02-14/KustoClusterDetachFollowerDatabases.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_list_follower_databases.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_list_follower_databases.py index c894536980c9..e0d6cd335e66 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_list_follower_databases.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_list_follower_databases.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.clusters.list_follower_databases( @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoClusterListFollowerDatabases.json +# x-ms-original-file: 2025-02-14/KustoClusterListFollowerDatabases.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_list_follower_databases_get.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_list_follower_databases_get.py index 8f13c0a30535..419e30cbae93 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_list_follower_databases_get.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_list_follower_databases_get.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.clusters.list_follower_databases_get( @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoClusterListFollowerDatabasesGet.json +# x-ms-original-file: 2025-02-14/KustoClusterListFollowerDatabasesGet.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_list_language_extensions.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_list_language_extensions.py index cc182440e915..021093719e3e 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_list_language_extensions.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_list_language_extensions.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.clusters.list_language_extensions( @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoClusterListLanguageExtensions.json +# x-ms-original-file: 2025-02-14/KustoClusterListLanguageExtensions.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_migrate.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_migrate.py index 9b160df8100f..7e192894db1e 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_migrate.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_migrate.py @@ -1,8 +1,9 @@ +# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +28,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) client.clusters.begin_migrate( @@ -39,6 +40,6 @@ def main(): ).result() -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoClusterMigrate.json +# x-ms-original-file: 2025-02-14/KustoClusterMigrate.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_principal_assignments_check_name_availability.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_principal_assignments_check_name_availability.py index 2c9bd62f6cf1..91e96228a12a 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_principal_assignments_check_name_availability.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_principal_assignments_check_name_availability.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.cluster_principal_assignments.check_name_availability( @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoClusterPrincipalAssignmentsCheckNameAvailability.json +# x-ms-original-file: 2025-02-14/KustoClusterPrincipalAssignmentsCheckNameAvailability.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_principal_assignments_create_or_update.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_principal_assignments_create_or_update.py index dc54c7ee72ba..19cc3b197c2d 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_principal_assignments_create_or_update.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_principal_assignments_create_or_update.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.cluster_principal_assignments.begin_create_or_update( @@ -46,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoClusterPrincipalAssignmentsCreateOrUpdate.json +# x-ms-original-file: 2025-02-14/KustoClusterPrincipalAssignmentsCreateOrUpdate.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_principal_assignments_delete.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_principal_assignments_delete.py index 0b3357bb7ca0..8911a0027f7c 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_principal_assignments_delete.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_principal_assignments_delete.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) client.cluster_principal_assignments.begin_delete( @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoClusterPrincipalAssignmentsDelete.json +# x-ms-original-file: 2025-02-14/KustoClusterPrincipalAssignmentsDelete.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_principal_assignments_get.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_principal_assignments_get.py index f771758a281d..05434a22f8ad 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_principal_assignments_get.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_principal_assignments_get.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.cluster_principal_assignments.get( @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoClusterPrincipalAssignmentsGet.json +# x-ms-original-file: 2025-02-14/KustoClusterPrincipalAssignmentsGet.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_principal_assignments_list.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_principal_assignments_list.py index ea1c4df2a147..258b4d933fc1 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_principal_assignments_list.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_principal_assignments_list.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.cluster_principal_assignments.list( @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoClusterPrincipalAssignmentsList.json +# x-ms-original-file: 2025-02-14/KustoClusterPrincipalAssignmentsList.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_remove_callout_policy.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_remove_callout_policy.py index 1b7292ed4fa5..dd0c936cb148 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_remove_callout_policy.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_remove_callout_policy.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) client.clusters.begin_remove_callout_policy( @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoClusterRemoveCalloutPolicy.json +# x-ms-original-file: 2025-02-14/KustoClusterRemoveCalloutPolicy.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_remove_language_extensions.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_remove_language_extensions.py index e047eedd9de0..b2100372896f 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_remove_language_extensions.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_remove_language_extensions.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) client.clusters.begin_remove_language_extensions( @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoClusterRemoveLanguageExtensions.json +# x-ms-original-file: 2025-02-14/KustoClusterRemoveLanguageExtensions.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_update_cmk_key_rotation.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_update_cmk_key_rotation.py new file mode 100644 index 000000000000..a0ef643d3b0c --- /dev/null +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_update_cmk_key_rotation.py @@ -0,0 +1,54 @@ +# pylint: disable=line-too-long,useless-suppression +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.kusto import KustoManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-kusto +# USAGE + python kusto_cluster_update_cmk_key_rotation.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = KustoManagementClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.clusters.begin_update( + resource_group_name="kustoRgTest", + cluster_name="kustoClusterCMK", + parameters={ + "location": "westus", + "properties": { + "keyVaultProperties": { + "keyName": "myClusterCMKKey", + "keyVaultUri": "https://myvault.vault.azure.net", + "keyVersion": "87654321-4321-4321-4321-210987654321", + "userIdentity": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustoRgTest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/kustoClusterIdentity", + } + }, + }, + ).result() + print(response) + + +# x-ms-original-file: 2025-02-14/KustoClusterUpdateCMKKeyRotation.json +if __name__ == "__main__": + main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_update_disable_cmk.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_update_disable_cmk.py new file mode 100644 index 000000000000..c4f6bef350b0 --- /dev/null +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_update_disable_cmk.py @@ -0,0 +1,43 @@ +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.kusto import KustoManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-kusto +# USAGE + python kusto_cluster_update_disable_cmk.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = KustoManagementClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.clusters.begin_update( + resource_group_name="kustoRgTest", + cluster_name="kustoClusterCMK", + parameters={"location": "westus", "properties": {"keyVaultProperties": {}}}, + ).result() + print(response) + + +# x-ms-original-file: 2025-02-14/KustoClusterUpdateDisableCMK.json +if __name__ == "__main__": + main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_update_enable_cmk.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_update_enable_cmk.py new file mode 100644 index 000000000000..37e3a7fde7a1 --- /dev/null +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_update_enable_cmk.py @@ -0,0 +1,60 @@ +# pylint: disable=line-too-long,useless-suppression +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.kusto import KustoManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-kusto +# USAGE + python kusto_cluster_update_enable_cmk.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = KustoManagementClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.clusters.begin_update( + resource_group_name="kustoRgTest", + cluster_name="kustoCluster", + parameters={ + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustoRgTest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/kustoClusterIdentity": {} + }, + }, + "location": "westus", + "properties": { + "keyVaultProperties": { + "keyName": "myClusterCMKKey", + "keyVaultUri": "https://myvault.vault.azure.net", + "keyVersion": "12345678-1234-1234-1234-123456789098", + "userIdentity": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustoRgTest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/kustoClusterIdentity", + } + }, + }, + ).result() + print(response) + + +# x-ms-original-file: 2025-02-14/KustoClusterUpdateEnableCMK.json +if __name__ == "__main__": + main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_update_with_cmk_federated_identity.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_update_with_cmk_federated_identity.py new file mode 100644 index 000000000000..0d632e2e75bb --- /dev/null +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_cluster_update_with_cmk_federated_identity.py @@ -0,0 +1,67 @@ +# pylint: disable=line-too-long,useless-suppression +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.kusto import KustoManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-kusto +# USAGE + python kusto_cluster_update_with_cmk_federated_identity.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = KustoManagementClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.clusters.begin_update( + resource_group_name="kustoRgTest", + cluster_name="kustoCluster2", + parameters={ + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustoRgTest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/kustoClusterIdentity": {} + }, + }, + "location": "westus", + "properties": { + "enableAutoStop": True, + "enablePurge": True, + "enableStreamingIngest": True, + "engineType": "V3", + "keyVaultProperties": { + "federatedIdentityClientId": "11111111-2222-3333-4444-555555555555", + "keyName": "myClusterCMKKey", + "keyVaultUri": "https://myvault.vault.azure.net", + "keyVersion": "12345678-1234-1234-1234-123456789098", + "userIdentity": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustoRgTest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/kustoClusterIdentity", + }, + "publicIPType": "IPv4", + "restrictOutboundNetworkAccess": "Disabled", + }, + }, + ).result() + print(response) + + +# x-ms-original-file: 2025-02-14/KustoClusterUpdateWithCMKFederatedIdentity.json +if __name__ == "__main__": + main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_check_name_availability.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_check_name_availability.py index 9dbb7acb7510..9d256bfbbb45 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_check_name_availability.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_check_name_availability.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.clusters.check_name_availability( @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoClustersCheckNameAvailability.json +# x-ms-original-file: 2025-02-14/KustoClustersCheckNameAvailability.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_create_or_update.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_create_or_update.py index 474faa6b6c2b..27d9486a804f 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_create_or_update.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_create_or_update.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.clusters.begin_create_or_update( @@ -57,6 +57,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoClustersCreateOrUpdate.json +# x-ms-original-file: 2025-02-14/KustoClustersCreateOrUpdate.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_delete.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_delete.py index 1b5f4d2b13d5..29e78b812176 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_delete.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_delete.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) client.clusters.begin_delete( @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoClustersDelete.json +# x-ms-original-file: 2025-02-14/KustoClustersDelete.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_diagnose_virtual_network.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_diagnose_virtual_network.py index 77deca9022c9..9cec7e28babf 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_diagnose_virtual_network.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_diagnose_virtual_network.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.clusters.begin_diagnose_virtual_network( @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoClustersDiagnoseVirtualNetwork.json +# x-ms-original-file: 2025-02-14/KustoClustersDiagnoseVirtualNetwork.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_get.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_get.py index 03e188b47ae4..6a21110e3f27 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_get.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_get.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.clusters.get( @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoClustersGet.json +# x-ms-original-file: 2025-02-14/KustoClustersGet.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_list.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_list.py index 73c2011ef004..87be690a4c7a 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_list.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_list.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.clusters.list() @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoClustersList.json +# x-ms-original-file: 2025-02-14/KustoClustersList.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_list_by_resource_group.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_list_by_resource_group.py index 1beeec3d121b..c609b7196cf9 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_list_by_resource_group.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_list_by_resource_group.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.clusters.list_by_resource_group( @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoClustersListByResourceGroup.json +# x-ms-original-file: 2025-02-14/KustoClustersListByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_list_callout_policies.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_list_callout_policies.py index f33654f3eae7..aba8fe8f179f 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_list_callout_policies.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_list_callout_policies.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.clusters.list_callout_policies( @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoClustersListCalloutPolicies.json +# x-ms-original-file: 2025-02-14/KustoClustersListCalloutPolicies.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_list_resource_skus.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_list_resource_skus.py index 4269bad6d4f9..3111497f83da 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_list_resource_skus.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_list_resource_skus.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.clusters.list_skus_by_resource( @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoClustersListResourceSkus.json +# x-ms-original-file: 2025-02-14/KustoClustersListResourceSkus.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_list_skus.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_list_skus.py index bc787719af7e..fc477c076f3e 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_list_skus.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_list_skus.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.clusters.list_skus() @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoClustersListSkus.json +# x-ms-original-file: 2025-02-14/KustoClustersListSkus.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_start.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_start.py index 24549d184e07..20187cc2c2ca 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_start.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_start.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) client.clusters.begin_start( @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoClustersStart.json +# x-ms-original-file: 2025-02-14/KustoClustersStart.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_stop.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_stop.py index bc16ec311407..8b498690895b 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_stop.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_stop.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) client.clusters.begin_stop( @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoClustersStop.json +# x-ms-original-file: 2025-02-14/KustoClustersStop.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_update.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_update.py index f3b2a4741577..8d14d21ee3ec 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_update.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_clusters_update.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.clusters.begin_update( @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoClustersUpdate.json +# x-ms-original-file: 2025-02-14/KustoClustersUpdate.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connection_event_grid_validation_async.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connection_event_grid_validation_async.py index bdfad9070b7f..673fc49f8c7a 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connection_event_grid_validation_async.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connection_event_grid_validation_async.py @@ -1,8 +1,9 @@ +# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +28,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.data_connections.begin_data_connection_validation( @@ -57,6 +58,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoDataConnectionEventGridValidationAsync.json +# x-ms-original-file: 2025-02-14/KustoDataConnectionEventGridValidationAsync.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connection_event_grid_with_managed_identity_validation_async.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connection_event_grid_with_managed_identity_validation_async.py new file mode 100644 index 000000000000..36267a080ae5 --- /dev/null +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connection_event_grid_with_managed_identity_validation_async.py @@ -0,0 +1,63 @@ +# pylint: disable=line-too-long,useless-suppression +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.kusto import KustoManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-kusto +# USAGE + python kusto_data_connection_event_grid_with_managed_identity_validation_async.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = KustoManagementClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.data_connections.begin_data_connection_validation( + resource_group_name="kustorptest", + cluster_name="kustoCluster", + database_name="KustoDatabase8", + parameters={ + "dataConnectionName": "dataConnectionTest", + "properties": { + "kind": "EventGridWithManagedIdentity", + "properties": { + "blobStorageEventType": "Microsoft.Storage.BlobCreated", + "consumerGroup": "$Default", + "dataFormat": "MULTIJSON", + "databaseRouting": "Single", + "eventGridResourceId": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Storage/storageAccounts/teststorageaccount/providers/Microsoft.EventGrid/eventSubscriptions/eventSubscriptionTest", + "eventHubResourceIdForManagedIdentity": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.EventHub/namespaces/eventhubTestns1/eventhubs/eventhubTest1", + "ignoreFirstRecord": False, + "managedIdentityResourceId": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/managedidentityTest1", + "mappingRuleName": "TestMapping", + "storageAccountResourceIdForManagedIdentity": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Storage/storageAccounts/teststorageaccount", + "tableName": "TestTable", + }, + }, + }, + ).result() + print(response) + + +# x-ms-original-file: 2025-02-14/KustoDataConnectionEventGridWithManagedIdentityValidationAsync.json +if __name__ == "__main__": + main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connection_event_hub_with_managed_identity_validation_async.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connection_event_hub_with_managed_identity_validation_async.py new file mode 100644 index 000000000000..40dbd62fbe37 --- /dev/null +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connection_event_hub_with_managed_identity_validation_async.py @@ -0,0 +1,59 @@ +# pylint: disable=line-too-long,useless-suppression +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.kusto import KustoManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-kusto +# USAGE + python kusto_data_connection_event_hub_with_managed_identity_validation_async.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = KustoManagementClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.data_connections.begin_data_connection_validation( + resource_group_name="kustorptest", + cluster_name="kustoCluster", + database_name="KustoDatabase8", + parameters={ + "dataConnectionName": "dataConnectionTest", + "properties": { + "kind": "EventHubWithManagedIdentity", + "properties": { + "compression": "None", + "consumerGroup": "testConsumerGroup1", + "dataFormat": "MULTIJSON", + "eventHubResourceIdForManagedIdentity": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.EventHub/namespaces/eventhubTestns1/eventhubs/eventhubTest1", + "managedIdentityResourceId": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/managedidentityTest1", + "mappingRuleName": "TestMapping", + "tableName": "TestTable", + }, + }, + }, + ).result() + print(response) + + +# x-ms-original-file: 2025-02-14/KustoDataConnectionEventHubWithManagedIdentityValidationAsync.json +if __name__ == "__main__": + main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connection_validation_async.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connection_validation_async.py index 40a545eec539..ea303119029c 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connection_validation_async.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connection_validation_async.py @@ -1,8 +1,9 @@ +# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +28,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.data_connections.begin_data_connection_validation( @@ -53,6 +54,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoDataConnectionValidationAsync.json +# x-ms-original-file: 2025-02-14/KustoDataConnectionValidationAsync.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_check_name_availability.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_check_name_availability.py index 3738b83a968c..42c64dfc9339 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_check_name_availability.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_check_name_availability.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.data_connections.check_name_availability( @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoDataConnectionsCheckNameAvailability.json +# x-ms-original-file: 2025-02-14/KustoDataConnectionsCheckNameAvailability.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_cosmos_db_create_or_update.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_cosmos_db_create_or_update.py index a2521d07151a..159f59654a0b 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_cosmos_db_create_or_update.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_cosmos_db_create_or_update.py @@ -1,8 +1,9 @@ +# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +28,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.data_connections.begin_create_or_update( @@ -52,6 +53,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoDataConnectionsCosmosDbCreateOrUpdate.json +# x-ms-original-file: 2025-02-14/KustoDataConnectionsCosmosDbCreateOrUpdate.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_cosmos_db_get.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_cosmos_db_get.py index 7fc46f4ccf64..eb5aac385f16 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_cosmos_db_get.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_cosmos_db_get.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.data_connections.get( @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoDataConnectionsCosmosDbGet.json +# x-ms-original-file: 2025-02-14/KustoDataConnectionsCosmosDbGet.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_cosmos_db_update.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_cosmos_db_update.py index 56f7c7c11b0c..5c05e1765020 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_cosmos_db_update.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_cosmos_db_update.py @@ -1,8 +1,9 @@ +# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +28,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.data_connections.begin_update( @@ -52,6 +53,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoDataConnectionsCosmosDbUpdate.json +# x-ms-original-file: 2025-02-14/KustoDataConnectionsCosmosDbUpdate.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_create_or_update.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_create_or_update.py index 2910388711d2..537820a93d6c 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_create_or_update.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_create_or_update.py @@ -1,8 +1,9 @@ +# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +28,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.data_connections.begin_create_or_update( @@ -48,6 +49,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoDataConnectionsCreateOrUpdate.json +# x-ms-original-file: 2025-02-14/KustoDataConnectionsCreateOrUpdate.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_delete.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_delete.py index 19904c7afe97..b9d00206a7bd 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_delete.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_delete.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) client.data_connections.begin_delete( @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoDataConnectionsDelete.json +# x-ms-original-file: 2025-02-14/KustoDataConnectionsDelete.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_event_grid_create_or_update.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_event_grid_create_or_update.py index c6a93188cdfe..1f790c9eb9ba 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_event_grid_create_or_update.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_event_grid_create_or_update.py @@ -1,8 +1,9 @@ +# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +28,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.data_connections.begin_create_or_update( @@ -56,6 +57,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoDataConnectionsEventGridCreateOrUpdate.json +# x-ms-original-file: 2025-02-14/KustoDataConnectionsEventGridCreateOrUpdate.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_event_grid_get.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_event_grid_get.py index 202a48942998..1fee7ef68c31 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_event_grid_get.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_event_grid_get.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.data_connections.get( @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoDataConnectionsEventGridGet.json +# x-ms-original-file: 2025-02-14/KustoDataConnectionsEventGridGet.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_event_grid_update.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_event_grid_update.py index 90b5c84592a7..d7fad5827511 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_event_grid_update.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_event_grid_update.py @@ -1,8 +1,9 @@ +# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +28,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.data_connections.begin_update( @@ -56,6 +57,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoDataConnectionsEventGridUpdate.json +# x-ms-original-file: 2025-02-14/KustoDataConnectionsEventGridUpdate.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_event_grid_with_managed_identity_create_or_update.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_event_grid_with_managed_identity_create_or_update.py new file mode 100644 index 000000000000..c0c45a4e7a36 --- /dev/null +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_event_grid_with_managed_identity_create_or_update.py @@ -0,0 +1,62 @@ +# pylint: disable=line-too-long,useless-suppression +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.kusto import KustoManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-kusto +# USAGE + python kusto_data_connections_event_grid_with_managed_identity_create_or_update.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = KustoManagementClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.data_connections.begin_create_or_update( + resource_group_name="kustorptest", + cluster_name="kustoCluster", + database_name="KustoDatabase8", + data_connection_name="dataConnectionTest", + parameters={ + "kind": "EventGridWithManagedIdentity", + "location": "westus", + "properties": { + "blobStorageEventType": "Microsoft.Storage.BlobCreated", + "consumerGroup": "$Default", + "dataFormat": "MULTIJSON", + "databaseRouting": "Single", + "eventGridResourceId": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Storage/storageAccounts/teststorageaccount/providers/Microsoft.EventGrid/eventSubscriptions/eventSubscriptionTest", + "eventHubResourceIdForManagedIdentity": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.EventHub/namespaces/eventhubTestns1/eventhubs/eventhubTest2", + "ignoreFirstRecord": False, + "managedIdentityResourceId": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/managedidentityTest1", + "mappingRuleName": "TestMapping", + "storageAccountResourceIdForManagedIdentity": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Storage/storageAccounts/teststorageaccount", + "tableName": "TestTable", + }, + }, + ).result() + print(response) + + +# x-ms-original-file: 2025-02-14/KustoDataConnectionsEventGridWithManagedIdentityCreateOrUpdate.json +if __name__ == "__main__": + main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_event_grid_with_managed_identity_get.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_event_grid_with_managed_identity_get.py new file mode 100644 index 000000000000..754015ed1aac --- /dev/null +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_event_grid_with_managed_identity_get.py @@ -0,0 +1,44 @@ +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.kusto import KustoManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-kusto +# USAGE + python kusto_data_connections_event_grid_with_managed_identity_get.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = KustoManagementClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.data_connections.get( + resource_group_name="kustorptest", + cluster_name="kustoCluster", + database_name="KustoDatabase8", + data_connection_name="dataConnectionTest", + ) + print(response) + + +# x-ms-original-file: 2025-02-14/KustoDataConnectionsEventGridWithManagedIdentityGet.json +if __name__ == "__main__": + main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_event_grid_with_managed_identity_update.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_event_grid_with_managed_identity_update.py new file mode 100644 index 000000000000..c8c96a2f4365 --- /dev/null +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_event_grid_with_managed_identity_update.py @@ -0,0 +1,62 @@ +# pylint: disable=line-too-long,useless-suppression +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.kusto import KustoManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-kusto +# USAGE + python kusto_data_connections_event_grid_with_managed_identity_update.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = KustoManagementClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.data_connections.begin_update( + resource_group_name="kustorptest", + cluster_name="kustoCluster", + database_name="KustoDatabase8", + data_connection_name="dataConnectionTest", + parameters={ + "kind": "EventGridWithManagedIdentity", + "location": "westus", + "properties": { + "blobStorageEventType": "Microsoft.Storage.BlobCreated", + "consumerGroup": "$Default", + "dataFormat": "MULTIJSON", + "databaseRouting": "Single", + "eventGridResourceId": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Storage/storageAccounts/teststorageaccount/providers/Microsoft.EventGrid/eventSubscriptions/eventSubscriptionTest", + "eventHubResourceIdForManagedIdentity": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.EventHub/namespaces/eventhubTestns1/eventhubs/eventhubTest2", + "ignoreFirstRecord": False, + "managedIdentityResourceId": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/managedidentityTest1", + "mappingRuleName": "TestMapping", + "storageAccountResourceIdForManagedIdentity": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Storage/storageAccounts/teststorageaccount", + "tableName": "TestTable", + }, + }, + ).result() + print(response) + + +# x-ms-original-file: 2025-02-14/KustoDataConnectionsEventGridWithManagedIdentityUpdate.json +if __name__ == "__main__": + main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_event_hub_with_managed_identity_create_or_update.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_event_hub_with_managed_identity_create_or_update.py new file mode 100644 index 000000000000..e0db7fb69feb --- /dev/null +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_event_hub_with_managed_identity_create_or_update.py @@ -0,0 +1,54 @@ +# pylint: disable=line-too-long,useless-suppression +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.kusto import KustoManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-kusto +# USAGE + python kusto_data_connections_event_hub_with_managed_identity_create_or_update.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = KustoManagementClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.data_connections.begin_create_or_update( + resource_group_name="kustorptest", + cluster_name="kustoCluster", + database_name="KustoDatabase8", + data_connection_name="dataConnectionTest", + parameters={ + "kind": "EventHubWithManagedIdentity", + "location": "westus", + "properties": { + "consumerGroup": "testConsumerGroup1", + "eventHubResourceIdForManagedIdentity": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.EventHub/namespaces/eventhubTestns1/eventhubs/eventhubTest1", + "managedIdentityResourceId": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/managedidentityTest1", + }, + }, + ).result() + print(response) + + +# x-ms-original-file: 2025-02-14/KustoDataConnectionsEventHubWithManagedIdentityCreateOrUpdate.json +if __name__ == "__main__": + main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_event_hub_with_managed_identity_get.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_event_hub_with_managed_identity_get.py new file mode 100644 index 000000000000..2c855c25625c --- /dev/null +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_event_hub_with_managed_identity_get.py @@ -0,0 +1,44 @@ +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.kusto import KustoManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-kusto +# USAGE + python kusto_data_connections_event_hub_with_managed_identity_get.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = KustoManagementClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.data_connections.get( + resource_group_name="kustorptest", + cluster_name="kustoCluster", + database_name="KustoDatabase8", + data_connection_name="dataConnectionTest", + ) + print(response) + + +# x-ms-original-file: 2025-02-14/KustoDataConnectionsEventHubWithManagedIdentityGet.json +if __name__ == "__main__": + main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_event_hub_with_managed_identity_update.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_event_hub_with_managed_identity_update.py new file mode 100644 index 000000000000..ff522a959f6a --- /dev/null +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_event_hub_with_managed_identity_update.py @@ -0,0 +1,54 @@ +# pylint: disable=line-too-long,useless-suppression +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.kusto import KustoManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-kusto +# USAGE + python kusto_data_connections_event_hub_with_managed_identity_update.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = KustoManagementClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.data_connections.begin_update( + resource_group_name="kustorptest", + cluster_name="kustoCluster", + database_name="KustoDatabase8", + data_connection_name="dataConnectionTest", + parameters={ + "kind": "EventHubWithManagedIdentity", + "location": "westus", + "properties": { + "consumerGroup": "testConsumerGroup1", + "eventHubResourceIdForManagedIdentity": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.EventHub/namespaces/eventhubTestns1/eventhubs/eventhubTest1", + "managedIdentityResourceId": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/managedidentityTest1", + }, + }, + ).result() + print(response) + + +# x-ms-original-file: 2025-02-14/KustoDataConnectionsEventHubWithManagedIdentityUpdate.json +if __name__ == "__main__": + main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_get.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_get.py index 619e6355a9f2..b6e59cc3550b 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_get.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_get.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.data_connections.get( @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoDataConnectionsGet.json +# x-ms-original-file: 2025-02-14/KustoDataConnectionsGet.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_list_by_database.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_list_by_database.py index a3dbf81577e6..23adad72d989 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_list_by_database.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_list_by_database.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.data_connections.list_by_database( @@ -39,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoDataConnectionsListByDatabase.json +# x-ms-original-file: 2025-02-14/KustoDataConnectionsListByDatabase.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_update.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_update.py index 999c59ee7608..79e5c40763fd 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_update.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_data_connections_update.py @@ -1,8 +1,9 @@ +# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +28,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.data_connections.begin_update( @@ -48,6 +49,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoDataConnectionsUpdate.json +# x-ms-original-file: 2025-02-14/KustoDataConnectionsUpdate.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_add_principals.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_add_principals.py index e52c7a27677f..102cebae0f5a 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_add_principals.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_add_principals.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.databases.add_principals( @@ -66,6 +66,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoDatabaseAddPrincipals.json +# x-ms-original-file: 2025-02-14/KustoDatabaseAddPrincipals.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_invite_follower.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_invite_follower.py index bd01192eebf4..e86216907c30 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_invite_follower.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_invite_follower.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.database.invite_follower( @@ -51,6 +51,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoDatabaseInviteFollower.json +# x-ms-original-file: 2025-02-14/KustoDatabaseInviteFollower.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_list_principals.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_list_principals.py index 34f5cd41a008..d1505d380120 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_list_principals.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_list_principals.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.databases.list_principals( @@ -39,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoDatabaseListPrincipals.json +# x-ms-original-file: 2025-02-14/KustoDatabaseListPrincipals.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_principal_assignments_check_name_availability.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_principal_assignments_check_name_availability.py index 2565e79b8cd7..a5193498defd 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_principal_assignments_check_name_availability.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_principal_assignments_check_name_availability.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.database_principal_assignments.check_name_availability( @@ -42,6 +42,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoDatabasePrincipalAssignmentsCheckNameAvailability.json +# x-ms-original-file: 2025-02-14/KustoDatabasePrincipalAssignmentsCheckNameAvailability.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_principal_assignments_create_or_update.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_principal_assignments_create_or_update.py index 9044906a9bfc..f866f1224911 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_principal_assignments_create_or_update.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_principal_assignments_create_or_update.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.database_principal_assignments.begin_create_or_update( @@ -47,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoDatabasePrincipalAssignmentsCreateOrUpdate.json +# x-ms-original-file: 2025-02-14/KustoDatabasePrincipalAssignmentsCreateOrUpdate.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_principal_assignments_delete.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_principal_assignments_delete.py index 12208c6256b8..724852049367 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_principal_assignments_delete.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_principal_assignments_delete.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) client.database_principal_assignments.begin_delete( @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoDatabasePrincipalAssignmentsDelete.json +# x-ms-original-file: 2025-02-14/KustoDatabasePrincipalAssignmentsDelete.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_principal_assignments_get.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_principal_assignments_get.py index ed4bd3889a58..651a59272a39 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_principal_assignments_get.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_principal_assignments_get.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.database_principal_assignments.get( @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoDatabasePrincipalAssignmentsGet.json +# x-ms-original-file: 2025-02-14/KustoDatabasePrincipalAssignmentsGet.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_principal_assignments_list.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_principal_assignments_list.py index 66ae0f531020..b065297c4eea 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_principal_assignments_list.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_principal_assignments_list.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.database_principal_assignments.list( @@ -39,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoDatabasePrincipalAssignmentsList.json +# x-ms-original-file: 2025-02-14/KustoDatabasePrincipalAssignmentsList.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_readonly_update.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_readonly_update.py index 38cb5b764e28..31397d12b1e7 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_readonly_update.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_readonly_update.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.databases.begin_create_or_update( @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoDatabaseReadonlyUpdate.json +# x-ms-original-file: 2025-02-14/KustoDatabaseReadonlyUpdate.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_remove_principals.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_remove_principals.py index be07554e1830..1fd64c67808e 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_remove_principals.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_database_remove_principals.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.databases.remove_principals( @@ -66,6 +66,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoDatabaseRemovePrincipals.json +# x-ms-original-file: 2025-02-14/KustoDatabaseRemovePrincipals.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_databases_check_name_availability.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_databases_check_name_availability.py index e832c2e083ca..b50339a42513 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_databases_check_name_availability.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_databases_check_name_availability.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.databases.check_name_availability( @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoDatabasesCheckNameAvailability.json +# x-ms-original-file: 2025-02-14/KustoDatabasesCheckNameAvailability.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_databases_create_or_update.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_databases_create_or_update.py index beb89f153d9a..9cdafd7e5216 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_databases_create_or_update.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_databases_create_or_update.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.databases.begin_create_or_update( @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoDatabasesCreateOrUpdate.json +# x-ms-original-file: 2025-02-14/KustoDatabasesCreateOrUpdate.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_databases_delete.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_databases_delete.py index bfddf69a88d9..62aa0b2ad437 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_databases_delete.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_databases_delete.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) client.databases.begin_delete( @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoDatabasesDelete.json +# x-ms-original-file: 2025-02-14/KustoDatabasesDelete.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_databases_get.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_databases_get.py index fd43122fe4b2..7ea42839ec60 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_databases_get.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_databases_get.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.databases.get( @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoDatabasesGet.json +# x-ms-original-file: 2025-02-14/KustoDatabasesGet.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_databases_list_by_cluster.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_databases_list_by_cluster.py index 3242e14a6205..87d72fa3d034 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_databases_list_by_cluster.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_databases_list_by_cluster.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.databases.list_by_cluster( @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoDatabasesListByCluster.json +# x-ms-original-file: 2025-02-14/KustoDatabasesListByCluster.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_databases_update.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_databases_update.py index 0ffedee5d364..c55879747e58 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_databases_update.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_databases_update.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.databases.begin_update( @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoDatabasesUpdate.json +# x-ms-original-file: 2025-02-14/KustoDatabasesUpdate.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_managed_private_endpoints_check_name_availability.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_managed_private_endpoints_check_name_availability.py index 392a5c9b7883..963ed2557f6f 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_managed_private_endpoints_check_name_availability.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_managed_private_endpoints_check_name_availability.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.managed_private_endpoints.check_name_availability( @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoManagedPrivateEndpointsCheckNameAvailability.json +# x-ms-original-file: 2025-02-14/KustoManagedPrivateEndpointsCheckNameAvailability.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_managed_private_endpoints_create_or_update.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_managed_private_endpoints_create_or_update.py index ca095697ac1a..917e4d381c20 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_managed_private_endpoints_create_or_update.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_managed_private_endpoints_create_or_update.py @@ -1,8 +1,9 @@ +# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +28,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.managed_private_endpoints.begin_create_or_update( @@ -45,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoManagedPrivateEndpointsCreateOrUpdate.json +# x-ms-original-file: 2025-02-14/KustoManagedPrivateEndpointsCreateOrUpdate.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_managed_private_endpoints_delete.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_managed_private_endpoints_delete.py index 4abb4ad53c08..37988107518d 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_managed_private_endpoints_delete.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_managed_private_endpoints_delete.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) client.managed_private_endpoints.begin_delete( @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoManagedPrivateEndpointsDelete.json +# x-ms-original-file: 2025-02-14/KustoManagedPrivateEndpointsDelete.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_managed_private_endpoints_get.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_managed_private_endpoints_get.py index 201e413ccb6d..e980b7f55f57 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_managed_private_endpoints_get.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_managed_private_endpoints_get.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.managed_private_endpoints.get( @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoManagedPrivateEndpointsGet.json +# x-ms-original-file: 2025-02-14/KustoManagedPrivateEndpointsGet.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_managed_private_endpoints_list.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_managed_private_endpoints_list.py index 46f232104ceb..cd475507588f 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_managed_private_endpoints_list.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_managed_private_endpoints_list.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.managed_private_endpoints.list( @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoManagedPrivateEndpointsList.json +# x-ms-original-file: 2025-02-14/KustoManagedPrivateEndpointsList.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_managed_private_endpoints_update.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_managed_private_endpoints_update.py index 044f944873c4..f6847545352e 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_managed_private_endpoints_update.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_managed_private_endpoints_update.py @@ -1,8 +1,9 @@ +# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +28,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.managed_private_endpoints.begin_update( @@ -45,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoManagedPrivateEndpointsUpdate.json +# x-ms-original-file: 2025-02-14/KustoManagedPrivateEndpointsUpdate.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_operation_results_get.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_operation_results_get.py index 7aecc4dfb224..370f254edc1d 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_operation_results_get.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_operation_results_get.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.operations_results.get( @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoOperationResultsGet.json +# x-ms-original-file: 2025-02-14/KustoOperationResultsGet.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_operation_results_operation_result_response_type_get.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_operation_results_operation_result_response_type_get.py index ec39154c0e33..0ae9c0fb7dca 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_operation_results_operation_result_response_type_get.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_operation_results_operation_result_response_type_get.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) client.operations_results_location.get( @@ -36,6 +36,6 @@ def main(): ) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoOperationResultsOperationResultResponseTypeGet.json +# x-ms-original-file: 2025-02-14/KustoOperationResultsOperationResultResponseTypeGet.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_operations_list.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_operations_list.py index 9e62a9bbed53..b0c8a712a1d3 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_operations_list.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_operations_list.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoOperationsList.json +# x-ms-original-file: 2025-02-14/KustoOperationsList.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_outbound_network_dependencies_list.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_outbound_network_dependencies_list.py index e1bf47fb253f..0ec6d70d11d6 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_outbound_network_dependencies_list.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_outbound_network_dependencies_list.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + subscription_id="SUBSCRIPTION_ID", ) response = client.clusters.list_outbound_network_dependencies_endpoints( @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoOutboundNetworkDependenciesList.json +# x-ms-original-file: 2025-02-14/KustoOutboundNetworkDependenciesList.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_private_endpoint_connections_create_or_update.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_private_endpoint_connections_create_or_update.py index c270913bfe46..c3c5d4b98b47 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_private_endpoint_connections_create_or_update.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_private_endpoint_connections_create_or_update.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.private_endpoint_connections.begin_create_or_update( @@ -37,7 +37,7 @@ def main(): parameters={ "properties": { "privateLinkServiceConnectionState": { - "description": "Approved by johndoe@contoso.com", + "description": "Approved by `johndoe@contoso.com `_", "status": "Approved", } } @@ -46,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoPrivateEndpointConnectionsCreateOrUpdate.json +# x-ms-original-file: 2025-02-14/KustoPrivateEndpointConnectionsCreateOrUpdate.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_private_endpoint_connections_delete.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_private_endpoint_connections_delete.py index aa6c024f86ed..f7af8effcf53 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_private_endpoint_connections_delete.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_private_endpoint_connections_delete.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) client.private_endpoint_connections.begin_delete( @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoPrivateEndpointConnectionsDelete.json +# x-ms-original-file: 2025-02-14/KustoPrivateEndpointConnectionsDelete.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_private_endpoint_connections_get.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_private_endpoint_connections_get.py index 8ba5054f2f6b..10eda1793aa1 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_private_endpoint_connections_get.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_private_endpoint_connections_get.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.private_endpoint_connections.get( @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoPrivateEndpointConnectionsGet.json +# x-ms-original-file: 2025-02-14/KustoPrivateEndpointConnectionsGet.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_private_endpoint_connections_list.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_private_endpoint_connections_list.py index a55a9c5bdfa4..351fa7a03dd8 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_private_endpoint_connections_list.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_private_endpoint_connections_list.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.private_endpoint_connections.list( @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoPrivateEndpointConnectionsList.json +# x-ms-original-file: 2025-02-14/KustoPrivateEndpointConnectionsList.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_private_link_resources_get.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_private_link_resources_get.py index fb5b11fca8aa..a0b9c1c58974 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_private_link_resources_get.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_private_link_resources_get.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.private_link_resources.get( @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoPrivateLinkResourcesGet.json +# x-ms-original-file: 2025-02-14/KustoPrivateLinkResourcesGet.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_private_link_resources_list.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_private_link_resources_list.py index fe1585eac53a..2876de4c0776 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_private_link_resources_list.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_private_link_resources_list.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.private_link_resources.list( @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoPrivateLinkResourcesList.json +# x-ms-original-file: 2025-02-14/KustoPrivateLinkResourcesList.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_sandbox_custom_image_delete.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_sandbox_custom_image_delete.py index ce641c1d39e8..4d5295fc1f0d 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_sandbox_custom_image_delete.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_sandbox_custom_image_delete.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) client.sandbox_custom_images.begin_delete( @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoSandboxCustomImageDelete.json +# x-ms-original-file: 2025-02-14/KustoSandboxCustomImageDelete.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_sandbox_custom_image_update.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_sandbox_custom_image_update.py index d12193a4a5e1..c378e22ef0a0 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_sandbox_custom_image_update.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_sandbox_custom_image_update.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.sandbox_custom_images.begin_update( @@ -41,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoSandboxCustomImageUpdate.json +# x-ms-original-file: 2025-02-14/KustoSandboxCustomImageUpdate.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_sandbox_custom_images_check_name_availability.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_sandbox_custom_images_check_name_availability.py index ba911dd8c88e..548abc2cdef3 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_sandbox_custom_images_check_name_availability.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_sandbox_custom_images_check_name_availability.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.sandbox_custom_images.check_name_availability( @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoSandboxCustomImagesCheckNameAvailability.json +# x-ms-original-file: 2025-02-14/KustoSandboxCustomImagesCheckNameAvailability.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_sandbox_custom_images_create_or_update.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_sandbox_custom_images_create_or_update.py index c62e3704601e..bbcd6b9b8513 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_sandbox_custom_images_create_or_update.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_sandbox_custom_images_create_or_update.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.sandbox_custom_images.begin_create_or_update( @@ -41,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoSandboxCustomImagesCreateOrUpdate.json +# x-ms-original-file: 2025-02-14/KustoSandboxCustomImagesCreateOrUpdate.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_sandbox_custom_images_create_or_update_with_custom_base_image.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_sandbox_custom_images_create_or_update_with_custom_base_image.py index 798f8b23d361..7a2f277662fe 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_sandbox_custom_images_create_or_update_with_custom_base_image.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_sandbox_custom_images_create_or_update_with_custom_base_image.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.sandbox_custom_images.begin_create_or_update( @@ -41,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoSandboxCustomImagesCreateOrUpdateWithCustomBaseImage.json +# x-ms-original-file: 2025-02-14/KustoSandboxCustomImagesCreateOrUpdateWithCustomBaseImage.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_sandbox_custom_images_create_or_update_with_managed_base_image.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_sandbox_custom_images_create_or_update_with_managed_base_image.py index d0f11cca3f4c..9f49ee843ec5 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_sandbox_custom_images_create_or_update_with_managed_base_image.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_sandbox_custom_images_create_or_update_with_managed_base_image.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.sandbox_custom_images.begin_create_or_update( @@ -41,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoSandboxCustomImagesCreateOrUpdateWithManagedBaseImage.json +# x-ms-original-file: 2025-02-14/KustoSandboxCustomImagesCreateOrUpdateWithManagedBaseImage.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_sandbox_custom_images_get.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_sandbox_custom_images_get.py index b7cb3027baa2..9a8bfdbde9d0 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_sandbox_custom_images_get.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_sandbox_custom_images_get.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.sandbox_custom_images.get( @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoSandboxCustomImagesGet.json +# x-ms-original-file: 2025-02-14/KustoSandboxCustomImagesGet.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_sandbox_custom_images_list.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_sandbox_custom_images_list.py index a4a605b402d5..e49823c502de 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_sandbox_custom_images_list.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_sandbox_custom_images_list.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.sandbox_custom_images.list_by_cluster( @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoSandboxCustomImagesList.json +# x-ms-original-file: 2025-02-14/KustoSandboxCustomImagesList.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_scripts_check_name_availability.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_scripts_check_name_availability.py index 2a49807e73b6..f2706e257c9d 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_scripts_check_name_availability.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_scripts_check_name_availability.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.scripts.check_name_availability( @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoScriptsCheckNameAvailability.json +# x-ms-original-file: 2025-02-14/KustoScriptsCheckNameAvailability.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_scripts_create_or_update.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_scripts_create_or_update.py index dc9d190ac482..b0a3a30addd6 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_scripts_create_or_update.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_scripts_create_or_update.py @@ -1,8 +1,9 @@ +# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +28,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.scripts.begin_create_or_update( @@ -49,6 +50,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoScriptsCreateOrUpdate.json +# x-ms-original-file: 2025-02-14/KustoScriptsCreateOrUpdate.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_scripts_create_or_update_with_managed_identity.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_scripts_create_or_update_with_managed_identity.py new file mode 100644 index 000000000000..9272a2c0728f --- /dev/null +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_scripts_create_or_update_with_managed_identity.py @@ -0,0 +1,55 @@ +# pylint: disable=line-too-long,useless-suppression +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.kusto import KustoManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-kusto +# USAGE + python kusto_scripts_create_or_update_with_managed_identity.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = KustoManagementClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.scripts.begin_create_or_update( + resource_group_name="kustorptest", + cluster_name="kustoCluster", + database_name="KustoDatabase8", + script_name="kustoScript", + parameters={ + "properties": { + "continueOnErrors": True, + "forceUpdateTag": "2bcf3c21-ffd1-4444-b9dd-e52e00ee53fe", + "managedIdentityResourceId": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustoprtest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/kustoMi1", + "principalPermissionsAction": "RemovePermissionOnScriptCompletion", + "scriptLevel": "Database", + "scriptUrl": "https://mysa.blob.core.windows.net/container/script.txt", + } + }, + ).result() + print(response) + + +# x-ms-original-file: 2025-02-14/KustoScriptsCreateOrUpdateWithManagedIdentity.json +if __name__ == "__main__": + main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_scripts_delete.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_scripts_delete.py index 1de7c1fdcd43..3ae24cb08d79 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_scripts_delete.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_scripts_delete.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) client.scripts.begin_delete( @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoScriptsDelete.json +# x-ms-original-file: 2025-02-14/KustoScriptsDelete.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_scripts_get.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_scripts_get.py index 08777bd9d4b7..cafb38eaf7f9 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_scripts_get.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_scripts_get.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.scripts.get( @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoScriptsGet.json +# x-ms-original-file: 2025-02-14/KustoScriptsGet.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_scripts_get_with_managed_identity.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_scripts_get_with_managed_identity.py new file mode 100644 index 000000000000..52f58943fceb --- /dev/null +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_scripts_get_with_managed_identity.py @@ -0,0 +1,44 @@ +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.kusto import KustoManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-kusto +# USAGE + python kusto_scripts_get_with_managed_identity.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = KustoManagementClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.scripts.get( + resource_group_name="kustorptest", + cluster_name="kustoCluster", + database_name="Kustodatabase8", + script_name="kustoScript", + ) + print(response) + + +# x-ms-original-file: 2025-02-14/KustoScriptsGetWithManagedIdentity.json +if __name__ == "__main__": + main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_scripts_list_by_database.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_scripts_list_by_database.py index 99f07dd49af9..365b848c104d 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_scripts_list_by_database.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_scripts_list_by_database.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.scripts.list_by_database( @@ -39,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoScriptsListByDatabase.json +# x-ms-original-file: 2025-02-14/KustoScriptsListByDatabase.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_scripts_update.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_scripts_update.py index 8e69b1831897..dd3c187eefc8 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_scripts_update.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_scripts_update.py @@ -1,8 +1,9 @@ +# pylint: disable=line-too-long,useless-suppression # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +28,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.scripts.begin_update( @@ -49,6 +50,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoScriptsUpdate.json +# x-ms-original-file: 2025-02-14/KustoScriptsUpdate.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_skus.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_skus.py index 30d6331faccb..177408a930b7 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_skus.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_skus.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.skus.list( @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoSkus.json +# x-ms-original-file: 2025-02-14/KustoSkus.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_suspended_databases_get.py b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_suspended_databases_get.py index cfb4bfe7288e..d41084ea74df 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_suspended_databases_get.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_samples/kusto_suspended_databases_get.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -27,7 +27,7 @@ def main(): client = KustoManagementClient( credential=DefaultAzureCredential(), - subscription_id="12345678-1234-1234-1234-123456789098", + subscription_id="SUBSCRIPTION_ID", ) response = client.databases.get( @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/examples/KustoSuspendedDatabasesGet.json +# x-ms-original-file: 2025-02-14/KustoSuspendedDatabasesGet.json if __name__ == "__main__": main() diff --git a/sdk/kusto/azure-mgmt-kusto/generated_tests/conftest.py b/sdk/kusto/azure-mgmt-kusto/generated_tests/conftest.py index c989f6b2750a..ca6ac7d932ee 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_tests/conftest.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_tests/conftest.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import os diff --git a/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_attached_database_configurations_operations.py b/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_attached_database_configurations_operations.py index ae0a3fe602e1..f43e06c5cc6e 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_attached_database_configurations_operations.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_attached_database_configurations_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -18,31 +18,6 @@ class TestKustoManagementAttachedDatabaseConfigurationsOperations(AzureMgmtRecor def setup_method(self, method): self.client = self.create_mgmt_client(KustoManagementClient) - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_attached_database_configurations_check_name_availability(self, resource_group): - response = self.client.attached_database_configurations.check_name_availability( - resource_group_name=resource_group.name, - cluster_name="str", - resource_name={"name": "str", "type": "Microsoft.Kusto/clusters/attachedDatabaseConfigurations"}, - api_version="2024-04-13", - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_attached_database_configurations_list_by_cluster(self, resource_group): - response = self.client.attached_database_configurations.list_by_cluster( - resource_group_name=resource_group.name, - cluster_name="str", - api_version="2024-04-13", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_attached_database_configurations_get(self, resource_group): @@ -50,7 +25,6 @@ def test_attached_database_configurations_get(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", attached_database_configuration_name="str", - api_version="2024-04-13", ) # please add some check logic here by yourself @@ -64,29 +38,38 @@ def test_attached_database_configurations_begin_create_or_update(self, resource_ cluster_name="str", attached_database_configuration_name="str", parameters={ - "attachedDatabaseNames": ["str"], - "clusterResourceId": "str", - "databaseName": "str", - "databaseNameOverride": "str", - "databaseNamePrefix": "str", - "defaultPrincipalsModificationKind": "str", "id": "str", "location": "str", "name": "str", - "provisioningState": "str", - "tableLevelSharingProperties": { - "externalTablesToExclude": ["str"], - "externalTablesToInclude": ["str"], - "functionsToExclude": ["str"], - "functionsToInclude": ["str"], - "materializedViewsToExclude": ["str"], - "materializedViewsToInclude": ["str"], - "tablesToExclude": ["str"], - "tablesToInclude": ["str"], + "properties": { + "clusterResourceId": "str", + "databaseName": "str", + "defaultPrincipalsModificationKind": "str", + "attachedDatabaseNames": ["str"], + "databaseNameOverride": "str", + "databaseNamePrefix": "str", + "provisioningState": "str", + "tableLevelSharingProperties": { + "externalTablesToExclude": ["str"], + "externalTablesToInclude": ["str"], + "functionsToExclude": ["str"], + "functionsToInclude": ["str"], + "materializedViewsToExclude": ["str"], + "materializedViewsToInclude": ["str"], + "tablesToExclude": ["str"], + "tablesToInclude": ["str"], + }, + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", }, "type": "str", }, - api_version="2024-04-13", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -99,8 +82,30 @@ def test_attached_database_configurations_begin_delete(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", attached_database_configuration_name="str", - api_version="2024-04-13", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_attached_database_configurations_list_by_cluster(self, resource_group): + response = self.client.attached_database_configurations.list_by_cluster( + resource_group_name=resource_group.name, + cluster_name="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_attached_database_configurations_check_name_availability(self, resource_group): + response = self.client.attached_database_configurations.check_name_availability( + resource_group_name=resource_group.name, + cluster_name="str", + resource_name={"name": "str", "type": "Microsoft.Kusto/clusters/attachedDatabaseConfigurations"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_attached_database_configurations_operations_async.py b/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_attached_database_configurations_operations_async.py index 3319e196e055..2287076846d8 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_attached_database_configurations_operations_async.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_attached_database_configurations_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -19,31 +19,6 @@ class TestKustoManagementAttachedDatabaseConfigurationsOperationsAsync(AzureMgmt def setup_method(self, method): self.client = self.create_mgmt_client(KustoManagementClient, is_async=True) - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_attached_database_configurations_check_name_availability(self, resource_group): - response = await self.client.attached_database_configurations.check_name_availability( - resource_group_name=resource_group.name, - cluster_name="str", - resource_name={"name": "str", "type": "Microsoft.Kusto/clusters/attachedDatabaseConfigurations"}, - api_version="2024-04-13", - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_attached_database_configurations_list_by_cluster(self, resource_group): - response = self.client.attached_database_configurations.list_by_cluster( - resource_group_name=resource_group.name, - cluster_name="str", - api_version="2024-04-13", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_attached_database_configurations_get(self, resource_group): @@ -51,7 +26,6 @@ async def test_attached_database_configurations_get(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", attached_database_configuration_name="str", - api_version="2024-04-13", ) # please add some check logic here by yourself @@ -66,29 +40,38 @@ async def test_attached_database_configurations_begin_create_or_update(self, res cluster_name="str", attached_database_configuration_name="str", parameters={ - "attachedDatabaseNames": ["str"], - "clusterResourceId": "str", - "databaseName": "str", - "databaseNameOverride": "str", - "databaseNamePrefix": "str", - "defaultPrincipalsModificationKind": "str", "id": "str", "location": "str", "name": "str", - "provisioningState": "str", - "tableLevelSharingProperties": { - "externalTablesToExclude": ["str"], - "externalTablesToInclude": ["str"], - "functionsToExclude": ["str"], - "functionsToInclude": ["str"], - "materializedViewsToExclude": ["str"], - "materializedViewsToInclude": ["str"], - "tablesToExclude": ["str"], - "tablesToInclude": ["str"], + "properties": { + "clusterResourceId": "str", + "databaseName": "str", + "defaultPrincipalsModificationKind": "str", + "attachedDatabaseNames": ["str"], + "databaseNameOverride": "str", + "databaseNamePrefix": "str", + "provisioningState": "str", + "tableLevelSharingProperties": { + "externalTablesToExclude": ["str"], + "externalTablesToInclude": ["str"], + "functionsToExclude": ["str"], + "functionsToInclude": ["str"], + "materializedViewsToExclude": ["str"], + "materializedViewsToInclude": ["str"], + "tablesToExclude": ["str"], + "tablesToInclude": ["str"], + }, + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", }, "type": "str", }, - api_version="2024-04-13", ) ).result() # call '.result()' to poll until service return final result @@ -103,9 +86,31 @@ async def test_attached_database_configurations_begin_delete(self, resource_grou resource_group_name=resource_group.name, cluster_name="str", attached_database_configuration_name="str", - api_version="2024-04-13", ) ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_attached_database_configurations_list_by_cluster(self, resource_group): + response = self.client.attached_database_configurations.list_by_cluster( + resource_group_name=resource_group.name, + cluster_name="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_attached_database_configurations_check_name_availability(self, resource_group): + response = await self.client.attached_database_configurations.check_name_availability( + resource_group_name=resource_group.name, + cluster_name="str", + resource_name={"name": "str", "type": "Microsoft.Kusto/clusters/attachedDatabaseConfigurations"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_cluster_principal_assignments_operations.py b/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_cluster_principal_assignments_operations.py index d7e21ebaf3e2..d86d95e2f0d3 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_cluster_principal_assignments_operations.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_cluster_principal_assignments_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -18,19 +18,6 @@ class TestKustoManagementClusterPrincipalAssignmentsOperations(AzureMgmtRecorded def setup_method(self, method): self.client = self.create_mgmt_client(KustoManagementClient) - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_cluster_principal_assignments_check_name_availability(self, resource_group): - response = self.client.cluster_principal_assignments.check_name_availability( - resource_group_name=resource_group.name, - cluster_name="str", - principal_assignment_name={"name": "str", "type": "Microsoft.Kusto/clusters/principalAssignments"}, - api_version="2024-04-13", - ) - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_cluster_principal_assignments_get(self, resource_group): @@ -38,7 +25,6 @@ def test_cluster_principal_assignments_get(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", principal_assignment_name="str", - api_version="2024-04-13", ) # please add some check logic here by yourself @@ -52,19 +38,28 @@ def test_cluster_principal_assignments_begin_create_or_update(self, resource_gro cluster_name="str", principal_assignment_name="str", parameters={ - "aadObjectId": "str", "id": "str", "name": "str", - "principalId": "str", - "principalName": "str", - "principalType": "str", - "provisioningState": "str", - "role": "str", - "tenantId": "str", - "tenantName": "str", + "properties": { + "principalId": "str", + "principalType": "str", + "role": "str", + "aadObjectId": "str", + "principalName": "str", + "provisioningState": "str", + "tenantId": "str", + "tenantName": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", }, - api_version="2024-04-13", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -77,7 +72,6 @@ def test_cluster_principal_assignments_begin_delete(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", principal_assignment_name="str", - api_version="2024-04-13", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -89,8 +83,19 @@ def test_cluster_principal_assignments_list(self, resource_group): response = self.client.cluster_principal_assignments.list( resource_group_name=resource_group.name, cluster_name="str", - api_version="2024-04-13", ) result = [r for r in response] # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_cluster_principal_assignments_check_name_availability(self, resource_group): + response = self.client.cluster_principal_assignments.check_name_availability( + resource_group_name=resource_group.name, + cluster_name="str", + principal_assignment_name={"name": "str", "type": "Microsoft.Kusto/clusters/principalAssignments"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_cluster_principal_assignments_operations_async.py b/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_cluster_principal_assignments_operations_async.py index 957e13c3f827..1d59ac72b20e 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_cluster_principal_assignments_operations_async.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_cluster_principal_assignments_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -19,19 +19,6 @@ class TestKustoManagementClusterPrincipalAssignmentsOperationsAsync(AzureMgmtRec def setup_method(self, method): self.client = self.create_mgmt_client(KustoManagementClient, is_async=True) - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_cluster_principal_assignments_check_name_availability(self, resource_group): - response = await self.client.cluster_principal_assignments.check_name_availability( - resource_group_name=resource_group.name, - cluster_name="str", - principal_assignment_name={"name": "str", "type": "Microsoft.Kusto/clusters/principalAssignments"}, - api_version="2024-04-13", - ) - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_cluster_principal_assignments_get(self, resource_group): @@ -39,7 +26,6 @@ async def test_cluster_principal_assignments_get(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", principal_assignment_name="str", - api_version="2024-04-13", ) # please add some check logic here by yourself @@ -54,19 +40,28 @@ async def test_cluster_principal_assignments_begin_create_or_update(self, resour cluster_name="str", principal_assignment_name="str", parameters={ - "aadObjectId": "str", "id": "str", "name": "str", - "principalId": "str", - "principalName": "str", - "principalType": "str", - "provisioningState": "str", - "role": "str", - "tenantId": "str", - "tenantName": "str", + "properties": { + "principalId": "str", + "principalType": "str", + "role": "str", + "aadObjectId": "str", + "principalName": "str", + "provisioningState": "str", + "tenantId": "str", + "tenantName": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", }, - api_version="2024-04-13", ) ).result() # call '.result()' to poll until service return final result @@ -81,7 +76,6 @@ async def test_cluster_principal_assignments_begin_delete(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", principal_assignment_name="str", - api_version="2024-04-13", ) ).result() # call '.result()' to poll until service return final result @@ -94,8 +88,19 @@ async def test_cluster_principal_assignments_list(self, resource_group): response = self.client.cluster_principal_assignments.list( resource_group_name=resource_group.name, cluster_name="str", - api_version="2024-04-13", ) result = [r async for r in response] # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_cluster_principal_assignments_check_name_availability(self, resource_group): + response = await self.client.cluster_principal_assignments.check_name_availability( + resource_group_name=resource_group.name, + cluster_name="str", + principal_assignment_name={"name": "str", "type": "Microsoft.Kusto/clusters/principalAssignments"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_clusters_operations.py b/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_clusters_operations.py index c4bd6b086d22..696609ec3b25 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_clusters_operations.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_clusters_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -24,7 +24,6 @@ def test_clusters_get(self, resource_group): response = self.client.clusters.get( resource_group_name=resource_group.name, cluster_name="str", - api_version="2024-04-13", ) # please add some check logic here by yourself @@ -39,19 +38,6 @@ def test_clusters_begin_create_or_update(self, resource_group): parameters={ "location": "str", "sku": {"name": "str", "tier": "str", "capacity": 0}, - "acceptedAudiences": [{"value": "str"}], - "allowedFqdnList": ["str"], - "allowedIpRangeList": ["str"], - "calloutPolicies": [ - {"calloutId": "str", "calloutType": "str", "calloutUriRegex": "str", "outboundAccess": "str"} - ], - "dataIngestionUri": "str", - "enableAutoStop": True, - "enableDiskEncryption": False, - "enableDoubleEncryption": False, - "enablePurge": False, - "enableStreamingIngest": False, - "engineType": "V3", "etag": "str", "id": "str", "identity": { @@ -60,53 +46,82 @@ def test_clusters_begin_create_or_update(self, resource_group): "tenantId": "str", "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, }, - "keyVaultProperties": { - "keyName": "str", - "keyVaultUri": "str", - "keyVersion": "str", - "userIdentity": "str", - }, - "languageExtensions": { - "value": [ + "name": "str", + "properties": { + "acceptedAudiences": [{"value": "str"}], + "allowedFqdnList": ["str"], + "allowedIpRangeList": ["str"], + "calloutPolicies": [ + {"calloutId": "str", "calloutType": "str", "calloutUriRegex": "str", "outboundAccess": "str"} + ], + "dataIngestionUri": "str", + "enableAutoStop": bool, + "enableDiskEncryption": bool, + "enableDoubleEncryption": bool, + "enablePurge": bool, + "enableStreamingIngest": bool, + "engineType": "str", + "keyVaultProperties": { + "federatedIdentityClientId": "str", + "keyName": "str", + "keyVaultUri": "str", + "keyVersion": "str", + "userIdentity": "str", + }, + "languageExtensions": { + "nextLink": "str", + "value": [ + { + "languageExtensionCustomImageName": "str", + "languageExtensionImageName": "str", + "languageExtensionName": "str", + } + ], + }, + "migrationCluster": {"dataIngestionUri": "str", "id": "str", "role": "str", "uri": "str"}, + "optimizedAutoscale": {"isEnabled": bool, "maximum": 0, "minimum": 0, "version": 0}, + "privateEndpointConnections": [ { - "languageExtensionCustomImageName": "str", - "languageExtensionImageName": "str", - "languageExtensionName": "str", + "id": "str", + "name": "str", + "properties": { + "privateLinkServiceConnectionState": { + "actionsRequired": "str", + "description": "str", + "status": "str", + }, + "groupId": "str", + "privateEndpoint": {"id": "str"}, + "provisioningState": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", } - ] + ], + "provisioningState": "str", + "publicIPType": "str", + "publicNetworkAccess": "str", + "restrictOutboundNetworkAccess": "str", + "state": "str", + "stateReason": "str", + "trustedExternalTenants": [{"value": "str"}], + "uri": "str", + "virtualClusterGraduationProperties": "str", + "virtualNetworkConfiguration": { + "dataManagementPublicIpId": "str", + "enginePublicIpId": "str", + "subnetId": "str", + "state": "str", + }, + "zoneStatus": "str", }, - "migrationCluster": {"dataIngestionUri": "str", "id": "str", "role": "str", "uri": "str"}, - "name": "str", - "optimizedAutoscale": {"isEnabled": bool, "maximum": 0, "minimum": 0, "version": 0}, - "privateEndpointConnections": [ - { - "groupId": "str", - "id": "str", - "name": "str", - "privateEndpoint": {"id": "str"}, - "privateLinkServiceConnectionState": { - "actionsRequired": "str", - "description": "str", - "status": "str", - }, - "provisioningState": "str", - "systemData": { - "createdAt": "2020-02-20 00:00:00", - "createdBy": "str", - "createdByType": "str", - "lastModifiedAt": "2020-02-20 00:00:00", - "lastModifiedBy": "str", - "lastModifiedByType": "str", - }, - "type": "str", - } - ], - "provisioningState": "str", - "publicIPType": "IPv4", - "publicNetworkAccess": "Enabled", - "restrictOutboundNetworkAccess": "Disabled", - "state": "str", - "stateReason": "str", "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -116,20 +131,9 @@ def test_clusters_begin_create_or_update(self, resource_group): "lastModifiedByType": "str", }, "tags": {"str": "str"}, - "trustedExternalTenants": [{"value": "str"}], "type": "str", - "uri": "str", - "virtualClusterGraduationProperties": "str", - "virtualNetworkConfiguration": { - "dataManagementPublicIpId": "str", - "enginePublicIpId": "str", - "subnetId": "str", - "state": "Enabled", - }, - "zoneStatus": "str", "zones": ["str"], }, - api_version="2024-04-13", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -142,19 +146,6 @@ def test_clusters_begin_update(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", parameters={ - "acceptedAudiences": [{"value": "str"}], - "allowedFqdnList": ["str"], - "allowedIpRangeList": ["str"], - "calloutPolicies": [ - {"calloutId": "str", "calloutType": "str", "calloutUriRegex": "str", "outboundAccess": "str"} - ], - "dataIngestionUri": "str", - "enableAutoStop": True, - "enableDiskEncryption": False, - "enableDoubleEncryption": False, - "enablePurge": False, - "enableStreamingIngest": False, - "engineType": "V3", "id": "str", "identity": { "type": "str", @@ -162,70 +153,96 @@ def test_clusters_begin_update(self, resource_group): "tenantId": "str", "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, }, - "keyVaultProperties": { - "keyName": "str", - "keyVaultUri": "str", - "keyVersion": "str", - "userIdentity": "str", - }, - "languageExtensions": { - "value": [ + "location": "str", + "name": "str", + "properties": { + "acceptedAudiences": [{"value": "str"}], + "allowedFqdnList": ["str"], + "allowedIpRangeList": ["str"], + "calloutPolicies": [ + {"calloutId": "str", "calloutType": "str", "calloutUriRegex": "str", "outboundAccess": "str"} + ], + "dataIngestionUri": "str", + "enableAutoStop": bool, + "enableDiskEncryption": bool, + "enableDoubleEncryption": bool, + "enablePurge": bool, + "enableStreamingIngest": bool, + "engineType": "str", + "keyVaultProperties": { + "federatedIdentityClientId": "str", + "keyName": "str", + "keyVaultUri": "str", + "keyVersion": "str", + "userIdentity": "str", + }, + "languageExtensions": { + "nextLink": "str", + "value": [ + { + "languageExtensionCustomImageName": "str", + "languageExtensionImageName": "str", + "languageExtensionName": "str", + } + ], + }, + "migrationCluster": {"dataIngestionUri": "str", "id": "str", "role": "str", "uri": "str"}, + "optimizedAutoscale": {"isEnabled": bool, "maximum": 0, "minimum": 0, "version": 0}, + "privateEndpointConnections": [ { - "languageExtensionCustomImageName": "str", - "languageExtensionImageName": "str", - "languageExtensionName": "str", + "id": "str", + "name": "str", + "properties": { + "privateLinkServiceConnectionState": { + "actionsRequired": "str", + "description": "str", + "status": "str", + }, + "groupId": "str", + "privateEndpoint": {"id": "str"}, + "provisioningState": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", } - ] + ], + "provisioningState": "str", + "publicIPType": "str", + "publicNetworkAccess": "str", + "restrictOutboundNetworkAccess": "str", + "state": "str", + "stateReason": "str", + "trustedExternalTenants": [{"value": "str"}], + "uri": "str", + "virtualClusterGraduationProperties": "str", + "virtualNetworkConfiguration": { + "dataManagementPublicIpId": "str", + "enginePublicIpId": "str", + "subnetId": "str", + "state": "str", + }, + "zoneStatus": "str", }, - "location": "str", - "migrationCluster": {"dataIngestionUri": "str", "id": "str", "role": "str", "uri": "str"}, - "name": "str", - "optimizedAutoscale": {"isEnabled": bool, "maximum": 0, "minimum": 0, "version": 0}, - "privateEndpointConnections": [ - { - "groupId": "str", - "id": "str", - "name": "str", - "privateEndpoint": {"id": "str"}, - "privateLinkServiceConnectionState": { - "actionsRequired": "str", - "description": "str", - "status": "str", - }, - "provisioningState": "str", - "systemData": { - "createdAt": "2020-02-20 00:00:00", - "createdBy": "str", - "createdByType": "str", - "lastModifiedAt": "2020-02-20 00:00:00", - "lastModifiedBy": "str", - "lastModifiedByType": "str", - }, - "type": "str", - } - ], - "provisioningState": "str", - "publicIPType": "IPv4", - "publicNetworkAccess": "Enabled", - "restrictOutboundNetworkAccess": "Disabled", "sku": {"name": "str", "tier": "str", "capacity": 0}, - "state": "str", - "stateReason": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "tags": {"str": "str"}, - "trustedExternalTenants": [{"value": "str"}], "type": "str", - "uri": "str", - "virtualClusterGraduationProperties": "str", - "virtualNetworkConfiguration": { - "dataManagementPublicIpId": "str", - "enginePublicIpId": "str", - "subnetId": "str", - "state": "Enabled", - }, - "zoneStatus": "str", "zones": ["str"], }, - api_version="2024-04-13", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -237,19 +254,35 @@ def test_clusters_begin_delete(self, resource_group): response = self.client.clusters.begin_delete( resource_group_name=resource_group.name, cluster_name="str", - api_version="2024-04-13", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_clusters_list_by_resource_group(self, resource_group): + response = self.client.clusters.list_by_resource_group( + resource_group_name=resource_group.name, + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_clusters_list(self, resource_group): + response = self.client.clusters.list() + result = [r for r in response] + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_clusters_begin_stop(self, resource_group): response = self.client.clusters.begin_stop( resource_group_name=resource_group.name, cluster_name="str", - api_version="2024-04-13", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -261,7 +294,6 @@ def test_clusters_begin_start(self, resource_group): response = self.client.clusters.begin_start( resource_group_name=resource_group.name, cluster_name="str", - api_version="2024-04-13", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -274,7 +306,6 @@ def test_clusters_begin_migrate(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", cluster_migrate_request={"clusterResourceId": "str"}, - api_version="2024-04-13", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -286,7 +317,6 @@ def test_clusters_list_follower_databases_get(self, resource_group): response = self.client.clusters.list_follower_databases_get( resource_group_name=resource_group.name, cluster_name="str", - api_version="2024-04-13", ) result = [r for r in response] # please add some check logic here by yourself @@ -298,7 +328,6 @@ def test_clusters_list_follower_databases(self, resource_group): response = self.client.clusters.list_follower_databases( resource_group_name=resource_group.name, cluster_name="str", - api_version="2024-04-13", ) result = [r for r in response] # please add some check logic here by yourself @@ -326,7 +355,6 @@ def test_clusters_begin_detach_follower_databases(self, resource_group): "tablesToInclude": ["str"], }, }, - api_version="2024-04-13", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -338,62 +366,17 @@ def test_clusters_begin_diagnose_virtual_network(self, resource_group): response = self.client.clusters.begin_diagnose_virtual_network( resource_group_name=resource_group.name, cluster_name="str", - api_version="2024-04-13", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_clusters_list_by_resource_group(self, resource_group): - response = self.client.clusters.list_by_resource_group( - resource_group_name=resource_group.name, - api_version="2024-04-13", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_clusters_list(self, resource_group): - response = self.client.clusters.list( - api_version="2024-04-13", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_clusters_list_skus(self, resource_group): - response = self.client.clusters.list_skus( - api_version="2024-04-13", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_clusters_check_name_availability(self, resource_group): - response = self.client.clusters.check_name_availability( - location="str", - cluster_name={"name": "str", "type": "Microsoft.Kusto/clusters"}, - api_version="2024-04-13", - ) - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_clusters_list_skus_by_resource(self, resource_group): response = self.client.clusters.list_skus_by_resource( resource_group_name=resource_group.name, cluster_name="str", - api_version="2024-04-13", ) result = [r for r in response] # please add some check logic here by yourself @@ -405,7 +388,6 @@ def test_clusters_list_outbound_network_dependencies_endpoints(self, resource_gr response = self.client.clusters.list_outbound_network_dependencies_endpoints( resource_group_name=resource_group.name, cluster_name="str", - api_version="2024-04-13", ) result = [r for r in response] # please add some check logic here by yourself @@ -418,12 +400,11 @@ def test_clusters_begin_add_callout_policies(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", callout_policies={ - "nextLink": "str", "value": [ {"calloutId": "str", "calloutType": "str", "calloutUriRegex": "str", "outboundAccess": "str"} ], + "nextLink": "str", }, - api_version="2024-04-13", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -436,7 +417,6 @@ def test_clusters_begin_remove_callout_policy(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", callout_policy={"calloutId": "str"}, - api_version="2024-04-13", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -448,7 +428,6 @@ def test_clusters_list_callout_policies(self, resource_group): response = self.client.clusters.list_callout_policies( resource_group_name=resource_group.name, cluster_name="str", - api_version="2024-04-13", ) result = [r for r in response] # please add some check logic here by yourself @@ -460,7 +439,6 @@ def test_clusters_list_language_extensions(self, resource_group): response = self.client.clusters.list_language_extensions( resource_group_name=resource_group.name, cluster_name="str", - api_version="2024-04-13", ) result = [r for r in response] # please add some check logic here by yourself @@ -473,15 +451,15 @@ def test_clusters_begin_add_language_extensions(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", language_extensions_to_add={ + "nextLink": "str", "value": [ { "languageExtensionCustomImageName": "str", "languageExtensionImageName": "str", "languageExtensionName": "str", } - ] + ], }, - api_version="2024-04-13", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -494,16 +472,35 @@ def test_clusters_begin_remove_language_extensions(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", language_extensions_to_remove={ + "nextLink": "str", "value": [ { "languageExtensionCustomImageName": "str", "languageExtensionImageName": "str", "languageExtensionName": "str", } - ] + ], }, - api_version="2024-04-13", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_clusters_list_skus(self, resource_group): + response = self.client.clusters.list_skus() + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_clusters_check_name_availability(self, resource_group): + response = self.client.clusters.check_name_availability( + location="str", + cluster_name={"name": "str", "type": "Microsoft.Kusto/clusters"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_clusters_operations_async.py b/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_clusters_operations_async.py index 97b8a1ee4cd3..a986d9a59b06 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_clusters_operations_async.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_clusters_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -25,7 +25,6 @@ async def test_clusters_get(self, resource_group): response = await self.client.clusters.get( resource_group_name=resource_group.name, cluster_name="str", - api_version="2024-04-13", ) # please add some check logic here by yourself @@ -41,19 +40,6 @@ async def test_clusters_begin_create_or_update(self, resource_group): parameters={ "location": "str", "sku": {"name": "str", "tier": "str", "capacity": 0}, - "acceptedAudiences": [{"value": "str"}], - "allowedFqdnList": ["str"], - "allowedIpRangeList": ["str"], - "calloutPolicies": [ - {"calloutId": "str", "calloutType": "str", "calloutUriRegex": "str", "outboundAccess": "str"} - ], - "dataIngestionUri": "str", - "enableAutoStop": True, - "enableDiskEncryption": False, - "enableDoubleEncryption": False, - "enablePurge": False, - "enableStreamingIngest": False, - "engineType": "V3", "etag": "str", "id": "str", "identity": { @@ -62,53 +48,87 @@ async def test_clusters_begin_create_or_update(self, resource_group): "tenantId": "str", "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, }, - "keyVaultProperties": { - "keyName": "str", - "keyVaultUri": "str", - "keyVersion": "str", - "userIdentity": "str", - }, - "languageExtensions": { - "value": [ + "name": "str", + "properties": { + "acceptedAudiences": [{"value": "str"}], + "allowedFqdnList": ["str"], + "allowedIpRangeList": ["str"], + "calloutPolicies": [ { - "languageExtensionCustomImageName": "str", - "languageExtensionImageName": "str", - "languageExtensionName": "str", + "calloutId": "str", + "calloutType": "str", + "calloutUriRegex": "str", + "outboundAccess": "str", } - ] + ], + "dataIngestionUri": "str", + "enableAutoStop": bool, + "enableDiskEncryption": bool, + "enableDoubleEncryption": bool, + "enablePurge": bool, + "enableStreamingIngest": bool, + "engineType": "str", + "keyVaultProperties": { + "federatedIdentityClientId": "str", + "keyName": "str", + "keyVaultUri": "str", + "keyVersion": "str", + "userIdentity": "str", + }, + "languageExtensions": { + "nextLink": "str", + "value": [ + { + "languageExtensionCustomImageName": "str", + "languageExtensionImageName": "str", + "languageExtensionName": "str", + } + ], + }, + "migrationCluster": {"dataIngestionUri": "str", "id": "str", "role": "str", "uri": "str"}, + "optimizedAutoscale": {"isEnabled": bool, "maximum": 0, "minimum": 0, "version": 0}, + "privateEndpointConnections": [ + { + "id": "str", + "name": "str", + "properties": { + "privateLinkServiceConnectionState": { + "actionsRequired": "str", + "description": "str", + "status": "str", + }, + "groupId": "str", + "privateEndpoint": {"id": "str"}, + "provisioningState": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + } + ], + "provisioningState": "str", + "publicIPType": "str", + "publicNetworkAccess": "str", + "restrictOutboundNetworkAccess": "str", + "state": "str", + "stateReason": "str", + "trustedExternalTenants": [{"value": "str"}], + "uri": "str", + "virtualClusterGraduationProperties": "str", + "virtualNetworkConfiguration": { + "dataManagementPublicIpId": "str", + "enginePublicIpId": "str", + "subnetId": "str", + "state": "str", + }, + "zoneStatus": "str", }, - "migrationCluster": {"dataIngestionUri": "str", "id": "str", "role": "str", "uri": "str"}, - "name": "str", - "optimizedAutoscale": {"isEnabled": bool, "maximum": 0, "minimum": 0, "version": 0}, - "privateEndpointConnections": [ - { - "groupId": "str", - "id": "str", - "name": "str", - "privateEndpoint": {"id": "str"}, - "privateLinkServiceConnectionState": { - "actionsRequired": "str", - "description": "str", - "status": "str", - }, - "provisioningState": "str", - "systemData": { - "createdAt": "2020-02-20 00:00:00", - "createdBy": "str", - "createdByType": "str", - "lastModifiedAt": "2020-02-20 00:00:00", - "lastModifiedBy": "str", - "lastModifiedByType": "str", - }, - "type": "str", - } - ], - "provisioningState": "str", - "publicIPType": "IPv4", - "publicNetworkAccess": "Enabled", - "restrictOutboundNetworkAccess": "Disabled", - "state": "str", - "stateReason": "str", "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -118,20 +138,9 @@ async def test_clusters_begin_create_or_update(self, resource_group): "lastModifiedByType": "str", }, "tags": {"str": "str"}, - "trustedExternalTenants": [{"value": "str"}], "type": "str", - "uri": "str", - "virtualClusterGraduationProperties": "str", - "virtualNetworkConfiguration": { - "dataManagementPublicIpId": "str", - "enginePublicIpId": "str", - "subnetId": "str", - "state": "Enabled", - }, - "zoneStatus": "str", "zones": ["str"], }, - api_version="2024-04-13", ) ).result() # call '.result()' to poll until service return final result @@ -146,19 +155,6 @@ async def test_clusters_begin_update(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", parameters={ - "acceptedAudiences": [{"value": "str"}], - "allowedFqdnList": ["str"], - "allowedIpRangeList": ["str"], - "calloutPolicies": [ - {"calloutId": "str", "calloutType": "str", "calloutUriRegex": "str", "outboundAccess": "str"} - ], - "dataIngestionUri": "str", - "enableAutoStop": True, - "enableDiskEncryption": False, - "enableDoubleEncryption": False, - "enablePurge": False, - "enableStreamingIngest": False, - "engineType": "V3", "id": "str", "identity": { "type": "str", @@ -166,70 +162,101 @@ async def test_clusters_begin_update(self, resource_group): "tenantId": "str", "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, }, - "keyVaultProperties": { - "keyName": "str", - "keyVaultUri": "str", - "keyVersion": "str", - "userIdentity": "str", - }, - "languageExtensions": { - "value": [ + "location": "str", + "name": "str", + "properties": { + "acceptedAudiences": [{"value": "str"}], + "allowedFqdnList": ["str"], + "allowedIpRangeList": ["str"], + "calloutPolicies": [ + { + "calloutId": "str", + "calloutType": "str", + "calloutUriRegex": "str", + "outboundAccess": "str", + } + ], + "dataIngestionUri": "str", + "enableAutoStop": bool, + "enableDiskEncryption": bool, + "enableDoubleEncryption": bool, + "enablePurge": bool, + "enableStreamingIngest": bool, + "engineType": "str", + "keyVaultProperties": { + "federatedIdentityClientId": "str", + "keyName": "str", + "keyVaultUri": "str", + "keyVersion": "str", + "userIdentity": "str", + }, + "languageExtensions": { + "nextLink": "str", + "value": [ + { + "languageExtensionCustomImageName": "str", + "languageExtensionImageName": "str", + "languageExtensionName": "str", + } + ], + }, + "migrationCluster": {"dataIngestionUri": "str", "id": "str", "role": "str", "uri": "str"}, + "optimizedAutoscale": {"isEnabled": bool, "maximum": 0, "minimum": 0, "version": 0}, + "privateEndpointConnections": [ { - "languageExtensionCustomImageName": "str", - "languageExtensionImageName": "str", - "languageExtensionName": "str", + "id": "str", + "name": "str", + "properties": { + "privateLinkServiceConnectionState": { + "actionsRequired": "str", + "description": "str", + "status": "str", + }, + "groupId": "str", + "privateEndpoint": {"id": "str"}, + "provisioningState": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", } - ] + ], + "provisioningState": "str", + "publicIPType": "str", + "publicNetworkAccess": "str", + "restrictOutboundNetworkAccess": "str", + "state": "str", + "stateReason": "str", + "trustedExternalTenants": [{"value": "str"}], + "uri": "str", + "virtualClusterGraduationProperties": "str", + "virtualNetworkConfiguration": { + "dataManagementPublicIpId": "str", + "enginePublicIpId": "str", + "subnetId": "str", + "state": "str", + }, + "zoneStatus": "str", }, - "location": "str", - "migrationCluster": {"dataIngestionUri": "str", "id": "str", "role": "str", "uri": "str"}, - "name": "str", - "optimizedAutoscale": {"isEnabled": bool, "maximum": 0, "minimum": 0, "version": 0}, - "privateEndpointConnections": [ - { - "groupId": "str", - "id": "str", - "name": "str", - "privateEndpoint": {"id": "str"}, - "privateLinkServiceConnectionState": { - "actionsRequired": "str", - "description": "str", - "status": "str", - }, - "provisioningState": "str", - "systemData": { - "createdAt": "2020-02-20 00:00:00", - "createdBy": "str", - "createdByType": "str", - "lastModifiedAt": "2020-02-20 00:00:00", - "lastModifiedBy": "str", - "lastModifiedByType": "str", - }, - "type": "str", - } - ], - "provisioningState": "str", - "publicIPType": "IPv4", - "publicNetworkAccess": "Enabled", - "restrictOutboundNetworkAccess": "Disabled", "sku": {"name": "str", "tier": "str", "capacity": 0}, - "state": "str", - "stateReason": "str", + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "tags": {"str": "str"}, - "trustedExternalTenants": [{"value": "str"}], "type": "str", - "uri": "str", - "virtualClusterGraduationProperties": "str", - "virtualNetworkConfiguration": { - "dataManagementPublicIpId": "str", - "enginePublicIpId": "str", - "subnetId": "str", - "state": "Enabled", - }, - "zoneStatus": "str", "zones": ["str"], }, - api_version="2024-04-13", ) ).result() # call '.result()' to poll until service return final result @@ -243,13 +270,30 @@ async def test_clusters_begin_delete(self, resource_group): await self.client.clusters.begin_delete( resource_group_name=resource_group.name, cluster_name="str", - api_version="2024-04-13", ) ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_clusters_list_by_resource_group(self, resource_group): + response = self.client.clusters.list_by_resource_group( + resource_group_name=resource_group.name, + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_clusters_list(self, resource_group): + response = self.client.clusters.list() + result = [r async for r in response] + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_clusters_begin_stop(self, resource_group): @@ -257,7 +301,6 @@ async def test_clusters_begin_stop(self, resource_group): await self.client.clusters.begin_stop( resource_group_name=resource_group.name, cluster_name="str", - api_version="2024-04-13", ) ).result() # call '.result()' to poll until service return final result @@ -271,7 +314,6 @@ async def test_clusters_begin_start(self, resource_group): await self.client.clusters.begin_start( resource_group_name=resource_group.name, cluster_name="str", - api_version="2024-04-13", ) ).result() # call '.result()' to poll until service return final result @@ -286,7 +328,6 @@ async def test_clusters_begin_migrate(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", cluster_migrate_request={"clusterResourceId": "str"}, - api_version="2024-04-13", ) ).result() # call '.result()' to poll until service return final result @@ -299,7 +340,6 @@ async def test_clusters_list_follower_databases_get(self, resource_group): response = self.client.clusters.list_follower_databases_get( resource_group_name=resource_group.name, cluster_name="str", - api_version="2024-04-13", ) result = [r async for r in response] # please add some check logic here by yourself @@ -311,7 +351,6 @@ async def test_clusters_list_follower_databases(self, resource_group): response = self.client.clusters.list_follower_databases( resource_group_name=resource_group.name, cluster_name="str", - api_version="2024-04-13", ) result = [r async for r in response] # please add some check logic here by yourself @@ -340,7 +379,6 @@ async def test_clusters_begin_detach_follower_databases(self, resource_group): "tablesToInclude": ["str"], }, }, - api_version="2024-04-13", ) ).result() # call '.result()' to poll until service return final result @@ -354,63 +392,18 @@ async def test_clusters_begin_diagnose_virtual_network(self, resource_group): await self.client.clusters.begin_diagnose_virtual_network( resource_group_name=resource_group.name, cluster_name="str", - api_version="2024-04-13", ) ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_clusters_list_by_resource_group(self, resource_group): - response = self.client.clusters.list_by_resource_group( - resource_group_name=resource_group.name, - api_version="2024-04-13", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_clusters_list(self, resource_group): - response = self.client.clusters.list( - api_version="2024-04-13", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_clusters_list_skus(self, resource_group): - response = self.client.clusters.list_skus( - api_version="2024-04-13", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_clusters_check_name_availability(self, resource_group): - response = await self.client.clusters.check_name_availability( - location="str", - cluster_name={"name": "str", "type": "Microsoft.Kusto/clusters"}, - api_version="2024-04-13", - ) - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_clusters_list_skus_by_resource(self, resource_group): response = self.client.clusters.list_skus_by_resource( resource_group_name=resource_group.name, cluster_name="str", - api_version="2024-04-13", ) result = [r async for r in response] # please add some check logic here by yourself @@ -422,7 +415,6 @@ async def test_clusters_list_outbound_network_dependencies_endpoints(self, resou response = self.client.clusters.list_outbound_network_dependencies_endpoints( resource_group_name=resource_group.name, cluster_name="str", - api_version="2024-04-13", ) result = [r async for r in response] # please add some check logic here by yourself @@ -436,12 +428,11 @@ async def test_clusters_begin_add_callout_policies(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", callout_policies={ - "nextLink": "str", "value": [ {"calloutId": "str", "calloutType": "str", "calloutUriRegex": "str", "outboundAccess": "str"} ], + "nextLink": "str", }, - api_version="2024-04-13", ) ).result() # call '.result()' to poll until service return final result @@ -456,7 +447,6 @@ async def test_clusters_begin_remove_callout_policy(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", callout_policy={"calloutId": "str"}, - api_version="2024-04-13", ) ).result() # call '.result()' to poll until service return final result @@ -469,7 +459,6 @@ async def test_clusters_list_callout_policies(self, resource_group): response = self.client.clusters.list_callout_policies( resource_group_name=resource_group.name, cluster_name="str", - api_version="2024-04-13", ) result = [r async for r in response] # please add some check logic here by yourself @@ -481,7 +470,6 @@ async def test_clusters_list_language_extensions(self, resource_group): response = self.client.clusters.list_language_extensions( resource_group_name=resource_group.name, cluster_name="str", - api_version="2024-04-13", ) result = [r async for r in response] # please add some check logic here by yourself @@ -495,15 +483,15 @@ async def test_clusters_begin_add_language_extensions(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", language_extensions_to_add={ + "nextLink": "str", "value": [ { "languageExtensionCustomImageName": "str", "languageExtensionImageName": "str", "languageExtensionName": "str", } - ] + ], }, - api_version="2024-04-13", ) ).result() # call '.result()' to poll until service return final result @@ -518,17 +506,36 @@ async def test_clusters_begin_remove_language_extensions(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", language_extensions_to_remove={ + "nextLink": "str", "value": [ { "languageExtensionCustomImageName": "str", "languageExtensionImageName": "str", "languageExtensionName": "str", } - ] + ], }, - api_version="2024-04-13", ) ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_clusters_list_skus(self, resource_group): + response = self.client.clusters.list_skus() + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_clusters_check_name_availability(self, resource_group): + response = await self.client.clusters.check_name_availability( + location="str", + cluster_name={"name": "str", "type": "Microsoft.Kusto/clusters"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_data_connections_operations.py b/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_data_connections_operations.py index bd1449e7d5bd..d215ecb1b992 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_data_connections_operations.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_data_connections_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -18,47 +18,6 @@ class TestKustoManagementDataConnectionsOperations(AzureMgmtRecordedTestCase): def setup_method(self, method): self.client = self.create_mgmt_client(KustoManagementClient) - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_data_connections_list_by_database(self, resource_group): - response = self.client.data_connections.list_by_database( - resource_group_name=resource_group.name, - cluster_name="str", - database_name="str", - api_version="2024-04-13", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_data_connections_begin_data_connection_validation(self, resource_group): - response = self.client.data_connections.begin_data_connection_validation( - resource_group_name=resource_group.name, - cluster_name="str", - database_name="str", - parameters={"dataConnectionName": "str", "properties": "data_connection"}, - api_version="2024-04-13", - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_data_connections_check_name_availability(self, resource_group): - response = self.client.data_connections.check_name_availability( - resource_group_name=resource_group.name, - cluster_name="str", - database_name="str", - data_connection_name={"name": "str", "type": "Microsoft.Kusto/clusters/databases/dataConnections"}, - api_version="2024-04-13", - ) - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_data_connections_get(self, resource_group): @@ -67,7 +26,6 @@ def test_data_connections_get(self, resource_group): cluster_name="str", database_name="str", data_connection_name="str", - api_version="2024-04-13", ) # please add some check logic here by yourself @@ -83,21 +41,30 @@ def test_data_connections_begin_create_or_update(self, resource_group): data_connection_name="str", parameters={ "kind": "CosmosDb", - "cosmosDbAccountResourceId": "str", - "cosmosDbContainer": "str", - "cosmosDbDatabase": "str", "id": "str", "location": "str", - "managedIdentityObjectId": "str", - "managedIdentityResourceId": "str", - "mappingRuleName": "str", "name": "str", - "provisioningState": "str", - "retrievalStartDate": "2020-02-20 00:00:00", - "tableName": "str", + "properties": { + "cosmosDbAccountResourceId": "str", + "cosmosDbContainer": "str", + "cosmosDbDatabase": "str", + "managedIdentityResourceId": "str", + "tableName": "str", + "managedIdentityObjectId": "str", + "mappingRuleName": "str", + "provisioningState": "str", + "retrievalStartDate": "2020-02-20 00:00:00", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", }, - api_version="2024-04-13", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -113,21 +80,30 @@ def test_data_connections_begin_update(self, resource_group): data_connection_name="str", parameters={ "kind": "CosmosDb", - "cosmosDbAccountResourceId": "str", - "cosmosDbContainer": "str", - "cosmosDbDatabase": "str", "id": "str", "location": "str", - "managedIdentityObjectId": "str", - "managedIdentityResourceId": "str", - "mappingRuleName": "str", "name": "str", - "provisioningState": "str", - "retrievalStartDate": "2020-02-20 00:00:00", - "tableName": "str", + "properties": { + "cosmosDbAccountResourceId": "str", + "cosmosDbContainer": "str", + "cosmosDbDatabase": "str", + "managedIdentityResourceId": "str", + "tableName": "str", + "managedIdentityObjectId": "str", + "mappingRuleName": "str", + "provisioningState": "str", + "retrievalStartDate": "2020-02-20 00:00:00", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", }, - api_version="2024-04-13", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -141,8 +117,45 @@ def test_data_connections_begin_delete(self, resource_group): cluster_name="str", database_name="str", data_connection_name="str", - api_version="2024-04-13", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_data_connections_list_by_database(self, resource_group): + response = self.client.data_connections.list_by_database( + resource_group_name=resource_group.name, + cluster_name="str", + database_name="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_data_connections_begin_data_connection_validation(self, resource_group): + response = self.client.data_connections.begin_data_connection_validation( + resource_group_name=resource_group.name, + cluster_name="str", + database_name="str", + parameters={"dataConnectionName": "str", "properties": "data_connection"}, + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_data_connections_check_name_availability(self, resource_group): + response = self.client.data_connections.check_name_availability( + resource_group_name=resource_group.name, + cluster_name="str", + database_name="str", + data_connection_name={"name": "str", "type": "Microsoft.Kusto/clusters/databases/dataConnections"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_data_connections_operations_async.py b/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_data_connections_operations_async.py index 3f0bca249991..f84d8af61ed1 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_data_connections_operations_async.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_data_connections_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -19,49 +19,6 @@ class TestKustoManagementDataConnectionsOperationsAsync(AzureMgmtRecordedTestCas def setup_method(self, method): self.client = self.create_mgmt_client(KustoManagementClient, is_async=True) - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_data_connections_list_by_database(self, resource_group): - response = self.client.data_connections.list_by_database( - resource_group_name=resource_group.name, - cluster_name="str", - database_name="str", - api_version="2024-04-13", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_data_connections_begin_data_connection_validation(self, resource_group): - response = await ( - await self.client.data_connections.begin_data_connection_validation( - resource_group_name=resource_group.name, - cluster_name="str", - database_name="str", - parameters={"dataConnectionName": "str", "properties": "data_connection"}, - api_version="2024-04-13", - ) - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_data_connections_check_name_availability(self, resource_group): - response = await self.client.data_connections.check_name_availability( - resource_group_name=resource_group.name, - cluster_name="str", - database_name="str", - data_connection_name={"name": "str", "type": "Microsoft.Kusto/clusters/databases/dataConnections"}, - api_version="2024-04-13", - ) - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_data_connections_get(self, resource_group): @@ -70,7 +27,6 @@ async def test_data_connections_get(self, resource_group): cluster_name="str", database_name="str", data_connection_name="str", - api_version="2024-04-13", ) # please add some check logic here by yourself @@ -87,21 +43,30 @@ async def test_data_connections_begin_create_or_update(self, resource_group): data_connection_name="str", parameters={ "kind": "CosmosDb", - "cosmosDbAccountResourceId": "str", - "cosmosDbContainer": "str", - "cosmosDbDatabase": "str", "id": "str", "location": "str", - "managedIdentityObjectId": "str", - "managedIdentityResourceId": "str", - "mappingRuleName": "str", "name": "str", - "provisioningState": "str", - "retrievalStartDate": "2020-02-20 00:00:00", - "tableName": "str", + "properties": { + "cosmosDbAccountResourceId": "str", + "cosmosDbContainer": "str", + "cosmosDbDatabase": "str", + "managedIdentityResourceId": "str", + "tableName": "str", + "managedIdentityObjectId": "str", + "mappingRuleName": "str", + "provisioningState": "str", + "retrievalStartDate": "2020-02-20 00:00:00", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", }, - api_version="2024-04-13", ) ).result() # call '.result()' to poll until service return final result @@ -119,21 +84,30 @@ async def test_data_connections_begin_update(self, resource_group): data_connection_name="str", parameters={ "kind": "CosmosDb", - "cosmosDbAccountResourceId": "str", - "cosmosDbContainer": "str", - "cosmosDbDatabase": "str", "id": "str", "location": "str", - "managedIdentityObjectId": "str", - "managedIdentityResourceId": "str", - "mappingRuleName": "str", "name": "str", - "provisioningState": "str", - "retrievalStartDate": "2020-02-20 00:00:00", - "tableName": "str", + "properties": { + "cosmosDbAccountResourceId": "str", + "cosmosDbContainer": "str", + "cosmosDbDatabase": "str", + "managedIdentityResourceId": "str", + "tableName": "str", + "managedIdentityObjectId": "str", + "mappingRuleName": "str", + "provisioningState": "str", + "retrievalStartDate": "2020-02-20 00:00:00", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", }, - api_version="2024-04-13", ) ).result() # call '.result()' to poll until service return final result @@ -149,9 +123,48 @@ async def test_data_connections_begin_delete(self, resource_group): cluster_name="str", database_name="str", data_connection_name="str", - api_version="2024-04-13", ) ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_data_connections_list_by_database(self, resource_group): + response = self.client.data_connections.list_by_database( + resource_group_name=resource_group.name, + cluster_name="str", + database_name="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_data_connections_begin_data_connection_validation(self, resource_group): + response = await ( + await self.client.data_connections.begin_data_connection_validation( + resource_group_name=resource_group.name, + cluster_name="str", + database_name="str", + parameters={"dataConnectionName": "str", "properties": "data_connection"}, + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_data_connections_check_name_availability(self, resource_group): + response = await self.client.data_connections.check_name_availability( + resource_group_name=resource_group.name, + cluster_name="str", + database_name="str", + data_connection_name={"name": "str", "type": "Microsoft.Kusto/clusters/databases/dataConnections"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_database_operations.py b/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_database_operations.py index ea803f6ece5d..8c2edfc9ff6a 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_database_operations.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_database_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -38,7 +38,6 @@ def test_database_invite_follower(self, resource_group): "tablesToInclude": ["str"], }, }, - api_version="2024-04-13", ) # please add some check logic here by yourself diff --git a/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_database_operations_async.py b/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_database_operations_async.py index 2d726443f528..6b71eddd6273 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_database_operations_async.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_database_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -39,7 +39,6 @@ async def test_database_invite_follower(self, resource_group): "tablesToInclude": ["str"], }, }, - api_version="2024-04-13", ) # please add some check logic here by yourself diff --git a/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_database_principal_assignments_operations.py b/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_database_principal_assignments_operations.py index a85b1b08802e..6f00424fbcd8 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_database_principal_assignments_operations.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_database_principal_assignments_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -18,23 +18,6 @@ class TestKustoManagementDatabasePrincipalAssignmentsOperations(AzureMgmtRecorde def setup_method(self, method): self.client = self.create_mgmt_client(KustoManagementClient) - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_database_principal_assignments_check_name_availability(self, resource_group): - response = self.client.database_principal_assignments.check_name_availability( - resource_group_name=resource_group.name, - cluster_name="str", - database_name="str", - principal_assignment_name={ - "name": "str", - "type": "Microsoft.Kusto/clusters/databases/principalAssignments", - }, - api_version="2024-04-13", - ) - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_database_principal_assignments_get(self, resource_group): @@ -43,7 +26,6 @@ def test_database_principal_assignments_get(self, resource_group): cluster_name="str", database_name="str", principal_assignment_name="str", - api_version="2024-04-13", ) # please add some check logic here by yourself @@ -58,19 +40,28 @@ def test_database_principal_assignments_begin_create_or_update(self, resource_gr database_name="str", principal_assignment_name="str", parameters={ - "aadObjectId": "str", "id": "str", "name": "str", - "principalId": "str", - "principalName": "str", - "principalType": "str", - "provisioningState": "str", - "role": "str", - "tenantId": "str", - "tenantName": "str", + "properties": { + "principalId": "str", + "principalType": "str", + "role": "str", + "aadObjectId": "str", + "principalName": "str", + "provisioningState": "str", + "tenantId": "str", + "tenantName": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", }, - api_version="2024-04-13", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -84,7 +75,6 @@ def test_database_principal_assignments_begin_delete(self, resource_group): cluster_name="str", database_name="str", principal_assignment_name="str", - api_version="2024-04-13", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -97,8 +87,23 @@ def test_database_principal_assignments_list(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", database_name="str", - api_version="2024-04-13", ) result = [r for r in response] # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_database_principal_assignments_check_name_availability(self, resource_group): + response = self.client.database_principal_assignments.check_name_availability( + resource_group_name=resource_group.name, + cluster_name="str", + database_name="str", + principal_assignment_name={ + "name": "str", + "type": "Microsoft.Kusto/clusters/databases/principalAssignments", + }, + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_database_principal_assignments_operations_async.py b/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_database_principal_assignments_operations_async.py index 7fbcb423f1bd..d7505409d909 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_database_principal_assignments_operations_async.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_database_principal_assignments_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -19,23 +19,6 @@ class TestKustoManagementDatabasePrincipalAssignmentsOperationsAsync(AzureMgmtRe def setup_method(self, method): self.client = self.create_mgmt_client(KustoManagementClient, is_async=True) - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_database_principal_assignments_check_name_availability(self, resource_group): - response = await self.client.database_principal_assignments.check_name_availability( - resource_group_name=resource_group.name, - cluster_name="str", - database_name="str", - principal_assignment_name={ - "name": "str", - "type": "Microsoft.Kusto/clusters/databases/principalAssignments", - }, - api_version="2024-04-13", - ) - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_database_principal_assignments_get(self, resource_group): @@ -44,7 +27,6 @@ async def test_database_principal_assignments_get(self, resource_group): cluster_name="str", database_name="str", principal_assignment_name="str", - api_version="2024-04-13", ) # please add some check logic here by yourself @@ -60,19 +42,28 @@ async def test_database_principal_assignments_begin_create_or_update(self, resou database_name="str", principal_assignment_name="str", parameters={ - "aadObjectId": "str", "id": "str", "name": "str", - "principalId": "str", - "principalName": "str", - "principalType": "str", - "provisioningState": "str", - "role": "str", - "tenantId": "str", - "tenantName": "str", + "properties": { + "principalId": "str", + "principalType": "str", + "role": "str", + "aadObjectId": "str", + "principalName": "str", + "provisioningState": "str", + "tenantId": "str", + "tenantName": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", }, - api_version="2024-04-13", ) ).result() # call '.result()' to poll until service return final result @@ -88,7 +79,6 @@ async def test_database_principal_assignments_begin_delete(self, resource_group) cluster_name="str", database_name="str", principal_assignment_name="str", - api_version="2024-04-13", ) ).result() # call '.result()' to poll until service return final result @@ -102,8 +92,23 @@ async def test_database_principal_assignments_list(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", database_name="str", - api_version="2024-04-13", ) result = [r async for r in response] # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_database_principal_assignments_check_name_availability(self, resource_group): + response = await self.client.database_principal_assignments.check_name_availability( + resource_group_name=resource_group.name, + cluster_name="str", + database_name="str", + principal_assignment_name={ + "name": "str", + "type": "Microsoft.Kusto/clusters/databases/principalAssignments", + }, + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_databases_operations.py b/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_databases_operations.py index 00220436caef..cc6fe2b4e196 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_databases_operations.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_databases_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -18,31 +18,6 @@ class TestKustoManagementDatabasesOperations(AzureMgmtRecordedTestCase): def setup_method(self, method): self.client = self.create_mgmt_client(KustoManagementClient) - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_databases_check_name_availability(self, resource_group): - response = self.client.databases.check_name_availability( - resource_group_name=resource_group.name, - cluster_name="str", - resource_name={"name": "str", "type": "str"}, - api_version="2024-04-13", - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_databases_list_by_cluster(self, resource_group): - response = self.client.databases.list_by_cluster( - resource_group_name=resource_group.name, - cluster_name="str", - api_version="2024-04-13", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_databases_get(self, resource_group): @@ -50,7 +25,6 @@ def test_databases_get(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", database_name="str", - api_version="2024-04-13", ) # please add some check logic here by yourself @@ -65,32 +39,41 @@ def test_databases_begin_create_or_update(self, resource_group): database_name="str", parameters={ "kind": "ReadOnlyFollowing", - "attachedDatabaseConfigurationName": "str", - "databaseShareOrigin": "str", - "hotCachePeriod": "1 day, 0:00:00", "id": "str", - "leaderClusterResourceId": "str", "location": "str", "name": "str", - "originalDatabaseName": "str", - "principalsModificationKind": "str", - "provisioningState": "str", - "softDeletePeriod": "1 day, 0:00:00", - "statistics": {"size": 0.0}, - "suspensionDetails": {"suspensionStartDate": "2020-02-20 00:00:00"}, - "tableLevelSharingProperties": { - "externalTablesToExclude": ["str"], - "externalTablesToInclude": ["str"], - "functionsToExclude": ["str"], - "functionsToInclude": ["str"], - "materializedViewsToExclude": ["str"], - "materializedViewsToInclude": ["str"], - "tablesToExclude": ["str"], - "tablesToInclude": ["str"], + "properties": { + "attachedDatabaseConfigurationName": "str", + "databaseShareOrigin": "str", + "hotCachePeriod": "1 day, 0:00:00", + "leaderClusterResourceId": "str", + "originalDatabaseName": "str", + "principalsModificationKind": "str", + "provisioningState": "str", + "softDeletePeriod": "1 day, 0:00:00", + "statistics": {"size": 0.0}, + "suspensionDetails": {"suspensionStartDate": "2020-02-20 00:00:00"}, + "tableLevelSharingProperties": { + "externalTablesToExclude": ["str"], + "externalTablesToInclude": ["str"], + "functionsToExclude": ["str"], + "functionsToInclude": ["str"], + "materializedViewsToExclude": ["str"], + "materializedViewsToInclude": ["str"], + "tablesToExclude": ["str"], + "tablesToInclude": ["str"], + }, + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", }, "type": "str", }, - api_version="2024-04-13", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -105,32 +88,41 @@ def test_databases_begin_update(self, resource_group): database_name="str", parameters={ "kind": "ReadOnlyFollowing", - "attachedDatabaseConfigurationName": "str", - "databaseShareOrigin": "str", - "hotCachePeriod": "1 day, 0:00:00", "id": "str", - "leaderClusterResourceId": "str", "location": "str", "name": "str", - "originalDatabaseName": "str", - "principalsModificationKind": "str", - "provisioningState": "str", - "softDeletePeriod": "1 day, 0:00:00", - "statistics": {"size": 0.0}, - "suspensionDetails": {"suspensionStartDate": "2020-02-20 00:00:00"}, - "tableLevelSharingProperties": { - "externalTablesToExclude": ["str"], - "externalTablesToInclude": ["str"], - "functionsToExclude": ["str"], - "functionsToInclude": ["str"], - "materializedViewsToExclude": ["str"], - "materializedViewsToInclude": ["str"], - "tablesToExclude": ["str"], - "tablesToInclude": ["str"], + "properties": { + "attachedDatabaseConfigurationName": "str", + "databaseShareOrigin": "str", + "hotCachePeriod": "1 day, 0:00:00", + "leaderClusterResourceId": "str", + "originalDatabaseName": "str", + "principalsModificationKind": "str", + "provisioningState": "str", + "softDeletePeriod": "1 day, 0:00:00", + "statistics": {"size": 0.0}, + "suspensionDetails": {"suspensionStartDate": "2020-02-20 00:00:00"}, + "tableLevelSharingProperties": { + "externalTablesToExclude": ["str"], + "externalTablesToInclude": ["str"], + "functionsToExclude": ["str"], + "functionsToInclude": ["str"], + "materializedViewsToExclude": ["str"], + "materializedViewsToInclude": ["str"], + "tablesToExclude": ["str"], + "tablesToInclude": ["str"], + }, + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", }, "type": "str", }, - api_version="2024-04-13", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -143,12 +135,22 @@ def test_databases_begin_delete(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", database_name="str", - api_version="2024-04-13", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_databases_list_by_cluster(self, resource_group): + response = self.client.databases.list_by_cluster( + resource_group_name=resource_group.name, + cluster_name="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_databases_list_principals(self, resource_group): @@ -156,7 +158,6 @@ def test_databases_list_principals(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", database_name="str", - api_version="2024-04-13", ) result = [r for r in response] # please add some check logic here by yourself @@ -182,7 +183,6 @@ def test_databases_add_principals(self, resource_group): } ] }, - api_version="2024-04-13", ) # please add some check logic here by yourself @@ -208,7 +208,18 @@ def test_databases_remove_principals(self, resource_group): } ] }, - api_version="2024-04-13", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_databases_check_name_availability(self, resource_group): + response = self.client.databases.check_name_availability( + resource_group_name=resource_group.name, + cluster_name="str", + resource_name={"name": "str", "type": "str"}, ) # please add some check logic here by yourself diff --git a/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_databases_operations_async.py b/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_databases_operations_async.py index 6352faedc994..1a2d95a78e50 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_databases_operations_async.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_databases_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -19,31 +19,6 @@ class TestKustoManagementDatabasesOperationsAsync(AzureMgmtRecordedTestCase): def setup_method(self, method): self.client = self.create_mgmt_client(KustoManagementClient, is_async=True) - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_databases_check_name_availability(self, resource_group): - response = await self.client.databases.check_name_availability( - resource_group_name=resource_group.name, - cluster_name="str", - resource_name={"name": "str", "type": "str"}, - api_version="2024-04-13", - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_databases_list_by_cluster(self, resource_group): - response = self.client.databases.list_by_cluster( - resource_group_name=resource_group.name, - cluster_name="str", - api_version="2024-04-13", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_databases_get(self, resource_group): @@ -51,7 +26,6 @@ async def test_databases_get(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", database_name="str", - api_version="2024-04-13", ) # please add some check logic here by yourself @@ -67,32 +41,41 @@ async def test_databases_begin_create_or_update(self, resource_group): database_name="str", parameters={ "kind": "ReadOnlyFollowing", - "attachedDatabaseConfigurationName": "str", - "databaseShareOrigin": "str", - "hotCachePeriod": "1 day, 0:00:00", "id": "str", - "leaderClusterResourceId": "str", "location": "str", "name": "str", - "originalDatabaseName": "str", - "principalsModificationKind": "str", - "provisioningState": "str", - "softDeletePeriod": "1 day, 0:00:00", - "statistics": {"size": 0.0}, - "suspensionDetails": {"suspensionStartDate": "2020-02-20 00:00:00"}, - "tableLevelSharingProperties": { - "externalTablesToExclude": ["str"], - "externalTablesToInclude": ["str"], - "functionsToExclude": ["str"], - "functionsToInclude": ["str"], - "materializedViewsToExclude": ["str"], - "materializedViewsToInclude": ["str"], - "tablesToExclude": ["str"], - "tablesToInclude": ["str"], + "properties": { + "attachedDatabaseConfigurationName": "str", + "databaseShareOrigin": "str", + "hotCachePeriod": "1 day, 0:00:00", + "leaderClusterResourceId": "str", + "originalDatabaseName": "str", + "principalsModificationKind": "str", + "provisioningState": "str", + "softDeletePeriod": "1 day, 0:00:00", + "statistics": {"size": 0.0}, + "suspensionDetails": {"suspensionStartDate": "2020-02-20 00:00:00"}, + "tableLevelSharingProperties": { + "externalTablesToExclude": ["str"], + "externalTablesToInclude": ["str"], + "functionsToExclude": ["str"], + "functionsToInclude": ["str"], + "materializedViewsToExclude": ["str"], + "materializedViewsToInclude": ["str"], + "tablesToExclude": ["str"], + "tablesToInclude": ["str"], + }, + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", }, "type": "str", }, - api_version="2024-04-13", ) ).result() # call '.result()' to poll until service return final result @@ -109,32 +92,41 @@ async def test_databases_begin_update(self, resource_group): database_name="str", parameters={ "kind": "ReadOnlyFollowing", - "attachedDatabaseConfigurationName": "str", - "databaseShareOrigin": "str", - "hotCachePeriod": "1 day, 0:00:00", "id": "str", - "leaderClusterResourceId": "str", "location": "str", "name": "str", - "originalDatabaseName": "str", - "principalsModificationKind": "str", - "provisioningState": "str", - "softDeletePeriod": "1 day, 0:00:00", - "statistics": {"size": 0.0}, - "suspensionDetails": {"suspensionStartDate": "2020-02-20 00:00:00"}, - "tableLevelSharingProperties": { - "externalTablesToExclude": ["str"], - "externalTablesToInclude": ["str"], - "functionsToExclude": ["str"], - "functionsToInclude": ["str"], - "materializedViewsToExclude": ["str"], - "materializedViewsToInclude": ["str"], - "tablesToExclude": ["str"], - "tablesToInclude": ["str"], + "properties": { + "attachedDatabaseConfigurationName": "str", + "databaseShareOrigin": "str", + "hotCachePeriod": "1 day, 0:00:00", + "leaderClusterResourceId": "str", + "originalDatabaseName": "str", + "principalsModificationKind": "str", + "provisioningState": "str", + "softDeletePeriod": "1 day, 0:00:00", + "statistics": {"size": 0.0}, + "suspensionDetails": {"suspensionStartDate": "2020-02-20 00:00:00"}, + "tableLevelSharingProperties": { + "externalTablesToExclude": ["str"], + "externalTablesToInclude": ["str"], + "functionsToExclude": ["str"], + "functionsToInclude": ["str"], + "materializedViewsToExclude": ["str"], + "materializedViewsToInclude": ["str"], + "tablesToExclude": ["str"], + "tablesToInclude": ["str"], + }, + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", }, "type": "str", }, - api_version="2024-04-13", ) ).result() # call '.result()' to poll until service return final result @@ -149,13 +141,23 @@ async def test_databases_begin_delete(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", database_name="str", - api_version="2024-04-13", ) ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_databases_list_by_cluster(self, resource_group): + response = self.client.databases.list_by_cluster( + resource_group_name=resource_group.name, + cluster_name="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_databases_list_principals(self, resource_group): @@ -163,7 +165,6 @@ async def test_databases_list_principals(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", database_name="str", - api_version="2024-04-13", ) result = [r async for r in response] # please add some check logic here by yourself @@ -189,7 +190,6 @@ async def test_databases_add_principals(self, resource_group): } ] }, - api_version="2024-04-13", ) # please add some check logic here by yourself @@ -215,7 +215,18 @@ async def test_databases_remove_principals(self, resource_group): } ] }, - api_version="2024-04-13", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_databases_check_name_availability(self, resource_group): + response = await self.client.databases.check_name_availability( + resource_group_name=resource_group.name, + cluster_name="str", + resource_name={"name": "str", "type": "str"}, ) # please add some check logic here by yourself diff --git a/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_managed_private_endpoints_operations.py b/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_managed_private_endpoints_operations.py index b5476e6e74f9..cb35090af273 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_managed_private_endpoints_operations.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_managed_private_endpoints_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -18,31 +18,6 @@ class TestKustoManagementManagedPrivateEndpointsOperations(AzureMgmtRecordedTest def setup_method(self, method): self.client = self.create_mgmt_client(KustoManagementClient) - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_managed_private_endpoints_check_name_availability(self, resource_group): - response = self.client.managed_private_endpoints.check_name_availability( - resource_group_name=resource_group.name, - cluster_name="str", - resource_name={"name": "str", "type": "Microsoft.Kusto/clusters/managedPrivateEndpoints"}, - api_version="2024-04-13", - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_managed_private_endpoints_list(self, resource_group): - response = self.client.managed_private_endpoints.list( - resource_group_name=resource_group.name, - cluster_name="str", - api_version="2024-04-13", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_managed_private_endpoints_get(self, resource_group): @@ -50,7 +25,6 @@ def test_managed_private_endpoints_get(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", managed_private_endpoint_name="str", - api_version="2024-04-13", ) # please add some check logic here by yourself @@ -64,13 +38,15 @@ def test_managed_private_endpoints_begin_create_or_update(self, resource_group): cluster_name="str", managed_private_endpoint_name="str", parameters={ - "groupId": "str", "id": "str", "name": "str", - "privateLinkResourceId": "str", - "privateLinkResourceRegion": "str", - "provisioningState": "str", - "requestMessage": "str", + "properties": { + "groupId": "str", + "privateLinkResourceId": "str", + "privateLinkResourceRegion": "str", + "provisioningState": "str", + "requestMessage": "str", + }, "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -81,7 +57,6 @@ def test_managed_private_endpoints_begin_create_or_update(self, resource_group): }, "type": "str", }, - api_version="2024-04-13", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -95,13 +70,15 @@ def test_managed_private_endpoints_begin_update(self, resource_group): cluster_name="str", managed_private_endpoint_name="str", parameters={ - "groupId": "str", "id": "str", "name": "str", - "privateLinkResourceId": "str", - "privateLinkResourceRegion": "str", - "provisioningState": "str", - "requestMessage": "str", + "properties": { + "groupId": "str", + "privateLinkResourceId": "str", + "privateLinkResourceRegion": "str", + "provisioningState": "str", + "requestMessage": "str", + }, "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -112,7 +89,6 @@ def test_managed_private_endpoints_begin_update(self, resource_group): }, "type": "str", }, - api_version="2024-04-13", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -125,8 +101,30 @@ def test_managed_private_endpoints_begin_delete(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", managed_private_endpoint_name="str", - api_version="2024-04-13", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_managed_private_endpoints_list(self, resource_group): + response = self.client.managed_private_endpoints.list( + resource_group_name=resource_group.name, + cluster_name="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_managed_private_endpoints_check_name_availability(self, resource_group): + response = self.client.managed_private_endpoints.check_name_availability( + resource_group_name=resource_group.name, + cluster_name="str", + resource_name={"name": "str", "type": "Microsoft.Kusto/clusters/managedPrivateEndpoints"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_managed_private_endpoints_operations_async.py b/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_managed_private_endpoints_operations_async.py index b63fe5d2bbf6..34e163dfc976 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_managed_private_endpoints_operations_async.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_managed_private_endpoints_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -19,31 +19,6 @@ class TestKustoManagementManagedPrivateEndpointsOperationsAsync(AzureMgmtRecorde def setup_method(self, method): self.client = self.create_mgmt_client(KustoManagementClient, is_async=True) - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_managed_private_endpoints_check_name_availability(self, resource_group): - response = await self.client.managed_private_endpoints.check_name_availability( - resource_group_name=resource_group.name, - cluster_name="str", - resource_name={"name": "str", "type": "Microsoft.Kusto/clusters/managedPrivateEndpoints"}, - api_version="2024-04-13", - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_managed_private_endpoints_list(self, resource_group): - response = self.client.managed_private_endpoints.list( - resource_group_name=resource_group.name, - cluster_name="str", - api_version="2024-04-13", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_managed_private_endpoints_get(self, resource_group): @@ -51,7 +26,6 @@ async def test_managed_private_endpoints_get(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", managed_private_endpoint_name="str", - api_version="2024-04-13", ) # please add some check logic here by yourself @@ -66,13 +40,15 @@ async def test_managed_private_endpoints_begin_create_or_update(self, resource_g cluster_name="str", managed_private_endpoint_name="str", parameters={ - "groupId": "str", "id": "str", "name": "str", - "privateLinkResourceId": "str", - "privateLinkResourceRegion": "str", - "provisioningState": "str", - "requestMessage": "str", + "properties": { + "groupId": "str", + "privateLinkResourceId": "str", + "privateLinkResourceRegion": "str", + "provisioningState": "str", + "requestMessage": "str", + }, "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -83,7 +59,6 @@ async def test_managed_private_endpoints_begin_create_or_update(self, resource_g }, "type": "str", }, - api_version="2024-04-13", ) ).result() # call '.result()' to poll until service return final result @@ -99,13 +74,15 @@ async def test_managed_private_endpoints_begin_update(self, resource_group): cluster_name="str", managed_private_endpoint_name="str", parameters={ - "groupId": "str", "id": "str", "name": "str", - "privateLinkResourceId": "str", - "privateLinkResourceRegion": "str", - "provisioningState": "str", - "requestMessage": "str", + "properties": { + "groupId": "str", + "privateLinkResourceId": "str", + "privateLinkResourceRegion": "str", + "provisioningState": "str", + "requestMessage": "str", + }, "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -116,7 +93,6 @@ async def test_managed_private_endpoints_begin_update(self, resource_group): }, "type": "str", }, - api_version="2024-04-13", ) ).result() # call '.result()' to poll until service return final result @@ -131,9 +107,31 @@ async def test_managed_private_endpoints_begin_delete(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", managed_private_endpoint_name="str", - api_version="2024-04-13", ) ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_managed_private_endpoints_list(self, resource_group): + response = self.client.managed_private_endpoints.list( + resource_group_name=resource_group.name, + cluster_name="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_managed_private_endpoints_check_name_availability(self, resource_group): + response = await self.client.managed_private_endpoints.check_name_availability( + resource_group_name=resource_group.name, + cluster_name="str", + resource_name={"name": "str", "type": "Microsoft.Kusto/clusters/managedPrivateEndpoints"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_operations.py b/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_operations.py index 39da833535f5..0b1faa25951b 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_operations.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,9 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_operations_list(self, resource_group): - response = self.client.operations.list( - api_version="2024-04-13", - ) + response = self.client.operations.list() result = [r for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_operations_async.py b/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_operations_async.py index 4fd02055b126..6fb60023462d 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_operations_async.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -22,9 +22,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_operations_list(self, resource_group): - response = self.client.operations.list( - api_version="2024-04-13", - ) + response = self.client.operations.list() result = [r async for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_operations_results_location_operations.py b/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_operations_results_location_operations.py index 44cf8ba088b5..7c0ec583de5e 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_operations_results_location_operations.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_operations_results_location_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -24,7 +24,7 @@ def test_operations_results_location_get(self, resource_group): response = self.client.operations_results_location.get( location="str", operation_id="str", - api_version="2024-04-13", + operation_result_response_type="Location", ) # please add some check logic here by yourself diff --git a/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_operations_results_location_operations_async.py b/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_operations_results_location_operations_async.py index 7cfeaf14ce39..f4215f0c24a9 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_operations_results_location_operations_async.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_operations_results_location_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -25,7 +25,7 @@ async def test_operations_results_location_get(self, resource_group): response = await self.client.operations_results_location.get( location="str", operation_id="str", - api_version="2024-04-13", + operation_result_response_type="Location", ) # please add some check logic here by yourself diff --git a/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_operations_results_operations.py b/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_operations_results_operations.py index 522cdeea137f..d3a71c283e17 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_operations_results_operations.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_operations_results_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -24,7 +24,6 @@ def test_operations_results_get(self, resource_group): response = self.client.operations_results.get( location="str", operation_id="str", - api_version="2024-04-13", ) # please add some check logic here by yourself diff --git a/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_operations_results_operations_async.py b/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_operations_results_operations_async.py index be45f1b6c98a..e9b3dc721e52 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_operations_results_operations_async.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_operations_results_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -25,7 +25,6 @@ async def test_operations_results_get(self, resource_group): response = await self.client.operations_results.get( location="str", operation_id="str", - api_version="2024-04-13", ) # please add some check logic here by yourself diff --git a/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_private_endpoint_connections_operations.py b/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_private_endpoint_connections_operations.py index 2169ae5babc4..0f46c3a16e9c 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_private_endpoint_connections_operations.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_private_endpoint_connections_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -18,18 +18,6 @@ class TestKustoManagementPrivateEndpointConnectionsOperations(AzureMgmtRecordedT def setup_method(self, method): self.client = self.create_mgmt_client(KustoManagementClient) - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_private_endpoint_connections_list(self, resource_group): - response = self.client.private_endpoint_connections.list( - resource_group_name=resource_group.name, - cluster_name="str", - api_version="2024-04-13", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_private_endpoint_connections_get(self, resource_group): @@ -37,7 +25,6 @@ def test_private_endpoint_connections_get(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", private_endpoint_connection_name="str", - api_version="2024-04-13", ) # please add some check logic here by yourself @@ -51,12 +38,18 @@ def test_private_endpoint_connections_begin_create_or_update(self, resource_grou cluster_name="str", private_endpoint_connection_name="str", parameters={ - "groupId": "str", "id": "str", "name": "str", - "privateEndpoint": {"id": "str"}, - "privateLinkServiceConnectionState": {"actionsRequired": "str", "description": "str", "status": "str"}, - "provisioningState": "str", + "properties": { + "privateLinkServiceConnectionState": { + "actionsRequired": "str", + "description": "str", + "status": "str", + }, + "groupId": "str", + "privateEndpoint": {"id": "str"}, + "provisioningState": "str", + }, "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -67,7 +60,6 @@ def test_private_endpoint_connections_begin_create_or_update(self, resource_grou }, "type": "str", }, - api_version="2024-04-13", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -80,8 +72,18 @@ def test_private_endpoint_connections_begin_delete(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", private_endpoint_connection_name="str", - api_version="2024-04-13", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_private_endpoint_connections_list(self, resource_group): + response = self.client.private_endpoint_connections.list( + resource_group_name=resource_group.name, + cluster_name="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_private_endpoint_connections_operations_async.py b/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_private_endpoint_connections_operations_async.py index e8b7ad11bd7e..ddaf0445cf00 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_private_endpoint_connections_operations_async.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_private_endpoint_connections_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -19,18 +19,6 @@ class TestKustoManagementPrivateEndpointConnectionsOperationsAsync(AzureMgmtReco def setup_method(self, method): self.client = self.create_mgmt_client(KustoManagementClient, is_async=True) - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_private_endpoint_connections_list(self, resource_group): - response = self.client.private_endpoint_connections.list( - resource_group_name=resource_group.name, - cluster_name="str", - api_version="2024-04-13", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_private_endpoint_connections_get(self, resource_group): @@ -38,7 +26,6 @@ async def test_private_endpoint_connections_get(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", private_endpoint_connection_name="str", - api_version="2024-04-13", ) # please add some check logic here by yourself @@ -53,16 +40,18 @@ async def test_private_endpoint_connections_begin_create_or_update(self, resourc cluster_name="str", private_endpoint_connection_name="str", parameters={ - "groupId": "str", "id": "str", "name": "str", - "privateEndpoint": {"id": "str"}, - "privateLinkServiceConnectionState": { - "actionsRequired": "str", - "description": "str", - "status": "str", + "properties": { + "privateLinkServiceConnectionState": { + "actionsRequired": "str", + "description": "str", + "status": "str", + }, + "groupId": "str", + "privateEndpoint": {"id": "str"}, + "provisioningState": "str", }, - "provisioningState": "str", "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -73,7 +62,6 @@ async def test_private_endpoint_connections_begin_create_or_update(self, resourc }, "type": "str", }, - api_version="2024-04-13", ) ).result() # call '.result()' to poll until service return final result @@ -88,9 +76,19 @@ async def test_private_endpoint_connections_begin_delete(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", private_endpoint_connection_name="str", - api_version="2024-04-13", ) ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_private_endpoint_connections_list(self, resource_group): + response = self.client.private_endpoint_connections.list( + resource_group_name=resource_group.name, + cluster_name="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_private_link_resources_operations.py b/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_private_link_resources_operations.py index 77cc01a39cbc..516a555dfc25 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_private_link_resources_operations.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_private_link_resources_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -20,25 +20,23 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_private_link_resources_list(self, resource_group): - response = self.client.private_link_resources.list( + def test_private_link_resources_get(self, resource_group): + response = self.client.private_link_resources.get( resource_group_name=resource_group.name, cluster_name="str", - api_version="2024-04-13", + private_link_resource_name="str", ) - result = [r for r in response] + # please add some check logic here by yourself # ... @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_private_link_resources_get(self, resource_group): - response = self.client.private_link_resources.get( + def test_private_link_resources_list(self, resource_group): + response = self.client.private_link_resources.list( resource_group_name=resource_group.name, cluster_name="str", - private_link_resource_name="str", - api_version="2024-04-13", ) - + result = [r for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_private_link_resources_operations_async.py b/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_private_link_resources_operations_async.py index 90cde125aa34..7e9fcd2716c7 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_private_link_resources_operations_async.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_private_link_resources_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -21,25 +21,23 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_private_link_resources_list(self, resource_group): - response = self.client.private_link_resources.list( + async def test_private_link_resources_get(self, resource_group): + response = await self.client.private_link_resources.get( resource_group_name=resource_group.name, cluster_name="str", - api_version="2024-04-13", + private_link_resource_name="str", ) - result = [r async for r in response] + # please add some check logic here by yourself # ... @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_private_link_resources_get(self, resource_group): - response = await self.client.private_link_resources.get( + async def test_private_link_resources_list(self, resource_group): + response = self.client.private_link_resources.list( resource_group_name=resource_group.name, cluster_name="str", - private_link_resource_name="str", - api_version="2024-04-13", ) - + result = [r async for r in response] # please add some check logic here by yourself # ... diff --git a/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_sandbox_custom_images_operations.py b/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_sandbox_custom_images_operations.py index 6e575beccffb..272e67c79e7c 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_sandbox_custom_images_operations.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_sandbox_custom_images_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -18,18 +18,6 @@ class TestKustoManagementSandboxCustomImagesOperations(AzureMgmtRecordedTestCase def setup_method(self, method): self.client = self.create_mgmt_client(KustoManagementClient) - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_sandbox_custom_images_list_by_cluster(self, resource_group): - response = self.client.sandbox_custom_images.list_by_cluster( - resource_group_name=resource_group.name, - cluster_name="str", - api_version="2024-04-13", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_sandbox_custom_images_get(self, resource_group): @@ -37,7 +25,6 @@ def test_sandbox_custom_images_get(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", sandbox_custom_image_name="str", - api_version="2024-04-13", ) # please add some check logic here by yourself @@ -51,16 +38,25 @@ def test_sandbox_custom_images_begin_create_or_update(self, resource_group): cluster_name="str", sandbox_custom_image_name="str", parameters={ - "baseImageName": "str", "id": "str", - "language": "str", - "languageVersion": "str", "name": "str", - "provisioningState": "str", - "requirementsFileContent": "str", + "properties": { + "language": "str", + "baseImageName": "str", + "languageVersion": "str", + "provisioningState": "str", + "requirementsFileContent": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", }, - api_version="2024-04-13", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -74,16 +70,25 @@ def test_sandbox_custom_images_begin_update(self, resource_group): cluster_name="str", sandbox_custom_image_name="str", parameters={ - "baseImageName": "str", "id": "str", - "language": "str", - "languageVersion": "str", "name": "str", - "provisioningState": "str", - "requirementsFileContent": "str", + "properties": { + "language": "str", + "baseImageName": "str", + "languageVersion": "str", + "provisioningState": "str", + "requirementsFileContent": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", }, - api_version="2024-04-13", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -96,12 +101,22 @@ def test_sandbox_custom_images_begin_delete(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", sandbox_custom_image_name="str", - api_version="2024-04-13", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_sandbox_custom_images_list_by_cluster(self, resource_group): + response = self.client.sandbox_custom_images.list_by_cluster( + resource_group_name=resource_group.name, + cluster_name="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_sandbox_custom_images_check_name_availability(self, resource_group): @@ -109,7 +124,6 @@ def test_sandbox_custom_images_check_name_availability(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", resource_name={"name": "str", "type": "Microsoft.Kusto/clusters/sandboxCustomImages"}, - api_version="2024-04-13", ) # please add some check logic here by yourself diff --git a/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_sandbox_custom_images_operations_async.py b/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_sandbox_custom_images_operations_async.py index 4eb0e613f915..14962d0dd4cf 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_sandbox_custom_images_operations_async.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_sandbox_custom_images_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -19,18 +19,6 @@ class TestKustoManagementSandboxCustomImagesOperationsAsync(AzureMgmtRecordedTes def setup_method(self, method): self.client = self.create_mgmt_client(KustoManagementClient, is_async=True) - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_sandbox_custom_images_list_by_cluster(self, resource_group): - response = self.client.sandbox_custom_images.list_by_cluster( - resource_group_name=resource_group.name, - cluster_name="str", - api_version="2024-04-13", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_sandbox_custom_images_get(self, resource_group): @@ -38,7 +26,6 @@ async def test_sandbox_custom_images_get(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", sandbox_custom_image_name="str", - api_version="2024-04-13", ) # please add some check logic here by yourself @@ -53,16 +40,25 @@ async def test_sandbox_custom_images_begin_create_or_update(self, resource_group cluster_name="str", sandbox_custom_image_name="str", parameters={ - "baseImageName": "str", "id": "str", - "language": "str", - "languageVersion": "str", "name": "str", - "provisioningState": "str", - "requirementsFileContent": "str", + "properties": { + "language": "str", + "baseImageName": "str", + "languageVersion": "str", + "provisioningState": "str", + "requirementsFileContent": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", }, - api_version="2024-04-13", ) ).result() # call '.result()' to poll until service return final result @@ -78,16 +74,25 @@ async def test_sandbox_custom_images_begin_update(self, resource_group): cluster_name="str", sandbox_custom_image_name="str", parameters={ - "baseImageName": "str", "id": "str", - "language": "str", - "languageVersion": "str", "name": "str", - "provisioningState": "str", - "requirementsFileContent": "str", + "properties": { + "language": "str", + "baseImageName": "str", + "languageVersion": "str", + "provisioningState": "str", + "requirementsFileContent": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", }, - api_version="2024-04-13", ) ).result() # call '.result()' to poll until service return final result @@ -102,13 +107,23 @@ async def test_sandbox_custom_images_begin_delete(self, resource_group): resource_group_name=resource_group.name, cluster_name="str", sandbox_custom_image_name="str", - api_version="2024-04-13", ) ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_sandbox_custom_images_list_by_cluster(self, resource_group): + response = self.client.sandbox_custom_images.list_by_cluster( + resource_group_name=resource_group.name, + cluster_name="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_sandbox_custom_images_check_name_availability(self, resource_group): @@ -116,7 +131,6 @@ async def test_sandbox_custom_images_check_name_availability(self, resource_grou resource_group_name=resource_group.name, cluster_name="str", resource_name={"name": "str", "type": "Microsoft.Kusto/clusters/sandboxCustomImages"}, - api_version="2024-04-13", ) # please add some check logic here by yourself diff --git a/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_scripts_operations.py b/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_scripts_operations.py index 656a6be42c35..4307abffe13c 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_scripts_operations.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_scripts_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -18,19 +18,6 @@ class TestKustoManagementScriptsOperations(AzureMgmtRecordedTestCase): def setup_method(self, method): self.client = self.create_mgmt_client(KustoManagementClient) - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_scripts_list_by_database(self, resource_group): - response = self.client.scripts.list_by_database( - resource_group_name=resource_group.name, - cluster_name="str", - database_name="str", - api_version="2024-04-13", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_scripts_get(self, resource_group): @@ -39,7 +26,6 @@ def test_scripts_get(self, resource_group): cluster_name="str", database_name="str", script_name="str", - api_version="2024-04-13", ) # please add some check logic here by yourself @@ -54,16 +40,19 @@ def test_scripts_begin_create_or_update(self, resource_group): database_name="str", script_name="str", parameters={ - "continueOnErrors": False, - "forceUpdateTag": "str", "id": "str", "name": "str", - "principalPermissionsAction": "str", - "provisioningState": "str", - "scriptContent": "str", - "scriptLevel": "str", - "scriptUrl": "str", - "scriptUrlSasToken": "str", + "properties": { + "continueOnErrors": bool, + "forceUpdateTag": "str", + "managedIdentityResourceId": "str", + "principalPermissionsAction": "str", + "provisioningState": "str", + "scriptContent": "str", + "scriptLevel": "str", + "scriptUrl": "str", + "scriptUrlSasToken": "str", + }, "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -74,7 +63,6 @@ def test_scripts_begin_create_or_update(self, resource_group): }, "type": "str", }, - api_version="2024-04-13", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -89,16 +77,19 @@ def test_scripts_begin_update(self, resource_group): database_name="str", script_name="str", parameters={ - "continueOnErrors": False, - "forceUpdateTag": "str", "id": "str", "name": "str", - "principalPermissionsAction": "str", - "provisioningState": "str", - "scriptContent": "str", - "scriptLevel": "str", - "scriptUrl": "str", - "scriptUrlSasToken": "str", + "properties": { + "continueOnErrors": bool, + "forceUpdateTag": "str", + "managedIdentityResourceId": "str", + "principalPermissionsAction": "str", + "provisioningState": "str", + "scriptContent": "str", + "scriptLevel": "str", + "scriptUrl": "str", + "scriptUrlSasToken": "str", + }, "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -109,7 +100,6 @@ def test_scripts_begin_update(self, resource_group): }, "type": "str", }, - api_version="2024-04-13", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -123,12 +113,23 @@ def test_scripts_begin_delete(self, resource_group): cluster_name="str", database_name="str", script_name="str", - api_version="2024-04-13", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_scripts_list_by_database(self, resource_group): + response = self.client.scripts.list_by_database( + resource_group_name=resource_group.name, + cluster_name="str", + database_name="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_scripts_check_name_availability(self, resource_group): @@ -137,7 +138,6 @@ def test_scripts_check_name_availability(self, resource_group): cluster_name="str", database_name="str", script_name={"name": "str", "type": "Microsoft.Kusto/clusters/databases/scripts"}, - api_version="2024-04-13", ) # please add some check logic here by yourself diff --git a/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_scripts_operations_async.py b/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_scripts_operations_async.py index 125ef4520537..8b73e86a1d6c 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_scripts_operations_async.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_scripts_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -19,19 +19,6 @@ class TestKustoManagementScriptsOperationsAsync(AzureMgmtRecordedTestCase): def setup_method(self, method): self.client = self.create_mgmt_client(KustoManagementClient, is_async=True) - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_scripts_list_by_database(self, resource_group): - response = self.client.scripts.list_by_database( - resource_group_name=resource_group.name, - cluster_name="str", - database_name="str", - api_version="2024-04-13", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_scripts_get(self, resource_group): @@ -40,7 +27,6 @@ async def test_scripts_get(self, resource_group): cluster_name="str", database_name="str", script_name="str", - api_version="2024-04-13", ) # please add some check logic here by yourself @@ -56,16 +42,19 @@ async def test_scripts_begin_create_or_update(self, resource_group): database_name="str", script_name="str", parameters={ - "continueOnErrors": False, - "forceUpdateTag": "str", "id": "str", "name": "str", - "principalPermissionsAction": "str", - "provisioningState": "str", - "scriptContent": "str", - "scriptLevel": "str", - "scriptUrl": "str", - "scriptUrlSasToken": "str", + "properties": { + "continueOnErrors": bool, + "forceUpdateTag": "str", + "managedIdentityResourceId": "str", + "principalPermissionsAction": "str", + "provisioningState": "str", + "scriptContent": "str", + "scriptLevel": "str", + "scriptUrl": "str", + "scriptUrlSasToken": "str", + }, "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -76,7 +65,6 @@ async def test_scripts_begin_create_or_update(self, resource_group): }, "type": "str", }, - api_version="2024-04-13", ) ).result() # call '.result()' to poll until service return final result @@ -93,16 +81,19 @@ async def test_scripts_begin_update(self, resource_group): database_name="str", script_name="str", parameters={ - "continueOnErrors": False, - "forceUpdateTag": "str", "id": "str", "name": "str", - "principalPermissionsAction": "str", - "provisioningState": "str", - "scriptContent": "str", - "scriptLevel": "str", - "scriptUrl": "str", - "scriptUrlSasToken": "str", + "properties": { + "continueOnErrors": bool, + "forceUpdateTag": "str", + "managedIdentityResourceId": "str", + "principalPermissionsAction": "str", + "provisioningState": "str", + "scriptContent": "str", + "scriptLevel": "str", + "scriptUrl": "str", + "scriptUrlSasToken": "str", + }, "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -113,7 +104,6 @@ async def test_scripts_begin_update(self, resource_group): }, "type": "str", }, - api_version="2024-04-13", ) ).result() # call '.result()' to poll until service return final result @@ -129,13 +119,24 @@ async def test_scripts_begin_delete(self, resource_group): cluster_name="str", database_name="str", script_name="str", - api_version="2024-04-13", ) ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_scripts_list_by_database(self, resource_group): + response = self.client.scripts.list_by_database( + resource_group_name=resource_group.name, + cluster_name="str", + database_name="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_scripts_check_name_availability(self, resource_group): @@ -144,7 +145,6 @@ async def test_scripts_check_name_availability(self, resource_group): cluster_name="str", database_name="str", script_name={"name": "str", "type": "Microsoft.Kusto/clusters/databases/scripts"}, - api_version="2024-04-13", ) # please add some check logic here by yourself diff --git a/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_skus_operations.py b/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_skus_operations.py index 0a7208c3eda6..25c0ff30e5b0 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_skus_operations.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_skus_operations.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -23,7 +23,6 @@ def setup_method(self, method): def test_skus_list(self, resource_group): response = self.client.skus.list( location="str", - api_version="2024-04-13", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_skus_operations_async.py b/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_skus_operations_async.py index 21afee5fff7c..38c7f3c34da4 100644 --- a/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_skus_operations_async.py +++ b/sdk/kusto/azure-mgmt-kusto/generated_tests/test_kusto_management_skus_operations_async.py @@ -2,7 +2,7 @@ # -------------------------------------------------------------------------- # 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. +# Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest @@ -24,7 +24,6 @@ def setup_method(self, method): async def test_skus_list(self, resource_group): response = self.client.skus.list( location="str", - api_version="2024-04-13", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/kusto/azure-mgmt-kusto/pyproject.toml b/sdk/kusto/azure-mgmt-kusto/pyproject.toml index 540da07d41af..15ac2c38d89a 100644 --- a/sdk/kusto/azure-mgmt-kusto/pyproject.toml +++ b/sdk/kusto/azure-mgmt-kusto/pyproject.toml @@ -1,6 +1,87 @@ +[build-system] +requires = [ + "setuptools>=77.0.3", + "wheel", +] +build-backend = "setuptools.build_meta" + +[project] +name = "azure-mgmt-kusto" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Azure Kusto Management Client Library for Python" +license = "MIT" +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", +] +requires-python = ">=3.10" +keywords = [ + "azure", + "azure sdk", +] +dependencies = [ + "isodate>=0.6.1", + "azure-mgmt-core>=1.6.0", + "typing-extensions>=4.6.0", +] +dynamic = [ + "version", + "readme", +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python" + +[tool.setuptools.dynamic.version] +attr = "azure.mgmt.kusto._version.VERSION" + +[tool.setuptools.dynamic.readme] +file = [ + "README.md", + "CHANGELOG.md", +] +content-type = "text/markdown" + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "generated_tests*", + "samples*", + "generated_samples*", + "doc*", + "azure", + "azure.mgmt", +] + +[tool.setuptools.package-data] +pytyped = [ + "py.typed", +] + [tool.azure-sdk-build] breaking = false mypy = false pyright = false type_check_samples = false verifytypes = false + +[packaging] +package_name = "azure-mgmt-kusto" +package_pprint_name = "Kusto Management" +package_doc_id = "" +is_stable = true +is_arm = true +title = "KustoManagementClient" +package_nspkg = "azure-mgmt-nspkg" +need_msrestazure = false +need_azuremgmtcore = true +sample_link = "" +exclude_folders = "" diff --git a/sdk/kusto/azure-mgmt-kusto/sdk_packaging.toml b/sdk/kusto/azure-mgmt-kusto/sdk_packaging.toml deleted file mode 100644 index b83776f978e9..000000000000 --- a/sdk/kusto/azure-mgmt-kusto/sdk_packaging.toml +++ /dev/null @@ -1,7 +0,0 @@ -[packaging] -package_name = "azure-mgmt-kusto" -package_pprint_name = "Kusto Management" -package_doc_id = "" -is_stable = true -is_arm = true -title = "KustoManagementClient" diff --git a/sdk/kusto/azure-mgmt-kusto/setup.py b/sdk/kusto/azure-mgmt-kusto/setup.py deleted file mode 100644 index 8cb66a3f57c9..000000000000 --- a/sdk/kusto/azure-mgmt-kusto/setup.py +++ /dev/null @@ -1,83 +0,0 @@ -#!/usr/bin/env python - -# ------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -------------------------------------------------------------------------- - -import re -import os.path -from io import open -from setuptools import find_packages, setup - -# Change the PACKAGE_NAME only to change folder and different name -PACKAGE_NAME = "azure-mgmt-kusto" -PACKAGE_PPRINT_NAME = "Kusto Management" - -# a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace("-", "/") -# a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace("-", ".") - -# Version extraction inspired from 'requests' -with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), - "r", -) as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - -with open("README.md", encoding="utf-8") as f: - readme = f.read() -with open("CHANGELOG.md", encoding="utf-8") as f: - changelog = f.read() - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=readme + "\n\n" + changelog, - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python", - keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product - classifiers=[ - "Development Status :: 5 - Production/Stable", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "azure", - "azure.mgmt", - ] - ), - include_package_data=True, - package_data={ - "pytyped": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "typing-extensions>=4.6.0", - "azure-common>=1.1", - "azure-mgmt-core>=1.3.2", - ], - python_requires=">=3.8", -) diff --git a/sdk/kusto/azure-mgmt-kusto/tests/disable_test_cli_mgmt_kusto.py b/sdk/kusto/azure-mgmt-kusto/tests/disable_test_cli_mgmt_kusto.py index 3058a9e29633..901b1e93255a 100644 --- a/sdk/kusto/azure-mgmt-kusto/tests/disable_test_cli_mgmt_kusto.py +++ b/sdk/kusto/azure-mgmt-kusto/tests/disable_test_cli_mgmt_kusto.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding: utf-8 # ------------------------------------------------------------------------- diff --git a/sdk/kusto/azure-mgmt-kusto/tsp-location.yaml b/sdk/kusto/azure-mgmt-kusto/tsp-location.yaml new file mode 100644 index 000000000000..70055d66bc31 --- /dev/null +++ b/sdk/kusto/azure-mgmt-kusto/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/azure-kusto/resource-manager/Microsoft.Kusto/Kusto +commit: 7089f3d2a4ed7e765d66f5f5e3be0b8b1eed6c1a +repo: Azure/azure-rest-api-specs +additionalDirectories: