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 925cfb070b73..4b5d8a6609fa 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 @@ -21,6 +21,8 @@ public KustoAttachedDatabaseConfigurationData() { } public System.Collections.Generic.IReadOnlyList AttachedDatabaseNames { get { throw null; } } public Azure.Core.ResourceIdentifier ClusterResourceId { get { throw null; } set { } } public string DatabaseName { get { throw null; } set { } } + public string DatabaseNameOverride { get { throw null; } set { } } + public string DatabaseNamePrefix { get { throw null; } set { } } public Azure.ResourceManager.Kusto.Models.KustoDatabaseDefaultPrincipalsModificationKind? DefaultPrincipalsModificationKind { get { throw null; } set { } } public Azure.Core.AzureLocation? Location { get { throw null; } set { } } public Azure.ResourceManager.Kusto.Models.KustoProvisioningState? ProvisioningState { get { throw null; } } @@ -197,8 +199,8 @@ protected KustoClusterResource() { } public partial class KustoDatabaseCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected KustoDatabaseCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string databaseName, Azure.ResourceManager.Kusto.KustoDatabaseData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string databaseName, Azure.ResourceManager.Kusto.KustoDatabaseData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string databaseName, Azure.ResourceManager.Kusto.KustoDatabaseData data, Azure.ResourceManager.Kusto.Models.CallerRole? callerRole = default(Azure.ResourceManager.Kusto.Models.CallerRole?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string databaseName, Azure.ResourceManager.Kusto.KustoDatabaseData data, Azure.ResourceManager.Kusto.Models.CallerRole? callerRole = default(Azure.ResourceManager.Kusto.Models.CallerRole?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Exists(string databaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string databaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(string databaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -290,8 +292,8 @@ protected KustoDatabaseResource() { } public virtual Azure.AsyncPageable GetPrincipalsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable RemovePrincipals(Azure.ResourceManager.Kusto.Models.DatabasePrincipalList databasePrincipalsToRemove, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable RemovePrincipalsAsync(Azure.ResourceManager.Kusto.Models.DatabasePrincipalList databasePrincipalsToRemove, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.Kusto.KustoDatabaseData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Kusto.KustoDatabaseData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.Kusto.KustoDatabaseData data, Azure.ResourceManager.Kusto.Models.CallerRole? callerRole = default(Azure.ResourceManager.Kusto.Models.CallerRole?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Kusto.KustoDatabaseData data, Azure.ResourceManager.Kusto.Models.CallerRole? callerRole = default(Azure.ResourceManager.Kusto.Models.CallerRole?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation ValidateDataConnection(Azure.WaitUntil waitUntil, Azure.ResourceManager.Kusto.Models.DataConnectionValidationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ValidateDataConnectionAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Kusto.Models.DataConnectionValidationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } @@ -538,11 +540,48 @@ public AcceptedAudience() { } public static bool operator !=(Azure.ResourceManager.Kusto.Models.BlobStorageEventType left, Azure.ResourceManager.Kusto.Models.BlobStorageEventType right) { throw null; } public override string ToString() { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct CallerRole : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CallerRole(string value) { throw null; } + public static Azure.ResourceManager.Kusto.Models.CallerRole Admin { get { throw null; } } + public static Azure.ResourceManager.Kusto.Models.CallerRole None { get { throw null; } } + public bool Equals(Azure.ResourceManager.Kusto.Models.CallerRole 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.CallerRole left, Azure.ResourceManager.Kusto.Models.CallerRole right) { throw null; } + public static implicit operator Azure.ResourceManager.Kusto.Models.CallerRole (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Kusto.Models.CallerRole left, Azure.ResourceManager.Kusto.Models.CallerRole right) { throw null; } + public override string ToString() { throw null; } + } public partial class DatabasePrincipalList { public DatabasePrincipalList() { } public System.Collections.Generic.IList Value { get { throw null; } } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DatabaseShareOrigin : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DatabaseShareOrigin(string value) { throw null; } + public static Azure.ResourceManager.Kusto.Models.DatabaseShareOrigin DataShare { get { throw null; } } + public static Azure.ResourceManager.Kusto.Models.DatabaseShareOrigin Direct { get { throw null; } } + public static Azure.ResourceManager.Kusto.Models.DatabaseShareOrigin Other { get { throw null; } } + public bool Equals(Azure.ResourceManager.Kusto.Models.DatabaseShareOrigin 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.DatabaseShareOrigin left, Azure.ResourceManager.Kusto.Models.DatabaseShareOrigin right) { throw null; } + public static implicit operator Azure.ResourceManager.Kusto.Models.DatabaseShareOrigin (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Kusto.Models.DatabaseShareOrigin left, Azure.ResourceManager.Kusto.Models.DatabaseShareOrigin right) { throw null; } + public override string ToString() { throw null; } + } public partial class DataConnectionValidationContent { public DataConnectionValidationContent() { } @@ -1054,6 +1093,7 @@ public KustoEventHubDataConnection() { } public Azure.Core.ResourceIdentifier ManagedIdentityResourceId { get { throw null; } set { } } public string MappingRuleName { get { throw null; } set { } } public Azure.ResourceManager.Kusto.Models.KustoProvisioningState? ProvisioningState { get { throw null; } } + public System.DateTimeOffset? RetrievalStartOn { get { throw null; } set { } } public string TableName { get { throw null; } set { } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] @@ -1094,6 +1134,8 @@ public KustoFollowerDatabaseDefinition(Azure.Core.ResourceIdentifier clusterReso public string AttachedDatabaseConfigurationName { get { throw null; } set { } } public Azure.Core.ResourceIdentifier ClusterResourceId { get { throw null; } set { } } public string DatabaseName { get { throw null; } } + public Azure.ResourceManager.Kusto.Models.DatabaseShareOrigin? DatabaseShareOrigin { get { throw null; } } + public Azure.ResourceManager.Kusto.Models.KustoDatabaseTableLevelSharingProperties TableLevelSharingProperties { get { throw null; } } } public partial class KustoIotHubDataConnection : Azure.ResourceManager.Kusto.KustoDataConnectionData { @@ -1105,6 +1147,7 @@ public KustoIotHubDataConnection() { } public Azure.Core.ResourceIdentifier IotHubResourceId { get { throw null; } set { } } public string MappingRuleName { get { throw null; } set { } } public Azure.ResourceManager.Kusto.Models.KustoProvisioningState? ProvisioningState { get { throw null; } } + public System.DateTimeOffset? RetrievalStartOn { get { throw null; } set { } } public string SharedAccessPolicyName { get { throw null; } set { } } public string TableName { get { throw null; } set { } } } @@ -1277,12 +1320,15 @@ public partial class KustoReadOnlyFollowingDatabase : Azure.ResourceManager.Kust { public KustoReadOnlyFollowingDatabase() { } public string AttachedDatabaseConfigurationName { get { throw null; } } + public Azure.ResourceManager.Kusto.Models.DatabaseShareOrigin? DatabaseShareOrigin { get { throw null; } } public System.TimeSpan? HotCachePeriod { get { throw null; } set { } } public string LeaderClusterResourceId { get { throw null; } } + public string OriginalDatabaseName { get { throw null; } } public Azure.ResourceManager.Kusto.Models.KustoDatabasePrincipalsModificationKind? PrincipalsModificationKind { get { throw null; } } public Azure.ResourceManager.Kusto.Models.KustoProvisioningState? ProvisioningState { get { throw null; } } public System.TimeSpan? SoftDeletePeriod { get { throw null; } } public float? StatisticsSize { get { throw null; } } + public Azure.ResourceManager.Kusto.Models.KustoDatabaseTableLevelSharingProperties TableLevelSharingProperties { get { throw null; } } } public partial class KustoReadWriteDatabase : Azure.ResourceManager.Kusto.KustoDatabaseData { @@ -1383,14 +1429,20 @@ internal KustoSkuLocationInfoItem() { } public static Azure.ResourceManager.Kusto.Models.KustoSkuName StandardE16asV53TBPS { get { throw null; } } public static Azure.ResourceManager.Kusto.Models.KustoSkuName StandardE16asV54TBPS { get { throw null; } } public static Azure.ResourceManager.Kusto.Models.KustoSkuName StandardE16aV4 { get { throw null; } } + public static Azure.ResourceManager.Kusto.Models.KustoSkuName StandardE16DV4 { get { throw null; } } + public static Azure.ResourceManager.Kusto.Models.KustoSkuName StandardE16DV5 { get { throw null; } } public static Azure.ResourceManager.Kusto.Models.KustoSkuName StandardE16sV43TBPS { get { throw null; } } public static Azure.ResourceManager.Kusto.Models.KustoSkuName StandardE16sV44TBPS { get { throw null; } } public static Azure.ResourceManager.Kusto.Models.KustoSkuName StandardE16sV53TBPS { get { throw null; } } public static Azure.ResourceManager.Kusto.Models.KustoSkuName StandardE16sV54TBPS { get { throw null; } } public static Azure.ResourceManager.Kusto.Models.KustoSkuName StandardE2adsV5 { get { throw null; } } public static Azure.ResourceManager.Kusto.Models.KustoSkuName StandardE2aV4 { get { throw null; } } + public static Azure.ResourceManager.Kusto.Models.KustoSkuName StandardE2DV4 { get { throw null; } } + public static Azure.ResourceManager.Kusto.Models.KustoSkuName StandardE2DV5 { get { throw null; } } public static Azure.ResourceManager.Kusto.Models.KustoSkuName StandardE4adsV5 { get { throw null; } } public static Azure.ResourceManager.Kusto.Models.KustoSkuName StandardE4aV4 { get { throw null; } } + public static Azure.ResourceManager.Kusto.Models.KustoSkuName StandardE4DV4 { get { throw null; } } + public static Azure.ResourceManager.Kusto.Models.KustoSkuName StandardE4DV5 { get { throw null; } } public static Azure.ResourceManager.Kusto.Models.KustoSkuName StandardE64iV3 { get { throw null; } } public static Azure.ResourceManager.Kusto.Models.KustoSkuName StandardE80idsV4 { get { throw null; } } public static Azure.ResourceManager.Kusto.Models.KustoSkuName StandardE8adsV5 { get { throw null; } } @@ -1399,15 +1451,27 @@ internal KustoSkuLocationInfoItem() { } public static Azure.ResourceManager.Kusto.Models.KustoSkuName StandardE8asV51TBPS { get { throw null; } } public static Azure.ResourceManager.Kusto.Models.KustoSkuName StandardE8asV52TBPS { get { throw null; } } public static Azure.ResourceManager.Kusto.Models.KustoSkuName StandardE8aV4 { get { throw null; } } + public static Azure.ResourceManager.Kusto.Models.KustoSkuName StandardE8DV4 { get { throw null; } } + public static Azure.ResourceManager.Kusto.Models.KustoSkuName StandardE8DV5 { get { throw null; } } public static Azure.ResourceManager.Kusto.Models.KustoSkuName StandardE8sV41TBPS { get { throw null; } } public static Azure.ResourceManager.Kusto.Models.KustoSkuName StandardE8sV42TBPS { get { throw null; } } public static Azure.ResourceManager.Kusto.Models.KustoSkuName StandardE8sV51TBPS { get { throw null; } } public static Azure.ResourceManager.Kusto.Models.KustoSkuName StandardE8sV52TBPS { get { throw null; } } + public static Azure.ResourceManager.Kusto.Models.KustoSkuName StandardEC16AdsV5 { get { throw null; } } + public static Azure.ResourceManager.Kusto.Models.KustoSkuName StandardEC16AsV53TBPS { get { throw null; } } + public static Azure.ResourceManager.Kusto.Models.KustoSkuName StandardEC16AsV54TBPS { get { throw null; } } + public static Azure.ResourceManager.Kusto.Models.KustoSkuName StandardEC8AdsV5 { get { throw null; } } + public static Azure.ResourceManager.Kusto.Models.KustoSkuName StandardEC8AsV51TBPS { get { throw null; } } + public static Azure.ResourceManager.Kusto.Models.KustoSkuName StandardEC8AsV52TBPS { get { throw null; } } + public static Azure.ResourceManager.Kusto.Models.KustoSkuName StandardL16AsV3 { get { throw null; } } public static Azure.ResourceManager.Kusto.Models.KustoSkuName StandardL16s { get { throw null; } } public static Azure.ResourceManager.Kusto.Models.KustoSkuName StandardL16sV2 { get { throw null; } } + public static Azure.ResourceManager.Kusto.Models.KustoSkuName StandardL16SV3 { get { throw null; } } public static Azure.ResourceManager.Kusto.Models.KustoSkuName StandardL4s { get { throw null; } } + public static Azure.ResourceManager.Kusto.Models.KustoSkuName StandardL8AsV3 { get { throw null; } } public static Azure.ResourceManager.Kusto.Models.KustoSkuName StandardL8s { get { throw null; } } public static Azure.ResourceManager.Kusto.Models.KustoSkuName StandardL8sV2 { get { throw null; } } + public static Azure.ResourceManager.Kusto.Models.KustoSkuName StandardL8SV3 { get { throw null; } } public bool Equals(Azure.ResourceManager.Kusto.Models.KustoSkuName other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } diff --git a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/KustoAttachedDatabaseConfigurationData.cs b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/KustoAttachedDatabaseConfigurationData.cs index b59aad6d880a..8d674b97537e 100644 --- a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/KustoAttachedDatabaseConfigurationData.cs +++ b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/KustoAttachedDatabaseConfigurationData.cs @@ -33,7 +33,9 @@ public KustoAttachedDatabaseConfigurationData() /// The list of databases from the clusterResourceId which are currently attached to the cluster. /// The default principals modification kind. /// Table level sharing specifications. - internal KustoAttachedDatabaseConfigurationData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, AzureLocation? location, KustoProvisioningState? provisioningState, string databaseName, ResourceIdentifier clusterResourceId, IReadOnlyList attachedDatabaseNames, KustoDatabaseDefaultPrincipalsModificationKind? defaultPrincipalsModificationKind, KustoDatabaseTableLevelSharingProperties tableLevelSharingProperties) : base(id, name, resourceType, systemData) + /// Overrides the original database name. Relevant only when attaching to a specific database. + /// Adds a prefix to the attached databases name. When following an entire cluster, that prefix would be added to all of the databases original names from leader cluster. + internal KustoAttachedDatabaseConfigurationData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, AzureLocation? location, KustoProvisioningState? provisioningState, string databaseName, ResourceIdentifier clusterResourceId, IReadOnlyList attachedDatabaseNames, KustoDatabaseDefaultPrincipalsModificationKind? defaultPrincipalsModificationKind, KustoDatabaseTableLevelSharingProperties tableLevelSharingProperties, string databaseNameOverride, string databaseNamePrefix) : base(id, name, resourceType, systemData) { Location = location; ProvisioningState = provisioningState; @@ -42,6 +44,8 @@ internal KustoAttachedDatabaseConfigurationData(ResourceIdentifier id, string na AttachedDatabaseNames = attachedDatabaseNames; DefaultPrincipalsModificationKind = defaultPrincipalsModificationKind; TableLevelSharingProperties = tableLevelSharingProperties; + DatabaseNameOverride = databaseNameOverride; + DatabaseNamePrefix = databaseNamePrefix; } /// Resource location. @@ -58,5 +62,9 @@ internal KustoAttachedDatabaseConfigurationData(ResourceIdentifier id, string na public KustoDatabaseDefaultPrincipalsModificationKind? DefaultPrincipalsModificationKind { get; set; } /// Table level sharing specifications. public KustoDatabaseTableLevelSharingProperties TableLevelSharingProperties { get; set; } + /// Overrides the original database name. Relevant only when attaching to a specific database. + public string DatabaseNameOverride { get; set; } + /// Adds a prefix to the attached databases name. When following an entire cluster, that prefix would be added to all of the databases original names from leader cluster. + public string DatabaseNamePrefix { get; set; } } } diff --git a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/KustoDatabaseCollection.cs b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/KustoDatabaseCollection.cs index 776b9ee975cf..d009b89d4d7b 100644 --- a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/KustoDatabaseCollection.cs +++ b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/KustoDatabaseCollection.cs @@ -16,6 +16,7 @@ using Azure.Core; using Azure.Core.Pipeline; using Azure.ResourceManager; +using Azure.ResourceManager.Kusto.Models; namespace Azure.ResourceManager.Kusto { @@ -61,10 +62,11 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// 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 database in the Kusto cluster. /// The database parameters supplied to the CreateOrUpdate operation. + /// By default, any user who run operation on a database become an Admin on it. This property allows the caller to exclude the caller from Admins list. /// 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 databaseName, KustoDatabaseData data, CancellationToken cancellationToken = default) + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string databaseName, KustoDatabaseData data, CallerRole? callerRole = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); Argument.AssertNotNull(data, nameof(data)); @@ -73,8 +75,8 @@ public virtual async Task> CreateOrUpdateAsy scope.Start(); try { - var response = await _kustoDatabaseDatabasesRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, databaseName, data, cancellationToken).ConfigureAwait(false); - var operation = new KustoArmOperation(new KustoDatabaseOperationSource(Client), _kustoDatabaseDatabasesClientDiagnostics, Pipeline, _kustoDatabaseDatabasesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, databaseName, data).Request, response, OperationFinalStateVia.Location); + var response = await _kustoDatabaseDatabasesRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, databaseName, data, callerRole, cancellationToken).ConfigureAwait(false); + var operation = new KustoArmOperation(new KustoDatabaseOperationSource(Client), _kustoDatabaseDatabasesClientDiagnostics, Pipeline, _kustoDatabaseDatabasesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, databaseName, data, callerRole).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -94,10 +96,11 @@ public virtual async Task> CreateOrUpdateAsy /// 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 database in the Kusto cluster. /// The database parameters supplied to the CreateOrUpdate operation. + /// By default, any user who run operation on a database become an Admin on it. This property allows the caller to exclude the caller from Admins list. /// 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 databaseName, KustoDatabaseData data, CancellationToken cancellationToken = default) + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string databaseName, KustoDatabaseData data, CallerRole? callerRole = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); Argument.AssertNotNull(data, nameof(data)); @@ -106,8 +109,8 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wait scope.Start(); try { - var response = _kustoDatabaseDatabasesRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, databaseName, data, cancellationToken); - var operation = new KustoArmOperation(new KustoDatabaseOperationSource(Client), _kustoDatabaseDatabasesClientDiagnostics, Pipeline, _kustoDatabaseDatabasesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, databaseName, data).Request, response, OperationFinalStateVia.Location); + var response = _kustoDatabaseDatabasesRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, databaseName, data, callerRole, cancellationToken); + var operation = new KustoArmOperation(new KustoDatabaseOperationSource(Client), _kustoDatabaseDatabasesClientDiagnostics, Pipeline, _kustoDatabaseDatabasesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, databaseName, data, callerRole).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; diff --git a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/KustoDatabaseResource.cs b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/KustoDatabaseResource.cs index 0e950699a523..e5ff26db51c4 100644 --- a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/KustoDatabaseResource.cs +++ b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/KustoDatabaseResource.cs @@ -320,9 +320,10 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// 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 database parameters supplied to the Update operation. + /// By default, any user who run operation on a database become an Admin on it. This property allows the caller to exclude the caller from Admins list. /// The cancellation token to use. /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, KustoDatabaseData data, CancellationToken cancellationToken = default) + public virtual async Task> UpdateAsync(WaitUntil waitUntil, KustoDatabaseData data, CallerRole? callerRole = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(data, nameof(data)); @@ -330,8 +331,8 @@ public virtual async Task> UpdateAsync(WaitU scope.Start(); try { - var response = await _kustoDatabaseDatabasesRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new KustoArmOperation(new KustoDatabaseOperationSource(Client), _kustoDatabaseDatabasesClientDiagnostics, Pipeline, _kustoDatabaseDatabasesRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + var response = await _kustoDatabaseDatabasesRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, callerRole, cancellationToken).ConfigureAwait(false); + var operation = new KustoArmOperation(new KustoDatabaseOperationSource(Client), _kustoDatabaseDatabasesClientDiagnostics, Pipeline, _kustoDatabaseDatabasesRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, callerRole).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -350,9 +351,10 @@ public virtual async Task> UpdateAsync(WaitU /// /// 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 database parameters supplied to the Update operation. + /// By default, any user who run operation on a database become an Admin on it. This property allows the caller to exclude the caller from Admins list. /// The cancellation token to use. /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, KustoDatabaseData data, CancellationToken cancellationToken = default) + public virtual ArmOperation Update(WaitUntil waitUntil, KustoDatabaseData data, CallerRole? callerRole = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(data, nameof(data)); @@ -360,8 +362,8 @@ public virtual ArmOperation Update(WaitUntil waitUntil, K scope.Start(); try { - var response = _kustoDatabaseDatabasesRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); - var operation = new KustoArmOperation(new KustoDatabaseOperationSource(Client), _kustoDatabaseDatabasesClientDiagnostics, Pipeline, _kustoDatabaseDatabasesRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + var response = _kustoDatabaseDatabasesRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, callerRole, cancellationToken); + var operation = new KustoArmOperation(new KustoDatabaseOperationSource(Client), _kustoDatabaseDatabasesClientDiagnostics, Pipeline, _kustoDatabaseDatabasesRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, callerRole).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; diff --git a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/CallerRole.cs b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/CallerRole.cs new file mode 100644 index 000000000000..14fdb879bab0 --- /dev/null +++ b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/CallerRole.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 +{ + /// The CallerRole. + public readonly partial struct CallerRole : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public CallerRole(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AdminValue = "Admin"; + private const string NoneValue = "None"; + + /// Admin. + public static CallerRole Admin { get; } = new CallerRole(AdminValue); + /// None. + public static CallerRole None { get; } = new CallerRole(NoneValue); + /// Determines if two values are the same. + public static bool operator ==(CallerRole left, CallerRole right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(CallerRole left, CallerRole right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator CallerRole(string value) => new CallerRole(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is CallerRole other && Equals(other); + /// + public bool Equals(CallerRole 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/DatabaseShareOrigin.cs b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/DatabaseShareOrigin.cs new file mode 100644 index 000000000000..61396c8544d2 --- /dev/null +++ b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/DatabaseShareOrigin.cs @@ -0,0 +1,54 @@ +// 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 origin of the following setup. + public readonly partial struct DatabaseShareOrigin : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DatabaseShareOrigin(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DirectValue = "Direct"; + private const string DataShareValue = "DataShare"; + private const string OtherValue = "Other"; + + /// Direct. + public static DatabaseShareOrigin Direct { get; } = new DatabaseShareOrigin(DirectValue); + /// DataShare. + public static DatabaseShareOrigin DataShare { get; } = new DatabaseShareOrigin(DataShareValue); + /// Other. + public static DatabaseShareOrigin Other { get; } = new DatabaseShareOrigin(OtherValue); + /// Determines if two values are the same. + public static bool operator ==(DatabaseShareOrigin left, DatabaseShareOrigin right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DatabaseShareOrigin left, DatabaseShareOrigin right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator DatabaseShareOrigin(string value) => new DatabaseShareOrigin(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DatabaseShareOrigin other && Equals(other); + /// + public bool Equals(DatabaseShareOrigin 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/KustoAttachedDatabaseConfigurationData.Serialization.cs b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoAttachedDatabaseConfigurationData.Serialization.cs index 47b421e2e731..6fd5329a9946 100644 --- a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoAttachedDatabaseConfigurationData.Serialization.cs +++ b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoAttachedDatabaseConfigurationData.Serialization.cs @@ -45,6 +45,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("tableLevelSharingProperties"); writer.WriteObjectValue(TableLevelSharingProperties); } + if (Optional.IsDefined(DatabaseNameOverride)) + { + writer.WritePropertyName("databaseNameOverride"); + writer.WriteStringValue(DatabaseNameOverride); + } + if (Optional.IsDefined(DatabaseNamePrefix)) + { + writer.WritePropertyName("databaseNamePrefix"); + writer.WriteStringValue(DatabaseNamePrefix); + } writer.WriteEndObject(); writer.WriteEndObject(); } @@ -62,6 +72,8 @@ internal static KustoAttachedDatabaseConfigurationData DeserializeKustoAttachedD Optional> attachedDatabaseNames = default; Optional defaultPrincipalsModificationKind = default; Optional tableLevelSharingProperties = default; + Optional databaseNameOverride = default; + Optional databaseNamePrefix = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("location")) @@ -168,11 +180,21 @@ internal static KustoAttachedDatabaseConfigurationData DeserializeKustoAttachedD tableLevelSharingProperties = KustoDatabaseTableLevelSharingProperties.DeserializeKustoDatabaseTableLevelSharingProperties(property0.Value); continue; } + if (property0.NameEquals("databaseNameOverride")) + { + databaseNameOverride = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("databaseNamePrefix")) + { + databaseNamePrefix = property0.Value.GetString(); + continue; + } } continue; } } - return new KustoAttachedDatabaseConfigurationData(id, name, type, systemData.Value, Optional.ToNullable(location), Optional.ToNullable(provisioningState), databaseName.Value, clusterResourceId.Value, Optional.ToList(attachedDatabaseNames), Optional.ToNullable(defaultPrincipalsModificationKind), tableLevelSharingProperties.Value); + return new KustoAttachedDatabaseConfigurationData(id, name, type, systemData.Value, Optional.ToNullable(location), Optional.ToNullable(provisioningState), databaseName.Value, clusterResourceId.Value, Optional.ToList(attachedDatabaseNames), Optional.ToNullable(defaultPrincipalsModificationKind), tableLevelSharingProperties.Value, databaseNameOverride.Value, databaseNamePrefix.Value); } } } diff --git a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoEventGridDataConnection.cs b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoEventGridDataConnection.cs index c2e742d84d0a..e07b11ca629b 100644 --- a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoEventGridDataConnection.cs +++ b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoEventGridDataConnection.cs @@ -37,7 +37,7 @@ public KustoEventGridDataConnection() /// The data format of the message. Optionally the data format can be added to each message. /// A Boolean value that, if set to true, indicates that ingestion should ignore the first record of every file. /// The name of blob storage event type to process. - /// Empty for non-managed identity based data connection. For system assigned identity, provide cluster resource Id. For user assigned identity (UAI) provide the UAI resource Id. + /// The resource ID of a managed identity (system or user assigned) to be used to authenticate with event hub and storage account. /// The object ID of managedIdentityResourceId. /// Indication for database routing information from the data connection, by default only database routing information is allowed. /// The provisioned state of the resource. @@ -77,7 +77,7 @@ internal KustoEventGridDataConnection(ResourceIdentifier id, string name, Resour public bool? IsFirstRecordIgnored { get; set; } /// The name of blob storage event type to process. public BlobStorageEventType? BlobStorageEventType { get; set; } - /// Empty for non-managed identity based data connection. For system assigned identity, provide cluster resource Id. For user assigned identity (UAI) provide the UAI resource Id. + /// The resource ID of a managed identity (system or user assigned) to be used to authenticate with event hub and storage account. public ResourceIdentifier ManagedIdentityResourceId { get; set; } /// The object ID of managedIdentityResourceId. public Guid? ManagedIdentityObjectId { get; } diff --git a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoEventHubDataConnection.Serialization.cs b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoEventHubDataConnection.Serialization.cs index 04185174ed2d..8f61c3dc33ee 100644 --- a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoEventHubDataConnection.Serialization.cs +++ b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoEventHubDataConnection.Serialization.cs @@ -77,6 +77,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("databaseRouting"); writer.WriteStringValue(DatabaseRouting.Value.ToString()); } + if (Optional.IsDefined(RetrievalStartOn)) + { + writer.WritePropertyName("retrievalStartDate"); + writer.WriteStringValue(RetrievalStartOn.Value, "O"); + } writer.WriteEndObject(); writer.WriteEndObject(); } @@ -100,6 +105,7 @@ internal static KustoEventHubDataConnection DeserializeKustoEventHubDataConnecti Optional managedIdentityResourceId = default; Optional managedIdentityObjectId = default; Optional databaseRouting = default; + Optional retrievalStartDate = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("location")) @@ -251,11 +257,21 @@ internal static KustoEventHubDataConnection DeserializeKustoEventHubDataConnecti databaseRouting = new KustoDatabaseRouting(property0.Value.GetString()); continue; } + if (property0.NameEquals("retrievalStartDate")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + retrievalStartDate = property0.Value.GetDateTimeOffset("O"); + continue; + } } continue; } } - return new KustoEventHubDataConnection(id, name, type, systemData.Value, Optional.ToNullable(location), kind, eventHubResourceId.Value, consumerGroup.Value, tableName.Value, mappingRuleName.Value, Optional.ToNullable(dataFormat), Optional.ToList(eventSystemProperties), Optional.ToNullable(compression), Optional.ToNullable(provisioningState), managedIdentityResourceId.Value, Optional.ToNullable(managedIdentityObjectId), Optional.ToNullable(databaseRouting)); + return new KustoEventHubDataConnection(id, name, type, systemData.Value, Optional.ToNullable(location), kind, eventHubResourceId.Value, consumerGroup.Value, tableName.Value, mappingRuleName.Value, Optional.ToNullable(dataFormat), Optional.ToList(eventSystemProperties), Optional.ToNullable(compression), Optional.ToNullable(provisioningState), managedIdentityResourceId.Value, Optional.ToNullable(managedIdentityObjectId), Optional.ToNullable(databaseRouting), Optional.ToNullable(retrievalStartDate)); } } } diff --git a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoEventHubDataConnection.cs b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoEventHubDataConnection.cs index 685094a024c7..fb7df8a9f02d 100644 --- a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoEventHubDataConnection.cs +++ b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoEventHubDataConnection.cs @@ -38,10 +38,11 @@ public KustoEventHubDataConnection() /// System properties of the event hub. /// The event hub messages compression type. /// The provisioned state of the resource. - /// Empty for non-managed identity based data connection. For system assigned identity, provide cluster resource Id. For user assigned identity (UAI) provide the UAI resource Id. + /// The resource ID of a managed identity (system or user assigned) to be used to authenticate with event hub. /// The object ID of the managedIdentityResourceId. /// Indication for database routing information from the data connection, by default only database routing information is allowed. - internal KustoEventHubDataConnection(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, AzureLocation? location, DataConnectionKind kind, ResourceIdentifier eventHubResourceId, string consumerGroup, string tableName, string mappingRuleName, KustoEventHubDataFormat? dataFormat, IList eventSystemProperties, EventHubMessagesCompressionType? compression, KustoProvisioningState? provisioningState, ResourceIdentifier managedIdentityResourceId, Guid? managedIdentityObjectId, KustoDatabaseRouting? databaseRouting) : base(id, name, resourceType, systemData, location, kind) + /// When defined, the data connection retrieves existing Event hub events created since the Retrieval start date. It can only retrieve events retained by the Event hub, based on its retention period. + internal KustoEventHubDataConnection(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, AzureLocation? location, DataConnectionKind kind, ResourceIdentifier eventHubResourceId, string consumerGroup, string tableName, string mappingRuleName, KustoEventHubDataFormat? dataFormat, IList eventSystemProperties, EventHubMessagesCompressionType? compression, KustoProvisioningState? provisioningState, ResourceIdentifier managedIdentityResourceId, Guid? managedIdentityObjectId, KustoDatabaseRouting? databaseRouting, DateTimeOffset? retrievalStartOn) : base(id, name, resourceType, systemData, location, kind) { EventHubResourceId = eventHubResourceId; ConsumerGroup = consumerGroup; @@ -54,6 +55,7 @@ internal KustoEventHubDataConnection(ResourceIdentifier id, string name, Resourc ManagedIdentityResourceId = managedIdentityResourceId; ManagedIdentityObjectId = managedIdentityObjectId; DatabaseRouting = databaseRouting; + RetrievalStartOn = retrievalStartOn; Kind = kind; } @@ -73,11 +75,13 @@ internal KustoEventHubDataConnection(ResourceIdentifier id, string name, Resourc public EventHubMessagesCompressionType? Compression { get; set; } /// The provisioned state of the resource. public KustoProvisioningState? ProvisioningState { get; } - /// Empty for non-managed identity based data connection. For system assigned identity, provide cluster resource Id. For user assigned identity (UAI) provide the UAI resource Id. + /// The resource ID of a managed identity (system or user assigned) to be used to authenticate with event hub. public ResourceIdentifier ManagedIdentityResourceId { get; set; } /// The object ID of the managedIdentityResourceId. public Guid? ManagedIdentityObjectId { get; } /// Indication for database routing information from the data connection, by default only database routing information is allowed. public KustoDatabaseRouting? DatabaseRouting { get; set; } + /// When defined, the data connection retrieves existing Event hub events created since the Retrieval start date. It can only retrieve events retained by the Event hub, based on its retention period. + public DateTimeOffset? RetrievalStartOn { get; set; } } } diff --git a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoFollowerDatabaseDefinition.Serialization.cs b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoFollowerDatabaseDefinition.Serialization.cs index 83b139031a84..f26b33621a16 100644 --- a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoFollowerDatabaseDefinition.Serialization.cs +++ b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoFollowerDatabaseDefinition.Serialization.cs @@ -27,6 +27,8 @@ internal static KustoFollowerDatabaseDefinition DeserializeKustoFollowerDatabase ResourceIdentifier clusterResourceId = default; string attachedDatabaseConfigurationName = default; Optional databaseName = default; + Optional tableLevelSharingProperties = default; + Optional databaseShareOrigin = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("clusterResourceId")) @@ -44,8 +46,28 @@ internal static KustoFollowerDatabaseDefinition DeserializeKustoFollowerDatabase databaseName = property.Value.GetString(); continue; } + if (property.NameEquals("tableLevelSharingProperties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + tableLevelSharingProperties = KustoDatabaseTableLevelSharingProperties.DeserializeKustoDatabaseTableLevelSharingProperties(property.Value); + continue; + } + if (property.NameEquals("databaseShareOrigin")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + databaseShareOrigin = new DatabaseShareOrigin(property.Value.GetString()); + continue; + } } - return new KustoFollowerDatabaseDefinition(clusterResourceId, attachedDatabaseConfigurationName, databaseName.Value); + return new KustoFollowerDatabaseDefinition(clusterResourceId, attachedDatabaseConfigurationName, databaseName.Value, tableLevelSharingProperties.Value, Optional.ToNullable(databaseShareOrigin)); } } } diff --git a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoFollowerDatabaseDefinition.cs b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoFollowerDatabaseDefinition.cs index 2a1521a6f030..9c8acdf7e0f0 100644 --- a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoFollowerDatabaseDefinition.cs +++ b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoFollowerDatabaseDefinition.cs @@ -30,11 +30,15 @@ public KustoFollowerDatabaseDefinition(ResourceIdentifier clusterResourceId, str /// Resource id of the cluster that follows a database owned by this cluster. /// Resource name of the attached database configuration in the follower cluster. /// The database name owned by this cluster that was followed. * in case following all databases. - internal KustoFollowerDatabaseDefinition(ResourceIdentifier clusterResourceId, string attachedDatabaseConfigurationName, string databaseName) + /// Table level sharing specifications. + /// The origin of the following setup. + internal KustoFollowerDatabaseDefinition(ResourceIdentifier clusterResourceId, string attachedDatabaseConfigurationName, string databaseName, KustoDatabaseTableLevelSharingProperties tableLevelSharingProperties, DatabaseShareOrigin? databaseShareOrigin) { ClusterResourceId = clusterResourceId; AttachedDatabaseConfigurationName = attachedDatabaseConfigurationName; DatabaseName = databaseName; + TableLevelSharingProperties = tableLevelSharingProperties; + DatabaseShareOrigin = databaseShareOrigin; } /// Resource id of the cluster that follows a database owned by this cluster. @@ -43,5 +47,9 @@ internal KustoFollowerDatabaseDefinition(ResourceIdentifier clusterResourceId, s public string AttachedDatabaseConfigurationName { get; set; } /// The database name owned by this cluster that was followed. * in case following all databases. public string DatabaseName { get; } + /// Table level sharing specifications. + public KustoDatabaseTableLevelSharingProperties TableLevelSharingProperties { get; } + /// The origin of the following setup. + public DatabaseShareOrigin? DatabaseShareOrigin { get; } } } diff --git a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoIotHubDataConnection.Serialization.cs b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoIotHubDataConnection.Serialization.cs index 7a08b7d6d32b..5fac653b38ae 100644 --- a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoIotHubDataConnection.Serialization.cs +++ b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoIotHubDataConnection.Serialization.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Collections.Generic; using System.Text.Json; using Azure.Core; @@ -71,6 +72,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("databaseRouting"); writer.WriteStringValue(DatabaseRouting.Value.ToString()); } + if (Optional.IsDefined(RetrievalStartOn)) + { + writer.WritePropertyName("retrievalStartDate"); + writer.WriteStringValue(RetrievalStartOn.Value, "O"); + } writer.WriteEndObject(); writer.WriteEndObject(); } @@ -91,6 +97,7 @@ internal static KustoIotHubDataConnection DeserializeKustoIotHubDataConnection(J Optional> eventSystemProperties = default; Optional sharedAccessPolicyName = default; Optional databaseRouting = default; + Optional retrievalStartDate = default; Optional provisioningState = default; foreach (var property in element.EnumerateObject()) { @@ -208,6 +215,16 @@ internal static KustoIotHubDataConnection DeserializeKustoIotHubDataConnection(J databaseRouting = new KustoDatabaseRouting(property0.Value.GetString()); continue; } + if (property0.NameEquals("retrievalStartDate")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + retrievalStartDate = property0.Value.GetDateTimeOffset("O"); + continue; + } if (property0.NameEquals("provisioningState")) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -222,7 +239,7 @@ internal static KustoIotHubDataConnection DeserializeKustoIotHubDataConnection(J continue; } } - return new KustoIotHubDataConnection(id, name, type, systemData.Value, Optional.ToNullable(location), kind, iotHubResourceId.Value, consumerGroup.Value, tableName.Value, mappingRuleName.Value, Optional.ToNullable(dataFormat), Optional.ToList(eventSystemProperties), sharedAccessPolicyName.Value, Optional.ToNullable(databaseRouting), Optional.ToNullable(provisioningState)); + return new KustoIotHubDataConnection(id, name, type, systemData.Value, Optional.ToNullable(location), kind, iotHubResourceId.Value, consumerGroup.Value, tableName.Value, mappingRuleName.Value, Optional.ToNullable(dataFormat), Optional.ToList(eventSystemProperties), sharedAccessPolicyName.Value, Optional.ToNullable(databaseRouting), Optional.ToNullable(retrievalStartDate), Optional.ToNullable(provisioningState)); } } } diff --git a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoIotHubDataConnection.cs b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoIotHubDataConnection.cs index 1b59177a0237..3d13898ef215 100644 --- a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoIotHubDataConnection.cs +++ b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoIotHubDataConnection.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Collections.Generic; using Azure.Core; using Azure.ResourceManager.Kusto; @@ -37,8 +38,9 @@ public KustoIotHubDataConnection() /// System properties of the iot hub. /// The name of the share access policy. /// Indication for database routing information from the data connection, by default only database routing information is allowed. + /// When defined, the data connection retrieves existing Event hub events created since the Retrieval start date. It can only retrieve events retained by the Event hub, based on its retention period. /// The provisioned state of the resource. - internal KustoIotHubDataConnection(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, AzureLocation? location, DataConnectionKind kind, ResourceIdentifier iotHubResourceId, string consumerGroup, string tableName, string mappingRuleName, KustoIotHubDataFormat? dataFormat, IList eventSystemProperties, string sharedAccessPolicyName, KustoDatabaseRouting? databaseRouting, KustoProvisioningState? provisioningState) : base(id, name, resourceType, systemData, location, kind) + internal KustoIotHubDataConnection(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, AzureLocation? location, DataConnectionKind kind, ResourceIdentifier iotHubResourceId, string consumerGroup, string tableName, string mappingRuleName, KustoIotHubDataFormat? dataFormat, IList eventSystemProperties, string sharedAccessPolicyName, KustoDatabaseRouting? databaseRouting, DateTimeOffset? retrievalStartOn, KustoProvisioningState? provisioningState) : base(id, name, resourceType, systemData, location, kind) { IotHubResourceId = iotHubResourceId; ConsumerGroup = consumerGroup; @@ -48,6 +50,7 @@ internal KustoIotHubDataConnection(ResourceIdentifier id, string name, ResourceT EventSystemProperties = eventSystemProperties; SharedAccessPolicyName = sharedAccessPolicyName; DatabaseRouting = databaseRouting; + RetrievalStartOn = retrievalStartOn; ProvisioningState = provisioningState; Kind = kind; } @@ -68,6 +71,8 @@ internal KustoIotHubDataConnection(ResourceIdentifier id, string name, ResourceT public string SharedAccessPolicyName { get; set; } /// Indication for database routing information from the data connection, by default only database routing information is allowed. public KustoDatabaseRouting? DatabaseRouting { get; set; } + /// When defined, the data connection retrieves existing Event hub events created since the Retrieval start date. It can only retrieve events retained by the Event hub, based on its retention period. + public DateTimeOffset? RetrievalStartOn { get; set; } /// The provisioned state of the resource. public KustoProvisioningState? ProvisioningState { get; } } diff --git a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoReadOnlyFollowingDatabase.Serialization.cs b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoReadOnlyFollowingDatabase.Serialization.cs index 802a72e0db42..1d9006a12352 100644 --- a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoReadOnlyFollowingDatabase.Serialization.cs +++ b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoReadOnlyFollowingDatabase.Serialization.cs @@ -50,6 +50,9 @@ internal static KustoReadOnlyFollowingDatabase DeserializeKustoReadOnlyFollowing Optional leaderClusterResourceId = default; Optional attachedDatabaseConfigurationName = default; Optional principalsModificationKind = default; + Optional tableLevelSharingProperties = default; + Optional originalDatabaseName = default; + Optional databaseShareOrigin = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("location")) @@ -161,11 +164,36 @@ internal static KustoReadOnlyFollowingDatabase DeserializeKustoReadOnlyFollowing principalsModificationKind = new KustoDatabasePrincipalsModificationKind(property0.Value.GetString()); continue; } + if (property0.NameEquals("tableLevelSharingProperties")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + tableLevelSharingProperties = KustoDatabaseTableLevelSharingProperties.DeserializeKustoDatabaseTableLevelSharingProperties(property0.Value); + continue; + } + if (property0.NameEquals("originalDatabaseName")) + { + originalDatabaseName = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("databaseShareOrigin")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + databaseShareOrigin = new DatabaseShareOrigin(property0.Value.GetString()); + continue; + } } continue; } } - return new KustoReadOnlyFollowingDatabase(id, name, type, systemData.Value, Optional.ToNullable(location), kind, Optional.ToNullable(provisioningState), Optional.ToNullable(softDeletePeriod), Optional.ToNullable(hotCachePeriod), statistics.Value, leaderClusterResourceId.Value, attachedDatabaseConfigurationName.Value, Optional.ToNullable(principalsModificationKind)); + return new KustoReadOnlyFollowingDatabase(id, name, type, systemData.Value, Optional.ToNullable(location), kind, Optional.ToNullable(provisioningState), Optional.ToNullable(softDeletePeriod), Optional.ToNullable(hotCachePeriod), statistics.Value, leaderClusterResourceId.Value, attachedDatabaseConfigurationName.Value, Optional.ToNullable(principalsModificationKind), tableLevelSharingProperties.Value, originalDatabaseName.Value, Optional.ToNullable(databaseShareOrigin)); } } } diff --git a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoReadOnlyFollowingDatabase.cs b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoReadOnlyFollowingDatabase.cs index 0a72b5a96f61..8adecc1e5d5f 100644 --- a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoReadOnlyFollowingDatabase.cs +++ b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoReadOnlyFollowingDatabase.cs @@ -35,7 +35,10 @@ public KustoReadOnlyFollowingDatabase() /// The name of the leader cluster. /// The name of the attached database configuration cluster. /// The principals modification kind of the database. - internal KustoReadOnlyFollowingDatabase(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, AzureLocation? location, KustoKind kind, KustoProvisioningState? provisioningState, TimeSpan? softDeletePeriod, TimeSpan? hotCachePeriod, DatabaseStatistics statistics, string leaderClusterResourceId, string attachedDatabaseConfigurationName, KustoDatabasePrincipalsModificationKind? principalsModificationKind) : base(id, name, resourceType, systemData, location, kind) + /// Table level sharing specifications. + /// The original database name, before databaseNameOverride or databaseNamePrefix where applied. + /// The origin of the following setup. + internal KustoReadOnlyFollowingDatabase(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, AzureLocation? location, KustoKind kind, KustoProvisioningState? provisioningState, TimeSpan? softDeletePeriod, TimeSpan? hotCachePeriod, DatabaseStatistics statistics, string leaderClusterResourceId, string attachedDatabaseConfigurationName, KustoDatabasePrincipalsModificationKind? principalsModificationKind, KustoDatabaseTableLevelSharingProperties tableLevelSharingProperties, string originalDatabaseName, DatabaseShareOrigin? databaseShareOrigin) : base(id, name, resourceType, systemData, location, kind) { ProvisioningState = provisioningState; SoftDeletePeriod = softDeletePeriod; @@ -44,6 +47,9 @@ internal KustoReadOnlyFollowingDatabase(ResourceIdentifier id, string name, Reso LeaderClusterResourceId = leaderClusterResourceId; AttachedDatabaseConfigurationName = attachedDatabaseConfigurationName; PrincipalsModificationKind = principalsModificationKind; + TableLevelSharingProperties = tableLevelSharingProperties; + OriginalDatabaseName = originalDatabaseName; + DatabaseShareOrigin = databaseShareOrigin; Kind = kind; } @@ -67,5 +73,11 @@ public float? StatisticsSize public string AttachedDatabaseConfigurationName { get; } /// The principals modification kind of the database. public KustoDatabasePrincipalsModificationKind? PrincipalsModificationKind { get; } + /// Table level sharing specifications. + public KustoDatabaseTableLevelSharingProperties TableLevelSharingProperties { get; } + /// The original database name, before databaseNameOverride or databaseNamePrefix where applied. + public string OriginalDatabaseName { get; } + /// The origin of the following setup. + public DatabaseShareOrigin? DatabaseShareOrigin { get; } } } diff --git a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoSkuName.cs b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoSkuName.cs index e79bcf814147..2c79716a6f08 100644 --- a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoSkuName.cs +++ b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/Models/KustoSkuName.cs @@ -40,6 +40,10 @@ public KustoSkuName(string value) private const string StandardL16sValue = "Standard_L16s"; private const string StandardL8sV2Value = "Standard_L8s_v2"; private const string StandardL16sV2Value = "Standard_L16s_v2"; + private const string StandardL8SV3Value = "Standard_L8s_v3"; + private const string StandardL16SV3Value = "Standard_L16s_v3"; + private const string StandardL8AsV3Value = "Standard_L8as_v3"; + private const string StandardL16AsV3Value = "Standard_L16as_v3"; private const string StandardE64iV3Value = "Standard_E64i_v3"; private const string StandardE80idsV4Value = "Standard_E80ids_v4"; private const string StandardE2aV4Value = "Standard_E2a_v4"; @@ -58,6 +62,12 @@ public KustoSkuName(string value) private const string StandardE4adsV5Value = "Standard_E4ads_v5"; private const string StandardE8adsV5Value = "Standard_E8ads_v5"; private const string StandardE16adsV5Value = "Standard_E16ads_v5"; + private const string StandardEC8AsV51TBPSValue = "Standard_EC8as_v5+1TB_PS"; + private const string StandardEC8AsV52TBPSValue = "Standard_EC8as_v5+2TB_PS"; + private const string StandardEC16AsV53TBPSValue = "Standard_EC16as_v5+3TB_PS"; + private const string StandardEC16AsV54TBPSValue = "Standard_EC16as_v5+4TB_PS"; + private const string StandardEC8AdsV5Value = "Standard_EC8ads_v5"; + private const string StandardEC16AdsV5Value = "Standard_EC16ads_v5"; private const string StandardE8sV41TBPSValue = "Standard_E8s_v4+1TB_PS"; private const string StandardE8sV42TBPSValue = "Standard_E8s_v4+2TB_PS"; private const string StandardE16sV43TBPSValue = "Standard_E16s_v4+3TB_PS"; @@ -66,6 +76,14 @@ public KustoSkuName(string value) private const string StandardE8sV52TBPSValue = "Standard_E8s_v5+2TB_PS"; private const string StandardE16sV53TBPSValue = "Standard_E16s_v5+3TB_PS"; private const string StandardE16sV54TBPSValue = "Standard_E16s_v5+4TB_PS"; + private const string StandardE2DV4Value = "Standard_E2d_v4"; + private const string StandardE4DV4Value = "Standard_E4d_v4"; + private const string StandardE8DV4Value = "Standard_E8d_v4"; + private const string StandardE16DV4Value = "Standard_E16d_v4"; + private const string StandardE2DV5Value = "Standard_E2d_v5"; + private const string StandardE4DV5Value = "Standard_E4d_v5"; + private const string StandardE8DV5Value = "Standard_E8d_v5"; + private const string StandardE16DV5Value = "Standard_E16d_v5"; /// Dev(No SLA)_Standard_D11_v2. public static KustoSkuName DevNoSlaStandardD11V2 { get; } = new KustoSkuName(DevNoSlaStandardD11V2Value); @@ -103,6 +121,14 @@ public KustoSkuName(string value) public static KustoSkuName StandardL8sV2 { get; } = new KustoSkuName(StandardL8sV2Value); /// Standard_L16s_v2. public static KustoSkuName StandardL16sV2 { get; } = new KustoSkuName(StandardL16sV2Value); + /// Standard_L8s_v3. + public static KustoSkuName StandardL8SV3 { get; } = new KustoSkuName(StandardL8SV3Value); + /// Standard_L16s_v3. + public static KustoSkuName StandardL16SV3 { get; } = new KustoSkuName(StandardL16SV3Value); + /// Standard_L8as_v3. + public static KustoSkuName StandardL8AsV3 { get; } = new KustoSkuName(StandardL8AsV3Value); + /// Standard_L16as_v3. + public static KustoSkuName StandardL16AsV3 { get; } = new KustoSkuName(StandardL16AsV3Value); /// Standard_E64i_v3. public static KustoSkuName StandardE64iV3 { get; } = new KustoSkuName(StandardE64iV3Value); /// Standard_E80ids_v4. @@ -139,6 +165,18 @@ public KustoSkuName(string value) public static KustoSkuName StandardE8adsV5 { get; } = new KustoSkuName(StandardE8adsV5Value); /// Standard_E16ads_v5. public static KustoSkuName StandardE16adsV5 { get; } = new KustoSkuName(StandardE16adsV5Value); + /// Standard_EC8as_v5+1TB_PS. + public static KustoSkuName StandardEC8AsV51TBPS { get; } = new KustoSkuName(StandardEC8AsV51TBPSValue); + /// Standard_EC8as_v5+2TB_PS. + public static KustoSkuName StandardEC8AsV52TBPS { get; } = new KustoSkuName(StandardEC8AsV52TBPSValue); + /// Standard_EC16as_v5+3TB_PS. + public static KustoSkuName StandardEC16AsV53TBPS { get; } = new KustoSkuName(StandardEC16AsV53TBPSValue); + /// Standard_EC16as_v5+4TB_PS. + public static KustoSkuName StandardEC16AsV54TBPS { get; } = new KustoSkuName(StandardEC16AsV54TBPSValue); + /// Standard_EC8ads_v5. + public static KustoSkuName StandardEC8AdsV5 { get; } = new KustoSkuName(StandardEC8AdsV5Value); + /// Standard_EC16ads_v5. + public static KustoSkuName StandardEC16AdsV5 { get; } = new KustoSkuName(StandardEC16AdsV5Value); /// Standard_E8s_v4+1TB_PS. public static KustoSkuName StandardE8sV41TBPS { get; } = new KustoSkuName(StandardE8sV41TBPSValue); /// Standard_E8s_v4+2TB_PS. @@ -155,6 +193,22 @@ public KustoSkuName(string value) public static KustoSkuName StandardE16sV53TBPS { get; } = new KustoSkuName(StandardE16sV53TBPSValue); /// Standard_E16s_v5+4TB_PS. public static KustoSkuName StandardE16sV54TBPS { get; } = new KustoSkuName(StandardE16sV54TBPSValue); + /// Standard_E2d_v4. + public static KustoSkuName StandardE2DV4 { get; } = new KustoSkuName(StandardE2DV4Value); + /// Standard_E4d_v4. + public static KustoSkuName StandardE4DV4 { get; } = new KustoSkuName(StandardE4DV4Value); + /// Standard_E8d_v4. + public static KustoSkuName StandardE8DV4 { get; } = new KustoSkuName(StandardE8DV4Value); + /// Standard_E16d_v4. + public static KustoSkuName StandardE16DV4 { get; } = new KustoSkuName(StandardE16DV4Value); + /// Standard_E2d_v5. + public static KustoSkuName StandardE2DV5 { get; } = new KustoSkuName(StandardE2DV5Value); + /// Standard_E4d_v5. + public static KustoSkuName StandardE4DV5 { get; } = new KustoSkuName(StandardE4DV5Value); + /// Standard_E8d_v5. + public static KustoSkuName StandardE8DV5 { get; } = new KustoSkuName(StandardE8DV5Value); + /// Standard_E16d_v5. + public static KustoSkuName StandardE16DV5 { get; } = new KustoSkuName(StandardE16DV5Value); /// Determines if two values are the same. public static bool operator ==(KustoSkuName left, KustoSkuName right) => left.Equals(right); /// Determines if two values are not the same. 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 ccb1bf196569..171f3801f95c 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 ?? "2022-02-01"; + _apiVersion = apiVersion ?? "2022-07-07"; _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 26ebef95401b..3ecd20baf31f 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 ?? "2022-02-01"; + _apiVersion = apiVersion ?? "2022-07-07"; _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 42462e3ca040..8ee1456d1b06 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 ?? "2022-02-01"; + _apiVersion = apiVersion ?? "2022-07-07"; _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 11c08cef93a9..e94ede2637a3 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 ?? "2022-02-01"; + _apiVersion = apiVersion ?? "2022-07-07"; _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 24eea3bed660..0259673e3ae3 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 ?? "2022-02-01"; + _apiVersion = apiVersion ?? "2022-07-07"; _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 bb7f5777e1a1..1e364daa871f 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 ?? "2022-02-01"; + _apiVersion = apiVersion ?? "2022-07-07"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -291,7 +291,7 @@ public Response Get(string subscriptionId, string resourceGro } } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string clusterName, string databaseName, KustoDatabaseData data) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string clusterName, string databaseName, KustoDatabaseData data, CallerRole? callerRole) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -307,6 +307,10 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r uri.AppendPath("/databases/", false); uri.AppendPath(databaseName, true); uri.AppendQuery("api-version", _apiVersion, true); + if (callerRole != null) + { + uri.AppendQuery("callerRole", callerRole.Value.ToString(), true); + } request.Uri = uri; request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); @@ -323,10 +327,11 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r /// The name of the Kusto cluster. /// The name of the database in the Kusto cluster. /// The database parameters supplied to the CreateOrUpdate operation. + /// By default, any user who run operation on a database become an Admin on it. This property allows the caller to exclude the caller from Admins list. /// 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 databaseName, KustoDatabaseData data, CancellationToken cancellationToken = default) + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string clusterName, string databaseName, KustoDatabaseData data, CallerRole? callerRole = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -334,7 +339,7 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, clusterName, databaseName, data); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, clusterName, databaseName, data, callerRole); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -353,10 +358,11 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re /// The name of the Kusto cluster. /// The name of the database in the Kusto cluster. /// The database parameters supplied to the CreateOrUpdate operation. + /// By default, any user who run operation on a database become an Admin on it. This property allows the caller to exclude the caller from Admins list. /// 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 databaseName, KustoDatabaseData data, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string clusterName, string databaseName, KustoDatabaseData data, CallerRole? callerRole = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -364,7 +370,7 @@ public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, clusterName, databaseName, data); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, clusterName, databaseName, data, callerRole); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -377,7 +383,7 @@ public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, } } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string clusterName, string databaseName, KustoDatabaseData data) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string clusterName, string databaseName, KustoDatabaseData data, CallerRole? callerRole) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -393,6 +399,10 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG uri.AppendPath("/databases/", false); uri.AppendPath(databaseName, true); uri.AppendQuery("api-version", _apiVersion, true); + if (callerRole != null) + { + uri.AppendQuery("callerRole", callerRole.Value.ToString(), true); + } request.Uri = uri; request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); @@ -409,10 +419,11 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG /// The name of the Kusto cluster. /// The name of the database in the Kusto cluster. /// The database parameters supplied to the Update operation. + /// By default, any user who run operation on a database become an Admin on it. This property allows the caller to exclude the caller from Admins list. /// 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 databaseName, KustoDatabaseData data, CancellationToken cancellationToken = default) + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string clusterName, string databaseName, KustoDatabaseData data, CallerRole? callerRole = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -420,7 +431,7 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); Argument.AssertNotNull(data, nameof(data)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, clusterName, databaseName, data); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, clusterName, databaseName, data, callerRole); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -439,10 +450,11 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr /// The name of the Kusto cluster. /// The name of the database in the Kusto cluster. /// The database parameters supplied to the Update operation. + /// By default, any user who run operation on a database become an Admin on it. This property allows the caller to exclude the caller from Admins list. /// 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 databaseName, KustoDatabaseData data, CancellationToken cancellationToken = default) + public Response Update(string subscriptionId, string resourceGroupName, string clusterName, string databaseName, KustoDatabaseData data, CallerRole? callerRole = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -450,7 +462,7 @@ public Response Update(string subscriptionId, string resourceGroupName, string c Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); Argument.AssertNotNull(data, nameof(data)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, clusterName, databaseName, data); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, clusterName, databaseName, data, callerRole); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { 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 281dc931b810..acb6cac36c90 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 ?? "2022-02-01"; + _apiVersion = apiVersion ?? "2022-07-07"; _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 22a860f9e34c..3dbd093465db 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 ?? "2022-02-01"; + _apiVersion = apiVersion ?? "2022-07-07"; _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 683fdc4765b4..c9ade9dbebe8 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 ?? "2022-02-01"; + _apiVersion = apiVersion ?? "2022-07-07"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } 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 a090797b6f4e..0689a1498481 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 ?? "2022-02-01"; + _apiVersion = apiVersion ?? "2022-07-07"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/kusto/Azure.ResourceManager.Kusto/src/autorest.md b/sdk/kusto/Azure.ResourceManager.Kusto/src/autorest.md index 05e671ccc85b..9ea0fb8e7019 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/aa8a23b8f92477d0fdce7af6ccffee1c604b3c56/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