@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
@@ -0,0 +1,136 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+
9
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
+ import { PollerLike, PollOperationState } from "@azure/core-lro";
11
+ import {
12
+ ResourceSyncRule,
13
+ ResourceSyncRulesListByCustomLocationIDOptionalParams,
14
+ ResourceSyncRulesGetOptionalParams,
15
+ ResourceSyncRulesGetResponse,
16
+ ResourceSyncRulesCreateOrUpdateOptionalParams,
17
+ ResourceSyncRulesCreateOrUpdateResponse,
18
+ ResourceSyncRulesDeleteOptionalParams,
19
+ ResourceSyncRulesUpdateOptionalParams,
20
+ ResourceSyncRulesUpdateResponse
21
+ } from "../models";
22
+
23
+ /// <reference lib="esnext.asynciterable" />
24
+ /** Interface representing a ResourceSyncRules. */
25
+ export interface ResourceSyncRules {
26
+ /**
27
+ * Gets a list of Resource Sync Rules in the specified subscription. The operation returns properties
28
+ * of each Resource Sync Rule
29
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
30
+ * @param resourceName Custom Locations name.
31
+ * @param options The options parameters.
32
+ */
33
+ listByCustomLocationID(
34
+ resourceGroupName: string,
35
+ resourceName: string,
36
+ options?: ResourceSyncRulesListByCustomLocationIDOptionalParams
37
+ ): PagedAsyncIterableIterator<ResourceSyncRule>;
38
+ /**
39
+ * Gets the details of the resourceSyncRule with a specified resource group, subscription id Custom
40
+ * Location resource name and Resource Sync Rule name.
41
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
42
+ * @param resourceName Custom Locations name.
43
+ * @param childResourceName Resource Sync Rule name.
44
+ * @param options The options parameters.
45
+ */
46
+ get(
47
+ resourceGroupName: string,
48
+ resourceName: string,
49
+ childResourceName: string,
50
+ options?: ResourceSyncRulesGetOptionalParams
51
+ ): Promise<ResourceSyncRulesGetResponse>;
52
+ /**
53
+ * Creates or updates a Resource Sync Rule in the parent Custom Location, Subscription Id and Resource
54
+ * Group
55
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
56
+ * @param resourceName Custom Locations name.
57
+ * @param childResourceName Resource Sync Rule name.
58
+ * @param parameters Parameters supplied to create or update a Resource Sync Rule.
59
+ * @param options The options parameters.
60
+ */
61
+ beginCreateOrUpdate(
62
+ resourceGroupName: string,
63
+ resourceName: string,
64
+ childResourceName: string,
65
+ parameters: ResourceSyncRule,
66
+ options?: ResourceSyncRulesCreateOrUpdateOptionalParams
67
+ ): Promise<
68
+ PollerLike<
69
+ PollOperationState<ResourceSyncRulesCreateOrUpdateResponse>,
70
+ ResourceSyncRulesCreateOrUpdateResponse
71
+ >
72
+ >;
73
+ /**
74
+ * Creates or updates a Resource Sync Rule in the parent Custom Location, Subscription Id and Resource
75
+ * Group
76
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
77
+ * @param resourceName Custom Locations name.
78
+ * @param childResourceName Resource Sync Rule name.
79
+ * @param parameters Parameters supplied to create or update a Resource Sync Rule.
80
+ * @param options The options parameters.
81
+ */
82
+ beginCreateOrUpdateAndWait(
83
+ resourceGroupName: string,
84
+ resourceName: string,
85
+ childResourceName: string,
86
+ parameters: ResourceSyncRule,
87
+ options?: ResourceSyncRulesCreateOrUpdateOptionalParams
88
+ ): Promise<ResourceSyncRulesCreateOrUpdateResponse>;
89
+ /**
90
+ * Deletes the Resource Sync Rule with the specified Resource Sync Rule Name, Custom Location Resource
91
+ * Name, Resource Group, and Subscription Id.
92
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
93
+ * @param resourceName Custom Locations name.
94
+ * @param childResourceName Resource Sync Rule name.
95
+ * @param options The options parameters.
96
+ */
97
+ delete(
98
+ resourceGroupName: string,
99
+ resourceName: string,
100
+ childResourceName: string,
101
+ options?: ResourceSyncRulesDeleteOptionalParams
102
+ ): Promise<void>;
103
+ /**
104
+ * Updates a Resource Sync Rule with the specified Resource Sync Rule name in the specified Resource
105
+ * Group, Subscription and Custom Location name.
106
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
107
+ * @param resourceName Custom Locations name.
108
+ * @param childResourceName Resource Sync Rule name.
109
+ * @param options The options parameters.
110
+ */
111
+ beginUpdate(
112
+ resourceGroupName: string,
113
+ resourceName: string,
114
+ childResourceName: string,
115
+ options?: ResourceSyncRulesUpdateOptionalParams
116
+ ): Promise<
117
+ PollerLike<
118
+ PollOperationState<ResourceSyncRulesUpdateResponse>,
119
+ ResourceSyncRulesUpdateResponse
120
+ >
121
+ >;
122
+ /**
123
+ * Updates a Resource Sync Rule with the specified Resource Sync Rule name in the specified Resource
124
+ * Group, Subscription and Custom Location name.
125
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
126
+ * @param resourceName Custom Locations name.
127
+ * @param childResourceName Resource Sync Rule name.
128
+ * @param options The options parameters.
129
+ */
130
+ beginUpdateAndWait(
131
+ resourceGroupName: string,
132
+ resourceName: string,
133
+ childResourceName: string,
134
+ options?: ResourceSyncRulesUpdateOptionalParams
135
+ ): Promise<ResourceSyncRulesUpdateResponse>;
136
+ }
@@ -0,0 +1,39 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+
9
+ export interface PageInfo {
10
+ continuationToken?: string;
11
+ }
12
+
13
+ const pageMap = new WeakMap<object, PageInfo>();
14
+
15
+ /**
16
+ * Given the last `.value` produced by the `byPage` iterator,
17
+ * returns a continuation token that can be used to begin paging from
18
+ * that point later.
19
+ * @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator.
20
+ * @returns The continuation token that can be passed into byPage() during future calls.
21
+ */
22
+ export function getContinuationToken(page: unknown): string | undefined {
23
+ if (typeof page !== "object" || page === null) {
24
+ return undefined;
25
+ }
26
+ return pageMap.get(page)?.continuationToken;
27
+ }
28
+
29
+ export function setContinuationToken(
30
+ page: unknown,
31
+ continuationToken: string | undefined
32
+ ): void {
33
+ if (typeof page !== "object" || page === null || !continuationToken) {
34
+ return;
35
+ }
36
+ const pageInfo = pageMap.get(page) ?? {};
37
+ pageInfo.continuationToken = continuationToken;
38
+ pageMap.set(page, pageInfo);
39
+ }
package/tsconfig.json CHANGED
@@ -9,11 +9,25 @@
9
9
  "esModuleInterop": true,
10
10
  "allowSyntheticDefaultImports": true,
11
11
  "forceConsistentCasingInFileNames": true,
12
- "lib": ["es6", "dom"],
12
+ "lib": [
13
+ "es6",
14
+ "dom"
15
+ ],
13
16
  "declaration": true,
14
17
  "outDir": "./dist-esm",
15
- "importHelpers": true
18
+ "importHelpers": true,
19
+ "paths": {
20
+ "@azure/arm-extendedlocation": [
21
+ "./src/index"
22
+ ]
23
+ }
16
24
  },
17
- "include": ["./src/**/*.ts", "./test/**/*.ts"],
18
- "exclude": ["node_modules"]
19
- }
25
+ "include": [
26
+ "./src/**/*.ts",
27
+ "./test/**/*.ts",
28
+ "samples-dev/**/*.ts"
29
+ ],
30
+ "exclude": [
31
+ "node_modules"
32
+ ]
33
+ }
@@ -17,7 +17,7 @@ import { PollOperationState } from '@azure/core-lro';
17
17
  export declare type CreatedByType = string;
18
18
 
19
19
  /** Custom Locations definition. */
20
- export declare type CustomLocation = TrackedResource & {
20
+ export declare interface CustomLocation extends TrackedResource {
21
21
  /** Identity for the resource. */
22
22
  identity?: Identity;
23
23
  /**
@@ -39,7 +39,29 @@ export declare type CustomLocation = TrackedResource & {
39
39
  namespace?: string;
40
40
  /** Provisioning State for the Custom Location. */
41
41
  provisioningState?: string;
42
- };
42
+ }
43
+
44
+ /** The Find Target Resource Group operation request. */
45
+ export declare interface CustomLocationFindTargetResourceGroupProperties {
46
+ /** Labels of the custom resource, this is a map of {key,value} pairs. */
47
+ labels?: {
48
+ [propertyName: string]: string;
49
+ };
50
+ }
51
+
52
+ /** The Find Target Resource Group operation response. */
53
+ export declare interface CustomLocationFindTargetResourceGroupResult {
54
+ /**
55
+ * 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.
56
+ * NOTE: This property will not be serialized. It can only be populated by the server.
57
+ */
58
+ readonly matchedResourceSyncRule?: string;
59
+ /**
60
+ * 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.
61
+ * NOTE: This property will not be serialized. It can only be populated by the server.
62
+ */
63
+ readonly targetResourceGroup?: string;
64
+ }
43
65
 
44
66
  /** The List Custom Locations operation response. */
45
67
  export declare interface CustomLocationListResult {
@@ -182,6 +204,15 @@ export declare interface CustomLocations {
182
204
  * @param options The options parameters.
183
205
  */
184
206
  update(resourceGroupName: string, resourceName: string, options?: CustomLocationsUpdateOptionalParams): Promise<CustomLocationsUpdateResponse>;
207
+ /**
208
+ * Returns the target resource group associated with the resource sync rules of the Custom Location
209
+ * that match the rules passed in with the Find Target Resource Group Request.
210
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
211
+ * @param resourceName Custom Locations name.
212
+ * @param parameters Parameters of the find target resource group request.
213
+ * @param options The options parameters.
214
+ */
215
+ findTargetResourceGroup(resourceGroupName: string, resourceName: string, parameters: CustomLocationFindTargetResourceGroupProperties, options?: CustomLocationsFindTargetResourceGroupOptionalParams): Promise<CustomLocationsFindTargetResourceGroupResponse>;
185
216
  }
186
217
 
187
218
  /** Optional parameters. */
@@ -203,6 +234,13 @@ export declare interface CustomLocationsDeleteOptionalParams extends coreClient.
203
234
  resumeFrom?: string;
204
235
  }
205
236
 
237
+ /** Optional parameters. */
238
+ export declare interface CustomLocationsFindTargetResourceGroupOptionalParams extends coreClient.OperationOptions {
239
+ }
240
+
241
+ /** Contains response data for the findTargetResourceGroup operation. */
242
+ export declare type CustomLocationsFindTargetResourceGroupResponse = CustomLocationFindTargetResourceGroupResult;
243
+
206
244
  /** Optional parameters. */
207
245
  export declare interface CustomLocationsGetOptionalParams extends coreClient.OperationOptions {
208
246
  }
@@ -266,28 +304,21 @@ export declare interface CustomLocationsListOperationsOptionalParams extends cor
266
304
  /** Contains response data for the listOperations operation. */
267
305
  export declare type CustomLocationsListOperationsResponse = CustomLocationOperationsList;
268
306
 
269
- export declare class CustomLocationsManagementClient extends CustomLocationsManagementClientContext {
270
- /**
271
- * Initializes a new instance of the CustomLocationsManagementClient class.
272
- * @param credentials Subscription credentials which uniquely identify client subscription.
273
- * @param subscriptionId The ID of the target subscription.
274
- * @param options The parameter options
275
- */
276
- constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: CustomLocationsManagementClientOptionalParams);
277
- customLocations: CustomLocations;
278
- }
279
-
280
- export declare class CustomLocationsManagementClientContext extends coreClient.ServiceClient {
307
+ export declare class CustomLocationsManagementClient extends coreClient.ServiceClient {
281
308
  $host: string;
282
309
  apiVersion: string;
283
310
  subscriptionId: string;
284
311
  /**
285
- * Initializes a new instance of the CustomLocationsManagementClientContext class.
312
+ * Initializes a new instance of the CustomLocationsManagementClient class.
286
313
  * @param credentials Subscription credentials which uniquely identify client subscription.
287
314
  * @param subscriptionId The ID of the target subscription.
288
315
  * @param options The parameter options
289
316
  */
290
317
  constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: CustomLocationsManagementClientOptionalParams);
318
+ /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
319
+ private addCustomApiVersionPolicy;
320
+ customLocations: CustomLocations;
321
+ resourceSyncRules: ResourceSyncRules;
291
322
  }
292
323
 
293
324
  /** Optional parameters. */
@@ -328,7 +359,7 @@ export declare interface CustomLocationsUpdateOptionalParams extends coreClient.
328
359
  export declare type CustomLocationsUpdateResponse = CustomLocation;
329
360
 
330
361
  /** EnabledResourceType definition. */
331
- export declare type EnabledResourceType = ProxyResource & {
362
+ export declare interface EnabledResourceType extends ProxyResource {
332
363
  /**
333
364
  * Metadata pertaining to creation and last modification of the resource
334
365
  * NOTE: This property will not be serialized. It can only be populated by the server.
@@ -340,7 +371,7 @@ export declare type EnabledResourceType = ProxyResource & {
340
371
  extensionType?: string;
341
372
  /** Metadata of the Resource Type */
342
373
  typesMetadata?: EnabledResourceTypePropertiesTypesMetadataItem[];
343
- };
374
+ }
344
375
 
345
376
  /** Metadata of the Resource Type. */
346
377
  export declare interface EnabledResourceTypePropertiesTypesMetadataItem {
@@ -415,6 +446,15 @@ export declare interface ErrorResponse {
415
446
  error?: ErrorDetail;
416
447
  }
417
448
 
449
+ /**
450
+ * Given the last `.value` produced by the `byPage` iterator,
451
+ * returns a continuation token that can be used to begin paging from
452
+ * that point later.
453
+ * @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator.
454
+ * @returns The continuation token that can be passed into byPage() during future calls.
455
+ */
456
+ export declare function getContinuationToken(page: unknown): string | undefined;
457
+
418
458
  /**
419
459
  * Defines values for HostType. \
420
460
  * {@link KnownHostType} can be used interchangeably with HostType,
@@ -442,23 +482,40 @@ export declare interface Identity {
442
482
 
443
483
  /** Known values of {@link CreatedByType} that the service accepts. */
444
484
  export declare enum KnownCreatedByType {
485
+ /** User */
445
486
  User = "User",
487
+ /** Application */
446
488
  Application = "Application",
489
+ /** ManagedIdentity */
447
490
  ManagedIdentity = "ManagedIdentity",
491
+ /** Key */
448
492
  Key = "Key"
449
493
  }
450
494
 
451
495
  /** Known values of {@link HostType} that the service accepts. */
452
496
  export declare enum KnownHostType {
497
+ /** Kubernetes */
453
498
  Kubernetes = "Kubernetes"
454
499
  }
455
500
 
456
501
  /** Known values of {@link ResourceIdentityType} that the service accepts. */
457
502
  export declare enum KnownResourceIdentityType {
503
+ /** SystemAssigned */
458
504
  SystemAssigned = "SystemAssigned",
505
+ /** None */
459
506
  None = "None"
460
507
  }
461
508
 
509
+ /** Resource Sync Rules matchExpression property definition. */
510
+ export declare interface MatchExpressionsProperties {
511
+ /** Key is the label key that the selector applies to. */
512
+ key?: string;
513
+ /** The Operator field represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. */
514
+ operator?: string;
515
+ /** The label value */
516
+ values?: string[];
517
+ }
518
+
462
519
  /** The Custom Locations patchable resource definition. */
463
520
  export declare interface PatchableCustomLocations {
464
521
  /** Identity for the resource. */
@@ -483,8 +540,28 @@ export declare interface PatchableCustomLocations {
483
540
  provisioningState?: string;
484
541
  }
485
542
 
543
+ /** The Resource Sync Rules patchable resource definition. */
544
+ export declare interface PatchableResourceSyncRule {
545
+ /** Resource tags */
546
+ tags?: {
547
+ [propertyName: string]: string;
548
+ };
549
+ /** Priority represents a priority of the Resource Sync Rule */
550
+ priority?: number;
551
+ /**
552
+ * Provisioning State for the Resource Sync Rule.
553
+ * NOTE: This property will not be serialized. It can only be populated by the server.
554
+ */
555
+ readonly provisioningState?: string;
556
+ /** 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. */
557
+ selector?: ResourceSyncRulePropertiesSelector;
558
+ /** 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. */
559
+ targetResourceGroup?: string;
560
+ }
561
+
486
562
  /** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */
487
- export declare type ProxyResource = Resource & {};
563
+ export declare interface ProxyResource extends Resource {
564
+ }
488
565
 
489
566
  /** Common fields that are returned in the response for all Azure Resource Manager resources */
490
567
  export declare interface Resource {
@@ -515,6 +592,175 @@ export declare interface Resource {
515
592
  */
516
593
  export declare type ResourceIdentityType = string;
517
594
 
595
+ /** Resource Sync Rules definition. */
596
+ export declare interface ResourceSyncRule extends TrackedResource {
597
+ /**
598
+ * Metadata pertaining to creation and last modification of the resource
599
+ * NOTE: This property will not be serialized. It can only be populated by the server.
600
+ */
601
+ readonly systemData?: SystemData;
602
+ /** Priority represents a priority of the Resource Sync Rule */
603
+ priority?: number;
604
+ /**
605
+ * Provisioning State for the Resource Sync Rule.
606
+ * NOTE: This property will not be serialized. It can only be populated by the server.
607
+ */
608
+ readonly provisioningState?: string;
609
+ /** 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. */
610
+ selector?: ResourceSyncRulePropertiesSelector;
611
+ /** 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. */
612
+ targetResourceGroup?: string;
613
+ }
614
+
615
+ /** The List Resource Sync Rules operation response. */
616
+ export declare interface ResourceSyncRuleListResult {
617
+ /**
618
+ * The URL to use for getting the next set of results.
619
+ * NOTE: This property will not be serialized. It can only be populated by the server.
620
+ */
621
+ readonly nextLink?: string;
622
+ /**
623
+ * The list of Resource Sync Rules.
624
+ * NOTE: This property will not be serialized. It can only be populated by the server.
625
+ */
626
+ readonly value?: ResourceSyncRule[];
627
+ }
628
+
629
+ /** 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. */
630
+ export declare interface ResourceSyncRulePropertiesSelector {
631
+ /** 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. */
632
+ matchExpressions?: MatchExpressionsProperties[];
633
+ /** 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'. */
634
+ matchLabels?: {
635
+ [propertyName: string]: string;
636
+ };
637
+ }
638
+
639
+ /** Interface representing a ResourceSyncRules. */
640
+ export declare interface ResourceSyncRules {
641
+ /**
642
+ * Gets a list of Resource Sync Rules in the specified subscription. The operation returns properties
643
+ * of each Resource Sync Rule
644
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
645
+ * @param resourceName Custom Locations name.
646
+ * @param options The options parameters.
647
+ */
648
+ listByCustomLocationID(resourceGroupName: string, resourceName: string, options?: ResourceSyncRulesListByCustomLocationIDOptionalParams): PagedAsyncIterableIterator<ResourceSyncRule>;
649
+ /**
650
+ * Gets the details of the resourceSyncRule with a specified resource group, subscription id Custom
651
+ * Location resource name and Resource Sync Rule name.
652
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
653
+ * @param resourceName Custom Locations name.
654
+ * @param childResourceName Resource Sync Rule name.
655
+ * @param options The options parameters.
656
+ */
657
+ get(resourceGroupName: string, resourceName: string, childResourceName: string, options?: ResourceSyncRulesGetOptionalParams): Promise<ResourceSyncRulesGetResponse>;
658
+ /**
659
+ * Creates or updates a Resource Sync Rule in the parent Custom Location, Subscription Id and Resource
660
+ * Group
661
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
662
+ * @param resourceName Custom Locations name.
663
+ * @param childResourceName Resource Sync Rule name.
664
+ * @param parameters Parameters supplied to create or update a Resource Sync Rule.
665
+ * @param options The options parameters.
666
+ */
667
+ beginCreateOrUpdate(resourceGroupName: string, resourceName: string, childResourceName: string, parameters: ResourceSyncRule, options?: ResourceSyncRulesCreateOrUpdateOptionalParams): Promise<PollerLike<PollOperationState<ResourceSyncRulesCreateOrUpdateResponse>, ResourceSyncRulesCreateOrUpdateResponse>>;
668
+ /**
669
+ * Creates or updates a Resource Sync Rule in the parent Custom Location, Subscription Id and Resource
670
+ * Group
671
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
672
+ * @param resourceName Custom Locations name.
673
+ * @param childResourceName Resource Sync Rule name.
674
+ * @param parameters Parameters supplied to create or update a Resource Sync Rule.
675
+ * @param options The options parameters.
676
+ */
677
+ beginCreateOrUpdateAndWait(resourceGroupName: string, resourceName: string, childResourceName: string, parameters: ResourceSyncRule, options?: ResourceSyncRulesCreateOrUpdateOptionalParams): Promise<ResourceSyncRulesCreateOrUpdateResponse>;
678
+ /**
679
+ * Deletes the Resource Sync Rule with the specified Resource Sync Rule Name, Custom Location Resource
680
+ * Name, Resource Group, and Subscription Id.
681
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
682
+ * @param resourceName Custom Locations name.
683
+ * @param childResourceName Resource Sync Rule name.
684
+ * @param options The options parameters.
685
+ */
686
+ delete(resourceGroupName: string, resourceName: string, childResourceName: string, options?: ResourceSyncRulesDeleteOptionalParams): Promise<void>;
687
+ /**
688
+ * Updates a Resource Sync Rule with the specified Resource Sync Rule name in the specified Resource
689
+ * Group, Subscription and Custom Location name.
690
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
691
+ * @param resourceName Custom Locations name.
692
+ * @param childResourceName Resource Sync Rule name.
693
+ * @param options The options parameters.
694
+ */
695
+ beginUpdate(resourceGroupName: string, resourceName: string, childResourceName: string, options?: ResourceSyncRulesUpdateOptionalParams): Promise<PollerLike<PollOperationState<ResourceSyncRulesUpdateResponse>, ResourceSyncRulesUpdateResponse>>;
696
+ /**
697
+ * Updates a Resource Sync Rule with the specified Resource Sync Rule name in the specified Resource
698
+ * Group, Subscription and Custom Location name.
699
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
700
+ * @param resourceName Custom Locations name.
701
+ * @param childResourceName Resource Sync Rule name.
702
+ * @param options The options parameters.
703
+ */
704
+ beginUpdateAndWait(resourceGroupName: string, resourceName: string, childResourceName: string, options?: ResourceSyncRulesUpdateOptionalParams): Promise<ResourceSyncRulesUpdateResponse>;
705
+ }
706
+
707
+ /** Optional parameters. */
708
+ export declare interface ResourceSyncRulesCreateOrUpdateOptionalParams extends coreClient.OperationOptions {
709
+ /** Delay to wait until next poll, in milliseconds. */
710
+ updateIntervalInMs?: number;
711
+ /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */
712
+ resumeFrom?: string;
713
+ }
714
+
715
+ /** Contains response data for the createOrUpdate operation. */
716
+ export declare type ResourceSyncRulesCreateOrUpdateResponse = ResourceSyncRule;
717
+
718
+ /** Optional parameters. */
719
+ export declare interface ResourceSyncRulesDeleteOptionalParams extends coreClient.OperationOptions {
720
+ }
721
+
722
+ /** Optional parameters. */
723
+ export declare interface ResourceSyncRulesGetOptionalParams extends coreClient.OperationOptions {
724
+ }
725
+
726
+ /** Contains response data for the get operation. */
727
+ export declare type ResourceSyncRulesGetResponse = ResourceSyncRule;
728
+
729
+ /** Optional parameters. */
730
+ export declare interface ResourceSyncRulesListByCustomLocationIDNextOptionalParams extends coreClient.OperationOptions {
731
+ }
732
+
733
+ /** Contains response data for the listByCustomLocationIDNext operation. */
734
+ export declare type ResourceSyncRulesListByCustomLocationIDNextResponse = ResourceSyncRuleListResult;
735
+
736
+ /** Optional parameters. */
737
+ export declare interface ResourceSyncRulesListByCustomLocationIDOptionalParams extends coreClient.OperationOptions {
738
+ }
739
+
740
+ /** Contains response data for the listByCustomLocationID operation. */
741
+ export declare type ResourceSyncRulesListByCustomLocationIDResponse = ResourceSyncRuleListResult;
742
+
743
+ /** Optional parameters. */
744
+ export declare interface ResourceSyncRulesUpdateOptionalParams extends coreClient.OperationOptions {
745
+ /** Resource tags */
746
+ tags?: {
747
+ [propertyName: string]: string;
748
+ };
749
+ /** Priority represents a priority of the Resource Sync Rule */
750
+ priority?: number;
751
+ /** 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. */
752
+ selector?: ResourceSyncRulePropertiesSelector;
753
+ /** 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. */
754
+ targetResourceGroup?: string;
755
+ /** Delay to wait until next poll, in milliseconds. */
756
+ updateIntervalInMs?: number;
757
+ /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */
758
+ resumeFrom?: string;
759
+ }
760
+
761
+ /** Contains response data for the update operation. */
762
+ export declare type ResourceSyncRulesUpdateResponse = ResourceSyncRule;
763
+
518
764
  /** Metadata pertaining to creation and last modification of the resource. */
519
765
  export declare interface SystemData {
520
766
  /** The identity that created the resource. */
@@ -532,13 +778,13 @@ export declare interface SystemData {
532
778
  }
533
779
 
534
780
  /** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */
535
- export declare type TrackedResource = Resource & {
781
+ export declare interface TrackedResource extends Resource {
536
782
  /** Resource tags. */
537
783
  tags?: {
538
784
  [propertyName: string]: string;
539
785
  };
540
786
  /** The geo-location where the resource lives */
541
787
  location: string;
542
- };
788
+ }
543
789
 
544
790
  export { }
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.7.11"
8
+ "packageVersion": "7.33.7"
9
9
  }
10
10
  ]
11
11
  }
@@ -1,16 +0,0 @@
1
- import * as coreClient from "@azure/core-client";
2
- import * as coreAuth from "@azure/core-auth";
3
- import { CustomLocationsManagementClientOptionalParams } from "./models";
4
- export declare class CustomLocationsManagementClientContext extends coreClient.ServiceClient {
5
- $host: string;
6
- apiVersion: string;
7
- subscriptionId: string;
8
- /**
9
- * Initializes a new instance of the CustomLocationsManagementClientContext class.
10
- * @param credentials Subscription credentials which uniquely identify client subscription.
11
- * @param subscriptionId The ID of the target subscription.
12
- * @param options The parameter options
13
- */
14
- constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: CustomLocationsManagementClientOptionalParams);
15
- }
16
- //# sourceMappingURL=customLocationsManagementClientContext.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"customLocationsManagementClientContext.d.ts","sourceRoot":"","sources":["../../src/customLocationsManagementClientContext.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,6CAA6C,EAAE,MAAM,UAAU,CAAC;AAEzE,qBAAa,sCAAuC,SAAQ,UAAU,CAAC,aAAa;IAClF,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IAEvB;;;;;OAKG;gBAED,WAAW,EAAE,QAAQ,CAAC,eAAe,EACrC,cAAc,EAAE,MAAM,EACtB,OAAO,CAAC,EAAE,6CAA6C;CA2C1D"}