/
SearchServicePatch.cs
180 lines (170 loc) · 16.2 KB
/
SearchServicePatch.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// <auto-generated/>
#nullable disable
using System;
using System.Collections.Generic;
using Azure.Core;
using Azure.ResourceManager.Models;
namespace Azure.ResourceManager.Search.Models
{
/// <summary> The parameters used to update a search service. </summary>
public partial class SearchServicePatch : TrackedResourceData
{
/// <summary>
/// Keeps track of any properties unknown to the library.
/// <para>
/// To assign an object to the value of this property use <see cref="BinaryData.FromObjectAsJson{T}(T, System.Text.Json.JsonSerializerOptions?)"/>.
/// </para>
/// <para>
/// To assign an already formatted json string to this property use <see cref="BinaryData.FromString(string)"/>.
/// </para>
/// <para>
/// Examples:
/// <list type="bullet">
/// <item>
/// <term>BinaryData.FromObjectAsJson("foo")</term>
/// <description>Creates a payload of "foo".</description>
/// </item>
/// <item>
/// <term>BinaryData.FromString("\"foo\"")</term>
/// <description>Creates a payload of "foo".</description>
/// </item>
/// <item>
/// <term>BinaryData.FromObjectAsJson(new { key = "value" })</term>
/// <description>Creates a payload of { "key": "value" }.</description>
/// </item>
/// <item>
/// <term>BinaryData.FromString("{\"key\": \"value\"}")</term>
/// <description>Creates a payload of { "key": "value" }.</description>
/// </item>
/// </list>
/// </para>
/// </summary>
private IDictionary<string, BinaryData> _serializedAdditionalRawData;
/// <summary> Initializes a new instance of <see cref="SearchServicePatch"/>. </summary>
/// <param name="location"> The location. </param>
public SearchServicePatch(AzureLocation location) : base(location)
{
PrivateEndpointConnections = new ChangeTrackingList<SearchPrivateEndpointConnectionData>();
SharedPrivateLinkResources = new ChangeTrackingList<SharedSearchServicePrivateLinkResourceData>();
}
/// <summary> Initializes a new instance of <see cref="SearchServicePatch"/>. </summary>
/// <param name="id"> The id. </param>
/// <param name="name"> The name. </param>
/// <param name="resourceType"> The resourceType. </param>
/// <param name="systemData"> The systemData. </param>
/// <param name="tags"> The tags. </param>
/// <param name="location"> The location. </param>
/// <param name="sku"> The SKU of the search service, which determines the billing rate and capacity limits. This property is required when creating a new search service. </param>
/// <param name="identity"> The identity of the resource. Current supported identity types: None, SystemAssigned. </param>
/// <param name="replicaCount"> The number of replicas in the search service. If specified, it must be a value between 1 and 12 inclusive for standard SKUs or between 1 and 3 inclusive for basic SKU. </param>
/// <param name="partitionCount"> The number of partitions in the search service; if specified, it can be 1, 2, 3, 4, 6, or 12. Values greater than 1 are only valid for standard SKUs. For 'standard3' services with hostingMode set to 'highDensity', the allowed values are between 1 and 3. </param>
/// <param name="hostingMode"> 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'. </param>
/// <param name="publicNetworkAccess"> This value can be set to 'enabled' to avoid breaking changes on existing customer resources and templates. If set to 'disabled', traffic over public interface is not allowed, and private endpoint connections would be the exclusive access method. </param>
/// <param name="status"> 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, Microsoft is actively investigating the underlying issue. Dedicated services in these states are still chargeable based on the number of search units provisioned. </param>
/// <param name="statusDetails"> The details of the search service status. </param>
/// <param name="provisioningState"> 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. </param>
/// <param name="networkRuleSet"> Network-specific rules that determine how the search service may be reached. </param>
/// <param name="encryptionWithCmk"> Specifies any policy regarding encryption of resources (such as indexes) using customer manager keys within a search service. </param>
/// <param name="isLocalAuthDisabled"> 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. </param>
/// <param name="authOptions"> 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. </param>
/// <param name="privateEndpointConnections"> The list of private endpoint connections to the search service. </param>
/// <param name="semanticSearch"> Sets options that control the availability of semantic search. This configuration is only possible for certain search SKUs in certain locations. </param>
/// <param name="sharedPrivateLinkResources"> The list of shared private link resources managed by the search service. </param>
/// <param name="serializedAdditionalRawData"> Keeps track of any properties unknown to the library. </param>
internal SearchServicePatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary<string, string> tags, AzureLocation location, SearchSku sku, ManagedServiceIdentity identity, int? replicaCount, int? partitionCount, SearchServiceHostingMode? hostingMode, SearchServicePublicNetworkAccess? publicNetworkAccess, SearchServiceStatus? status, string statusDetails, SearchServiceProvisioningState? provisioningState, NetworkRuleSet networkRuleSet, SearchEncryptionWithCmk encryptionWithCmk, bool? isLocalAuthDisabled, SearchAadAuthDataPlaneAuthOptions authOptions, IReadOnlyList<SearchPrivateEndpointConnectionData> privateEndpointConnections, SearchSemanticSearch? semanticSearch, IReadOnlyList<SharedSearchServicePrivateLinkResourceData> sharedPrivateLinkResources, IDictionary<string, BinaryData> serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location)
{
Sku = sku;
Identity = identity;
ReplicaCount = replicaCount;
PartitionCount = partitionCount;
HostingMode = hostingMode;
PublicNetworkAccess = publicNetworkAccess;
Status = status;
StatusDetails = statusDetails;
ProvisioningState = provisioningState;
NetworkRuleSet = networkRuleSet;
EncryptionWithCmk = encryptionWithCmk;
IsLocalAuthDisabled = isLocalAuthDisabled;
AuthOptions = authOptions;
PrivateEndpointConnections = privateEndpointConnections;
SemanticSearch = semanticSearch;
SharedPrivateLinkResources = sharedPrivateLinkResources;
_serializedAdditionalRawData = serializedAdditionalRawData;
}
/// <summary> Initializes a new instance of <see cref="SearchServicePatch"/> for deserialization. </summary>
internal SearchServicePatch()
{
}
/// <summary> The SKU of the search service, which determines the billing rate and capacity limits. This property is required when creating a new search service. </summary>
internal SearchSku Sku { get; set; }
/// <summary> 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.'. </summary>
[WirePath("sku.name")]
public SearchSkuName? SkuName
{
get => Sku is null ? default : Sku.Name;
set
{
if (Sku is null)
Sku = new SearchSku();
Sku.Name = value;
}
}
/// <summary> The identity of the resource. Current supported identity types: None, SystemAssigned. </summary>
[WirePath("identity")]
public ManagedServiceIdentity Identity { get; set; }
/// <summary> The number of replicas in the search service. If specified, it must be a value between 1 and 12 inclusive for standard SKUs or between 1 and 3 inclusive for basic SKU. </summary>
[WirePath("properties.replicaCount")]
public int? ReplicaCount { get; set; }
/// <summary> The number of partitions in the search service; if specified, it can be 1, 2, 3, 4, 6, or 12. Values greater than 1 are only valid for standard SKUs. For 'standard3' services with hostingMode set to 'highDensity', the allowed values are between 1 and 3. </summary>
[WirePath("properties.partitionCount")]
public int? PartitionCount { get; set; }
/// <summary> 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'. </summary>
[WirePath("properties.hostingMode")]
public SearchServiceHostingMode? HostingMode { get; set; }
/// <summary> This value can be set to 'enabled' to avoid breaking changes on existing customer resources and templates. If set to 'disabled', traffic over public interface is not allowed, and private endpoint connections would be the exclusive access method. </summary>
[WirePath("properties.publicNetworkAccess")]
public SearchServicePublicNetworkAccess? PublicNetworkAccess { get; set; }
/// <summary> 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, Microsoft is actively investigating the underlying issue. Dedicated services in these states are still chargeable based on the number of search units provisioned. </summary>
[WirePath("properties.status")]
public SearchServiceStatus? Status { get; }
/// <summary> The details of the search service status. </summary>
[WirePath("properties.statusDetails")]
public string StatusDetails { get; }
/// <summary> 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. </summary>
[WirePath("properties.provisioningState")]
public SearchServiceProvisioningState? ProvisioningState { get; }
/// <summary> Network-specific rules that determine how the search service may be reached. </summary>
internal NetworkRuleSet NetworkRuleSet { get; set; }
/// <summary> A list of IP restriction rules used for an IP firewall. Any IPs that do not match the rules are blocked by the firewall. These rules are only applied when the 'publicNetworkAccess' of the search service is 'enabled'. </summary>
[WirePath("properties.networkRuleSet.ipRules")]
public IList<SearchServiceIPRule> IPRules
{
get
{
if (NetworkRuleSet is null)
NetworkRuleSet = new NetworkRuleSet();
return NetworkRuleSet.IPRules;
}
}
/// <summary> Specifies any policy regarding encryption of resources (such as indexes) using customer manager keys within a search service. </summary>
[WirePath("properties.encryptionWithCmk")]
public SearchEncryptionWithCmk EncryptionWithCmk { get; set; }
/// <summary> 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. </summary>
[WirePath("properties.disableLocalAuth")]
public bool? IsLocalAuthDisabled { get; set; }
/// <summary> 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. </summary>
[WirePath("properties.authOptions")]
public SearchAadAuthDataPlaneAuthOptions AuthOptions { get; set; }
/// <summary> The list of private endpoint connections to the search service. </summary>
[WirePath("properties.privateEndpointConnections")]
public IReadOnlyList<SearchPrivateEndpointConnectionData> PrivateEndpointConnections { get; }
/// <summary> Sets options that control the availability of semantic search. This configuration is only possible for certain search SKUs in certain locations. </summary>
[WirePath("properties.semanticSearch")]
public SearchSemanticSearch? SemanticSearch { get; set; }
/// <summary> The list of shared private link resources managed by the search service. </summary>
[WirePath("properties.sharedPrivateLinkResources")]
public IReadOnlyList<SharedSearchServicePrivateLinkResourceData> SharedPrivateLinkResources { get; }
}
}