@azure/arm-extendedlocation 1.0.0-beta.1 → 1.0.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/CHANGELOG.md +51 -0
  2. package/LICENSE +1 -1
  3. package/README.md +24 -9
  4. package/dist/index.js +921 -113
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.min.js +1 -1
  7. package/dist/index.min.js.map +1 -1
  8. package/dist-esm/samples-dev/customLocationsCreateOrUpdateSample.d.ts +2 -0
  9. package/dist-esm/samples-dev/customLocationsCreateOrUpdateSample.d.ts.map +1 -0
  10. package/dist-esm/samples-dev/customLocationsCreateOrUpdateSample.js +50 -0
  11. package/dist-esm/samples-dev/customLocationsCreateOrUpdateSample.js.map +1 -0
  12. package/dist-esm/samples-dev/customLocationsDeleteSample.d.ts +2 -0
  13. package/dist-esm/samples-dev/customLocationsDeleteSample.d.ts.map +1 -0
  14. package/dist-esm/samples-dev/customLocationsDeleteSample.js +39 -0
  15. package/dist-esm/samples-dev/customLocationsDeleteSample.js.map +1 -0
  16. package/dist-esm/samples-dev/customLocationsFindTargetResourceGroupSample.d.ts +2 -0
  17. package/dist-esm/samples-dev/customLocationsFindTargetResourceGroupSample.d.ts.map +1 -0
  18. package/dist-esm/samples-dev/customLocationsFindTargetResourceGroupSample.js +42 -0
  19. package/dist-esm/samples-dev/customLocationsFindTargetResourceGroupSample.js.map +1 -0
  20. package/dist-esm/samples-dev/customLocationsGetSample.d.ts +2 -0
  21. package/dist-esm/samples-dev/customLocationsGetSample.d.ts.map +1 -0
  22. package/dist-esm/samples-dev/customLocationsGetSample.js +39 -0
  23. package/dist-esm/samples-dev/customLocationsGetSample.js.map +1 -0
  24. package/dist-esm/samples-dev/customLocationsListByResourceGroupSample.d.ts +2 -0
  25. package/dist-esm/samples-dev/customLocationsListByResourceGroupSample.d.ts.map +1 -0
  26. package/dist-esm/samples-dev/customLocationsListByResourceGroupSample.js +52 -0
  27. package/dist-esm/samples-dev/customLocationsListByResourceGroupSample.js.map +1 -0
  28. package/dist-esm/samples-dev/customLocationsListBySubscriptionSample.d.ts +2 -0
  29. package/dist-esm/samples-dev/customLocationsListBySubscriptionSample.d.ts.map +1 -0
  30. package/dist-esm/samples-dev/customLocationsListBySubscriptionSample.js +51 -0
  31. package/dist-esm/samples-dev/customLocationsListBySubscriptionSample.js.map +1 -0
  32. package/dist-esm/samples-dev/customLocationsListEnabledResourceTypesSample.d.ts +2 -0
  33. package/dist-esm/samples-dev/customLocationsListEnabledResourceTypesSample.d.ts.map +1 -0
  34. package/dist-esm/samples-dev/customLocationsListEnabledResourceTypesSample.js +53 -0
  35. package/dist-esm/samples-dev/customLocationsListEnabledResourceTypesSample.js.map +1 -0
  36. package/dist-esm/samples-dev/customLocationsListOperationsSample.d.ts +2 -0
  37. package/dist-esm/samples-dev/customLocationsListOperationsSample.d.ts.map +1 -0
  38. package/dist-esm/samples-dev/customLocationsListOperationsSample.js +51 -0
  39. package/dist-esm/samples-dev/customLocationsListOperationsSample.js.map +1 -0
  40. package/dist-esm/samples-dev/customLocationsUpdateSample.d.ts +2 -0
  41. package/dist-esm/samples-dev/customLocationsUpdateSample.d.ts.map +1 -0
  42. package/dist-esm/samples-dev/customLocationsUpdateSample.js +42 -0
  43. package/dist-esm/samples-dev/customLocationsUpdateSample.js.map +1 -0
  44. package/dist-esm/samples-dev/resourceSyncRulesCreateOrUpdateSample.d.ts +2 -0
  45. package/dist-esm/samples-dev/resourceSyncRulesCreateOrUpdateSample.d.ts.map +1 -0
  46. package/dist-esm/samples-dev/resourceSyncRulesCreateOrUpdateSample.js +49 -0
  47. package/dist-esm/samples-dev/resourceSyncRulesCreateOrUpdateSample.js.map +1 -0
  48. package/dist-esm/samples-dev/resourceSyncRulesDeleteSample.d.ts +2 -0
  49. package/dist-esm/samples-dev/resourceSyncRulesDeleteSample.d.ts.map +1 -0
  50. package/dist-esm/samples-dev/resourceSyncRulesDeleteSample.js +40 -0
  51. package/dist-esm/samples-dev/resourceSyncRulesDeleteSample.js.map +1 -0
  52. package/dist-esm/samples-dev/resourceSyncRulesGetSample.d.ts +2 -0
  53. package/dist-esm/samples-dev/resourceSyncRulesGetSample.d.ts.map +1 -0
  54. package/dist-esm/samples-dev/resourceSyncRulesGetSample.js +40 -0
  55. package/dist-esm/samples-dev/resourceSyncRulesGetSample.js.map +1 -0
  56. package/dist-esm/samples-dev/resourceSyncRulesListByCustomLocationIdSample.d.ts +2 -0
  57. package/dist-esm/samples-dev/resourceSyncRulesListByCustomLocationIdSample.d.ts.map +1 -0
  58. package/dist-esm/samples-dev/resourceSyncRulesListByCustomLocationIdSample.js +53 -0
  59. package/dist-esm/samples-dev/resourceSyncRulesListByCustomLocationIdSample.js.map +1 -0
  60. package/dist-esm/samples-dev/resourceSyncRulesUpdateSample.d.ts +2 -0
  61. package/dist-esm/samples-dev/resourceSyncRulesUpdateSample.d.ts.map +1 -0
  62. package/dist-esm/samples-dev/resourceSyncRulesUpdateSample.js +42 -0
  63. package/dist-esm/samples-dev/resourceSyncRulesUpdateSample.js.map +1 -0
  64. package/dist-esm/src/customLocationsManagementClient.d.ts +9 -3
  65. package/dist-esm/src/customLocationsManagementClient.d.ts.map +1 -1
  66. package/dist-esm/src/customLocationsManagementClient.js +83 -4
  67. package/dist-esm/src/customLocationsManagementClient.js.map +1 -1
  68. package/dist-esm/src/index.d.ts +1 -1
  69. package/dist-esm/src/index.d.ts.map +1 -1
  70. package/dist-esm/src/index.js +1 -1
  71. package/dist-esm/src/index.js.map +1 -1
  72. package/dist-esm/src/models/index.d.ts +172 -25
  73. package/dist-esm/src/models/index.d.ts.map +1 -1
  74. package/dist-esm/src/models/index.js +7 -0
  75. package/dist-esm/src/models/index.js.map +1 -1
  76. package/dist-esm/src/models/mappers.d.ts +8 -1
  77. package/dist-esm/src/models/mappers.d.ts.map +1 -1
  78. package/dist-esm/src/models/mappers.js +228 -29
  79. package/dist-esm/src/models/mappers.js.map +1 -1
  80. package/dist-esm/src/models/parameters.d.ts +7 -0
  81. package/dist-esm/src/models/parameters.d.ts.map +1 -1
  82. package/dist-esm/src/models/parameters.js +41 -2
  83. package/dist-esm/src/models/parameters.js.map +1 -1
  84. package/dist-esm/src/operations/customLocations.d.ts +12 -3
  85. package/dist-esm/src/operations/customLocations.d.ts.map +1 -1
  86. package/dist-esm/src/operations/customLocations.js +114 -34
  87. package/dist-esm/src/operations/customLocations.js.map +1 -1
  88. package/dist-esm/src/operations/index.d.ts +1 -0
  89. package/dist-esm/src/operations/index.d.ts.map +1 -1
  90. package/dist-esm/src/operations/index.js +1 -0
  91. package/dist-esm/src/operations/index.js.map +1 -1
  92. package/dist-esm/src/operations/resourceSyncRules.d.ts +97 -0
  93. package/dist-esm/src/operations/resourceSyncRules.d.ts.map +1 -0
  94. package/dist-esm/src/operations/resourceSyncRules.js +411 -0
  95. package/dist-esm/src/operations/resourceSyncRules.js.map +1 -0
  96. package/dist-esm/src/operationsInterfaces/customLocations.d.ts +10 -1
  97. package/dist-esm/src/operationsInterfaces/customLocations.d.ts.map +1 -1
  98. package/dist-esm/src/operationsInterfaces/index.d.ts +1 -0
  99. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -1
  100. package/dist-esm/src/operationsInterfaces/index.js +1 -0
  101. package/dist-esm/src/operationsInterfaces/index.js.map +1 -1
  102. package/dist-esm/src/operationsInterfaces/resourceSyncRules.d.ts +71 -0
  103. package/dist-esm/src/operationsInterfaces/resourceSyncRules.d.ts.map +1 -0
  104. package/dist-esm/src/operationsInterfaces/resourceSyncRules.js +9 -0
  105. package/dist-esm/src/operationsInterfaces/resourceSyncRules.js.map +1 -0
  106. package/dist-esm/src/pagingHelper.d.ts +13 -0
  107. package/dist-esm/src/pagingHelper.d.ts.map +1 -0
  108. package/dist-esm/src/pagingHelper.js +32 -0
  109. package/dist-esm/src/pagingHelper.js.map +1 -0
  110. package/dist-esm/test/sampleTest.js +11 -13
  111. package/dist-esm/test/sampleTest.js.map +1 -1
  112. package/package.json +58 -27
  113. package/review/arm-extendedlocation.api.md +142 -27
  114. package/rollup.config.js +6 -72
  115. package/src/customLocationsManagementClient.ts +115 -5
  116. package/src/index.ts +1 -1
  117. package/src/models/index.ts +186 -26
  118. package/src/models/mappers.ts +243 -30
  119. package/src/models/parameters.ts +53 -2
  120. package/src/operations/customLocations.ts +148 -46
  121. package/src/operations/index.ts +1 -0
  122. package/src/operations/resourceSyncRules.ts +575 -0
  123. package/src/operationsInterfaces/customLocations.ts +18 -1
  124. package/src/operationsInterfaces/index.ts +1 -0
  125. package/src/operationsInterfaces/resourceSyncRules.ts +136 -0
  126. package/src/pagingHelper.ts +39 -0
  127. package/tsconfig.json +19 -5
  128. package/types/arm-extendedlocation.d.ts +266 -20
  129. package/types/tsdoc-metadata.json +1 -1
  130. package/dist-esm/src/customLocationsManagementClientContext.d.ts +0 -16
  131. package/dist-esm/src/customLocationsManagementClientContext.d.ts.map +0 -1
  132. package/dist-esm/src/customLocationsManagementClientContext.js +0 -49
  133. package/dist-esm/src/customLocationsManagementClientContext.js.map +0 -1
  134. package/src/customLocationsManagementClientContext.ts +0 -70
@@ -6,13 +6,23 @@
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
8
 
9
+ import * as coreClient from "@azure/core-client";
10
+ import * as coreRestPipeline from "@azure/core-rest-pipeline";
11
+ import {
12
+ PipelineRequest,
13
+ PipelineResponse,
14
+ SendRequest
15
+ } from "@azure/core-rest-pipeline";
9
16
  import * as coreAuth from "@azure/core-auth";
10
- import { CustomLocationsImpl } from "./operations";
11
- import { CustomLocations } from "./operationsInterfaces";
12
- import { CustomLocationsManagementClientContext } from "./customLocationsManagementClientContext";
17
+ import { CustomLocationsImpl, ResourceSyncRulesImpl } from "./operations";
18
+ import { CustomLocations, ResourceSyncRules } from "./operationsInterfaces";
13
19
  import { CustomLocationsManagementClientOptionalParams } from "./models";
14
20
 
15
- export class CustomLocationsManagementClient extends CustomLocationsManagementClientContext {
21
+ export class CustomLocationsManagementClient extends coreClient.ServiceClient {
22
+ $host: string;
23
+ apiVersion: string;
24
+ subscriptionId: string;
25
+
16
26
  /**
17
27
  * Initializes a new instance of the CustomLocationsManagementClient class.
18
28
  * @param credentials Subscription credentials which uniquely identify client subscription.
@@ -24,9 +34,109 @@ export class CustomLocationsManagementClient extends CustomLocationsManagementCl
24
34
  subscriptionId: string,
25
35
  options?: CustomLocationsManagementClientOptionalParams
26
36
  ) {
27
- super(credentials, subscriptionId, options);
37
+ if (credentials === undefined) {
38
+ throw new Error("'credentials' cannot be null");
39
+ }
40
+ if (subscriptionId === undefined) {
41
+ throw new Error("'subscriptionId' cannot be null");
42
+ }
43
+
44
+ // Initializing default values for options
45
+ if (!options) {
46
+ options = {};
47
+ }
48
+ const defaults: CustomLocationsManagementClientOptionalParams = {
49
+ requestContentType: "application/json; charset=utf-8",
50
+ credential: credentials
51
+ };
52
+
53
+ const packageDetails = `azsdk-js-arm-extendedlocation/1.0.0-beta.3`;
54
+ const userAgentPrefix =
55
+ options.userAgentOptions && options.userAgentOptions.userAgentPrefix
56
+ ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
57
+ : `${packageDetails}`;
58
+
59
+ const optionsWithDefaults = {
60
+ ...defaults,
61
+ ...options,
62
+ userAgentOptions: {
63
+ userAgentPrefix
64
+ },
65
+ endpoint:
66
+ options.endpoint ?? options.baseUri ?? "https://management.azure.com"
67
+ };
68
+ super(optionsWithDefaults);
69
+
70
+ let bearerTokenAuthenticationPolicyFound: boolean = false;
71
+ if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
72
+ const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();
73
+ bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(
74
+ (pipelinePolicy) =>
75
+ pipelinePolicy.name ===
76
+ coreRestPipeline.bearerTokenAuthenticationPolicyName
77
+ );
78
+ }
79
+ if (
80
+ !options ||
81
+ !options.pipeline ||
82
+ options.pipeline.getOrderedPolicies().length == 0 ||
83
+ !bearerTokenAuthenticationPolicyFound
84
+ ) {
85
+ this.pipeline.removePolicy({
86
+ name: coreRestPipeline.bearerTokenAuthenticationPolicyName
87
+ });
88
+ this.pipeline.addPolicy(
89
+ coreRestPipeline.bearerTokenAuthenticationPolicy({
90
+ credential: credentials,
91
+ scopes:
92
+ optionsWithDefaults.credentialScopes ??
93
+ `${optionsWithDefaults.endpoint}/.default`,
94
+ challengeCallbacks: {
95
+ authorizeRequestOnChallenge:
96
+ coreClient.authorizeRequestOnClaimChallenge
97
+ }
98
+ })
99
+ );
100
+ }
101
+ // Parameter assignments
102
+ this.subscriptionId = subscriptionId;
103
+
104
+ // Assigning values to Constant parameters
105
+ this.$host = options.$host || "https://management.azure.com";
106
+ this.apiVersion = options.apiVersion || "2021-08-31-preview";
28
107
  this.customLocations = new CustomLocationsImpl(this);
108
+ this.resourceSyncRules = new ResourceSyncRulesImpl(this);
109
+ this.addCustomApiVersionPolicy(options.apiVersion);
110
+ }
111
+
112
+ /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
113
+ private addCustomApiVersionPolicy(apiVersion?: string) {
114
+ if (!apiVersion) {
115
+ return;
116
+ }
117
+ const apiVersionPolicy = {
118
+ name: "CustomApiVersionPolicy",
119
+ async sendRequest(
120
+ request: PipelineRequest,
121
+ next: SendRequest
122
+ ): Promise<PipelineResponse> {
123
+ const param = request.url.split("?");
124
+ if (param.length > 1) {
125
+ const newParams = param[1].split("&").map((item) => {
126
+ if (item.indexOf("api-version") > -1) {
127
+ return "api-version=" + apiVersion;
128
+ } else {
129
+ return item;
130
+ }
131
+ });
132
+ request.url = param[0] + "?" + newParams.join("&");
133
+ }
134
+ return next(request);
135
+ }
136
+ };
137
+ this.pipeline.addPolicy(apiVersionPolicy);
29
138
  }
30
139
 
31
140
  customLocations: CustomLocations;
141
+ resourceSyncRules: ResourceSyncRules;
32
142
  }
package/src/index.ts CHANGED
@@ -7,7 +7,7 @@
7
7
  */
8
8
 
9
9
  /// <reference lib="esnext.asynciterable" />
10
+ export { getContinuationToken } from "./pagingHelper";
10
11
  export * from "./models";
11
12
  export { CustomLocationsManagementClient } from "./customLocationsManagementClient";
12
- export { CustomLocationsManagementClientContext } from "./customLocationsManagementClientContext";
13
13
  export * from "./operationsInterfaces";
@@ -118,25 +118,6 @@ export interface CustomLocationListResult {
118
118
  readonly value?: CustomLocation[];
119
119
  }
120
120
 
121
- /** Common fields that are returned in the response for all Azure Resource Manager resources */
122
- export interface Resource {
123
- /**
124
- * Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
125
- * NOTE: This property will not be serialized. It can only be populated by the server.
126
- */
127
- readonly id?: string;
128
- /**
129
- * The name of the resource
130
- * NOTE: This property will not be serialized. It can only be populated by the server.
131
- */
132
- readonly name?: string;
133
- /**
134
- * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
135
- * NOTE: This property will not be serialized. It can only be populated by the server.
136
- */
137
- readonly type?: string;
138
- }
139
-
140
121
  /** Identity for the resource. */
141
122
  export interface Identity {
142
123
  /**
@@ -177,6 +158,25 @@ export interface SystemData {
177
158
  lastModifiedAt?: Date;
178
159
  }
179
160
 
161
+ /** Common fields that are returned in the response for all Azure Resource Manager resources */
162
+ export interface Resource {
163
+ /**
164
+ * Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
165
+ * NOTE: This property will not be serialized. It can only be populated by the server.
166
+ */
167
+ readonly id?: string;
168
+ /**
169
+ * The name of the resource
170
+ * NOTE: This property will not be serialized. It can only be populated by the server.
171
+ */
172
+ readonly name?: string;
173
+ /**
174
+ * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
175
+ * NOTE: This property will not be serialized. It can only be populated by the server.
176
+ */
177
+ readonly type?: string;
178
+ }
179
+
180
180
  /** The Custom Locations patchable resource definition. */
181
181
  export interface PatchableCustomLocations {
182
182
  /** Identity for the resource. */
@@ -223,19 +223,88 @@ export interface EnabledResourceTypePropertiesTypesMetadataItem {
223
223
  resourceType?: string;
224
224
  }
225
225
 
226
+ /** The Find Target Resource Group operation request. */
227
+ export interface CustomLocationFindTargetResourceGroupProperties {
228
+ /** Labels of the custom resource, this is a map of {key,value} pairs. */
229
+ labels?: { [propertyName: string]: string };
230
+ }
231
+
232
+ /** The Find Target Resource Group operation response. */
233
+ export interface CustomLocationFindTargetResourceGroupResult {
234
+ /**
235
+ * The matching resource sync rule is the particular resource sync rule that matched the match expressions and labels and had lowest priority. This is the rule responsible for mapping the target resource to the target resource group.
236
+ * NOTE: This property will not be serialized. It can only be populated by the server.
237
+ */
238
+ readonly matchedResourceSyncRule?: string;
239
+ /**
240
+ * The target resource group of matching resource sync rule. The labels from the request will be used to find out matching resource sync rule against the selector property of the resource sync rule. The one with highest priority will be returned if there are multiple matching rules.
241
+ * NOTE: This property will not be serialized. It can only be populated by the server.
242
+ */
243
+ readonly targetResourceGroup?: string;
244
+ }
245
+
246
+ /** The List Resource Sync Rules operation response. */
247
+ export interface ResourceSyncRuleListResult {
248
+ /**
249
+ * The URL to use for getting the next set of results.
250
+ * NOTE: This property will not be serialized. It can only be populated by the server.
251
+ */
252
+ readonly nextLink?: string;
253
+ /**
254
+ * The list of Resource Sync Rules.
255
+ * NOTE: This property will not be serialized. It can only be populated by the server.
256
+ */
257
+ readonly value?: ResourceSyncRule[];
258
+ }
259
+
260
+ /** A label selector is composed of two parts, matchLabels and matchExpressions. The first part, matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is 'key', the operator is 'In', and the values array contains only 'value'. The second part, matchExpressions is a list of resource selector requirements. Valid operators include In, NotIn, Exists, and DoesNotExist. The values set must be non-empty in the case of In and NotIn. The values set must be empty in the case of Exists and DoesNotExist. All of the requirements, from both matchLabels and matchExpressions must all be satisfied in order to match. */
261
+ export interface ResourceSyncRulePropertiesSelector {
262
+ /** MatchExpressions is a list of resource selector requirements. Valid operators include In, NotIn, Exists, and DoesNotExist. The values set must be non-empty in the case of In and NotIn. The values set must be empty in the case of Exists and DoesNotExist. */
263
+ matchExpressions?: MatchExpressionsProperties[];
264
+ /** MatchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is 'key', the operator is 'In', and the values array contains only 'value'. */
265
+ matchLabels?: { [propertyName: string]: string };
266
+ }
267
+
268
+ /** Resource Sync Rules matchExpression property definition. */
269
+ export interface MatchExpressionsProperties {
270
+ /** Key is the label key that the selector applies to. */
271
+ key?: string;
272
+ /** The Operator field represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. */
273
+ operator?: string;
274
+ /** The label value */
275
+ values?: string[];
276
+ }
277
+
278
+ /** The Resource Sync Rules patchable resource definition. */
279
+ export interface PatchableResourceSyncRule {
280
+ /** Resource tags */
281
+ tags?: { [propertyName: string]: string };
282
+ /** Priority represents a priority of the Resource Sync Rule */
283
+ priority?: number;
284
+ /**
285
+ * Provisioning State for the Resource Sync Rule.
286
+ * NOTE: This property will not be serialized. It can only be populated by the server.
287
+ */
288
+ readonly provisioningState?: string;
289
+ /** A label selector is composed of two parts, matchLabels and matchExpressions. The first part, matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is 'key', the operator is 'In', and the values array contains only 'value'. The second part, matchExpressions is a list of resource selector requirements. Valid operators include In, NotIn, Exists, and DoesNotExist. The values set must be non-empty in the case of In and NotIn. The values set must be empty in the case of Exists and DoesNotExist. All of the requirements, from both matchLabels and matchExpressions must all be satisfied in order to match. */
290
+ selector?: ResourceSyncRulePropertiesSelector;
291
+ /** For an unmapped custom resource, its labels will be used to find matching resource sync rules. If this resource sync rule is one of the matching rules with highest priority, then the unmapped custom resource will be projected to the target resource group associated with this resource sync rule. The user creating this resource sync rule should have write permissions on the target resource group and this write permission will be validated when creating the resource sync rule. */
292
+ targetResourceGroup?: string;
293
+ }
294
+
226
295
  /** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */
227
- export type TrackedResource = Resource & {
296
+ export interface TrackedResource extends Resource {
228
297
  /** Resource tags. */
229
298
  tags?: { [propertyName: string]: string };
230
299
  /** The geo-location where the resource lives */
231
300
  location: string;
232
- };
301
+ }
233
302
 
234
303
  /** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */
235
- export type ProxyResource = Resource & {};
304
+ export interface ProxyResource extends Resource {}
236
305
 
237
306
  /** Custom Locations definition. */
238
- export type CustomLocation = TrackedResource & {
307
+ export interface CustomLocation extends TrackedResource {
239
308
  /** Identity for the resource. */
240
309
  identity?: Identity;
241
310
  /**
@@ -257,10 +326,30 @@ export type CustomLocation = TrackedResource & {
257
326
  namespace?: string;
258
327
  /** Provisioning State for the Custom Location. */
259
328
  provisioningState?: string;
260
- };
329
+ }
330
+
331
+ /** Resource Sync Rules definition. */
332
+ export interface ResourceSyncRule extends TrackedResource {
333
+ /**
334
+ * Metadata pertaining to creation and last modification of the resource
335
+ * NOTE: This property will not be serialized. It can only be populated by the server.
336
+ */
337
+ readonly systemData?: SystemData;
338
+ /** Priority represents a priority of the Resource Sync Rule */
339
+ priority?: number;
340
+ /**
341
+ * Provisioning State for the Resource Sync Rule.
342
+ * NOTE: This property will not be serialized. It can only be populated by the server.
343
+ */
344
+ readonly provisioningState?: string;
345
+ /** A label selector is composed of two parts, matchLabels and matchExpressions. The first part, matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is 'key', the operator is 'In', and the values array contains only 'value'. The second part, matchExpressions is a list of resource selector requirements. Valid operators include In, NotIn, Exists, and DoesNotExist. The values set must be non-empty in the case of In and NotIn. The values set must be empty in the case of Exists and DoesNotExist. All of the requirements, from both matchLabels and matchExpressions must all be satisfied in order to match. */
346
+ selector?: ResourceSyncRulePropertiesSelector;
347
+ /** For an unmapped custom resource, its labels will be used to find matching resource sync rules. If this resource sync rule is one of the matching rules with highest priority, then the unmapped custom resource will be projected to the target resource group associated with this resource sync rule. The user creating this resource sync rule should have write permissions on the target resource group and this write permission will be validated when creating the resource sync rule. */
348
+ targetResourceGroup?: string;
349
+ }
261
350
 
262
351
  /** EnabledResourceType definition. */
263
- export type EnabledResourceType = ProxyResource & {
352
+ export interface EnabledResourceType extends ProxyResource {
264
353
  /**
265
354
  * Metadata pertaining to creation and last modification of the resource
266
355
  * NOTE: This property will not be serialized. It can only be populated by the server.
@@ -272,11 +361,13 @@ export type EnabledResourceType = ProxyResource & {
272
361
  extensionType?: string;
273
362
  /** Metadata of the Resource Type */
274
363
  typesMetadata?: EnabledResourceTypePropertiesTypesMetadataItem[];
275
- };
364
+ }
276
365
 
277
366
  /** Known values of {@link ResourceIdentityType} that the service accepts. */
278
367
  export enum KnownResourceIdentityType {
368
+ /** SystemAssigned */
279
369
  SystemAssigned = "SystemAssigned",
370
+ /** None */
280
371
  None = "None"
281
372
  }
282
373
 
@@ -292,6 +383,7 @@ export type ResourceIdentityType = string;
292
383
 
293
384
  /** Known values of {@link HostType} that the service accepts. */
294
385
  export enum KnownHostType {
386
+ /** Kubernetes */
295
387
  Kubernetes = "Kubernetes"
296
388
  }
297
389
 
@@ -306,9 +398,13 @@ export type HostType = string;
306
398
 
307
399
  /** Known values of {@link CreatedByType} that the service accepts. */
308
400
  export enum KnownCreatedByType {
401
+ /** User */
309
402
  User = "User",
403
+ /** Application */
310
404
  Application = "Application",
405
+ /** ManagedIdentity */
311
406
  ManagedIdentity = "ManagedIdentity",
407
+ /** Key */
312
408
  Key = "Key"
313
409
  }
314
410
 
@@ -406,6 +502,13 @@ export interface CustomLocationsListEnabledResourceTypesOptionalParams
406
502
  /** Contains response data for the listEnabledResourceTypes operation. */
407
503
  export type CustomLocationsListEnabledResourceTypesResponse = EnabledResourceTypesListResult;
408
504
 
505
+ /** Optional parameters. */
506
+ export interface CustomLocationsFindTargetResourceGroupOptionalParams
507
+ extends coreClient.OperationOptions {}
508
+
509
+ /** Contains response data for the findTargetResourceGroup operation. */
510
+ export type CustomLocationsFindTargetResourceGroupResponse = CustomLocationFindTargetResourceGroupResult;
511
+
409
512
  /** Optional parameters. */
410
513
  export interface CustomLocationsListOperationsNextOptionalParams
411
514
  extends coreClient.OperationOptions {}
@@ -434,6 +537,63 @@ export interface CustomLocationsListEnabledResourceTypesNextOptionalParams
434
537
  /** Contains response data for the listEnabledResourceTypesNext operation. */
435
538
  export type CustomLocationsListEnabledResourceTypesNextResponse = EnabledResourceTypesListResult;
436
539
 
540
+ /** Optional parameters. */
541
+ export interface ResourceSyncRulesListByCustomLocationIDOptionalParams
542
+ extends coreClient.OperationOptions {}
543
+
544
+ /** Contains response data for the listByCustomLocationID operation. */
545
+ export type ResourceSyncRulesListByCustomLocationIDResponse = ResourceSyncRuleListResult;
546
+
547
+ /** Optional parameters. */
548
+ export interface ResourceSyncRulesGetOptionalParams
549
+ extends coreClient.OperationOptions {}
550
+
551
+ /** Contains response data for the get operation. */
552
+ export type ResourceSyncRulesGetResponse = ResourceSyncRule;
553
+
554
+ /** Optional parameters. */
555
+ export interface ResourceSyncRulesCreateOrUpdateOptionalParams
556
+ extends coreClient.OperationOptions {
557
+ /** Delay to wait until next poll, in milliseconds. */
558
+ updateIntervalInMs?: number;
559
+ /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */
560
+ resumeFrom?: string;
561
+ }
562
+
563
+ /** Contains response data for the createOrUpdate operation. */
564
+ export type ResourceSyncRulesCreateOrUpdateResponse = ResourceSyncRule;
565
+
566
+ /** Optional parameters. */
567
+ export interface ResourceSyncRulesDeleteOptionalParams
568
+ extends coreClient.OperationOptions {}
569
+
570
+ /** Optional parameters. */
571
+ export interface ResourceSyncRulesUpdateOptionalParams
572
+ extends coreClient.OperationOptions {
573
+ /** Resource tags */
574
+ tags?: { [propertyName: string]: string };
575
+ /** Priority represents a priority of the Resource Sync Rule */
576
+ priority?: number;
577
+ /** A label selector is composed of two parts, matchLabels and matchExpressions. The first part, matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is 'key', the operator is 'In', and the values array contains only 'value'. The second part, matchExpressions is a list of resource selector requirements. Valid operators include In, NotIn, Exists, and DoesNotExist. The values set must be non-empty in the case of In and NotIn. The values set must be empty in the case of Exists and DoesNotExist. All of the requirements, from both matchLabels and matchExpressions must all be satisfied in order to match. */
578
+ selector?: ResourceSyncRulePropertiesSelector;
579
+ /** For an unmapped custom resource, its labels will be used to find matching resource sync rules. If this resource sync rule is one of the matching rules with highest priority, then the unmapped custom resource will be projected to the target resource group associated with this resource sync rule. The user creating this resource sync rule should have write permissions on the target resource group and this write permission will be validated when creating the resource sync rule. */
580
+ targetResourceGroup?: string;
581
+ /** Delay to wait until next poll, in milliseconds. */
582
+ updateIntervalInMs?: number;
583
+ /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */
584
+ resumeFrom?: string;
585
+ }
586
+
587
+ /** Contains response data for the update operation. */
588
+ export type ResourceSyncRulesUpdateResponse = ResourceSyncRule;
589
+
590
+ /** Optional parameters. */
591
+ export interface ResourceSyncRulesListByCustomLocationIDNextOptionalParams
592
+ extends coreClient.OperationOptions {}
593
+
594
+ /** Contains response data for the listByCustomLocationIDNext operation. */
595
+ export type ResourceSyncRulesListByCustomLocationIDNextResponse = ResourceSyncRuleListResult;
596
+
437
597
  /** Optional parameters. */
438
598
  export interface CustomLocationsManagementClientOptionalParams
439
599
  extends coreClient.ServiceClientOptions {