From d81fd65a141924e2bf7ba07977b6c37ea42a642a Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 29 Aug 2023 12:46:21 +0000 Subject: [PATCH] CodeGen from PR 25434 in Azure/azure-rest-api-specs Merge 6b5357bc5a3756928751c99b20acb7aa91daa1d0 into 0762e82bcccef4a032e29dda5e4c07fd7cc822a6 --- ...re.ResourceManager.Kusto.netstandard2.0.cs | 110 +++- .../src/Generated/ArmKustoModelFactory.cs | 21 +- .../Generated/Extensions/KustoExtensions.cs | 19 + .../src/Generated/KustoClusterResource.cs | 126 ++++ .../SandboxCustomImageOperationSource.cs | 40 ++ .../Models/EndpointDetail.Serialization.cs | 13 +- .../src/Generated/Models/EndpointDetail.cs | 6 +- .../Models/KustoClusterPatch.Serialization.cs | 27 +- .../src/Generated/Models/KustoClusterPatch.cs | 7 +- ...rtualNetworkConfiguration.Serialization.cs | 17 +- ...KustoClusterVirtualNetworkConfiguration.cs | 15 + .../KustoLanguageExtension.Serialization.cs | 13 +- .../Models/KustoLanguageExtension.cs | 6 +- .../Models/KustoLanguageExtensionImageName.cs | 6 + .../src/Generated/Models/Language.cs | 48 ++ .../SandboxCustomImageData.Serialization.cs | 125 ++++ .../Models/SandboxCustomImageType.cs | 48 ++ ...tomImagesCheckNameContent.Serialization.cs | 25 + .../SandboxCustomImagesCheckNameContent.cs | 32 ++ ...boxCustomImagesListResult.Serialization.cs | 50 ++ .../Models/SandboxCustomImagesListResult.cs | 37 ++ .../src/Generated/Models/VnetState.cs | 51 ++ ...hedDatabaseConfigurationsRestOperations.cs | 2 +- ...usterPrincipalAssignmentsRestOperations.cs | 2 +- .../RestOperations/ClustersRestOperations.cs | 2 +- .../DataConnectionsRestOperations.cs | 2 +- ...abasePrincipalAssignmentsRestOperations.cs | 2 +- .../RestOperations/DatabaseRestOperations.cs | 2 +- .../RestOperations/DatabasesRestOperations.cs | 2 +- .../ManagedPrivateEndpointsRestOperations.cs | 2 +- ...rivateEndpointConnectionsRestOperations.cs | 2 +- .../PrivateLinkResourcesRestOperations.cs | 2 +- .../SandboxCustomImagesRestOperations.cs | 542 ++++++++++++++++++ .../RestOperations/ScriptsRestOperations.cs | 2 +- .../RestOperations/SkusRestOperations.cs | 2 +- .../Generated/SandboxCustomImageCollection.cs | 338 +++++++++++ .../src/Generated/SandboxCustomImageData.cs | 51 ++ .../Generated/SandboxCustomImageResource.cs | 297 ++++++++++ .../src/autorest.md | 2 +- 39 files changed, 2073 insertions(+), 23 deletions(-) create mode 100644 sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/LongRunningOperation/SandboxCustomImageOperationSource.cs create mode 100644 sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/Language.cs create mode 100644 sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/SandboxCustomImageData.Serialization.cs create mode 100644 sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/SandboxCustomImageType.cs create mode 100644 sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/SandboxCustomImagesCheckNameContent.Serialization.cs create mode 100644 sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/SandboxCustomImagesCheckNameContent.cs create mode 100644 sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/SandboxCustomImagesListResult.Serialization.cs create mode 100644 sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/SandboxCustomImagesListResult.cs create mode 100644 sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/VnetState.cs create mode 100644 sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/RestOperations/SandboxCustomImagesRestOperations.cs create mode 100644 sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/SandboxCustomImageCollection.cs create mode 100644 sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/SandboxCustomImageData.cs create mode 100644 sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/SandboxCustomImageResource.cs diff --git a/sdk/kusto/Azure.ResourceManager.Kusto/api/Azure.ResourceManager.Kusto.netstandard2.0.cs b/sdk/kusto/Azure.ResourceManager.Kusto/api/Azure.ResourceManager.Kusto.netstandard2.0.cs index 82a30885c93d..7b8721fe93c2 100644 --- a/sdk/kusto/Azure.ResourceManager.Kusto/api/Azure.ResourceManager.Kusto.netstandard2.0.cs +++ b/sdk/kusto/Azure.ResourceManager.Kusto/api/Azure.ResourceManager.Kusto.netstandard2.0.cs @@ -152,6 +152,8 @@ protected KustoClusterResource() { } public virtual System.Threading.Tasks.Task> CheckKustoDatabaseNameAvailabilityAsync(Azure.ResourceManager.Kusto.Models.KustoDatabaseNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response CheckKustoManagedPrivateEndpointNameAvailability(Azure.ResourceManager.Kusto.Models.KustoManagedPrivateEndpointNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> CheckKustoManagedPrivateEndpointNameAvailabilityAsync(Azure.ResourceManager.Kusto.Models.KustoManagedPrivateEndpointNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response CheckNameAvailabilitySandboxCustomImage(Azure.ResourceManager.Kusto.Models.SandboxCustomImagesCheckNameContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CheckNameAvailabilitySandboxCustomImageAsync(Azure.ResourceManager.Kusto.Models.SandboxCustomImagesCheckNameContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string clusterName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -187,6 +189,9 @@ protected KustoClusterResource() { } public virtual Azure.AsyncPageable GetLanguageExtensionsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetOutboundNetworkDependenciesEndpoints(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetOutboundNetworkDependenciesEndpointsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetSandboxCustomImage(string sandboxCustomImageName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetSandboxCustomImageAsync(string sandboxCustomImageName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.Kusto.SandboxCustomImageCollection GetSandboxCustomImages() { throw null; } public virtual Azure.ResourceManager.ArmOperation Migrate(Azure.WaitUntil waitUntil, Azure.ResourceManager.Kusto.Models.ClusterMigrateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task MigrateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Kusto.Models.ClusterMigrateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation RemoveLanguageExtensions(Azure.WaitUntil waitUntil, Azure.ResourceManager.Kusto.Models.KustoLanguageExtensionList languageExtensionsToRemove, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -366,6 +371,7 @@ public static partial class KustoExtensions public static Azure.ResourceManager.Kusto.KustoPrivateEndpointConnectionResource GetKustoPrivateEndpointConnectionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.Kusto.KustoPrivateLinkResource GetKustoPrivateLinkResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.Kusto.KustoScriptResource GetKustoScriptResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.Kusto.SandboxCustomImageResource GetSandboxCustomImageResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Pageable GetSkus(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetSkusAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } @@ -513,6 +519,43 @@ protected KustoScriptResource() { } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.Kusto.KustoScriptData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Kusto.KustoScriptData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class SandboxCustomImageCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected SandboxCustomImageCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string sandboxCustomImageName, Azure.ResourceManager.Kusto.SandboxCustomImageData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string sandboxCustomImageName, Azure.ResourceManager.Kusto.SandboxCustomImageData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string sandboxCustomImageName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string sandboxCustomImageName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string sandboxCustomImageName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string sandboxCustomImageName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class SandboxCustomImageData : Azure.ResourceManager.Models.ResourceData + { + public SandboxCustomImageData() { } + public Azure.ResourceManager.Kusto.Models.Language? Language { get { throw null; } set { } } + public string LanguageVersion { get { throw null; } set { } } + public Azure.ResourceManager.Kusto.Models.KustoProvisioningState? ProvisioningState { get { throw null; } } + public string RequirementsFileContent { get { throw null; } set { } } + } + public partial class SandboxCustomImageResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected SandboxCustomImageResource() { } + public virtual Azure.ResourceManager.Kusto.SandboxCustomImageData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string clusterName, string sandboxCustomImageName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.Kusto.SandboxCustomImageData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Kusto.SandboxCustomImageData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } } namespace Azure.ResourceManager.Kusto.Models { @@ -531,7 +574,7 @@ public static partial class ArmKustoModelFactory public static Azure.ResourceManager.Kusto.Models.KustoAvailableSkuDetails KustoAvailableSkuDetails(string resourceType = null, Azure.ResourceManager.Kusto.Models.KustoSku sku = null, Azure.ResourceManager.Kusto.Models.KustoCapacity capacity = null) { throw null; } public static Azure.ResourceManager.Kusto.Models.KustoCapacity KustoCapacity(Azure.ResourceManager.Kusto.Models.KustoScaleType scaleType = default(Azure.ResourceManager.Kusto.Models.KustoScaleType), int minimum = 0, int maximum = 0, int @default = 0) { throw null; } public static Azure.ResourceManager.Kusto.KustoClusterData KustoClusterData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Kusto.Models.KustoSku sku = null, System.Collections.Generic.IEnumerable zones = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ETag? etag = default(Azure.ETag?), Azure.ResourceManager.Kusto.Models.KustoClusterState? state = default(Azure.ResourceManager.Kusto.Models.KustoClusterState?), Azure.ResourceManager.Kusto.Models.KustoProvisioningState? provisioningState = default(Azure.ResourceManager.Kusto.Models.KustoProvisioningState?), System.Uri clusterUri = null, System.Uri dataIngestionUri = null, string stateReason = null, System.Collections.Generic.IEnumerable trustedExternalTenants = null, Azure.ResourceManager.Kusto.Models.OptimizedAutoscale optimizedAutoscale = null, bool? isDiskEncryptionEnabled = default(bool?), bool? isStreamingIngestEnabled = default(bool?), Azure.ResourceManager.Kusto.Models.KustoClusterVirtualNetworkConfiguration virtualNetworkConfiguration = null, Azure.ResourceManager.Kusto.Models.KustoKeyVaultProperties keyVaultProperties = null, bool? isPurgeEnabled = default(bool?), System.Collections.Generic.IEnumerable languageExtensionsValue = null, bool? isDoubleEncryptionEnabled = default(bool?), Azure.ResourceManager.Kusto.Models.KustoClusterPublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.Kusto.Models.KustoClusterPublicNetworkAccess?), System.Collections.Generic.IEnumerable allowedIPRangeList = null, Azure.ResourceManager.Kusto.Models.KustoClusterEngineType? engineType = default(Azure.ResourceManager.Kusto.Models.KustoClusterEngineType?), System.Collections.Generic.IEnumerable acceptedAudiences = null, bool? isAutoStopEnabled = default(bool?), Azure.ResourceManager.Kusto.Models.KustoClusterNetworkAccessFlag? restrictOutboundNetworkAccess = default(Azure.ResourceManager.Kusto.Models.KustoClusterNetworkAccessFlag?), System.Collections.Generic.IEnumerable allowedFqdnList = null, Azure.ResourceManager.Kusto.Models.KustoClusterPublicIPType? publicIPType = default(Azure.ResourceManager.Kusto.Models.KustoClusterPublicIPType?), string virtualClusterGraduationProperties = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, Azure.ResourceManager.Kusto.Models.MigrationClusterProperties migrationCluster = null) { throw null; } - public static Azure.ResourceManager.Kusto.Models.KustoClusterPatch KustoClusterPatch(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Kusto.Models.KustoSku sku = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.Kusto.Models.KustoClusterState? state = default(Azure.ResourceManager.Kusto.Models.KustoClusterState?), Azure.ResourceManager.Kusto.Models.KustoProvisioningState? provisioningState = default(Azure.ResourceManager.Kusto.Models.KustoProvisioningState?), System.Uri uri = null, System.Uri dataIngestionUri = null, string stateReason = null, System.Collections.Generic.IEnumerable trustedExternalTenants = null, Azure.ResourceManager.Kusto.Models.OptimizedAutoscale optimizedAutoscale = null, bool? isDiskEncryptionEnabled = default(bool?), bool? isStreamingIngestEnabled = default(bool?), Azure.ResourceManager.Kusto.Models.KustoClusterVirtualNetworkConfiguration virtualNetworkConfiguration = null, Azure.ResourceManager.Kusto.Models.KustoKeyVaultProperties keyVaultProperties = null, bool? isPurgeEnabled = default(bool?), System.Collections.Generic.IEnumerable languageExtensionsValue = null, bool? isDoubleEncryptionEnabled = default(bool?), Azure.ResourceManager.Kusto.Models.KustoClusterPublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.Kusto.Models.KustoClusterPublicNetworkAccess?), System.Collections.Generic.IEnumerable allowedIPRangeList = null, Azure.ResourceManager.Kusto.Models.KustoClusterEngineType? engineType = default(Azure.ResourceManager.Kusto.Models.KustoClusterEngineType?), System.Collections.Generic.IEnumerable acceptedAudiences = null, bool? isAutoStopEnabled = default(bool?), Azure.ResourceManager.Kusto.Models.KustoClusterNetworkAccessFlag? restrictOutboundNetworkAccess = default(Azure.ResourceManager.Kusto.Models.KustoClusterNetworkAccessFlag?), System.Collections.Generic.IEnumerable allowedFqdnList = null, Azure.ResourceManager.Kusto.Models.KustoClusterPublicIPType? publicIPType = default(Azure.ResourceManager.Kusto.Models.KustoClusterPublicIPType?), string virtualClusterGraduationProperties = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, Azure.ResourceManager.Kusto.Models.MigrationClusterProperties migrationCluster = null) { throw null; } + public static Azure.ResourceManager.Kusto.Models.KustoClusterPatch KustoClusterPatch(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Kusto.Models.KustoSku sku = null, System.Collections.Generic.IEnumerable zones = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.Kusto.Models.KustoClusterState? state = default(Azure.ResourceManager.Kusto.Models.KustoClusterState?), Azure.ResourceManager.Kusto.Models.KustoProvisioningState? provisioningState = default(Azure.ResourceManager.Kusto.Models.KustoProvisioningState?), System.Uri uri = null, System.Uri dataIngestionUri = null, string stateReason = null, System.Collections.Generic.IEnumerable trustedExternalTenants = null, Azure.ResourceManager.Kusto.Models.OptimizedAutoscale optimizedAutoscale = null, bool? isDiskEncryptionEnabled = default(bool?), bool? isStreamingIngestEnabled = default(bool?), Azure.ResourceManager.Kusto.Models.KustoClusterVirtualNetworkConfiguration virtualNetworkConfiguration = null, Azure.ResourceManager.Kusto.Models.KustoKeyVaultProperties keyVaultProperties = null, bool? isPurgeEnabled = default(bool?), System.Collections.Generic.IEnumerable languageExtensionsValue = null, bool? isDoubleEncryptionEnabled = default(bool?), Azure.ResourceManager.Kusto.Models.KustoClusterPublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.Kusto.Models.KustoClusterPublicNetworkAccess?), System.Collections.Generic.IEnumerable allowedIPRangeList = null, Azure.ResourceManager.Kusto.Models.KustoClusterEngineType? engineType = default(Azure.ResourceManager.Kusto.Models.KustoClusterEngineType?), System.Collections.Generic.IEnumerable acceptedAudiences = null, bool? isAutoStopEnabled = default(bool?), Azure.ResourceManager.Kusto.Models.KustoClusterNetworkAccessFlag? restrictOutboundNetworkAccess = default(Azure.ResourceManager.Kusto.Models.KustoClusterNetworkAccessFlag?), System.Collections.Generic.IEnumerable allowedFqdnList = null, Azure.ResourceManager.Kusto.Models.KustoClusterPublicIPType? publicIPType = default(Azure.ResourceManager.Kusto.Models.KustoClusterPublicIPType?), string virtualClusterGraduationProperties = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, Azure.ResourceManager.Kusto.Models.MigrationClusterProperties migrationCluster = null) { throw null; } public static Azure.ResourceManager.Kusto.KustoClusterPrincipalAssignmentData KustoClusterPrincipalAssignmentData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string clusterPrincipalId = null, Azure.ResourceManager.Kusto.Models.KustoClusterPrincipalRole? role = default(Azure.ResourceManager.Kusto.Models.KustoClusterPrincipalRole?), System.Guid? tenantId = default(System.Guid?), Azure.ResourceManager.Kusto.Models.KustoPrincipalAssignmentType? principalType = default(Azure.ResourceManager.Kusto.Models.KustoPrincipalAssignmentType?), string tenantName = null, string principalName = null, Azure.ResourceManager.Kusto.Models.KustoProvisioningState? provisioningState = default(Azure.ResourceManager.Kusto.Models.KustoProvisioningState?), System.Guid? aadObjectId = default(System.Guid?)) { throw null; } public static Azure.ResourceManager.Kusto.Models.KustoCosmosDBDataConnection KustoCosmosDBDataConnection(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), string tableName = null, string mappingRuleName = null, Azure.Core.ResourceIdentifier managedIdentityResourceId = null, System.Guid? managedIdentityObjectId = default(System.Guid?), Azure.Core.ResourceIdentifier cosmosDBAccountResourceId = null, string cosmosDBDatabase = null, string cosmosDBContainer = null, System.DateTimeOffset? retrievalStartOn = default(System.DateTimeOffset?), Azure.ResourceManager.Kusto.Models.KustoProvisioningState? provisioningState = default(Azure.ResourceManager.Kusto.Models.KustoProvisioningState?)) { throw null; } public static Azure.ResourceManager.Kusto.KustoDatabaseData KustoDatabaseData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), string kind = "Unknown") { throw null; } @@ -556,6 +599,7 @@ public static partial class ArmKustoModelFactory public static Azure.ResourceManager.Kusto.Models.KustoSkuLocationInfoItem KustoSkuLocationInfoItem(Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), System.Collections.Generic.IEnumerable zones = null, System.Collections.Generic.IEnumerable zoneDetails = null) { throw null; } public static Azure.ResourceManager.Kusto.Models.MigrationClusterProperties MigrationClusterProperties(string id = null, System.Uri uri = null, System.Uri dataIngestionUri = null, Azure.ResourceManager.Kusto.Models.MigrationClusterRole? role = default(Azure.ResourceManager.Kusto.Models.MigrationClusterRole?)) { throw null; } public static Azure.ResourceManager.Kusto.Models.OutboundNetworkDependenciesEndpoint OutboundNetworkDependenciesEndpoint(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ETag? etag = default(Azure.ETag?), string category = null, System.Collections.Generic.IEnumerable endpoints = null, Azure.ResourceManager.Kusto.Models.KustoProvisioningState? provisioningState = default(Azure.ResourceManager.Kusto.Models.KustoProvisioningState?)) { throw null; } + public static Azure.ResourceManager.Kusto.SandboxCustomImageData SandboxCustomImageData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Kusto.Models.Language? language = default(Azure.ResourceManager.Kusto.Models.Language?), string languageVersion = null, string requirementsFileContent = null, Azure.ResourceManager.Kusto.Models.KustoProvisioningState? provisioningState = default(Azure.ResourceManager.Kusto.Models.KustoProvisioningState?)) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct AttachedDatabaseType : System.IEquatable @@ -643,6 +687,7 @@ public EndpointDependency() { } public partial class EndpointDetail { public EndpointDetail() { } + public string IPAddress { get { throw null; } set { } } public int? Port { get { throw null; } set { } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] @@ -756,6 +801,7 @@ public KustoClusterPatch(Azure.Core.AzureLocation location) : base (default(Azur public System.Uri Uri { get { throw null; } } public string VirtualClusterGraduationProperties { get { throw null; } set { } } public Azure.ResourceManager.Kusto.Models.KustoClusterVirtualNetworkConfiguration VirtualNetworkConfiguration { get { throw null; } set { } } + public System.Collections.Generic.IList Zones { get { throw null; } } } public partial class KustoClusterPrincipalAssignmentNameAvailabilityContent { @@ -887,6 +933,7 @@ public partial class KustoClusterVirtualNetworkConfiguration public KustoClusterVirtualNetworkConfiguration(string subnetId, string enginePublicIPId, string dataManagementPublicIPId) { } public string DataManagementPublicIPId { get { throw null; } set { } } public string EnginePublicIPId { get { throw null; } set { } } + public Azure.ResourceManager.Kusto.Models.VnetState? State { get { throw null; } set { } } public string SubnetId { get { throw null; } set { } } } public partial class KustoCosmosDBDataConnection : Azure.ResourceManager.Kusto.KustoDataConnectionData @@ -1279,6 +1326,7 @@ public KustoKeyVaultProperties() { } public partial class KustoLanguageExtension { public KustoLanguageExtension() { } + public string LanguageExtensionCustomImageName { get { throw null; } set { } } public Azure.ResourceManager.Kusto.Models.KustoLanguageExtensionImageName? LanguageExtensionImageName { get { throw null; } set { } } public Azure.ResourceManager.Kusto.Models.KustoLanguageExtensionName? LanguageExtensionName { get { throw null; } set { } } } @@ -1288,12 +1336,14 @@ public KustoLanguageExtension() { } private readonly object _dummy; private readonly int _dummyPrimitive; public KustoLanguageExtensionImageName(string value) { throw null; } + public static Azure.ResourceManager.Kusto.Models.KustoLanguageExtensionImageName Python3108DL { get { throw null; } } public static Azure.ResourceManager.Kusto.Models.KustoLanguageExtensionImageName Python3_10_8 { get { throw null; } } public static Azure.ResourceManager.Kusto.Models.KustoLanguageExtensionImageName Python3_6_5 { get { throw null; } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.Kusto.Models.KustoLanguageExtensionImageName Python3_9_12 { get { throw null; } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.Kusto.Models.KustoLanguageExtensionImageName Python3_9_12IncludeDeepLearning { get { throw null; } } + public static Azure.ResourceManager.Kusto.Models.KustoLanguageExtensionImageName PythonCustomImage { get { throw null; } } public static Azure.ResourceManager.Kusto.Models.KustoLanguageExtensionImageName R { get { throw null; } } public bool Equals(Azure.ResourceManager.Kusto.Models.KustoLanguageExtensionImageName other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] @@ -1628,6 +1678,23 @@ internal KustoSkuLocationInfoItem() { } public static bool operator !=(Azure.ResourceManager.Kusto.Models.KustoSkuTier left, Azure.ResourceManager.Kusto.Models.KustoSkuTier right) { throw null; } public override string ToString() { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct Language : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public Language(string value) { throw null; } + public static Azure.ResourceManager.Kusto.Models.Language Python { get { throw null; } } + public bool Equals(Azure.ResourceManager.Kusto.Models.Language other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.Kusto.Models.Language left, Azure.ResourceManager.Kusto.Models.Language right) { throw null; } + public static implicit operator Azure.ResourceManager.Kusto.Models.Language (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Kusto.Models.Language left, Azure.ResourceManager.Kusto.Models.Language right) { throw null; } + public override string ToString() { throw null; } + } public partial class MigrationClusterProperties { internal MigrationClusterProperties() { } @@ -1670,4 +1737,45 @@ public OutboundNetworkDependenciesEndpoint() { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Kusto.Models.KustoProvisioningState? ProvisioningState { get { throw null; } } } + public partial class SandboxCustomImagesCheckNameContent + { + public SandboxCustomImagesCheckNameContent(string name) { } + public Azure.ResourceManager.Kusto.Models.SandboxCustomImageType ImageType { get { throw null; } } + public string Name { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SandboxCustomImageType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SandboxCustomImageType(string value) { throw null; } + public static Azure.ResourceManager.Kusto.Models.SandboxCustomImageType MicrosoftKustoClustersSandboxCustomImages { get { throw null; } } + public bool Equals(Azure.ResourceManager.Kusto.Models.SandboxCustomImageType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.Kusto.Models.SandboxCustomImageType left, Azure.ResourceManager.Kusto.Models.SandboxCustomImageType right) { throw null; } + public static implicit operator Azure.ResourceManager.Kusto.Models.SandboxCustomImageType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Kusto.Models.SandboxCustomImageType left, Azure.ResourceManager.Kusto.Models.SandboxCustomImageType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct VnetState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public VnetState(string value) { throw null; } + public static Azure.ResourceManager.Kusto.Models.VnetState Disabled { get { throw null; } } + public static Azure.ResourceManager.Kusto.Models.VnetState Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.Kusto.Models.VnetState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.Kusto.Models.VnetState left, Azure.ResourceManager.Kusto.Models.VnetState right) { throw null; } + public static implicit operator Azure.ResourceManager.Kusto.Models.VnetState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Kusto.Models.VnetState left, Azure.ResourceManager.Kusto.Models.VnetState right) { throw null; } + public override string ToString() { throw null; } + } } diff --git a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/ArmKustoModelFactory.cs b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/ArmKustoModelFactory.cs index 7c7dc4e39351..d7a53a1f2ac5 100644 --- a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/ArmKustoModelFactory.cs +++ b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/ArmKustoModelFactory.cs @@ -113,6 +113,7 @@ public static MigrationClusterProperties MigrationClusterProperties(string id = /// The tags. /// The location. /// The SKU of the cluster. + /// The availability zones of the cluster. /// The identity of the cluster, if configured. /// The state of the resource. /// The provisioned state of the resource. @@ -140,9 +141,10 @@ public static MigrationClusterProperties MigrationClusterProperties(string id = /// A list of private endpoint connections. /// Properties of the peer cluster involved in a migration to/from this cluster. /// A new instance for mocking. - public static KustoClusterPatch KustoClusterPatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, KustoSku sku = null, ManagedServiceIdentity identity = null, KustoClusterState? state = null, KustoProvisioningState? provisioningState = null, Uri uri = null, Uri dataIngestionUri = null, string stateReason = null, IEnumerable trustedExternalTenants = null, OptimizedAutoscale optimizedAutoscale = null, bool? isDiskEncryptionEnabled = null, bool? isStreamingIngestEnabled = null, KustoClusterVirtualNetworkConfiguration virtualNetworkConfiguration = null, KustoKeyVaultProperties keyVaultProperties = null, bool? isPurgeEnabled = null, IEnumerable languageExtensionsValue = null, bool? isDoubleEncryptionEnabled = null, KustoClusterPublicNetworkAccess? publicNetworkAccess = null, IEnumerable allowedIPRangeList = null, KustoClusterEngineType? engineType = null, IEnumerable acceptedAudiences = null, bool? isAutoStopEnabled = null, KustoClusterNetworkAccessFlag? restrictOutboundNetworkAccess = null, IEnumerable allowedFqdnList = null, KustoClusterPublicIPType? publicIPType = null, string virtualClusterGraduationProperties = null, IEnumerable privateEndpointConnections = null, MigrationClusterProperties migrationCluster = null) + public static KustoClusterPatch KustoClusterPatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, KustoSku sku = null, IEnumerable zones = null, ManagedServiceIdentity identity = null, KustoClusterState? state = null, KustoProvisioningState? provisioningState = null, Uri uri = null, Uri dataIngestionUri = null, string stateReason = null, IEnumerable trustedExternalTenants = null, OptimizedAutoscale optimizedAutoscale = null, bool? isDiskEncryptionEnabled = null, bool? isStreamingIngestEnabled = null, KustoClusterVirtualNetworkConfiguration virtualNetworkConfiguration = null, KustoKeyVaultProperties keyVaultProperties = null, bool? isPurgeEnabled = null, IEnumerable languageExtensionsValue = null, bool? isDoubleEncryptionEnabled = null, KustoClusterPublicNetworkAccess? publicNetworkAccess = null, IEnumerable allowedIPRangeList = null, KustoClusterEngineType? engineType = null, IEnumerable acceptedAudiences = null, bool? isAutoStopEnabled = null, KustoClusterNetworkAccessFlag? restrictOutboundNetworkAccess = null, IEnumerable allowedFqdnList = null, KustoClusterPublicIPType? publicIPType = null, string virtualClusterGraduationProperties = null, IEnumerable privateEndpointConnections = null, MigrationClusterProperties migrationCluster = null) { tags ??= new Dictionary(); + zones ??= new List(); trustedExternalTenants ??= new List(); languageExtensionsValue ??= new List(); allowedIPRangeList ??= new List(); @@ -150,7 +152,7 @@ public static KustoClusterPatch KustoClusterPatch(ResourceIdentifier id = null, allowedFqdnList ??= new List(); privateEndpointConnections ??= new List(); - return new KustoClusterPatch(id, name, resourceType, systemData, tags, location, sku, identity, state, provisioningState, uri, dataIngestionUri, stateReason, trustedExternalTenants?.ToList(), optimizedAutoscale, isDiskEncryptionEnabled, isStreamingIngestEnabled, virtualNetworkConfiguration, keyVaultProperties, isPurgeEnabled, languageExtensionsValue != null ? new KustoLanguageExtensionList(languageExtensionsValue?.ToList()) : null, isDoubleEncryptionEnabled, publicNetworkAccess, allowedIPRangeList?.ToList(), engineType, acceptedAudiences?.ToList(), isAutoStopEnabled, restrictOutboundNetworkAccess, allowedFqdnList?.ToList(), publicIPType, virtualClusterGraduationProperties, privateEndpointConnections?.ToList(), migrationCluster); + return new KustoClusterPatch(id, name, resourceType, systemData, tags, location, sku, zones?.ToList(), identity, state, provisioningState, uri, dataIngestionUri, stateReason, trustedExternalTenants?.ToList(), optimizedAutoscale, isDiskEncryptionEnabled, isStreamingIngestEnabled, virtualNetworkConfiguration, keyVaultProperties, isPurgeEnabled, languageExtensionsValue != null ? new KustoLanguageExtensionList(languageExtensionsValue?.ToList()) : null, isDoubleEncryptionEnabled, publicNetworkAccess, allowedIPRangeList?.ToList(), engineType, acceptedAudiences?.ToList(), isAutoStopEnabled, restrictOutboundNetworkAccess, allowedFqdnList?.ToList(), publicIPType, virtualClusterGraduationProperties, privateEndpointConnections?.ToList(), migrationCluster); } /// Initializes a new instance of KustoNameAvailabilityResult. @@ -348,6 +350,21 @@ public static KustoScriptData KustoScriptData(ResourceIdentifier id = null, stri return new KustoScriptData(id, name, resourceType, systemData, scriptUri, scriptUriSasToken, scriptContent, forceUpdateTag, shouldContinueOnErrors, provisioningState); } + /// Initializes a new instance of SandboxCustomImageData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The language name, for example Python. + /// The version of the language. + /// The requirements file content. + /// The provisioned state of the resource. + /// A new instance for mocking. + public static SandboxCustomImageData SandboxCustomImageData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, Language? language = null, string languageVersion = null, string requirementsFileContent = null, KustoProvisioningState? provisioningState = null) + { + return new SandboxCustomImageData(id, name, resourceType, systemData, language, languageVersion, requirementsFileContent, provisioningState); + } + /// Initializes a new instance of KustoManagedPrivateEndpointData. /// The id. /// The name. diff --git a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Extensions/KustoExtensions.cs b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Extensions/KustoExtensions.cs index 5759f2e551b0..1908fe1a881f 100644 --- a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Extensions/KustoExtensions.cs +++ b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Extensions/KustoExtensions.cs @@ -183,6 +183,25 @@ public static KustoScriptResource GetKustoScriptResource(this ArmClient client, } #endregion + #region SandboxCustomImageResource + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// Returns a object. + public static SandboxCustomImageResource GetSandboxCustomImageResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + SandboxCustomImageResource.ValidateResourceId(id); + return new SandboxCustomImageResource(client, id); + } + ); + } + #endregion + #region KustoPrivateEndpointConnectionResource /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. diff --git a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/KustoClusterResource.cs b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/KustoClusterResource.cs index f9fcc8c186bd..e4cc9ba455f8 100644 --- a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/KustoClusterResource.cs +++ b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/KustoClusterResource.cs @@ -44,6 +44,8 @@ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, private readonly AttachedDatabaseConfigurationsRestOperations _kustoAttachedDatabaseConfigurationAttachedDatabaseConfigurationsRestClient; private readonly ClientDiagnostics _kustoManagedPrivateEndpointManagedPrivateEndpointsClientDiagnostics; private readonly ManagedPrivateEndpointsRestOperations _kustoManagedPrivateEndpointManagedPrivateEndpointsRestClient; + private readonly ClientDiagnostics _sandboxCustomImageClientDiagnostics; + private readonly SandboxCustomImagesRestOperations _sandboxCustomImageRestClient; private readonly KustoClusterData _data; /// Initializes a new instance of the class for mocking. @@ -80,6 +82,9 @@ internal KustoClusterResource(ArmClient client, ResourceIdentifier id) : base(cl _kustoManagedPrivateEndpointManagedPrivateEndpointsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Kusto", KustoManagedPrivateEndpointResource.ResourceType.Namespace, Diagnostics); TryGetApiVersion(KustoManagedPrivateEndpointResource.ResourceType, out string kustoManagedPrivateEndpointManagedPrivateEndpointsApiVersion); _kustoManagedPrivateEndpointManagedPrivateEndpointsRestClient = new ManagedPrivateEndpointsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, kustoManagedPrivateEndpointManagedPrivateEndpointsApiVersion); + _sandboxCustomImageClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Kusto", SandboxCustomImageResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(SandboxCustomImageResource.ResourceType, out string sandboxCustomImageApiVersion); + _sandboxCustomImageRestClient = new SandboxCustomImagesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, sandboxCustomImageApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -321,6 +326,59 @@ public virtual Response GetKustoManagedPriv return GetKustoManagedPrivateEndpoints().Get(managedPrivateEndpointName, cancellationToken); } + /// Gets a collection of SandboxCustomImageResources in the KustoCluster. + /// An object representing collection of SandboxCustomImageResources and their operations over a SandboxCustomImageResource. + public virtual SandboxCustomImageCollection GetSandboxCustomImages() + { + return GetCachedClient(Client => new SandboxCustomImageCollection(Client, Id)); + } + + /// + /// Returns a sandbox custom image + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/sandboxCustomImages/{sandboxCustomImageName} + /// + /// + /// Operation Id + /// SandboxCustomImages_Get + /// + /// + /// + /// The name of the sandbox custom image. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetSandboxCustomImageAsync(string sandboxCustomImageName, CancellationToken cancellationToken = default) + { + return await GetSandboxCustomImages().GetAsync(sandboxCustomImageName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Returns a sandbox custom image + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/sandboxCustomImages/{sandboxCustomImageName} + /// + /// + /// Operation Id + /// SandboxCustomImages_Get + /// + /// + /// + /// The name of the sandbox custom image. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetSandboxCustomImage(string sandboxCustomImageName, CancellationToken cancellationToken = default) + { + return GetSandboxCustomImages().Get(sandboxCustomImageName, cancellationToken); + } + /// Gets a collection of KustoPrivateEndpointConnectionResources in the KustoCluster. /// An object representing collection of KustoPrivateEndpointConnectionResources and their operations over a KustoPrivateEndpointConnectionResource. public virtual KustoPrivateEndpointConnectionCollection GetKustoPrivateEndpointConnections() @@ -1587,6 +1645,74 @@ public virtual Response CheckKustoManagedPrivateEnd } } + /// + /// Checks that the sandbox custom image resource name is valid and is not already in use. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/sandboxCustomImagesCheckNameAvailability + /// + /// + /// Operation Id + /// SandboxCustomImages_CheckNameAvailability + /// + /// + /// + /// The name of the resource. + /// The cancellation token to use. + /// is null. + public virtual async Task> CheckNameAvailabilitySandboxCustomImageAsync(SandboxCustomImagesCheckNameContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _sandboxCustomImageClientDiagnostics.CreateScope("KustoClusterResource.CheckNameAvailabilitySandboxCustomImage"); + scope.Start(); + try + { + var response = await _sandboxCustomImageRestClient.CheckNameAvailabilityAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks that the sandbox custom image resource name is valid and is not already in use. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/sandboxCustomImagesCheckNameAvailability + /// + /// + /// Operation Id + /// SandboxCustomImages_CheckNameAvailability + /// + /// + /// + /// The name of the resource. + /// The cancellation token to use. + /// is null. + public virtual Response CheckNameAvailabilitySandboxCustomImage(SandboxCustomImagesCheckNameContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _sandboxCustomImageClientDiagnostics.CreateScope("KustoClusterResource.CheckNameAvailabilitySandboxCustomImage"); + scope.Start(); + try + { + var response = _sandboxCustomImageRestClient.CheckNameAvailability(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// /// Add a tag to the current resource. /// diff --git a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/LongRunningOperation/SandboxCustomImageOperationSource.cs b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/LongRunningOperation/SandboxCustomImageOperationSource.cs new file mode 100644 index 000000000000..e2355be49e6d --- /dev/null +++ b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/LongRunningOperation/SandboxCustomImageOperationSource.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.Kusto +{ + internal class SandboxCustomImageOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal SandboxCustomImageOperationSource(ArmClient client) + { + _client = client; + } + + SandboxCustomImageResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = SandboxCustomImageData.DeserializeSandboxCustomImageData(document.RootElement); + return new SandboxCustomImageResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = SandboxCustomImageData.DeserializeSandboxCustomImageData(document.RootElement); + return new SandboxCustomImageResource(_client, data); + } + } +} diff --git a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/EndpointDetail.Serialization.cs b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/EndpointDetail.Serialization.cs index f11433590dbb..ae2fa517d338 100644 --- a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/EndpointDetail.Serialization.cs +++ b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/EndpointDetail.Serialization.cs @@ -20,6 +20,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("port"u8); writer.WriteNumberValue(Port.Value); } + if (Optional.IsDefined(IPAddress)) + { + writer.WritePropertyName("ipAddress"u8); + writer.WriteStringValue(IPAddress); + } writer.WriteEndObject(); } @@ -30,6 +35,7 @@ internal static EndpointDetail DeserializeEndpointDetail(JsonElement element) return null; } Optional port = default; + Optional ipAddress = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("port"u8)) @@ -41,8 +47,13 @@ internal static EndpointDetail DeserializeEndpointDetail(JsonElement element) port = property.Value.GetInt32(); continue; } + if (property.NameEquals("ipAddress"u8)) + { + ipAddress = property.Value.GetString(); + continue; + } } - return new EndpointDetail(Optional.ToNullable(port)); + return new EndpointDetail(Optional.ToNullable(port), ipAddress.Value); } } } diff --git a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/EndpointDetail.cs b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/EndpointDetail.cs index df9acb0cb0a0..ab0a0dcc1f68 100644 --- a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/EndpointDetail.cs +++ b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/EndpointDetail.cs @@ -17,12 +17,16 @@ public EndpointDetail() /// Initializes a new instance of EndpointDetail. /// The port an endpoint is connected to. - internal EndpointDetail(int? port) + /// The ip address of the endpoint. + internal EndpointDetail(int? port, string ipAddress) { Port = port; + IPAddress = ipAddress; } /// The port an endpoint is connected to. public int? Port { get; set; } + /// The ip address of the endpoint. + public string IPAddress { get; set; } } } diff --git a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoClusterPatch.Serialization.cs b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoClusterPatch.Serialization.cs index e80f3bf2ffb6..8c47977d564c 100644 --- a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoClusterPatch.Serialization.cs +++ b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoClusterPatch.Serialization.cs @@ -24,6 +24,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("sku"u8); writer.WriteObjectValue(Sku); } + if (Optional.IsCollectionDefined(Zones)) + { + writer.WritePropertyName("zones"u8); + writer.WriteStartArray(); + foreach (var item in Zones) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); @@ -165,6 +175,7 @@ internal static KustoClusterPatch DeserializeKustoClusterPatch(JsonElement eleme return null; } Optional sku = default; + Optional> zones = default; Optional identity = default; Optional> tags = default; AzureLocation location = default; @@ -208,6 +219,20 @@ internal static KustoClusterPatch DeserializeKustoClusterPatch(JsonElement eleme sku = KustoSku.DeserializeKustoSku(property.Value); continue; } + if (property.NameEquals("zones"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + zones = array; + continue; + } if (property.NameEquals("identity"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -515,7 +540,7 @@ internal static KustoClusterPatch DeserializeKustoClusterPatch(JsonElement eleme continue; } } - return new KustoClusterPatch(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, sku.Value, identity, Optional.ToNullable(state), Optional.ToNullable(provisioningState), uri.Value, dataIngestionUri.Value, stateReason.Value, Optional.ToList(trustedExternalTenants), optimizedAutoscale.Value, Optional.ToNullable(enableDiskEncryption), Optional.ToNullable(enableStreamingIngest), virtualNetworkConfiguration.Value, keyVaultProperties.Value, Optional.ToNullable(enablePurge), languageExtensions.Value, Optional.ToNullable(enableDoubleEncryption), Optional.ToNullable(publicNetworkAccess), Optional.ToList(allowedIPRangeList), Optional.ToNullable(engineType), Optional.ToList(acceptedAudiences), Optional.ToNullable(enableAutoStop), Optional.ToNullable(restrictOutboundNetworkAccess), Optional.ToList(allowedFqdnList), Optional.ToNullable(publicIPType), virtualClusterGraduationProperties.Value, Optional.ToList(privateEndpointConnections), migrationCluster.Value); + return new KustoClusterPatch(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, sku.Value, Optional.ToList(zones), identity, Optional.ToNullable(state), Optional.ToNullable(provisioningState), uri.Value, dataIngestionUri.Value, stateReason.Value, Optional.ToList(trustedExternalTenants), optimizedAutoscale.Value, Optional.ToNullable(enableDiskEncryption), Optional.ToNullable(enableStreamingIngest), virtualNetworkConfiguration.Value, keyVaultProperties.Value, Optional.ToNullable(enablePurge), languageExtensions.Value, Optional.ToNullable(enableDoubleEncryption), Optional.ToNullable(publicNetworkAccess), Optional.ToList(allowedIPRangeList), Optional.ToNullable(engineType), Optional.ToList(acceptedAudiences), Optional.ToNullable(enableAutoStop), Optional.ToNullable(restrictOutboundNetworkAccess), Optional.ToList(allowedFqdnList), Optional.ToNullable(publicIPType), virtualClusterGraduationProperties.Value, Optional.ToList(privateEndpointConnections), migrationCluster.Value); } } } diff --git a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoClusterPatch.cs b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoClusterPatch.cs index 979becb57943..e7c5fad1095e 100644 --- a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoClusterPatch.cs +++ b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoClusterPatch.cs @@ -20,6 +20,7 @@ public partial class KustoClusterPatch : TrackedResourceData /// The location. public KustoClusterPatch(AzureLocation location) : base(location) { + Zones = new ChangeTrackingList(); TrustedExternalTenants = new ChangeTrackingList(); AllowedIPRangeList = new ChangeTrackingList(); AcceptedAudiences = new ChangeTrackingList(); @@ -35,6 +36,7 @@ public KustoClusterPatch(AzureLocation location) : base(location) /// The tags. /// The location. /// The SKU of the cluster. + /// The availability zones of the cluster. /// The identity of the cluster, if configured. /// The state of the resource. /// The provisioned state of the resource. @@ -61,9 +63,10 @@ public KustoClusterPatch(AzureLocation location) : base(location) /// Virtual Cluster graduation properties. /// A list of private endpoint connections. /// Properties of the peer cluster involved in a migration to/from this cluster. - internal KustoClusterPatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, KustoSku sku, ManagedServiceIdentity identity, KustoClusterState? state, KustoProvisioningState? provisioningState, Uri uri, Uri dataIngestionUri, string stateReason, IList trustedExternalTenants, OptimizedAutoscale optimizedAutoscale, bool? isDiskEncryptionEnabled, bool? isStreamingIngestEnabled, KustoClusterVirtualNetworkConfiguration virtualNetworkConfiguration, KustoKeyVaultProperties keyVaultProperties, bool? isPurgeEnabled, KustoLanguageExtensionList languageExtensions, bool? isDoubleEncryptionEnabled, KustoClusterPublicNetworkAccess? publicNetworkAccess, IList allowedIPRangeList, KustoClusterEngineType? engineType, IList acceptedAudiences, bool? isAutoStopEnabled, KustoClusterNetworkAccessFlag? restrictOutboundNetworkAccess, IList allowedFqdnList, KustoClusterPublicIPType? publicIPType, string virtualClusterGraduationProperties, IReadOnlyList privateEndpointConnections, MigrationClusterProperties migrationCluster) : base(id, name, resourceType, systemData, tags, location) + internal KustoClusterPatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, KustoSku sku, IList zones, ManagedServiceIdentity identity, KustoClusterState? state, KustoProvisioningState? provisioningState, Uri uri, Uri dataIngestionUri, string stateReason, IList trustedExternalTenants, OptimizedAutoscale optimizedAutoscale, bool? isDiskEncryptionEnabled, bool? isStreamingIngestEnabled, KustoClusterVirtualNetworkConfiguration virtualNetworkConfiguration, KustoKeyVaultProperties keyVaultProperties, bool? isPurgeEnabled, KustoLanguageExtensionList languageExtensions, bool? isDoubleEncryptionEnabled, KustoClusterPublicNetworkAccess? publicNetworkAccess, IList allowedIPRangeList, KustoClusterEngineType? engineType, IList acceptedAudiences, bool? isAutoStopEnabled, KustoClusterNetworkAccessFlag? restrictOutboundNetworkAccess, IList allowedFqdnList, KustoClusterPublicIPType? publicIPType, string virtualClusterGraduationProperties, IReadOnlyList privateEndpointConnections, MigrationClusterProperties migrationCluster) : base(id, name, resourceType, systemData, tags, location) { Sku = sku; + Zones = zones; Identity = identity; State = state; ProvisioningState = provisioningState; @@ -94,6 +97,8 @@ internal KustoClusterPatch(ResourceIdentifier id, string name, ResourceType reso /// The SKU of the cluster. public KustoSku Sku { get; set; } + /// The availability zones of the cluster. + public IList Zones { get; } /// The identity of the cluster, if configured. public ManagedServiceIdentity Identity { get; set; } /// The state of the resource. diff --git a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoClusterVirtualNetworkConfiguration.Serialization.cs b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoClusterVirtualNetworkConfiguration.Serialization.cs index dfb3ba3e5fe3..c0621b3abd13 100644 --- a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoClusterVirtualNetworkConfiguration.Serialization.cs +++ b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoClusterVirtualNetworkConfiguration.Serialization.cs @@ -21,6 +21,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteStringValue(EnginePublicIPId); writer.WritePropertyName("dataManagementPublicIpId"u8); writer.WriteStringValue(DataManagementPublicIPId); + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } writer.WriteEndObject(); } @@ -33,6 +38,7 @@ internal static KustoClusterVirtualNetworkConfiguration DeserializeKustoClusterV string subnetId = default; string enginePublicIPId = default; string dataManagementPublicIPId = default; + Optional state = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("subnetId"u8)) @@ -50,8 +56,17 @@ internal static KustoClusterVirtualNetworkConfiguration DeserializeKustoClusterV dataManagementPublicIPId = property.Value.GetString(); continue; } + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new VnetState(property.Value.GetString()); + continue; + } } - return new KustoClusterVirtualNetworkConfiguration(subnetId, enginePublicIPId, dataManagementPublicIPId); + return new KustoClusterVirtualNetworkConfiguration(subnetId, enginePublicIPId, dataManagementPublicIPId, Optional.ToNullable(state)); } } } diff --git a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoClusterVirtualNetworkConfiguration.cs b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoClusterVirtualNetworkConfiguration.cs index 8436d97b203a..30aadfe1658f 100644 --- a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoClusterVirtualNetworkConfiguration.cs +++ b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoClusterVirtualNetworkConfiguration.cs @@ -29,11 +29,26 @@ public KustoClusterVirtualNetworkConfiguration(string subnetId, string enginePub DataManagementPublicIPId = dataManagementPublicIPId; } + /// Initializes a new instance of KustoClusterVirtualNetworkConfiguration. + /// The subnet resource id. + /// Engine service's public IP address resource id. + /// Data management's service public IP address resource id. + /// When enabled, the cluster is deployed into the configured subnet, when disabled it will be removed from the subnet. + internal KustoClusterVirtualNetworkConfiguration(string subnetId, string enginePublicIPId, string dataManagementPublicIPId, VnetState? state) + { + SubnetId = subnetId; + EnginePublicIPId = enginePublicIPId; + DataManagementPublicIPId = dataManagementPublicIPId; + State = state; + } + /// The subnet resource id. public string SubnetId { get; set; } /// Engine service's public IP address resource id. public string EnginePublicIPId { get; set; } /// Data management's service public IP address resource id. public string DataManagementPublicIPId { get; set; } + /// When enabled, the cluster is deployed into the configured subnet, when disabled it will be removed from the subnet. + public VnetState? State { get; set; } } } diff --git a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoLanguageExtension.Serialization.cs b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoLanguageExtension.Serialization.cs index f1e92aebb30f..db0dbcefafbd 100644 --- a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoLanguageExtension.Serialization.cs +++ b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoLanguageExtension.Serialization.cs @@ -25,6 +25,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("languageExtensionImageName"u8); writer.WriteStringValue(LanguageExtensionImageName.Value.ToString()); } + if (Optional.IsDefined(LanguageExtensionCustomImageName)) + { + writer.WritePropertyName("languageExtensionCustomImageName"u8); + writer.WriteStringValue(LanguageExtensionCustomImageName); + } writer.WriteEndObject(); } @@ -36,6 +41,7 @@ internal static KustoLanguageExtension DeserializeKustoLanguageExtension(JsonEle } Optional languageExtensionName = default; Optional languageExtensionImageName = default; + Optional languageExtensionCustomImageName = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("languageExtensionName"u8)) @@ -56,8 +62,13 @@ internal static KustoLanguageExtension DeserializeKustoLanguageExtension(JsonEle languageExtensionImageName = new KustoLanguageExtensionImageName(property.Value.GetString()); continue; } + if (property.NameEquals("languageExtensionCustomImageName"u8)) + { + languageExtensionCustomImageName = property.Value.GetString(); + continue; + } } - return new KustoLanguageExtension(Optional.ToNullable(languageExtensionName), Optional.ToNullable(languageExtensionImageName)); + return new KustoLanguageExtension(Optional.ToNullable(languageExtensionName), Optional.ToNullable(languageExtensionImageName), languageExtensionCustomImageName.Value); } } } diff --git a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoLanguageExtension.cs b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoLanguageExtension.cs index 87d76d57fbf1..c5d33416f209 100644 --- a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoLanguageExtension.cs +++ b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoLanguageExtension.cs @@ -18,15 +18,19 @@ public KustoLanguageExtension() /// Initializes a new instance of KustoLanguageExtension. /// The language extension name. /// The language extension image name. - internal KustoLanguageExtension(KustoLanguageExtensionName? languageExtensionName, KustoLanguageExtensionImageName? languageExtensionImageName) + /// The language extension custom image name. + internal KustoLanguageExtension(KustoLanguageExtensionName? languageExtensionName, KustoLanguageExtensionImageName? languageExtensionImageName, string languageExtensionCustomImageName) { LanguageExtensionName = languageExtensionName; LanguageExtensionImageName = languageExtensionImageName; + LanguageExtensionCustomImageName = languageExtensionCustomImageName; } /// The language extension name. public KustoLanguageExtensionName? LanguageExtensionName { get; set; } /// The language extension image name. public KustoLanguageExtensionImageName? LanguageExtensionImageName { get; set; } + /// The language extension custom image name. + public string LanguageExtensionCustomImageName { get; set; } } } diff --git a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoLanguageExtensionImageName.cs b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoLanguageExtensionImageName.cs index 5bb172bb2cde..716d3fc15cb2 100644 --- a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoLanguageExtensionImageName.cs +++ b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoLanguageExtensionImageName.cs @@ -25,9 +25,15 @@ public KustoLanguageExtensionImageName(string value) private const string RValue = "R"; private const string Python3_6_5Value = "Python3_6_5"; private const string Python3_10_8Value = "Python3_10_8"; + private const string Python3108DLValue = "Python3_10_8_DL"; + private const string PythonCustomImageValue = "PythonCustomImage"; /// R. public static KustoLanguageExtensionImageName R { get; } = new KustoLanguageExtensionImageName(RValue); + /// Python3_10_8_DL. + public static KustoLanguageExtensionImageName Python3108DL { get; } = new KustoLanguageExtensionImageName(Python3108DLValue); + /// PythonCustomImage. + public static KustoLanguageExtensionImageName PythonCustomImage { get; } = new KustoLanguageExtensionImageName(PythonCustomImageValue); /// Determines if two values are the same. public static bool operator ==(KustoLanguageExtensionImageName left, KustoLanguageExtensionImageName right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/Language.cs b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/Language.cs new file mode 100644 index 000000000000..35ef3bae7e7e --- /dev/null +++ b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/Language.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Kusto.Models +{ + /// The language name, for example Python. + public readonly partial struct Language : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public Language(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PythonValue = "Python"; + + /// Python. + public static Language Python { get; } = new Language(PythonValue); + /// Determines if two values are the same. + public static bool operator ==(Language left, Language right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(Language left, Language right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator Language(string value) => new Language(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is Language other && Equals(other); + /// + public bool Equals(Language other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/SandboxCustomImageData.Serialization.cs b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/SandboxCustomImageData.Serialization.cs new file mode 100644 index 000000000000..6b2d4886c0e3 --- /dev/null +++ b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/SandboxCustomImageData.Serialization.cs @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Kusto.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Kusto +{ + public partial class SandboxCustomImageData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(Language)) + { + writer.WritePropertyName("language"u8); + writer.WriteStringValue(Language.Value.ToString()); + } + if (Optional.IsDefined(LanguageVersion)) + { + writer.WritePropertyName("languageVersion"u8); + writer.WriteStringValue(LanguageVersion); + } + if (Optional.IsDefined(RequirementsFileContent)) + { + writer.WritePropertyName("requirementsFileContent"u8); + writer.WriteStringValue(RequirementsFileContent); + } + writer.WriteEndObject(); + writer.WriteEndObject(); + } + + internal static SandboxCustomImageData DeserializeSandboxCustomImageData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + Optional language = default; + Optional languageVersion = default; + Optional requirementsFileContent = default; + Optional provisioningState = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("language"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + language = new Language(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("languageVersion"u8)) + { + languageVersion = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("requirementsFileContent"u8)) + { + requirementsFileContent = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("provisioningState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new KustoProvisioningState(property0.Value.GetString()); + continue; + } + } + continue; + } + } + return new SandboxCustomImageData(id, name, type, systemData.Value, Optional.ToNullable(language), languageVersion.Value, requirementsFileContent.Value, Optional.ToNullable(provisioningState)); + } + } +} diff --git a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/SandboxCustomImageType.cs b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/SandboxCustomImageType.cs new file mode 100644 index 000000000000..35967d97c2d0 --- /dev/null +++ b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/SandboxCustomImageType.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Kusto.Models +{ + /// The type of resource, for instance Microsoft.Kusto/clusters/sandboxCustomImages. + public readonly partial struct SandboxCustomImageType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SandboxCustomImageType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string MicrosoftKustoClustersSandboxCustomImagesValue = "Microsoft.Kusto/clusters/sandboxCustomImages"; + + /// Microsoft.Kusto/clusters/sandboxCustomImages. + public static SandboxCustomImageType MicrosoftKustoClustersSandboxCustomImages { get; } = new SandboxCustomImageType(MicrosoftKustoClustersSandboxCustomImagesValue); + /// Determines if two values are the same. + public static bool operator ==(SandboxCustomImageType left, SandboxCustomImageType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SandboxCustomImageType left, SandboxCustomImageType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator SandboxCustomImageType(string value) => new SandboxCustomImageType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SandboxCustomImageType other && Equals(other); + /// + public bool Equals(SandboxCustomImageType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/SandboxCustomImagesCheckNameContent.Serialization.cs b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/SandboxCustomImagesCheckNameContent.Serialization.cs new file mode 100644 index 000000000000..202bba6d4379 --- /dev/null +++ b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/SandboxCustomImagesCheckNameContent.Serialization.cs @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Kusto.Models +{ + public partial class SandboxCustomImagesCheckNameContent : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ImageType.ToString()); + writer.WriteEndObject(); + } + } +} diff --git a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/SandboxCustomImagesCheckNameContent.cs b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/SandboxCustomImagesCheckNameContent.cs new file mode 100644 index 000000000000..3bd8f95d390d --- /dev/null +++ b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/SandboxCustomImagesCheckNameContent.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.Kusto.Models +{ + /// The result returned from a sandboxCustomImage check name availability request. + public partial class SandboxCustomImagesCheckNameContent + { + /// Initializes a new instance of SandboxCustomImagesCheckNameContent. + /// Sandbox custom image resource name. + /// is null. + public SandboxCustomImagesCheckNameContent(string name) + { + Argument.AssertNotNull(name, nameof(name)); + + Name = name; + ImageType = SandboxCustomImageType.MicrosoftKustoClustersSandboxCustomImages; + } + + /// Sandbox custom image resource name. + public string Name { get; } + /// The type of resource, for instance Microsoft.Kusto/clusters/sandboxCustomImages. + public SandboxCustomImageType ImageType { get; } + } +} diff --git a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/SandboxCustomImagesListResult.Serialization.cs b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/SandboxCustomImagesListResult.Serialization.cs new file mode 100644 index 000000000000..d41eb695c55b --- /dev/null +++ b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/SandboxCustomImagesListResult.Serialization.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Kusto; + +namespace Azure.ResourceManager.Kusto.Models +{ + internal partial class SandboxCustomImagesListResult + { + internal static SandboxCustomImagesListResult DeserializeSandboxCustomImagesListResult(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional nextLink = default; + Optional> value = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SandboxCustomImageData.DeserializeSandboxCustomImageData(item)); + } + value = array; + continue; + } + } + return new SandboxCustomImagesListResult(nextLink.Value, Optional.ToList(value)); + } + } +} diff --git a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/SandboxCustomImagesListResult.cs b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/SandboxCustomImagesListResult.cs new file mode 100644 index 000000000000..f60d824e49c3 --- /dev/null +++ b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/SandboxCustomImagesListResult.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Kusto; + +namespace Azure.ResourceManager.Kusto.Models +{ + /// The list Kusto sandbox custom images operation response. + internal partial class SandboxCustomImagesListResult + { + /// Initializes a new instance of SandboxCustomImagesListResult. + internal SandboxCustomImagesListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of SandboxCustomImagesListResult. + /// Link to the next page of results. + /// The list of Kusto sandbox custom images. + internal SandboxCustomImagesListResult(string nextLink, IReadOnlyList value) + { + NextLink = nextLink; + Value = value; + } + + /// Link to the next page of results. + public string NextLink { get; } + /// The list of Kusto sandbox custom images. + public IReadOnlyList Value { get; } + } +} diff --git a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/VnetState.cs b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/VnetState.cs new file mode 100644 index 000000000000..6aacabb86ffb --- /dev/null +++ b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/VnetState.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Kusto.Models +{ + /// When enabled, the cluster is deployed into the configured subnet, when disabled it will be removed from the subnet. + public readonly partial struct VnetState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public VnetState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnabledValue = "Enabled"; + private const string DisabledValue = "Disabled"; + + /// Enabled. + public static VnetState Enabled { get; } = new VnetState(EnabledValue); + /// Disabled. + public static VnetState Disabled { get; } = new VnetState(DisabledValue); + /// Determines if two values are the same. + public static bool operator ==(VnetState left, VnetState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(VnetState left, VnetState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator VnetState(string value) => new VnetState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is VnetState other && Equals(other); + /// + public bool Equals(VnetState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/RestOperations/AttachedDatabaseConfigurationsRestOperations.cs b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/RestOperations/AttachedDatabaseConfigurationsRestOperations.cs index 36301ce80ffe..f1025af9e211 100644 --- a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/RestOperations/AttachedDatabaseConfigurationsRestOperations.cs +++ b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/RestOperations/AttachedDatabaseConfigurationsRestOperations.cs @@ -33,7 +33,7 @@ public AttachedDatabaseConfigurationsRestOperations(HttpPipeline pipeline, strin { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-05-02"; + _apiVersion = apiVersion ?? "2023-08-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/RestOperations/ClusterPrincipalAssignmentsRestOperations.cs b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/RestOperations/ClusterPrincipalAssignmentsRestOperations.cs index 6972a54dc1ea..637c222b561b 100644 --- a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/RestOperations/ClusterPrincipalAssignmentsRestOperations.cs +++ b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/RestOperations/ClusterPrincipalAssignmentsRestOperations.cs @@ -33,7 +33,7 @@ public ClusterPrincipalAssignmentsRestOperations(HttpPipeline pipeline, string a { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-05-02"; + _apiVersion = apiVersion ?? "2023-08-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/RestOperations/ClustersRestOperations.cs b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/RestOperations/ClustersRestOperations.cs index 5ccd1bcc4819..68c8377a06b5 100644 --- a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/RestOperations/ClustersRestOperations.cs +++ b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/RestOperations/ClustersRestOperations.cs @@ -33,7 +33,7 @@ public ClustersRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-05-02"; + _apiVersion = apiVersion ?? "2023-08-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/RestOperations/DataConnectionsRestOperations.cs b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/RestOperations/DataConnectionsRestOperations.cs index 17e47fd08401..c070729fc168 100644 --- a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/RestOperations/DataConnectionsRestOperations.cs +++ b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/RestOperations/DataConnectionsRestOperations.cs @@ -33,7 +33,7 @@ public DataConnectionsRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-05-02"; + _apiVersion = apiVersion ?? "2023-08-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/RestOperations/DatabasePrincipalAssignmentsRestOperations.cs b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/RestOperations/DatabasePrincipalAssignmentsRestOperations.cs index 65254c2596c4..900911833c72 100644 --- a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/RestOperations/DatabasePrincipalAssignmentsRestOperations.cs +++ b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/RestOperations/DatabasePrincipalAssignmentsRestOperations.cs @@ -33,7 +33,7 @@ public DatabasePrincipalAssignmentsRestOperations(HttpPipeline pipeline, string { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-05-02"; + _apiVersion = apiVersion ?? "2023-08-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/RestOperations/DatabaseRestOperations.cs b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/RestOperations/DatabaseRestOperations.cs index 677c5b27d4ae..225a913a6536 100644 --- a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/RestOperations/DatabaseRestOperations.cs +++ b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/RestOperations/DatabaseRestOperations.cs @@ -33,7 +33,7 @@ public DatabaseRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-05-02"; + _apiVersion = apiVersion ?? "2023-08-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/RestOperations/DatabasesRestOperations.cs b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/RestOperations/DatabasesRestOperations.cs index aafffdf1b4bd..479b00ae19de 100644 --- a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/RestOperations/DatabasesRestOperations.cs +++ b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/RestOperations/DatabasesRestOperations.cs @@ -33,7 +33,7 @@ public DatabasesRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-05-02"; + _apiVersion = apiVersion ?? "2023-08-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/RestOperations/ManagedPrivateEndpointsRestOperations.cs b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/RestOperations/ManagedPrivateEndpointsRestOperations.cs index e07069fa5df7..5601f561d3a8 100644 --- a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/RestOperations/ManagedPrivateEndpointsRestOperations.cs +++ b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/RestOperations/ManagedPrivateEndpointsRestOperations.cs @@ -33,7 +33,7 @@ public ManagedPrivateEndpointsRestOperations(HttpPipeline pipeline, string appli { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-05-02"; + _apiVersion = apiVersion ?? "2023-08-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs index c0a76ccc531b..c445a6c43a6c 100644 --- a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs +++ b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs @@ -33,7 +33,7 @@ public PrivateEndpointConnectionsRestOperations(HttpPipeline pipeline, string ap { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-05-02"; + _apiVersion = apiVersion ?? "2023-08-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs index 834fc187e6c4..ec5f17f46d0f 100644 --- a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs +++ b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs @@ -33,7 +33,7 @@ public PrivateLinkResourcesRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-05-02"; + _apiVersion = apiVersion ?? "2023-08-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/RestOperations/SandboxCustomImagesRestOperations.cs b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/RestOperations/SandboxCustomImagesRestOperations.cs new file mode 100644 index 000000000000..0b429711ab95 --- /dev/null +++ b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/RestOperations/SandboxCustomImagesRestOperations.cs @@ -0,0 +1,542 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Kusto.Models; + +namespace Azure.ResourceManager.Kusto +{ + internal partial class SandboxCustomImagesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of SandboxCustomImagesRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public SandboxCustomImagesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-08-15"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateListByClusterRequest(string subscriptionId, string resourceGroupName, string clusterName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Kusto/clusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendPath("/sandboxCustomImages", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Returns the list of the existing sandbox custom images of the given Kusto cluster. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Kusto cluster. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByClusterAsync(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + + using var message = CreateListByClusterRequest(subscriptionId, resourceGroupName, clusterName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SandboxCustomImagesListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = SandboxCustomImagesListResult.DeserializeSandboxCustomImagesListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Returns the list of the existing sandbox custom images of the given Kusto cluster. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Kusto cluster. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByCluster(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + + using var message = CreateListByClusterRequest(subscriptionId, resourceGroupName, clusterName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SandboxCustomImagesListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = SandboxCustomImagesListResult.DeserializeSandboxCustomImagesListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string clusterName, string sandboxCustomImageName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Kusto/clusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendPath("/sandboxCustomImages/", false); + uri.AppendPath(sandboxCustomImageName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Returns a sandbox custom image. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Kusto cluster. + /// The name of the sandbox custom image. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string clusterName, string sandboxCustomImageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNullOrEmpty(sandboxCustomImageName, nameof(sandboxCustomImageName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, clusterName, sandboxCustomImageName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SandboxCustomImageData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = SandboxCustomImageData.DeserializeSandboxCustomImageData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((SandboxCustomImageData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Returns a sandbox custom image. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Kusto cluster. + /// The name of the sandbox custom image. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string clusterName, string sandboxCustomImageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNullOrEmpty(sandboxCustomImageName, nameof(sandboxCustomImageName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, clusterName, sandboxCustomImageName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SandboxCustomImageData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = SandboxCustomImageData.DeserializeSandboxCustomImageData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((SandboxCustomImageData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string clusterName, string sandboxCustomImageName, SandboxCustomImageData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Kusto/clusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendPath("/sandboxCustomImages/", false); + uri.AppendPath(sandboxCustomImageName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates or updates a sandbox custom image. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Kusto cluster. + /// The name of the sandbox custom image. + /// The sandbox custom image parameters. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string clusterName, string sandboxCustomImageName, SandboxCustomImageData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNullOrEmpty(sandboxCustomImageName, nameof(sandboxCustomImageName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, clusterName, sandboxCustomImageName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates or updates a sandbox custom image. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Kusto cluster. + /// The name of the sandbox custom image. + /// The sandbox custom image parameters. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string clusterName, string sandboxCustomImageName, SandboxCustomImageData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNullOrEmpty(sandboxCustomImageName, nameof(sandboxCustomImageName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, clusterName, sandboxCustomImageName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string clusterName, string sandboxCustomImageName, SandboxCustomImageData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Kusto/clusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendPath("/sandboxCustomImages/", false); + uri.AppendPath(sandboxCustomImageName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Updates a sandbox custom image. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Kusto cluster. + /// The name of the sandbox custom image. + /// The sandbox custom image parameters. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string clusterName, string sandboxCustomImageName, SandboxCustomImageData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNullOrEmpty(sandboxCustomImageName, nameof(sandboxCustomImageName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, clusterName, sandboxCustomImageName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Updates a sandbox custom image. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Kusto cluster. + /// The name of the sandbox custom image. + /// The sandbox custom image parameters. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string clusterName, string sandboxCustomImageName, SandboxCustomImageData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNullOrEmpty(sandboxCustomImageName, nameof(sandboxCustomImageName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, clusterName, sandboxCustomImageName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string clusterName, string sandboxCustomImageName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Kusto/clusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendPath("/sandboxCustomImages/", false); + uri.AppendPath(sandboxCustomImageName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes a sandbox custom image. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Kusto cluster. + /// The name of the sandbox custom image. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string clusterName, string sandboxCustomImageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNullOrEmpty(sandboxCustomImageName, nameof(sandboxCustomImageName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, clusterName, sandboxCustomImageName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes a sandbox custom image. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Kusto cluster. + /// The name of the sandbox custom image. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string clusterName, string sandboxCustomImageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNullOrEmpty(sandboxCustomImageName, nameof(sandboxCustomImageName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, clusterName, sandboxCustomImageName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCheckNameAvailabilityRequest(string subscriptionId, string resourceGroupName, string clusterName, SandboxCustomImagesCheckNameContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Kusto/clusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendPath("/sandboxCustomImagesCheckNameAvailability", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content); + request.Content = content0; + _userAgent.Apply(message); + return message; + } + + /// Checks that the sandbox custom image resource name is valid and is not already in use. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Kusto cluster. + /// The name of the resource. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> CheckNameAvailabilityAsync(string subscriptionId, string resourceGroupName, string clusterName, SandboxCustomImagesCheckNameContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateCheckNameAvailabilityRequest(subscriptionId, resourceGroupName, clusterName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + KustoNameAvailabilityResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = KustoNameAvailabilityResult.DeserializeKustoNameAvailabilityResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Checks that the sandbox custom image resource name is valid and is not already in use. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Kusto cluster. + /// The name of the resource. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response CheckNameAvailability(string subscriptionId, string resourceGroupName, string clusterName, SandboxCustomImagesCheckNameContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateCheckNameAvailabilityRequest(subscriptionId, resourceGroupName, clusterName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + KustoNameAvailabilityResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = KustoNameAvailabilityResult.DeserializeKustoNameAvailabilityResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/RestOperations/ScriptsRestOperations.cs b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/RestOperations/ScriptsRestOperations.cs index 6af08b88bbe8..e57502043d24 100644 --- a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/RestOperations/ScriptsRestOperations.cs +++ b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/RestOperations/ScriptsRestOperations.cs @@ -33,7 +33,7 @@ public ScriptsRestOperations(HttpPipeline pipeline, string applicationId, Uri en { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-05-02"; + _apiVersion = apiVersion ?? "2023-08-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/RestOperations/SkusRestOperations.cs b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/RestOperations/SkusRestOperations.cs index 42ded0236e56..26dfc37c1d4c 100644 --- a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/RestOperations/SkusRestOperations.cs +++ b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/RestOperations/SkusRestOperations.cs @@ -33,7 +33,7 @@ public SkusRestOperations(HttpPipeline pipeline, string applicationId, Uri endpo { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-05-02"; + _apiVersion = apiVersion ?? "2023-08-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/SandboxCustomImageCollection.cs b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/SandboxCustomImageCollection.cs new file mode 100644 index 000000000000..491c3ca4ce71 --- /dev/null +++ b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/SandboxCustomImageCollection.cs @@ -0,0 +1,338 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.Kusto +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetSandboxCustomImages method from an instance of . + /// + public partial class SandboxCustomImageCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _sandboxCustomImageClientDiagnostics; + private readonly SandboxCustomImagesRestOperations _sandboxCustomImageRestClient; + + /// Initializes a new instance of the class for mocking. + protected SandboxCustomImageCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal SandboxCustomImageCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _sandboxCustomImageClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Kusto", SandboxCustomImageResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(SandboxCustomImageResource.ResourceType, out string sandboxCustomImageApiVersion); + _sandboxCustomImageRestClient = new SandboxCustomImagesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, sandboxCustomImageApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != KustoClusterResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, KustoClusterResource.ResourceType), nameof(id)); + } + + /// + /// Creates or updates a sandbox custom image. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/sandboxCustomImages/{sandboxCustomImageName} + /// + /// + /// Operation Id + /// SandboxCustomImages_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the sandbox custom image. + /// The sandbox custom image parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string sandboxCustomImageName, SandboxCustomImageData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(sandboxCustomImageName, nameof(sandboxCustomImageName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _sandboxCustomImageClientDiagnostics.CreateScope("SandboxCustomImageCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _sandboxCustomImageRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, sandboxCustomImageName, data, cancellationToken).ConfigureAwait(false); + var operation = new KustoArmOperation(new SandboxCustomImageOperationSource(Client), _sandboxCustomImageClientDiagnostics, Pipeline, _sandboxCustomImageRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, sandboxCustomImageName, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates a sandbox custom image. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/sandboxCustomImages/{sandboxCustomImageName} + /// + /// + /// Operation Id + /// SandboxCustomImages_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the sandbox custom image. + /// The sandbox custom image parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string sandboxCustomImageName, SandboxCustomImageData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(sandboxCustomImageName, nameof(sandboxCustomImageName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _sandboxCustomImageClientDiagnostics.CreateScope("SandboxCustomImageCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _sandboxCustomImageRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, sandboxCustomImageName, data, cancellationToken); + var operation = new KustoArmOperation(new SandboxCustomImageOperationSource(Client), _sandboxCustomImageClientDiagnostics, Pipeline, _sandboxCustomImageRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, sandboxCustomImageName, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Returns a sandbox custom image + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/sandboxCustomImages/{sandboxCustomImageName} + /// + /// + /// Operation Id + /// SandboxCustomImages_Get + /// + /// + /// + /// The name of the sandbox custom image. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string sandboxCustomImageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(sandboxCustomImageName, nameof(sandboxCustomImageName)); + + using var scope = _sandboxCustomImageClientDiagnostics.CreateScope("SandboxCustomImageCollection.Get"); + scope.Start(); + try + { + var response = await _sandboxCustomImageRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, sandboxCustomImageName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SandboxCustomImageResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Returns a sandbox custom image + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/sandboxCustomImages/{sandboxCustomImageName} + /// + /// + /// Operation Id + /// SandboxCustomImages_Get + /// + /// + /// + /// The name of the sandbox custom image. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string sandboxCustomImageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(sandboxCustomImageName, nameof(sandboxCustomImageName)); + + using var scope = _sandboxCustomImageClientDiagnostics.CreateScope("SandboxCustomImageCollection.Get"); + scope.Start(); + try + { + var response = _sandboxCustomImageRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, sandboxCustomImageName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SandboxCustomImageResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Returns the list of the existing sandbox custom images of the given Kusto cluster. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/sandboxCustomImages + /// + /// + /// Operation Id + /// SandboxCustomImages_ListByCluster + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _sandboxCustomImageRestClient.CreateListByClusterRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => new SandboxCustomImageResource(Client, SandboxCustomImageData.DeserializeSandboxCustomImageData(e)), _sandboxCustomImageClientDiagnostics, Pipeline, "SandboxCustomImageCollection.GetAll", "value", null, cancellationToken); + } + + /// + /// Returns the list of the existing sandbox custom images of the given Kusto cluster. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/sandboxCustomImages + /// + /// + /// Operation Id + /// SandboxCustomImages_ListByCluster + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _sandboxCustomImageRestClient.CreateListByClusterRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return PageableHelpers.CreatePageable(FirstPageRequest, null, e => new SandboxCustomImageResource(Client, SandboxCustomImageData.DeserializeSandboxCustomImageData(e)), _sandboxCustomImageClientDiagnostics, Pipeline, "SandboxCustomImageCollection.GetAll", "value", null, cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/sandboxCustomImages/{sandboxCustomImageName} + /// + /// + /// Operation Id + /// SandboxCustomImages_Get + /// + /// + /// + /// The name of the sandbox custom image. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string sandboxCustomImageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(sandboxCustomImageName, nameof(sandboxCustomImageName)); + + using var scope = _sandboxCustomImageClientDiagnostics.CreateScope("SandboxCustomImageCollection.Exists"); + scope.Start(); + try + { + var response = await _sandboxCustomImageRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, sandboxCustomImageName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/sandboxCustomImages/{sandboxCustomImageName} + /// + /// + /// Operation Id + /// SandboxCustomImages_Get + /// + /// + /// + /// The name of the sandbox custom image. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string sandboxCustomImageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(sandboxCustomImageName, nameof(sandboxCustomImageName)); + + using var scope = _sandboxCustomImageClientDiagnostics.CreateScope("SandboxCustomImageCollection.Exists"); + scope.Start(); + try + { + var response = _sandboxCustomImageRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, sandboxCustomImageName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/SandboxCustomImageData.cs b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/SandboxCustomImageData.cs new file mode 100644 index 000000000000..12259dddfab3 --- /dev/null +++ b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/SandboxCustomImageData.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; +using Azure.ResourceManager.Kusto.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Kusto +{ + /// + /// A class representing the SandboxCustomImage data model. + /// Class representing a Kusto sandbox custom image. + /// + public partial class SandboxCustomImageData : ResourceData + { + /// Initializes a new instance of SandboxCustomImageData. + public SandboxCustomImageData() + { + } + + /// Initializes a new instance of SandboxCustomImageData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The language name, for example Python. + /// The version of the language. + /// The requirements file content. + /// The provisioned state of the resource. + internal SandboxCustomImageData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, Language? language, string languageVersion, string requirementsFileContent, KustoProvisioningState? provisioningState) : base(id, name, resourceType, systemData) + { + Language = language; + LanguageVersion = languageVersion; + RequirementsFileContent = requirementsFileContent; + ProvisioningState = provisioningState; + } + + /// The language name, for example Python. + public Language? Language { get; set; } + /// The version of the language. + public string LanguageVersion { get; set; } + /// The requirements file content. + public string RequirementsFileContent { get; set; } + /// The provisioned state of the resource. + public KustoProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/SandboxCustomImageResource.cs b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/SandboxCustomImageResource.cs new file mode 100644 index 000000000000..bc03af04d02c --- /dev/null +++ b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/SandboxCustomImageResource.cs @@ -0,0 +1,297 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.Kusto +{ + /// + /// A Class representing a SandboxCustomImage along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetSandboxCustomImageResource method. + /// Otherwise you can get one from its parent resource using the GetSandboxCustomImage method. + /// + public partial class SandboxCustomImageResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string clusterName, string sandboxCustomImageName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/sandboxCustomImages/{sandboxCustomImageName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _sandboxCustomImageClientDiagnostics; + private readonly SandboxCustomImagesRestOperations _sandboxCustomImageRestClient; + private readonly SandboxCustomImageData _data; + + /// Initializes a new instance of the class for mocking. + protected SandboxCustomImageResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal SandboxCustomImageResource(ArmClient client, SandboxCustomImageData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal SandboxCustomImageResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _sandboxCustomImageClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Kusto", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string sandboxCustomImageApiVersion); + _sandboxCustomImageRestClient = new SandboxCustomImagesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, sandboxCustomImageApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Kusto/clusters/sandboxCustomImages"; + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual SandboxCustomImageData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Returns a sandbox custom image + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/sandboxCustomImages/{sandboxCustomImageName} + /// + /// + /// Operation Id + /// SandboxCustomImages_Get + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _sandboxCustomImageClientDiagnostics.CreateScope("SandboxCustomImageResource.Get"); + scope.Start(); + try + { + var response = await _sandboxCustomImageRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SandboxCustomImageResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Returns a sandbox custom image + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/sandboxCustomImages/{sandboxCustomImageName} + /// + /// + /// Operation Id + /// SandboxCustomImages_Get + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _sandboxCustomImageClientDiagnostics.CreateScope("SandboxCustomImageResource.Get"); + scope.Start(); + try + { + var response = _sandboxCustomImageRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SandboxCustomImageResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes a sandbox custom image. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/sandboxCustomImages/{sandboxCustomImageName} + /// + /// + /// Operation Id + /// SandboxCustomImages_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _sandboxCustomImageClientDiagnostics.CreateScope("SandboxCustomImageResource.Delete"); + scope.Start(); + try + { + var response = await _sandboxCustomImageRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new KustoArmOperation(_sandboxCustomImageClientDiagnostics, Pipeline, _sandboxCustomImageRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes a sandbox custom image. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/sandboxCustomImages/{sandboxCustomImageName} + /// + /// + /// Operation Id + /// SandboxCustomImages_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _sandboxCustomImageClientDiagnostics.CreateScope("SandboxCustomImageResource.Delete"); + scope.Start(); + try + { + var response = _sandboxCustomImageRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new KustoArmOperation(_sandboxCustomImageClientDiagnostics, Pipeline, _sandboxCustomImageRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates a sandbox custom image. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/sandboxCustomImages/{sandboxCustomImageName} + /// + /// + /// Operation Id + /// SandboxCustomImages_Update + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The sandbox custom image parameters. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, SandboxCustomImageData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _sandboxCustomImageClientDiagnostics.CreateScope("SandboxCustomImageResource.Update"); + scope.Start(); + try + { + var response = await _sandboxCustomImageRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new KustoArmOperation(new SandboxCustomImageOperationSource(Client), _sandboxCustomImageClientDiagnostics, Pipeline, _sandboxCustomImageRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates a sandbox custom image. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/sandboxCustomImages/{sandboxCustomImageName} + /// + /// + /// Operation Id + /// SandboxCustomImages_Update + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The sandbox custom image parameters. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, SandboxCustomImageData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _sandboxCustomImageClientDiagnostics.CreateScope("SandboxCustomImageResource.Update"); + scope.Start(); + try + { + var response = _sandboxCustomImageRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new KustoArmOperation(new SandboxCustomImageOperationSource(Client), _sandboxCustomImageClientDiagnostics, Pipeline, _sandboxCustomImageRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/kusto/Azure.ResourceManager.Kusto/src/autorest.md b/sdk/kusto/Azure.ResourceManager.Kusto/src/autorest.md index a7c94c673d32..b380dfe9aa84 100644 --- a/sdk/kusto/Azure.ResourceManager.Kusto/src/autorest.md +++ b/sdk/kusto/Azure.ResourceManager.Kusto/src/autorest.md @@ -8,7 +8,7 @@ azure-arm: true csharp: true library-name: Kusto namespace: Azure.ResourceManager.Kusto -require: https://github.com/Azure/azure-rest-api-specs/blob/4c49a05d22106119afd2078a982f30855b91a010/specification/azure-kusto/resource-manager/readme.md +require: /mnt/vss/_work/1/s/azure-rest-api-specs/specification/azure-kusto/resource-manager/readme.md output-folder: $(this-folder)/Generated clear-output-folder: true skip-csproj: true