From 9a3e01668323ea756a6626818c9ef9fc61ac7e85 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Mon, 16 Jan 2023 04:32:48 +0000 Subject: [PATCH] CodeGen from PR 21964 in Azure/azure-rest-api-specs Dev search microsoft.search 2022 09 01 (#21964) * Adds base for updating Microsoft.Search from version stable/2020-08-01 to version 2022-09-01 * Updates readme * Updates API version in new specs and examples * Add missing private endpoint connection properties (#21629) * add missing private endpoint connection properties * fix errors * Adding delegated identities to data plane * Revert "Adding delegated identities to data plane" This reverts commit def1bd3ba296458c19b8f04cb1a7a5b800d002f9. * Fix Lint ProvisioningStateValidation Error * Applying prettier changes npm run prettier -- --write Co-authored-by: Enrique Jaimes * Satumkur/new api ver 20220901 (#21922) * semantic updates * Add Dataplane RBAC related changes + examples * Prettier fixes * Fix LintDiff errors * Update SearchUpdateServiceDisableLocalAuth.json update erroneous api version param Co-authored-by: Samartha Tumkur Vani Co-authored-by: Enrique Jaimes * Add CMK Enforcement policy support (#21996) * Add CMK Enforcement policy support * Update api-version * Remove unused properties * Remove bypass property Co-authored-by: satumkurmsft <72990508+satumkurmsft@users.noreply.github.com> Co-authored-by: Matt <57731498+mattmsft@users.noreply.github.com> Co-authored-by: Samartha Tumkur Vani --- ...e.ResourceManager.Search.netstandard2.0.cs | 59 +++++++++++++++ .../Generated/Extensions/SearchExtensions.cs | 4 +- .../SubscriptionResourceExtensionClient.cs | 4 +- .../AadAuthFailureMode.Serialization.cs | 28 +++++++ .../Generated/Models/AadAuthFailureMode.cs | 18 +++++ ...laneAadOrApiKeyAuthOption.Serialization.cs | 45 +++++++++++ .../Models/DataPlaneAadOrApiKeyAuthOption.cs | 28 +++++++ .../DataPlaneAuthOptions.Serialization.cs | 66 +++++++++++++++++ .../Generated/Models/DataPlaneAuthOptions.cs | 74 +++++++++++++++++++ .../Models/EncryptionWithCmk.Serialization.cs | 56 ++++++++++++++ .../src/Generated/Models/EncryptionWithCmk.cs | 32 ++++++++ ...eLinkServiceConnectionProvisioningState.cs | 63 ++++++++++++++++ ...ncryptionComplianceStatus.Serialization.cs | 28 +++++++ .../SearchEncryptionComplianceStatus.cs | 18 +++++ .../SearchEncryptionWithCmk.Serialization.cs | 30 ++++++++ .../Models/SearchEncryptionWithCmk.cs | 20 +++++ .../Models/SearchServiceAdminKeyKind.cs | 4 +- .../Models/SearchServiceData.Serialization.cs | 57 +++++++++++++- .../Models/SearchServiceHostingMode.cs | 4 +- .../Models/SearchServiceListResult.cs | 4 +- .../SearchServiceNameUnavailableReason.cs | 4 +- .../SearchServicePatch.Serialization.cs | 57 +++++++++++++- .../Generated/Models/SearchServicePatch.cs | 14 +++- ...pointConnectionProperties.Serialization.cs | 29 +++++++- ...vicePrivateEndpointConnectionProperties.cs | 10 ++- ...rvicePrivateLinkServiceConnectionStatus.cs | 8 +- .../Models/SearchServiceProvisioningState.cs | 6 +- .../SearchServiceStatus.Serialization.cs | 2 + .../Generated/Models/SearchServiceStatus.cs | 16 ++-- .../src/Generated/Models/SearchSkuName.cs | 14 ++-- .../RestOperations/AdminKeysRestOperations.cs | 2 +- ...rivateEndpointConnectionsRestOperations.cs | 2 +- .../PrivateLinkResourcesRestOperations.cs | 2 +- .../RestOperations/QueryKeysRestOperations.cs | 2 +- .../RestOperations/ServicesRestOperations.cs | 18 ++--- ...haredPrivateLinkResourcesRestOperations.cs | 2 +- .../src/Generated/SearchServiceCollection.cs | 4 +- .../src/Generated/SearchServiceData.cs | 14 +++- .../src/autorest.md | 2 +- 39 files changed, 794 insertions(+), 56 deletions(-) create mode 100644 sdk/search/Azure.ResourceManager.Search/src/Generated/Models/AadAuthFailureMode.Serialization.cs create mode 100644 sdk/search/Azure.ResourceManager.Search/src/Generated/Models/AadAuthFailureMode.cs create mode 100644 sdk/search/Azure.ResourceManager.Search/src/Generated/Models/DataPlaneAadOrApiKeyAuthOption.Serialization.cs create mode 100644 sdk/search/Azure.ResourceManager.Search/src/Generated/Models/DataPlaneAadOrApiKeyAuthOption.cs create mode 100644 sdk/search/Azure.ResourceManager.Search/src/Generated/Models/DataPlaneAuthOptions.Serialization.cs create mode 100644 sdk/search/Azure.ResourceManager.Search/src/Generated/Models/DataPlaneAuthOptions.cs create mode 100644 sdk/search/Azure.ResourceManager.Search/src/Generated/Models/EncryptionWithCmk.Serialization.cs create mode 100644 sdk/search/Azure.ResourceManager.Search/src/Generated/Models/EncryptionWithCmk.cs create mode 100644 sdk/search/Azure.ResourceManager.Search/src/Generated/Models/PrivateLinkServiceConnectionProvisioningState.cs create mode 100644 sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchEncryptionComplianceStatus.Serialization.cs create mode 100644 sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchEncryptionComplianceStatus.cs create mode 100644 sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchEncryptionWithCmk.Serialization.cs create mode 100644 sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchEncryptionWithCmk.cs diff --git a/sdk/search/Azure.ResourceManager.Search/api/Azure.ResourceManager.Search.netstandard2.0.cs b/sdk/search/Azure.ResourceManager.Search/api/Azure.ResourceManager.Search.netstandard2.0.cs index 711cf5c8c7f5..775b10974fba 100644 --- a/sdk/search/Azure.ResourceManager.Search/api/Azure.ResourceManager.Search.netstandard2.0.cs +++ b/sdk/search/Azure.ResourceManager.Search/api/Azure.ResourceManager.Search.netstandard2.0.cs @@ -65,6 +65,9 @@ protected SearchServiceCollection() { } public partial class SearchServiceData : Azure.ResourceManager.Models.TrackedResourceData { public SearchServiceData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } + public Azure.ResourceManager.Search.Models.DataPlaneAuthOptions AuthOptions { get { throw null; } set { } } + public bool? DisableLocalAuth { get { throw null; } set { } } + public Azure.ResourceManager.Search.Models.EncryptionWithCmk EncryptionWithCmk { get { throw null; } set { } } public Azure.ResourceManager.Search.Models.SearchServiceHostingMode? HostingMode { get { throw null; } set { } } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public System.Collections.Generic.IList IPRules { get { throw null; } } @@ -153,6 +156,56 @@ public SharedSearchServicePrivateLinkResourceData() { } } namespace Azure.ResourceManager.Search.Models { + public enum AadAuthFailureMode + { + Http403 = 0, + Http401WithBearerChallenge = 1, + } + public partial class DataPlaneAuthOptions + { + public DataPlaneAuthOptions() { } + public Azure.ResourceManager.Search.Models.AadAuthFailureMode? AadAuthFailureMode { get { throw null; } set { } } + public System.BinaryData ApiKeyOnly { get { throw null; } set { } } + } + public partial class EncryptionWithCmk + { + public EncryptionWithCmk() { } + public Azure.ResourceManager.Search.Models.SearchEncryptionComplianceStatus? EncryptionComplianceStatus { get { throw null; } } + public Azure.ResourceManager.Search.Models.SearchEncryptionWithCmk? Enforcement { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct PrivateLinkServiceConnectionProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PrivateLinkServiceConnectionProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.Search.Models.PrivateLinkServiceConnectionProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.Search.Models.PrivateLinkServiceConnectionProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.Search.Models.PrivateLinkServiceConnectionProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.Search.Models.PrivateLinkServiceConnectionProvisioningState Incomplete { get { throw null; } } + public static Azure.ResourceManager.Search.Models.PrivateLinkServiceConnectionProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.Search.Models.PrivateLinkServiceConnectionProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.Search.Models.PrivateLinkServiceConnectionProvisioningState 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.Search.Models.PrivateLinkServiceConnectionProvisioningState left, Azure.ResourceManager.Search.Models.PrivateLinkServiceConnectionProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.Search.Models.PrivateLinkServiceConnectionProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Search.Models.PrivateLinkServiceConnectionProvisioningState left, Azure.ResourceManager.Search.Models.PrivateLinkServiceConnectionProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public enum SearchEncryptionComplianceStatus + { + Compliant = 0, + NonCompliant = 1, + } + public enum SearchEncryptionWithCmk + { + Unspecified = 0, + Disabled = 1, + Enabled = 2, + } public partial class SearchManagementRequestOptions { public SearchManagementRequestOptions() { } @@ -226,6 +279,9 @@ internal SearchServiceNameAvailabilityResult() { } public partial class SearchServicePatch : Azure.ResourceManager.Models.TrackedResourceData { public SearchServicePatch(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } + public Azure.ResourceManager.Search.Models.DataPlaneAuthOptions AuthOptions { get { throw null; } set { } } + public bool? DisableLocalAuth { get { throw null; } set { } } + public Azure.ResourceManager.Search.Models.EncryptionWithCmk EncryptionWithCmk { get { throw null; } set { } } public Azure.ResourceManager.Search.Models.SearchServiceHostingMode? HostingMode { get { throw null; } set { } } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public System.Collections.Generic.IList IPRules { get { throw null; } } @@ -243,7 +299,9 @@ public partial class SearchServicePrivateEndpointConnectionProperties { public SearchServicePrivateEndpointConnectionProperties() { } public Azure.ResourceManager.Search.Models.SearchServicePrivateLinkServiceConnectionState ConnectionState { get { throw null; } set { } } + public string GroupId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier PrivateEndpointId { get { throw null; } set { } } + public Azure.ResourceManager.Search.Models.PrivateLinkServiceConnectionProvisioningState? ProvisioningState { get { throw null; } set { } } } public partial class SearchServicePrivateLinkServiceConnectionState { @@ -301,6 +359,7 @@ public enum SearchServiceStatus Degraded = 3, Disabled = 4, Error = 5, + Stopped = 6, } public enum SearchSkuName { diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Extensions/SearchExtensions.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Extensions/SearchExtensions.cs index fd3335a91569..eda24bcac9f1 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Extensions/SearchExtensions.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Extensions/SearchExtensions.cs @@ -29,7 +29,7 @@ private static SubscriptionResourceExtensionClient GetExtensionClient(Subscripti } /// - /// Gets a list of all search services in the given subscription. + /// Gets a list of all Search services in the given subscription. /// /// /// Request Path @@ -51,7 +51,7 @@ public static AsyncPageable GetSearchServicesAsync(this S } /// - /// Gets a list of all search services in the given subscription. + /// Gets a list of all Search services in the given subscription. /// /// /// Request Path diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs index a82a4397f572..84bc0774fcea 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs @@ -44,7 +44,7 @@ private string GetApiVersionOrNull(ResourceType resourceType) } /// - /// Gets a list of all search services in the given subscription. + /// Gets a list of all Search services in the given subscription. /// /// /// Request Path @@ -67,7 +67,7 @@ public virtual AsyncPageable GetSearchServicesAsync(Searc } /// - /// Gets a list of all search services in the given subscription. + /// Gets a list of all Search services in the given subscription. /// /// /// Request Path diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/AadAuthFailureMode.Serialization.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/AadAuthFailureMode.Serialization.cs new file mode 100644 index 000000000000..7fbc9945605c --- /dev/null +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/AadAuthFailureMode.Serialization.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.Search.Models +{ + internal static partial class AadAuthFailureModeExtensions + { + public static string ToSerialString(this AadAuthFailureMode value) => value switch + { + AadAuthFailureMode.Http403 => "http403", + AadAuthFailureMode.Http401WithBearerChallenge => "http401WithBearerChallenge", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown AadAuthFailureMode value.") + }; + + public static AadAuthFailureMode ToAadAuthFailureMode(this string value) + { + if (string.Equals(value, "http403", StringComparison.InvariantCultureIgnoreCase)) return AadAuthFailureMode.Http403; + if (string.Equals(value, "http401WithBearerChallenge", StringComparison.InvariantCultureIgnoreCase)) return AadAuthFailureMode.Http401WithBearerChallenge; + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown AadAuthFailureMode value."); + } + } +} diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/AadAuthFailureMode.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/AadAuthFailureMode.cs new file mode 100644 index 000000000000..249408d891ea --- /dev/null +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/AadAuthFailureMode.cs @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.Search.Models +{ + /// Describes what response the data plane API of a Search service would send for requests that failed authentication. + public enum AadAuthFailureMode + { + /// Indicates that requests that failed authentication should be presented with an HTTP status code of 403 (Forbidden). + Http403, + /// Indicates that requests that failed authentication should be presented with an HTTP status code of 401 (Unauthorized) and present a Bearer Challenge. + Http401WithBearerChallenge + } +} diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/DataPlaneAadOrApiKeyAuthOption.Serialization.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/DataPlaneAadOrApiKeyAuthOption.Serialization.cs new file mode 100644 index 000000000000..7104912810be --- /dev/null +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/DataPlaneAadOrApiKeyAuthOption.Serialization.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Search.Models +{ + internal partial class DataPlaneAadOrApiKeyAuthOption : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(AadAuthFailureMode)) + { + writer.WritePropertyName("aadAuthFailureMode"); + writer.WriteStringValue(AadAuthFailureMode.Value.ToSerialString()); + } + writer.WriteEndObject(); + } + + internal static DataPlaneAadOrApiKeyAuthOption DeserializeDataPlaneAadOrApiKeyAuthOption(JsonElement element) + { + Optional aadAuthFailureMode = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("aadAuthFailureMode")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + aadAuthFailureMode = property.Value.GetString().ToAadAuthFailureMode(); + continue; + } + } + return new DataPlaneAadOrApiKeyAuthOption(Optional.ToNullable(aadAuthFailureMode)); + } + } +} diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/DataPlaneAadOrApiKeyAuthOption.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/DataPlaneAadOrApiKeyAuthOption.cs new file mode 100644 index 000000000000..df757b58fa70 --- /dev/null +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/DataPlaneAadOrApiKeyAuthOption.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.Search.Models +{ + /// Indicates that either the API key or an access token from Azure Active Directory can be used for authentication. + internal partial class DataPlaneAadOrApiKeyAuthOption + { + /// Initializes a new instance of DataPlaneAadOrApiKeyAuthOption. + public DataPlaneAadOrApiKeyAuthOption() + { + } + + /// Initializes a new instance of DataPlaneAadOrApiKeyAuthOption. + /// Describes what response the data plane API of a Search service would send for requests that failed authentication. + internal DataPlaneAadOrApiKeyAuthOption(AadAuthFailureMode? aadAuthFailureMode) + { + AadAuthFailureMode = aadAuthFailureMode; + } + + /// Describes what response the data plane API of a Search service would send for requests that failed authentication. + public AadAuthFailureMode? AadAuthFailureMode { get; set; } + } +} diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/DataPlaneAuthOptions.Serialization.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/DataPlaneAuthOptions.Serialization.cs new file mode 100644 index 000000000000..4ef9bb1ff466 --- /dev/null +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/DataPlaneAuthOptions.Serialization.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Search.Models +{ + public partial class DataPlaneAuthOptions : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(ApiKeyOnly)) + { + writer.WritePropertyName("apiKeyOnly"); +#if NET6_0_OR_GREATER + writer.WriteRawValue(ApiKeyOnly); +#else + JsonSerializer.Serialize(writer, JsonDocument.Parse(ApiKeyOnly.ToString()).RootElement); +#endif + } + if (Optional.IsDefined(AadOrApiKey)) + { + writer.WritePropertyName("aadOrApiKey"); + writer.WriteObjectValue(AadOrApiKey); + } + writer.WriteEndObject(); + } + + internal static DataPlaneAuthOptions DeserializeDataPlaneAuthOptions(JsonElement element) + { + Optional apiKeyOnly = default; + Optional aadOrApiKey = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("apiKeyOnly")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + apiKeyOnly = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("aadOrApiKey")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + aadOrApiKey = DataPlaneAadOrApiKeyAuthOption.DeserializeDataPlaneAadOrApiKeyAuthOption(property.Value); + continue; + } + } + return new DataPlaneAuthOptions(apiKeyOnly.Value, aadOrApiKey.Value); + } + } +} diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/DataPlaneAuthOptions.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/DataPlaneAuthOptions.cs new file mode 100644 index 000000000000..d6feac834951 --- /dev/null +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/DataPlaneAuthOptions.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.Search.Models +{ + /// Defines the options for how the data plane API of a Search service authenticates requests. This cannot be set if 'disableLocalAuth' is set to true. + public partial class DataPlaneAuthOptions + { + /// Initializes a new instance of DataPlaneAuthOptions. + public DataPlaneAuthOptions() + { + } + + /// Initializes a new instance of DataPlaneAuthOptions. + /// Indicates that only the API key needs to be used for authentication. + /// Indicates that either the API key or an access token from Azure Active Directory can be used for authentication. + internal DataPlaneAuthOptions(BinaryData apiKeyOnly, DataPlaneAadOrApiKeyAuthOption aadOrApiKey) + { + ApiKeyOnly = apiKeyOnly; + AadOrApiKey = aadOrApiKey; + } + + /// + /// Indicates that only the API key needs to be used for authentication. + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formated json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + public BinaryData ApiKeyOnly { get; set; } + /// Indicates that either the API key or an access token from Azure Active Directory can be used for authentication. + internal DataPlaneAadOrApiKeyAuthOption AadOrApiKey { get; set; } + /// Describes what response the data plane API of a Search service would send for requests that failed authentication. + public AadAuthFailureMode? AadAuthFailureMode + { + get => AadOrApiKey is null ? default : AadOrApiKey.AadAuthFailureMode; + set + { + if (AadOrApiKey is null) + AadOrApiKey = new DataPlaneAadOrApiKeyAuthOption(); + AadOrApiKey.AadAuthFailureMode = value; + } + } + } +} diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/EncryptionWithCmk.Serialization.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/EncryptionWithCmk.Serialization.cs new file mode 100644 index 000000000000..51e57550c1b1 --- /dev/null +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/EncryptionWithCmk.Serialization.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Search.Models +{ + public partial class EncryptionWithCmk : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Enforcement)) + { + writer.WritePropertyName("enforcement"); + writer.WriteStringValue(Enforcement.Value.ToSerialString()); + } + writer.WriteEndObject(); + } + + internal static EncryptionWithCmk DeserializeEncryptionWithCmk(JsonElement element) + { + Optional enforcement = default; + Optional encryptionComplianceStatus = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("enforcement")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + enforcement = property.Value.GetString().ToSearchEncryptionWithCmk(); + continue; + } + if (property.NameEquals("encryptionComplianceStatus")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + encryptionComplianceStatus = property.Value.GetString().ToSearchEncryptionComplianceStatus(); + continue; + } + } + return new EncryptionWithCmk(Optional.ToNullable(enforcement), Optional.ToNullable(encryptionComplianceStatus)); + } + } +} diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/EncryptionWithCmk.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/EncryptionWithCmk.cs new file mode 100644 index 000000000000..347ad25b8d3b --- /dev/null +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/EncryptionWithCmk.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.Search.Models +{ + /// Describes a policy that determines how resources within the search service are to be encrypted with Customer Managed Keys. + public partial class EncryptionWithCmk + { + /// Initializes a new instance of EncryptionWithCmk. + public EncryptionWithCmk() + { + } + + /// Initializes a new instance of EncryptionWithCmk. + /// Describes how a search service should enforce having one or more non customer encrypted resources. + /// Describes whether the search service is compliant or not with respect to having non customer encrypted resources. If a service has more than one non customer encrypted resource and 'Enforcement' is 'enabled' then the service will be marked as 'nonCompliant'. + internal EncryptionWithCmk(SearchEncryptionWithCmk? enforcement, SearchEncryptionComplianceStatus? encryptionComplianceStatus) + { + Enforcement = enforcement; + EncryptionComplianceStatus = encryptionComplianceStatus; + } + + /// Describes how a search service should enforce having one or more non customer encrypted resources. + public SearchEncryptionWithCmk? Enforcement { get; set; } + /// Describes whether the search service is compliant or not with respect to having non customer encrypted resources. If a service has more than one non customer encrypted resource and 'Enforcement' is 'enabled' then the service will be marked as 'nonCompliant'. + public SearchEncryptionComplianceStatus? EncryptionComplianceStatus { get; } + } +} diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/PrivateLinkServiceConnectionProvisioningState.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/PrivateLinkServiceConnectionProvisioningState.cs new file mode 100644 index 000000000000..3b2d0c28ff77 --- /dev/null +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/PrivateLinkServiceConnectionProvisioningState.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Search.Models +{ + /// The provisioning state of the private link service connection. Can be Updating, Deleting, Failed, Succeeded, or Incomplete. + public readonly partial struct PrivateLinkServiceConnectionProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public PrivateLinkServiceConnectionProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string UpdatingValue = "Updating"; + private const string DeletingValue = "Deleting"; + private const string FailedValue = "Failed"; + private const string SucceededValue = "Succeeded"; + private const string IncompleteValue = "Incomplete"; + private const string CanceledValue = "Canceled"; + + /// The private link service connection is in the process of being created along with other resources for it to be fully functional. + public static PrivateLinkServiceConnectionProvisioningState Updating { get; } = new PrivateLinkServiceConnectionProvisioningState(UpdatingValue); + /// The private link service connection is in the process of being deleted. + public static PrivateLinkServiceConnectionProvisioningState Deleting { get; } = new PrivateLinkServiceConnectionProvisioningState(DeletingValue); + /// The private link service connection has failed to be provisioned or deleted. + public static PrivateLinkServiceConnectionProvisioningState Failed { get; } = new PrivateLinkServiceConnectionProvisioningState(FailedValue); + /// The private link service connection has finished provisioning and is ready for approval. + public static PrivateLinkServiceConnectionProvisioningState Succeeded { get; } = new PrivateLinkServiceConnectionProvisioningState(SucceededValue); + /// Provisioning request for the private link service connection resource has been accepted but the process of creation has not commenced yet. + public static PrivateLinkServiceConnectionProvisioningState Incomplete { get; } = new PrivateLinkServiceConnectionProvisioningState(IncompleteValue); + /// Provisioning request for the private link service connection resource has been canceled. + public static PrivateLinkServiceConnectionProvisioningState Canceled { get; } = new PrivateLinkServiceConnectionProvisioningState(CanceledValue); + /// Determines if two values are the same. + public static bool operator ==(PrivateLinkServiceConnectionProvisioningState left, PrivateLinkServiceConnectionProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PrivateLinkServiceConnectionProvisioningState left, PrivateLinkServiceConnectionProvisioningState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator PrivateLinkServiceConnectionProvisioningState(string value) => new PrivateLinkServiceConnectionProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PrivateLinkServiceConnectionProvisioningState other && Equals(other); + /// + public bool Equals(PrivateLinkServiceConnectionProvisioningState 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/search/Azure.ResourceManager.Search/src/Generated/Models/SearchEncryptionComplianceStatus.Serialization.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchEncryptionComplianceStatus.Serialization.cs new file mode 100644 index 000000000000..4f00b3d3d53d --- /dev/null +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchEncryptionComplianceStatus.Serialization.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.Search.Models +{ + internal static partial class SearchEncryptionComplianceStatusExtensions + { + public static string ToSerialString(this SearchEncryptionComplianceStatus value) => value switch + { + SearchEncryptionComplianceStatus.Compliant => "Compliant", + SearchEncryptionComplianceStatus.NonCompliant => "NonCompliant", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown SearchEncryptionComplianceStatus value.") + }; + + public static SearchEncryptionComplianceStatus ToSearchEncryptionComplianceStatus(this string value) + { + if (string.Equals(value, "Compliant", StringComparison.InvariantCultureIgnoreCase)) return SearchEncryptionComplianceStatus.Compliant; + if (string.Equals(value, "NonCompliant", StringComparison.InvariantCultureIgnoreCase)) return SearchEncryptionComplianceStatus.NonCompliant; + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown SearchEncryptionComplianceStatus value."); + } + } +} diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchEncryptionComplianceStatus.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchEncryptionComplianceStatus.cs new file mode 100644 index 000000000000..6e215c500b87 --- /dev/null +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchEncryptionComplianceStatus.cs @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.Search.Models +{ + /// Describes whether the search service is compliant or not with respect to having non customer encrypted resources. If a service has more than one non customer encrypted resource and 'Enforcement' is 'enabled' then the service will be marked as 'nonCompliant'. + public enum SearchEncryptionComplianceStatus + { + /// Indicates that the search service is compliant, either because number of non customer encrypted resources is zero or enforcement is disabled. + Compliant, + /// Indicates that the search service has more than 1 non customer encrypted resources. + NonCompliant + } +} diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchEncryptionWithCmk.Serialization.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchEncryptionWithCmk.Serialization.cs new file mode 100644 index 000000000000..97e197a6f850 --- /dev/null +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchEncryptionWithCmk.Serialization.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.Search.Models +{ + internal static partial class SearchEncryptionWithCmkExtensions + { + public static string ToSerialString(this SearchEncryptionWithCmk value) => value switch + { + SearchEncryptionWithCmk.Unspecified => "Unspecified", + SearchEncryptionWithCmk.Disabled => "Disabled", + SearchEncryptionWithCmk.Enabled => "Enabled", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown SearchEncryptionWithCmk value.") + }; + + public static SearchEncryptionWithCmk ToSearchEncryptionWithCmk(this string value) + { + if (string.Equals(value, "Unspecified", StringComparison.InvariantCultureIgnoreCase)) return SearchEncryptionWithCmk.Unspecified; + if (string.Equals(value, "Disabled", StringComparison.InvariantCultureIgnoreCase)) return SearchEncryptionWithCmk.Disabled; + if (string.Equals(value, "Enabled", StringComparison.InvariantCultureIgnoreCase)) return SearchEncryptionWithCmk.Enabled; + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown SearchEncryptionWithCmk value."); + } + } +} diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchEncryptionWithCmk.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchEncryptionWithCmk.cs new file mode 100644 index 000000000000..96fba360eaab --- /dev/null +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchEncryptionWithCmk.cs @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.Search.Models +{ + /// Describes how a search service should enforce having one or more non customer encrypted resources. + public enum SearchEncryptionWithCmk + { + /// Enforcement policy is not explicitly specified, with the behavior being the same as if it were set to 'Disabled'. + Unspecified, + /// No enforcement will be made and the search service can have non customer encrypted resources. + Disabled, + /// Search service will be marked as non-compliant if there are one or more non customer encrypted resources. + Enabled + } +} diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceAdminKeyKind.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceAdminKeyKind.cs index 76f712992f6d..9b3f25492c8b 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceAdminKeyKind.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceAdminKeyKind.cs @@ -10,9 +10,9 @@ namespace Azure.ResourceManager.Search.Models /// The SearchServiceAdminKeyKind. public enum SearchServiceAdminKeyKind { - /// primary. + /// The primary API key for the search service. Primary, - /// secondary. + /// The secondary API key for the search service. Secondary } } diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceData.Serialization.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceData.Serialization.cs index 4b2eefda0741..4d022bbd9803 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceData.Serialization.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceData.Serialization.cs @@ -68,6 +68,28 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("networkRuleSet"); writer.WriteObjectValue(NetworkRuleSet); } + if (Optional.IsDefined(EncryptionWithCmk)) + { + writer.WritePropertyName("encryptionWithCmk"); + writer.WriteObjectValue(EncryptionWithCmk); + } + if (Optional.IsDefined(DisableLocalAuth)) + { + if (DisableLocalAuth != null) + { + writer.WritePropertyName("disableLocalAuth"); + writer.WriteBooleanValue(DisableLocalAuth.Value); + } + else + { + writer.WriteNull("disableLocalAuth"); + } + } + if (Optional.IsDefined(AuthOptions)) + { + writer.WritePropertyName("authOptions"); + writer.WriteObjectValue(AuthOptions); + } writer.WriteEndObject(); writer.WriteEndObject(); } @@ -90,6 +112,9 @@ internal static SearchServiceData DeserializeSearchServiceData(JsonElement eleme Optional statusDetails = default; Optional provisioningState = default; Optional networkRuleSet = default; + Optional encryptionWithCmk = default; + Optional disableLocalAuth = default; + Optional authOptions = default; Optional> privateEndpointConnections = default; Optional> sharedPrivateLinkResources = default; foreach (var property in element.EnumerateObject()) @@ -243,6 +268,36 @@ internal static SearchServiceData DeserializeSearchServiceData(JsonElement eleme networkRuleSet = NetworkRuleSet.DeserializeNetworkRuleSet(property0.Value); continue; } + if (property0.NameEquals("encryptionWithCmk")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + encryptionWithCmk = EncryptionWithCmk.DeserializeEncryptionWithCmk(property0.Value); + continue; + } + if (property0.NameEquals("disableLocalAuth")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + disableLocalAuth = null; + continue; + } + disableLocalAuth = property0.Value.GetBoolean(); + continue; + } + if (property0.NameEquals("authOptions")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + authOptions = DataPlaneAuthOptions.DeserializeDataPlaneAuthOptions(property0.Value); + continue; + } if (property0.NameEquals("privateEndpointConnections")) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -277,7 +332,7 @@ internal static SearchServiceData DeserializeSearchServiceData(JsonElement eleme continue; } } - return new SearchServiceData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, sku.Value, identity, Optional.ToNullable(replicaCount), Optional.ToNullable(partitionCount), Optional.ToNullable(hostingMode), Optional.ToNullable(publicNetworkAccess), Optional.ToNullable(status), statusDetails.Value, Optional.ToNullable(provisioningState), networkRuleSet.Value, Optional.ToList(privateEndpointConnections), Optional.ToList(sharedPrivateLinkResources)); + return new SearchServiceData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, sku.Value, identity, Optional.ToNullable(replicaCount), Optional.ToNullable(partitionCount), Optional.ToNullable(hostingMode), Optional.ToNullable(publicNetworkAccess), Optional.ToNullable(status), statusDetails.Value, Optional.ToNullable(provisioningState), networkRuleSet.Value, encryptionWithCmk.Value, Optional.ToNullable(disableLocalAuth), authOptions.Value, Optional.ToList(privateEndpointConnections), Optional.ToList(sharedPrivateLinkResources)); } } } diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceHostingMode.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceHostingMode.cs index 2f2afe7e7f1e..dc47859fb2a5 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceHostingMode.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceHostingMode.cs @@ -10,9 +10,9 @@ namespace Azure.ResourceManager.Search.Models /// Applicable only for the standard3 SKU. You can set this property to enable up to 3 high density partitions that allow up to 1000 indexes, which is much higher than the maximum indexes allowed for any other SKU. For the standard3 SKU, the value is either 'default' or 'highDensity'. For all other SKUs, this value must be 'default'. public enum SearchServiceHostingMode { - /// default. + /// The limit on number of indexes is determined by the default limits for the SKU. Default, - /// highDensity. + /// Only application for standard3 SKU, where the search service can have up to 1000 indexes. HighDensity } } diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceListResult.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceListResult.cs index 3e8cf73c9480..02180a22b4b5 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceListResult.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceListResult.cs @@ -21,7 +21,7 @@ internal SearchServiceListResult() } /// Initializes a new instance of SearchServiceListResult. - /// The list of search services. + /// The list of Search services. /// Request URL that can be used to query next page of search services. Returned when the total number of requested search services exceed maximum page size. internal SearchServiceListResult(IReadOnlyList value, string nextLink) { @@ -29,7 +29,7 @@ internal SearchServiceListResult(IReadOnlyList value, string NextLink = nextLink; } - /// The list of search services. + /// The list of Search services. public IReadOnlyList Value { get; } /// Request URL that can be used to query next page of search services. Returned when the total number of requested search services exceed maximum page size. public string NextLink { get; } diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceNameUnavailableReason.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceNameUnavailableReason.cs index af03e9d99247..2232f5deca55 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceNameUnavailableReason.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceNameUnavailableReason.cs @@ -25,9 +25,9 @@ public SearchServiceNameUnavailableReason(string value) private const string InvalidValue = "Invalid"; private const string AlreadyExistsValue = "AlreadyExists"; - /// Invalid. + /// The search service name does not match naming requirements. public static SearchServiceNameUnavailableReason Invalid { get; } = new SearchServiceNameUnavailableReason(InvalidValue); - /// AlreadyExists. + /// The search service name is already assigned to a different search service. public static SearchServiceNameUnavailableReason AlreadyExists { get; } = new SearchServiceNameUnavailableReason(AlreadyExistsValue); /// Determines if two values are the same. public static bool operator ==(SearchServiceNameUnavailableReason left, SearchServiceNameUnavailableReason right) => left.Equals(right); diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServicePatch.Serialization.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServicePatch.Serialization.cs index cd264d875545..91c2e4ca6e9b 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServicePatch.Serialization.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServicePatch.Serialization.cs @@ -68,6 +68,28 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("networkRuleSet"); writer.WriteObjectValue(NetworkRuleSet); } + if (Optional.IsDefined(EncryptionWithCmk)) + { + writer.WritePropertyName("encryptionWithCmk"); + writer.WriteObjectValue(EncryptionWithCmk); + } + if (Optional.IsDefined(DisableLocalAuth)) + { + if (DisableLocalAuth != null) + { + writer.WritePropertyName("disableLocalAuth"); + writer.WriteBooleanValue(DisableLocalAuth.Value); + } + else + { + writer.WriteNull("disableLocalAuth"); + } + } + if (Optional.IsDefined(AuthOptions)) + { + writer.WritePropertyName("authOptions"); + writer.WriteObjectValue(AuthOptions); + } writer.WriteEndObject(); writer.WriteEndObject(); } @@ -90,6 +112,9 @@ internal static SearchServicePatch DeserializeSearchServicePatch(JsonElement ele Optional statusDetails = default; Optional provisioningState = default; Optional networkRuleSet = default; + Optional encryptionWithCmk = default; + Optional disableLocalAuth = default; + Optional authOptions = default; Optional> privateEndpointConnections = default; Optional> sharedPrivateLinkResources = default; foreach (var property in element.EnumerateObject()) @@ -243,6 +268,36 @@ internal static SearchServicePatch DeserializeSearchServicePatch(JsonElement ele networkRuleSet = NetworkRuleSet.DeserializeNetworkRuleSet(property0.Value); continue; } + if (property0.NameEquals("encryptionWithCmk")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + encryptionWithCmk = EncryptionWithCmk.DeserializeEncryptionWithCmk(property0.Value); + continue; + } + if (property0.NameEquals("disableLocalAuth")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + disableLocalAuth = null; + continue; + } + disableLocalAuth = property0.Value.GetBoolean(); + continue; + } + if (property0.NameEquals("authOptions")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + authOptions = DataPlaneAuthOptions.DeserializeDataPlaneAuthOptions(property0.Value); + continue; + } if (property0.NameEquals("privateEndpointConnections")) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -277,7 +332,7 @@ internal static SearchServicePatch DeserializeSearchServicePatch(JsonElement ele continue; } } - return new SearchServicePatch(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, sku.Value, identity, Optional.ToNullable(replicaCount), Optional.ToNullable(partitionCount), Optional.ToNullable(hostingMode), Optional.ToNullable(publicNetworkAccess), Optional.ToNullable(status), statusDetails.Value, Optional.ToNullable(provisioningState), networkRuleSet.Value, Optional.ToList(privateEndpointConnections), Optional.ToList(sharedPrivateLinkResources)); + return new SearchServicePatch(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, sku.Value, identity, Optional.ToNullable(replicaCount), Optional.ToNullable(partitionCount), Optional.ToNullable(hostingMode), Optional.ToNullable(publicNetworkAccess), Optional.ToNullable(status), statusDetails.Value, Optional.ToNullable(provisioningState), networkRuleSet.Value, encryptionWithCmk.Value, Optional.ToNullable(disableLocalAuth), authOptions.Value, Optional.ToList(privateEndpointConnections), Optional.ToList(sharedPrivateLinkResources)); } } } diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServicePatch.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServicePatch.cs index 8a5a8558d6d3..907f235401ee 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServicePatch.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServicePatch.cs @@ -40,9 +40,12 @@ public SearchServicePatch(AzureLocation location) : base(location) /// The details of the search service status. /// The state of the last provisioning operation performed on the search service. Provisioning is an intermediate state that occurs while service capacity is being established. After capacity is set up, provisioningState changes to either 'succeeded' or 'failed'. Client applications can poll provisioning status (the recommended polling interval is from 30 seconds to one minute) by using the Get Search Service operation to see when an operation is completed. If you are using the free service, this value tends to come back as 'succeeded' directly in the call to Create search service. This is because the free service uses capacity that is already set up. /// Network specific rules that determine how the Azure Cognitive Search service may be reached. + /// Specifies any policy regarding encryption of resources (such as indexes) using customer manager keys within a search service. + /// When set to true, calls to the search service will not be permitted to utilize API keys for authentication. This cannot be set to true if 'dataPlaneAuthOptions' are defined. + /// Defines the options for how the data plane API of a search service authenticates requests. This cannot be set if 'disableLocalAuth' is set to true. /// The list of private endpoint connections to the Azure Cognitive Search service. /// The list of shared private link resources managed by the Azure Cognitive Search service. - internal SearchServicePatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, SearchSku sku, ManagedServiceIdentity identity, int? replicaCount, int? partitionCount, SearchServiceHostingMode? hostingMode, SearchServicePublicNetworkAccess? publicNetworkAccess, SearchServiceStatus? status, string statusDetails, SearchServiceProvisioningState? provisioningState, NetworkRuleSet networkRuleSet, IReadOnlyList privateEndpointConnections, IReadOnlyList sharedPrivateLinkResources) : base(id, name, resourceType, systemData, tags, location) + internal SearchServicePatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, SearchSku sku, ManagedServiceIdentity identity, int? replicaCount, int? partitionCount, SearchServiceHostingMode? hostingMode, SearchServicePublicNetworkAccess? publicNetworkAccess, SearchServiceStatus? status, string statusDetails, SearchServiceProvisioningState? provisioningState, NetworkRuleSet networkRuleSet, EncryptionWithCmk encryptionWithCmk, bool? disableLocalAuth, DataPlaneAuthOptions authOptions, IReadOnlyList privateEndpointConnections, IReadOnlyList sharedPrivateLinkResources) : base(id, name, resourceType, systemData, tags, location) { Sku = sku; Identity = identity; @@ -54,6 +57,9 @@ internal SearchServicePatch(ResourceIdentifier id, string name, ResourceType res StatusDetails = statusDetails; ProvisioningState = provisioningState; NetworkRuleSet = networkRuleSet; + EncryptionWithCmk = encryptionWithCmk; + DisableLocalAuth = disableLocalAuth; + AuthOptions = authOptions; PrivateEndpointConnections = privateEndpointConnections; SharedPrivateLinkResources = sharedPrivateLinkResources; } @@ -101,6 +107,12 @@ public IList IPRules } } + /// Specifies any policy regarding encryption of resources (such as indexes) using customer manager keys within a search service. + public EncryptionWithCmk EncryptionWithCmk { get; set; } + /// When set to true, calls to the search service will not be permitted to utilize API keys for authentication. This cannot be set to true if 'dataPlaneAuthOptions' are defined. + public bool? DisableLocalAuth { get; set; } + /// Defines the options for how the data plane API of a search service authenticates requests. This cannot be set if 'disableLocalAuth' is set to true. + public DataPlaneAuthOptions AuthOptions { get; set; } /// The list of private endpoint connections to the Azure Cognitive Search service. public IReadOnlyList PrivateEndpointConnections { get; } /// The list of shared private link resources managed by the Azure Cognitive Search service. diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServicePrivateEndpointConnectionProperties.Serialization.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServicePrivateEndpointConnectionProperties.Serialization.cs index c3c44d07ca57..f82ff7873b4b 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServicePrivateEndpointConnectionProperties.Serialization.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServicePrivateEndpointConnectionProperties.Serialization.cs @@ -26,6 +26,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("privateLinkServiceConnectionState"); writer.WriteObjectValue(ConnectionState); } + if (Optional.IsDefined(GroupId)) + { + writer.WritePropertyName("groupId"); + writer.WriteStringValue(GroupId); + } + if (Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } writer.WriteEndObject(); } @@ -33,6 +43,8 @@ internal static SearchServicePrivateEndpointConnectionProperties DeserializeSear { Optional privateEndpoint = default; Optional privateLinkServiceConnectionState = default; + Optional groupId = default; + Optional provisioningState = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("privateEndpoint")) @@ -55,8 +67,23 @@ internal static SearchServicePrivateEndpointConnectionProperties DeserializeSear privateLinkServiceConnectionState = SearchServicePrivateLinkServiceConnectionState.DeserializeSearchServicePrivateLinkServiceConnectionState(property.Value); continue; } + if (property.NameEquals("groupId")) + { + groupId = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + provisioningState = new PrivateLinkServiceConnectionProvisioningState(property.Value.GetString()); + continue; + } } - return new SearchServicePrivateEndpointConnectionProperties(privateEndpoint, privateLinkServiceConnectionState.Value); + return new SearchServicePrivateEndpointConnectionProperties(privateEndpoint, privateLinkServiceConnectionState.Value, groupId.Value, Optional.ToNullable(provisioningState)); } } } diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServicePrivateEndpointConnectionProperties.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServicePrivateEndpointConnectionProperties.cs index 8c202b6db040..5cdcec8b42c9 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServicePrivateEndpointConnectionProperties.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServicePrivateEndpointConnectionProperties.cs @@ -21,10 +21,14 @@ public SearchServicePrivateEndpointConnectionProperties() /// Initializes a new instance of SearchServicePrivateEndpointConnectionProperties. /// The private endpoint resource from Microsoft.Network provider. /// Describes the current state of an existing Private Link Service connection to the Azure Private Endpoint. - internal SearchServicePrivateEndpointConnectionProperties(WritableSubResource privateEndpoint, SearchServicePrivateLinkServiceConnectionState connectionState) + /// The group id from the provider of resource the private link service connection is for. + /// The provisioning state of the private link service connection. Can be Updating, Deleting, Failed, Succeeded, or Incomplete. + internal SearchServicePrivateEndpointConnectionProperties(WritableSubResource privateEndpoint, SearchServicePrivateLinkServiceConnectionState connectionState, string groupId, PrivateLinkServiceConnectionProvisioningState? provisioningState) { PrivateEndpoint = privateEndpoint; ConnectionState = connectionState; + GroupId = groupId; + ProvisioningState = provisioningState; } /// The private endpoint resource from Microsoft.Network provider. @@ -43,5 +47,9 @@ public ResourceIdentifier PrivateEndpointId /// Describes the current state of an existing Private Link Service connection to the Azure Private Endpoint. public SearchServicePrivateLinkServiceConnectionState ConnectionState { get; set; } + /// The group id from the provider of resource the private link service connection is for. + public string GroupId { get; set; } + /// The provisioning state of the private link service connection. Can be Updating, Deleting, Failed, Succeeded, or Incomplete. + public PrivateLinkServiceConnectionProvisioningState? ProvisioningState { get; set; } } } diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServicePrivateLinkServiceConnectionStatus.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServicePrivateLinkServiceConnectionStatus.cs index afb17a29baa7..3e71ac045527 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServicePrivateLinkServiceConnectionStatus.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServicePrivateLinkServiceConnectionStatus.cs @@ -10,13 +10,13 @@ namespace Azure.ResourceManager.Search.Models /// Status of the the private link service connection. Can be Pending, Approved, Rejected, or Disconnected. public enum SearchServicePrivateLinkServiceConnectionStatus { - /// Pending. + /// The private endpoint connection has been created and is pending approval. Pending, - /// Approved. + /// The private endpoint connection is approved and is ready for use. Approved, - /// Rejected. + /// The private endpoint connection has been rejected and cannot be used. Rejected, - /// Disconnected. + /// The private endpoint connection has been removed from the service. Disconnected } } diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceProvisioningState.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceProvisioningState.cs index 6e88fb894516..37c85031c349 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceProvisioningState.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceProvisioningState.cs @@ -10,11 +10,11 @@ namespace Azure.ResourceManager.Search.Models /// The state of the last provisioning operation performed on the search service. Provisioning is an intermediate state that occurs while service capacity is being established. After capacity is set up, provisioningState changes to either 'succeeded' or 'failed'. Client applications can poll provisioning status (the recommended polling interval is from 30 seconds to one minute) by using the Get Search Service operation to see when an operation is completed. If you are using the free service, this value tends to come back as 'succeeded' directly in the call to Create search service. This is because the free service uses capacity that is already set up. public enum SearchServiceProvisioningState { - /// succeeded. + /// The last provisioning operation has completed successfully. Succeeded, - /// provisioning. + /// The search service is being provisioned or scaled up or down. Provisioning, - /// failed. + /// The last provisioning operation has failed. Failed } } diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceStatus.Serialization.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceStatus.Serialization.cs index 56545cfbcf98..970c80c0e0a3 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceStatus.Serialization.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceStatus.Serialization.cs @@ -19,6 +19,7 @@ internal static partial class SearchServiceStatusExtensions SearchServiceStatus.Degraded => "degraded", SearchServiceStatus.Disabled => "disabled", SearchServiceStatus.Error => "error", + SearchServiceStatus.Stopped => "stopped", _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown SearchServiceStatus value.") }; @@ -30,6 +31,7 @@ public static SearchServiceStatus ToSearchServiceStatus(this string value) if (string.Equals(value, "degraded", StringComparison.InvariantCultureIgnoreCase)) return SearchServiceStatus.Degraded; if (string.Equals(value, "disabled", StringComparison.InvariantCultureIgnoreCase)) return SearchServiceStatus.Disabled; if (string.Equals(value, "error", StringComparison.InvariantCultureIgnoreCase)) return SearchServiceStatus.Error; + if (string.Equals(value, "stopped", StringComparison.InvariantCultureIgnoreCase)) return SearchServiceStatus.Stopped; throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown SearchServiceStatus value."); } } diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceStatus.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceStatus.cs index c9bd779bc218..dd279bb64b31 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceStatus.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceStatus.cs @@ -10,17 +10,19 @@ namespace Azure.ResourceManager.Search.Models /// The status of the search service. Possible values include: 'running': The search service is running and no provisioning operations are underway. 'provisioning': The search service is being provisioned or scaled up or down. 'deleting': The search service is being deleted. 'degraded': The search service is degraded. This can occur when the underlying search units are not healthy. The search service is most likely operational, but performance might be slow and some requests might be dropped. 'disabled': The search service is disabled. In this state, the service will reject all API requests. 'error': The search service is in an error state. If your service is in the degraded, disabled, or error states, it means the Azure Cognitive Search team is actively investigating the underlying issue. Dedicated services in these states are still chargeable based on the number of search units provisioned. public enum SearchServiceStatus { - /// running. + /// The search service is running and no provisioning operations are underway. Running, - /// provisioning. + /// The search service is being provisioned or scaled up or down. Provisioning, - /// deleting. + /// The search service is being deleted. Deleting, - /// degraded. + /// The search service is degraded because underlying search units are not healthy. Degraded, - /// disabled. + /// The search service is disabled and all API requests will be rejected. Disabled, - /// error. - Error + /// The search service is in error state, indicating either a failure to provision or to be deleted. + Error, + /// The search service is in a subscription that's disabled. + Stopped } } diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchSkuName.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchSkuName.cs index d6cca14d4782..a960a4b60ec9 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchSkuName.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchSkuName.cs @@ -10,19 +10,19 @@ namespace Azure.ResourceManager.Search.Models /// The SKU of the search service. Valid values include: 'free': Shared service. 'basic': Dedicated service with up to 3 replicas. 'standard': Dedicated service with up to 12 partitions and 12 replicas. 'standard2': Similar to standard, but with more capacity per search unit. 'standard3': The largest Standard offering with up to 12 partitions and 12 replicas (or up to 3 partitions with more indexes if you also set the hostingMode property to 'highDensity'). 'storage_optimized_l1': Supports 1TB per partition, up to 12 partitions. 'storage_optimized_l2': Supports 2TB per partition, up to 12 partitions.'. public enum SearchSkuName { - /// free. + /// Free tier, with no SLA guarantees and a subset of features offered to paid tiers. Free, - /// basic. + /// Paid tier dedicated service with up to 3 replicas. Basic, - /// standard. + /// Paid tier dedicated service with up to 12 partitions and 12 replicas. Standard, - /// standard2. + /// Similar to 'standard', but with more capacity per search unit. Standard2, - /// standard3. + /// The largest Standard offering with up to 12 partitions and 12 replicas (or up to 3 partitions with more indexes if you also set the hostingMode property to 'highDensity'). Standard3, - /// storage_optimized_l1. + /// Paid tier dedicated service that supports 1TB per partition, up to 12 partitions. StorageOptimizedL1, - /// storage_optimized_l2. + /// Paid tier dedicated service that supports 2TB per partition, up to 12 partitions. StorageOptimizedL2 } } diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/AdminKeysRestOperations.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/AdminKeysRestOperations.cs index a499ef696f80..88062c25020f 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/AdminKeysRestOperations.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/AdminKeysRestOperations.cs @@ -33,7 +33,7 @@ public AdminKeysRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2020-08-01"; + _apiVersion = apiVersion ?? "2022-09-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs index 0a3fcde4daa3..a3633b904f16 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs +++ b/sdk/search/Azure.ResourceManager.Search/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 ?? "2020-08-01"; + _apiVersion = apiVersion ?? "2022-09-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs index 1e42e5449952..fa0180b3c97d 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs +++ b/sdk/search/Azure.ResourceManager.Search/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 ?? "2020-08-01"; + _apiVersion = apiVersion ?? "2022-09-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/QueryKeysRestOperations.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/QueryKeysRestOperations.cs index 60bc7bf8988f..a3b16ea0e2b5 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/QueryKeysRestOperations.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/QueryKeysRestOperations.cs @@ -33,7 +33,7 @@ public QueryKeysRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2020-08-01"; + _apiVersion = apiVersion ?? "2022-09-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/ServicesRestOperations.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/ServicesRestOperations.cs index 22c425387d66..50e0a7081215 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/ServicesRestOperations.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/ServicesRestOperations.cs @@ -33,7 +33,7 @@ public ServicesRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2020-08-01"; + _apiVersion = apiVersion ?? "2022-09-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -382,7 +382,7 @@ internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, str return message; } - /// Gets a list of all search services in the given resource group. + /// Gets a list of all Search services in the given resource group. /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. /// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. /// Parameter group. @@ -410,7 +410,7 @@ public async Task> ListByResourceGroupAsync(st } } - /// Gets a list of all search services in the given resource group. + /// Gets a list of all Search services in the given resource group. /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. /// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. /// Parameter group. @@ -455,7 +455,7 @@ internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId, Sear return message; } - /// Gets a list of all search services in the given subscription. + /// Gets a list of all Search services in the given subscription. /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. /// Parameter group. /// The cancellation token to use. @@ -481,7 +481,7 @@ public async Task> ListBySubscriptionAsync(str } } - /// Gets a list of all search services in the given subscription. + /// Gets a list of all Search services in the given subscription. /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. /// Parameter group. /// The cancellation token to use. @@ -598,7 +598,7 @@ internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, s return message; } - /// Gets a list of all search services in the given resource group. + /// Gets a list of all Search services in the given resource group. /// The URL to the next page of results. /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. /// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. @@ -628,7 +628,7 @@ public async Task> ListByResourceGroupNextPage } } - /// Gets a list of all search services in the given resource group. + /// Gets a list of all Search services in the given resource group. /// The URL to the next page of results. /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. /// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. @@ -672,7 +672,7 @@ internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, st return message; } - /// Gets a list of all search services in the given subscription. + /// Gets a list of all Search services in the given subscription. /// The URL to the next page of results. /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. /// Parameter group. @@ -700,7 +700,7 @@ public async Task> ListBySubscriptionNextPageA } } - /// Gets a list of all search services in the given subscription. + /// Gets a list of all Search services in the given subscription. /// The URL to the next page of results. /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. /// Parameter group. diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/SharedPrivateLinkResourcesRestOperations.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/SharedPrivateLinkResourcesRestOperations.cs index 7f9b7dfaba66..58b3061f655b 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/SharedPrivateLinkResourcesRestOperations.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/SharedPrivateLinkResourcesRestOperations.cs @@ -33,7 +33,7 @@ public SharedPrivateLinkResourcesRestOperations(HttpPipeline pipeline, string ap { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2020-08-01"; + _apiVersion = apiVersion ?? "2022-09-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/SearchServiceCollection.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/SearchServiceCollection.cs index cf1267b29864..c00a880b8a8f 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/SearchServiceCollection.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/SearchServiceCollection.cs @@ -215,7 +215,7 @@ public virtual Response Get(string searchServiceName, Sea } /// - /// Gets a list of all search services in the given resource group. + /// Gets a list of all Search services in the given resource group. /// /// /// Request Path @@ -238,7 +238,7 @@ public virtual AsyncPageable GetAllAsync(SearchManagement } /// - /// Gets a list of all search services in the given resource group. + /// Gets a list of all Search services in the given resource group. /// /// /// Request Path diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/SearchServiceData.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/SearchServiceData.cs index 71b0ffff153b..a651ba9e9dc4 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/SearchServiceData.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/SearchServiceData.cs @@ -40,9 +40,12 @@ public SearchServiceData(AzureLocation location) : base(location) /// The details of the search service status. /// The state of the last provisioning operation performed on the search service. Provisioning is an intermediate state that occurs while service capacity is being established. After capacity is set up, provisioningState changes to either 'succeeded' or 'failed'. Client applications can poll provisioning status (the recommended polling interval is from 30 seconds to one minute) by using the Get Search Service operation to see when an operation is completed. If you are using the free service, this value tends to come back as 'succeeded' directly in the call to Create search service. This is because the free service uses capacity that is already set up. /// Network specific rules that determine how the Azure Cognitive Search service may be reached. + /// Specifies any policy regarding encryption of resources (such as indexes) using customer manager keys within a search service. + /// When set to true, calls to the search service will not be permitted to utilize API keys for authentication. This cannot be set to true if 'dataPlaneAuthOptions' are defined. + /// Defines the options for how the data plane API of a search service authenticates requests. This cannot be set if 'disableLocalAuth' is set to true. /// The list of private endpoint connections to the Azure Cognitive Search service. /// The list of shared private link resources managed by the Azure Cognitive Search service. - internal SearchServiceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, SearchSku sku, ManagedServiceIdentity identity, int? replicaCount, int? partitionCount, SearchServiceHostingMode? hostingMode, SearchServicePublicNetworkAccess? publicNetworkAccess, SearchServiceStatus? status, string statusDetails, SearchServiceProvisioningState? provisioningState, NetworkRuleSet networkRuleSet, IReadOnlyList privateEndpointConnections, IReadOnlyList sharedPrivateLinkResources) : base(id, name, resourceType, systemData, tags, location) + internal SearchServiceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, SearchSku sku, ManagedServiceIdentity identity, int? replicaCount, int? partitionCount, SearchServiceHostingMode? hostingMode, SearchServicePublicNetworkAccess? publicNetworkAccess, SearchServiceStatus? status, string statusDetails, SearchServiceProvisioningState? provisioningState, NetworkRuleSet networkRuleSet, EncryptionWithCmk encryptionWithCmk, bool? disableLocalAuth, DataPlaneAuthOptions authOptions, IReadOnlyList privateEndpointConnections, IReadOnlyList sharedPrivateLinkResources) : base(id, name, resourceType, systemData, tags, location) { Sku = sku; Identity = identity; @@ -54,6 +57,9 @@ internal SearchServiceData(ResourceIdentifier id, string name, ResourceType reso StatusDetails = statusDetails; ProvisioningState = provisioningState; NetworkRuleSet = networkRuleSet; + EncryptionWithCmk = encryptionWithCmk; + DisableLocalAuth = disableLocalAuth; + AuthOptions = authOptions; PrivateEndpointConnections = privateEndpointConnections; SharedPrivateLinkResources = sharedPrivateLinkResources; } @@ -101,6 +107,12 @@ public IList IPRules } } + /// Specifies any policy regarding encryption of resources (such as indexes) using customer manager keys within a search service. + public EncryptionWithCmk EncryptionWithCmk { get; set; } + /// When set to true, calls to the search service will not be permitted to utilize API keys for authentication. This cannot be set to true if 'dataPlaneAuthOptions' are defined. + public bool? DisableLocalAuth { get; set; } + /// Defines the options for how the data plane API of a search service authenticates requests. This cannot be set if 'disableLocalAuth' is set to true. + public DataPlaneAuthOptions AuthOptions { get; set; } /// The list of private endpoint connections to the Azure Cognitive Search service. public IReadOnlyList PrivateEndpointConnections { get; } /// The list of shared private link resources managed by the Azure Cognitive Search service. diff --git a/sdk/search/Azure.ResourceManager.Search/src/autorest.md b/sdk/search/Azure.ResourceManager.Search/src/autorest.md index e809e10e1d67..165b5e2adb1e 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/autorest.md +++ b/sdk/search/Azure.ResourceManager.Search/src/autorest.md @@ -8,7 +8,7 @@ azure-arm: true csharp: true library-name: Search namespace: Azure.ResourceManager.Search -require: https://github.com/Azure/azure-rest-api-specs/blob/6b08774c89877269e73e11ac3ecbd1bd4e14f5a0/specification/search/resource-manager/readme.md +require: /mnt/vss/_work/1/s/azure-rest-api-specs/specification/search/resource-manager/readme.md output-folder: $(this-folder)/Generated clear-output-folder: true skip-csproj: true