@azure/arm-extendedlocation 1.0.0-beta.1 → 1.0.0-beta.2
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.
- package/CHANGELOG.md +41 -0
- package/LICENSE +1 -1
- package/README.md +23 -8
- package/dist/index.js +806 -83
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist-esm/samples-dev/customLocationsCreateOrUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/customLocationsCreateOrUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/customLocationsCreateOrUpdateSample.js +42 -0
- package/dist-esm/samples-dev/customLocationsCreateOrUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/customLocationsDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/customLocationsDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/customLocationsDeleteSample.js +31 -0
- package/dist-esm/samples-dev/customLocationsDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/customLocationsFindTargetResourceGroupSample.d.ts +2 -0
- package/dist-esm/samples-dev/customLocationsFindTargetResourceGroupSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/customLocationsFindTargetResourceGroupSample.js +34 -0
- package/dist-esm/samples-dev/customLocationsFindTargetResourceGroupSample.js.map +1 -0
- package/dist-esm/samples-dev/customLocationsGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/customLocationsGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/customLocationsGetSample.js +31 -0
- package/dist-esm/samples-dev/customLocationsGetSample.js.map +1 -0
- package/dist-esm/samples-dev/customLocationsListByResourceGroupSample.d.ts +2 -0
- package/dist-esm/samples-dev/customLocationsListByResourceGroupSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/customLocationsListByResourceGroupSample.js +44 -0
- package/dist-esm/samples-dev/customLocationsListByResourceGroupSample.js.map +1 -0
- package/dist-esm/samples-dev/customLocationsListBySubscriptionSample.d.ts +2 -0
- package/dist-esm/samples-dev/customLocationsListBySubscriptionSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/customLocationsListBySubscriptionSample.js +43 -0
- package/dist-esm/samples-dev/customLocationsListBySubscriptionSample.js.map +1 -0
- package/dist-esm/samples-dev/customLocationsListEnabledResourceTypesSample.d.ts +2 -0
- package/dist-esm/samples-dev/customLocationsListEnabledResourceTypesSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/customLocationsListEnabledResourceTypesSample.js +45 -0
- package/dist-esm/samples-dev/customLocationsListEnabledResourceTypesSample.js.map +1 -0
- package/dist-esm/samples-dev/customLocationsListOperationsSample.d.ts +2 -0
- package/dist-esm/samples-dev/customLocationsListOperationsSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/customLocationsListOperationsSample.js +43 -0
- package/dist-esm/samples-dev/customLocationsListOperationsSample.js.map +1 -0
- package/dist-esm/samples-dev/customLocationsUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/customLocationsUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/customLocationsUpdateSample.js +34 -0
- package/dist-esm/samples-dev/customLocationsUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/resourceSyncRulesCreateOrUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/resourceSyncRulesCreateOrUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/resourceSyncRulesCreateOrUpdateSample.js +41 -0
- package/dist-esm/samples-dev/resourceSyncRulesCreateOrUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/resourceSyncRulesDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/resourceSyncRulesDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/resourceSyncRulesDeleteSample.js +32 -0
- package/dist-esm/samples-dev/resourceSyncRulesDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/resourceSyncRulesGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/resourceSyncRulesGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/resourceSyncRulesGetSample.js +32 -0
- package/dist-esm/samples-dev/resourceSyncRulesGetSample.js.map +1 -0
- package/dist-esm/samples-dev/resourceSyncRulesListByCustomLocationIdSample.d.ts +2 -0
- package/dist-esm/samples-dev/resourceSyncRulesListByCustomLocationIdSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/resourceSyncRulesListByCustomLocationIdSample.js +45 -0
- package/dist-esm/samples-dev/resourceSyncRulesListByCustomLocationIdSample.js.map +1 -0
- package/dist-esm/samples-dev/resourceSyncRulesUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/resourceSyncRulesUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/resourceSyncRulesUpdateSample.js +34 -0
- package/dist-esm/samples-dev/resourceSyncRulesUpdateSample.js.map +1 -0
- package/dist-esm/src/customLocationsManagementClient.d.ts +9 -3
- package/dist-esm/src/customLocationsManagementClient.d.ts.map +1 -1
- package/dist-esm/src/customLocationsManagementClient.js +81 -4
- package/dist-esm/src/customLocationsManagementClient.js.map +1 -1
- package/dist-esm/src/index.d.ts +0 -1
- package/dist-esm/src/index.d.ts.map +1 -1
- package/dist-esm/src/index.js +0 -1
- package/dist-esm/src/index.js.map +1 -1
- package/dist-esm/src/models/index.d.ts +172 -25
- package/dist-esm/src/models/index.d.ts.map +1 -1
- package/dist-esm/src/models/index.js +7 -0
- package/dist-esm/src/models/index.js.map +1 -1
- package/dist-esm/src/models/mappers.d.ts +8 -1
- package/dist-esm/src/models/mappers.d.ts.map +1 -1
- package/dist-esm/src/models/mappers.js +228 -29
- package/dist-esm/src/models/mappers.js.map +1 -1
- package/dist-esm/src/models/parameters.d.ts +7 -0
- package/dist-esm/src/models/parameters.d.ts.map +1 -1
- package/dist-esm/src/models/parameters.js +41 -2
- package/dist-esm/src/models/parameters.js.map +1 -1
- package/dist-esm/src/operations/customLocations.d.ts +12 -3
- package/dist-esm/src/operations/customLocations.d.ts.map +1 -1
- package/dist-esm/src/operations/customLocations.js +41 -2
- package/dist-esm/src/operations/customLocations.js.map +1 -1
- package/dist-esm/src/operations/index.d.ts +1 -0
- package/dist-esm/src/operations/index.d.ts.map +1 -1
- package/dist-esm/src/operations/index.js +1 -0
- package/dist-esm/src/operations/index.js.map +1 -1
- package/dist-esm/src/operations/resourceSyncRules.d.ts +97 -0
- package/dist-esm/src/operations/resourceSyncRules.d.ts.map +1 -0
- package/dist-esm/src/operations/resourceSyncRules.js +400 -0
- package/dist-esm/src/operations/resourceSyncRules.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/customLocations.d.ts +10 -1
- package/dist-esm/src/operationsInterfaces/customLocations.d.ts.map +1 -1
- package/dist-esm/src/operationsInterfaces/index.d.ts +1 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -1
- package/dist-esm/src/operationsInterfaces/index.js +1 -0
- package/dist-esm/src/operationsInterfaces/index.js.map +1 -1
- package/dist-esm/src/operationsInterfaces/resourceSyncRules.d.ts +71 -0
- package/dist-esm/src/operationsInterfaces/resourceSyncRules.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/resourceSyncRules.js +9 -0
- package/dist-esm/src/operationsInterfaces/resourceSyncRules.js.map +1 -0
- package/dist-esm/test/sampleTest.js +11 -13
- package/dist-esm/test/sampleTest.js.map +1 -1
- package/package.json +54 -25
- package/review/arm-extendedlocation.api.md +139 -27
- package/rollup.config.js +6 -72
- package/src/customLocationsManagementClient.ts +109 -5
- package/src/index.ts +0 -1
- package/src/models/index.ts +186 -26
- package/src/models/mappers.ts +243 -30
- package/src/models/parameters.ts +53 -2
- package/src/operations/customLocations.ts +57 -5
- package/src/operations/index.ts +1 -0
- package/src/operations/resourceSyncRules.ts +562 -0
- package/src/operationsInterfaces/customLocations.ts +18 -1
- package/src/operationsInterfaces/index.ts +1 -0
- package/src/operationsInterfaces/resourceSyncRules.ts +136 -0
- package/tsconfig.json +19 -5
- package/types/arm-extendedlocation.d.ts +257 -20
- package/types/tsdoc-metadata.json +1 -1
- package/dist-esm/src/customLocationsManagementClientContext.d.ts +0 -16
- package/dist-esm/src/customLocationsManagementClientContext.d.ts.map +0 -1
- package/dist-esm/src/customLocationsManagementClientContext.js +0 -49
- package/dist-esm/src/customLocationsManagementClientContext.js.map +0 -1
- package/src/customLocationsManagementClientContext.ts +0 -70
package/dist/index.js
CHANGED
|
@@ -4,8 +4,30 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var tslib = require('tslib');
|
|
6
6
|
var coreClient = require('@azure/core-client');
|
|
7
|
+
var coreRestPipeline = require('@azure/core-rest-pipeline');
|
|
7
8
|
var coreLro = require('@azure/core-lro');
|
|
8
9
|
|
|
10
|
+
function _interopNamespace(e) {
|
|
11
|
+
if (e && e.__esModule) return e;
|
|
12
|
+
var n = Object.create(null);
|
|
13
|
+
if (e) {
|
|
14
|
+
Object.keys(e).forEach(function (k) {
|
|
15
|
+
if (k !== 'default') {
|
|
16
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
17
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () { return e[k]; }
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
n["default"] = e;
|
|
25
|
+
return Object.freeze(n);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
var coreClient__namespace = /*#__PURE__*/_interopNamespace(coreClient);
|
|
29
|
+
var coreRestPipeline__namespace = /*#__PURE__*/_interopNamespace(coreRestPipeline);
|
|
30
|
+
|
|
9
31
|
/*
|
|
10
32
|
* Copyright (c) Microsoft Corporation.
|
|
11
33
|
* Licensed under the MIT License.
|
|
@@ -13,17 +35,30 @@ var coreLro = require('@azure/core-lro');
|
|
|
13
35
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
14
36
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
15
37
|
*/
|
|
38
|
+
/** Known values of {@link ResourceIdentityType} that the service accepts. */
|
|
39
|
+
exports.KnownResourceIdentityType = void 0;
|
|
16
40
|
(function (KnownResourceIdentityType) {
|
|
41
|
+
/** SystemAssigned */
|
|
17
42
|
KnownResourceIdentityType["SystemAssigned"] = "SystemAssigned";
|
|
43
|
+
/** None */
|
|
18
44
|
KnownResourceIdentityType["None"] = "None";
|
|
19
45
|
})(exports.KnownResourceIdentityType || (exports.KnownResourceIdentityType = {}));
|
|
46
|
+
/** Known values of {@link HostType} that the service accepts. */
|
|
47
|
+
exports.KnownHostType = void 0;
|
|
20
48
|
(function (KnownHostType) {
|
|
49
|
+
/** Kubernetes */
|
|
21
50
|
KnownHostType["Kubernetes"] = "Kubernetes";
|
|
22
51
|
})(exports.KnownHostType || (exports.KnownHostType = {}));
|
|
52
|
+
/** Known values of {@link CreatedByType} that the service accepts. */
|
|
53
|
+
exports.KnownCreatedByType = void 0;
|
|
23
54
|
(function (KnownCreatedByType) {
|
|
55
|
+
/** User */
|
|
24
56
|
KnownCreatedByType["User"] = "User";
|
|
57
|
+
/** Application */
|
|
25
58
|
KnownCreatedByType["Application"] = "Application";
|
|
59
|
+
/** ManagedIdentity */
|
|
26
60
|
KnownCreatedByType["ManagedIdentity"] = "ManagedIdentity";
|
|
61
|
+
/** Key */
|
|
27
62
|
KnownCreatedByType["Key"] = "Key";
|
|
28
63
|
})(exports.KnownCreatedByType || (exports.KnownCreatedByType = {}));
|
|
29
64
|
|
|
@@ -239,35 +274,6 @@ const CustomLocationListResult = {
|
|
|
239
274
|
}
|
|
240
275
|
}
|
|
241
276
|
};
|
|
242
|
-
const Resource = {
|
|
243
|
-
type: {
|
|
244
|
-
name: "Composite",
|
|
245
|
-
className: "Resource",
|
|
246
|
-
modelProperties: {
|
|
247
|
-
id: {
|
|
248
|
-
serializedName: "id",
|
|
249
|
-
readOnly: true,
|
|
250
|
-
type: {
|
|
251
|
-
name: "String"
|
|
252
|
-
}
|
|
253
|
-
},
|
|
254
|
-
name: {
|
|
255
|
-
serializedName: "name",
|
|
256
|
-
readOnly: true,
|
|
257
|
-
type: {
|
|
258
|
-
name: "String"
|
|
259
|
-
}
|
|
260
|
-
},
|
|
261
|
-
type: {
|
|
262
|
-
serializedName: "type",
|
|
263
|
-
readOnly: true,
|
|
264
|
-
type: {
|
|
265
|
-
name: "String"
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
};
|
|
271
277
|
const Identity = {
|
|
272
278
|
type: {
|
|
273
279
|
name: "Composite",
|
|
@@ -360,6 +366,35 @@ const SystemData = {
|
|
|
360
366
|
}
|
|
361
367
|
}
|
|
362
368
|
};
|
|
369
|
+
const Resource = {
|
|
370
|
+
type: {
|
|
371
|
+
name: "Composite",
|
|
372
|
+
className: "Resource",
|
|
373
|
+
modelProperties: {
|
|
374
|
+
id: {
|
|
375
|
+
serializedName: "id",
|
|
376
|
+
readOnly: true,
|
|
377
|
+
type: {
|
|
378
|
+
name: "String"
|
|
379
|
+
}
|
|
380
|
+
},
|
|
381
|
+
name: {
|
|
382
|
+
serializedName: "name",
|
|
383
|
+
readOnly: true,
|
|
384
|
+
type: {
|
|
385
|
+
name: "String"
|
|
386
|
+
}
|
|
387
|
+
},
|
|
388
|
+
type: {
|
|
389
|
+
serializedName: "type",
|
|
390
|
+
readOnly: true,
|
|
391
|
+
type: {
|
|
392
|
+
name: "String"
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
};
|
|
363
398
|
const PatchableCustomLocations = {
|
|
364
399
|
type: {
|
|
365
400
|
name: "Composite",
|
|
@@ -484,6 +519,170 @@ const EnabledResourceTypePropertiesTypesMetadataItem = {
|
|
|
484
519
|
}
|
|
485
520
|
}
|
|
486
521
|
};
|
|
522
|
+
const CustomLocationFindTargetResourceGroupProperties = {
|
|
523
|
+
type: {
|
|
524
|
+
name: "Composite",
|
|
525
|
+
className: "CustomLocationFindTargetResourceGroupProperties",
|
|
526
|
+
modelProperties: {
|
|
527
|
+
labels: {
|
|
528
|
+
serializedName: "labels",
|
|
529
|
+
type: {
|
|
530
|
+
name: "Dictionary",
|
|
531
|
+
value: { type: { name: "String" } }
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
};
|
|
537
|
+
const CustomLocationFindTargetResourceGroupResult = {
|
|
538
|
+
type: {
|
|
539
|
+
name: "Composite",
|
|
540
|
+
className: "CustomLocationFindTargetResourceGroupResult",
|
|
541
|
+
modelProperties: {
|
|
542
|
+
matchedResourceSyncRule: {
|
|
543
|
+
serializedName: "matchedResourceSyncRule",
|
|
544
|
+
readOnly: true,
|
|
545
|
+
type: {
|
|
546
|
+
name: "String"
|
|
547
|
+
}
|
|
548
|
+
},
|
|
549
|
+
targetResourceGroup: {
|
|
550
|
+
serializedName: "targetResourceGroup",
|
|
551
|
+
readOnly: true,
|
|
552
|
+
type: {
|
|
553
|
+
name: "String"
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
};
|
|
559
|
+
const ResourceSyncRuleListResult = {
|
|
560
|
+
type: {
|
|
561
|
+
name: "Composite",
|
|
562
|
+
className: "ResourceSyncRuleListResult",
|
|
563
|
+
modelProperties: {
|
|
564
|
+
nextLink: {
|
|
565
|
+
serializedName: "nextLink",
|
|
566
|
+
readOnly: true,
|
|
567
|
+
type: {
|
|
568
|
+
name: "String"
|
|
569
|
+
}
|
|
570
|
+
},
|
|
571
|
+
value: {
|
|
572
|
+
serializedName: "value",
|
|
573
|
+
readOnly: true,
|
|
574
|
+
type: {
|
|
575
|
+
name: "Sequence",
|
|
576
|
+
element: {
|
|
577
|
+
type: {
|
|
578
|
+
name: "Composite",
|
|
579
|
+
className: "ResourceSyncRule"
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
};
|
|
587
|
+
const ResourceSyncRulePropertiesSelector = {
|
|
588
|
+
type: {
|
|
589
|
+
name: "Composite",
|
|
590
|
+
className: "ResourceSyncRulePropertiesSelector",
|
|
591
|
+
modelProperties: {
|
|
592
|
+
matchExpressions: {
|
|
593
|
+
serializedName: "matchExpressions",
|
|
594
|
+
type: {
|
|
595
|
+
name: "Sequence",
|
|
596
|
+
element: {
|
|
597
|
+
type: {
|
|
598
|
+
name: "Composite",
|
|
599
|
+
className: "MatchExpressionsProperties"
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
},
|
|
604
|
+
matchLabels: {
|
|
605
|
+
serializedName: "matchLabels",
|
|
606
|
+
type: {
|
|
607
|
+
name: "Dictionary",
|
|
608
|
+
value: { type: { name: "String" } }
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
};
|
|
614
|
+
const MatchExpressionsProperties = {
|
|
615
|
+
type: {
|
|
616
|
+
name: "Composite",
|
|
617
|
+
className: "MatchExpressionsProperties",
|
|
618
|
+
modelProperties: {
|
|
619
|
+
key: {
|
|
620
|
+
serializedName: "key",
|
|
621
|
+
type: {
|
|
622
|
+
name: "String"
|
|
623
|
+
}
|
|
624
|
+
},
|
|
625
|
+
operator: {
|
|
626
|
+
serializedName: "operator",
|
|
627
|
+
type: {
|
|
628
|
+
name: "String"
|
|
629
|
+
}
|
|
630
|
+
},
|
|
631
|
+
values: {
|
|
632
|
+
serializedName: "values",
|
|
633
|
+
type: {
|
|
634
|
+
name: "Sequence",
|
|
635
|
+
element: {
|
|
636
|
+
type: {
|
|
637
|
+
name: "String"
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
};
|
|
645
|
+
const PatchableResourceSyncRule = {
|
|
646
|
+
type: {
|
|
647
|
+
name: "Composite",
|
|
648
|
+
className: "PatchableResourceSyncRule",
|
|
649
|
+
modelProperties: {
|
|
650
|
+
tags: {
|
|
651
|
+
serializedName: "tags",
|
|
652
|
+
type: {
|
|
653
|
+
name: "Dictionary",
|
|
654
|
+
value: { type: { name: "String" } }
|
|
655
|
+
}
|
|
656
|
+
},
|
|
657
|
+
priority: {
|
|
658
|
+
serializedName: "properties.priority",
|
|
659
|
+
type: {
|
|
660
|
+
name: "Number"
|
|
661
|
+
}
|
|
662
|
+
},
|
|
663
|
+
provisioningState: {
|
|
664
|
+
serializedName: "properties.provisioningState",
|
|
665
|
+
readOnly: true,
|
|
666
|
+
type: {
|
|
667
|
+
name: "String"
|
|
668
|
+
}
|
|
669
|
+
},
|
|
670
|
+
selector: {
|
|
671
|
+
serializedName: "properties.selector",
|
|
672
|
+
type: {
|
|
673
|
+
name: "Composite",
|
|
674
|
+
className: "ResourceSyncRulePropertiesSelector"
|
|
675
|
+
}
|
|
676
|
+
},
|
|
677
|
+
targetResourceGroup: {
|
|
678
|
+
serializedName: "properties.targetResourceGroup",
|
|
679
|
+
type: {
|
|
680
|
+
name: "String"
|
|
681
|
+
}
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
};
|
|
487
686
|
const TrackedResource = {
|
|
488
687
|
type: {
|
|
489
688
|
name: "Composite",
|
|
@@ -570,6 +769,41 @@ const CustomLocation = {
|
|
|
570
769
|
} })
|
|
571
770
|
}
|
|
572
771
|
};
|
|
772
|
+
const ResourceSyncRule = {
|
|
773
|
+
type: {
|
|
774
|
+
name: "Composite",
|
|
775
|
+
className: "ResourceSyncRule",
|
|
776
|
+
modelProperties: Object.assign(Object.assign({}, TrackedResource.type.modelProperties), { systemData: {
|
|
777
|
+
serializedName: "systemData",
|
|
778
|
+
type: {
|
|
779
|
+
name: "Composite",
|
|
780
|
+
className: "SystemData"
|
|
781
|
+
}
|
|
782
|
+
}, priority: {
|
|
783
|
+
serializedName: "properties.priority",
|
|
784
|
+
type: {
|
|
785
|
+
name: "Number"
|
|
786
|
+
}
|
|
787
|
+
}, provisioningState: {
|
|
788
|
+
serializedName: "properties.provisioningState",
|
|
789
|
+
readOnly: true,
|
|
790
|
+
type: {
|
|
791
|
+
name: "String"
|
|
792
|
+
}
|
|
793
|
+
}, selector: {
|
|
794
|
+
serializedName: "properties.selector",
|
|
795
|
+
type: {
|
|
796
|
+
name: "Composite",
|
|
797
|
+
className: "ResourceSyncRulePropertiesSelector"
|
|
798
|
+
}
|
|
799
|
+
}, targetResourceGroup: {
|
|
800
|
+
serializedName: "properties.targetResourceGroup",
|
|
801
|
+
type: {
|
|
802
|
+
name: "String"
|
|
803
|
+
}
|
|
804
|
+
} })
|
|
805
|
+
}
|
|
806
|
+
};
|
|
573
807
|
const EnabledResourceType = {
|
|
574
808
|
type: {
|
|
575
809
|
name: "Composite",
|
|
@@ -613,16 +847,23 @@ var Mappers = /*#__PURE__*/Object.freeze({
|
|
|
613
847
|
ErrorDetail: ErrorDetail,
|
|
614
848
|
ErrorAdditionalInfo: ErrorAdditionalInfo,
|
|
615
849
|
CustomLocationListResult: CustomLocationListResult,
|
|
616
|
-
Resource: Resource,
|
|
617
850
|
Identity: Identity,
|
|
618
851
|
CustomLocationPropertiesAuthentication: CustomLocationPropertiesAuthentication,
|
|
619
852
|
SystemData: SystemData,
|
|
853
|
+
Resource: Resource,
|
|
620
854
|
PatchableCustomLocations: PatchableCustomLocations,
|
|
621
855
|
EnabledResourceTypesListResult: EnabledResourceTypesListResult,
|
|
622
856
|
EnabledResourceTypePropertiesTypesMetadataItem: EnabledResourceTypePropertiesTypesMetadataItem,
|
|
857
|
+
CustomLocationFindTargetResourceGroupProperties: CustomLocationFindTargetResourceGroupProperties,
|
|
858
|
+
CustomLocationFindTargetResourceGroupResult: CustomLocationFindTargetResourceGroupResult,
|
|
859
|
+
ResourceSyncRuleListResult: ResourceSyncRuleListResult,
|
|
860
|
+
ResourceSyncRulePropertiesSelector: ResourceSyncRulePropertiesSelector,
|
|
861
|
+
MatchExpressionsProperties: MatchExpressionsProperties,
|
|
862
|
+
PatchableResourceSyncRule: PatchableResourceSyncRule,
|
|
623
863
|
TrackedResource: TrackedResource,
|
|
624
864
|
ProxyResource: ProxyResource,
|
|
625
865
|
CustomLocation: CustomLocation,
|
|
866
|
+
ResourceSyncRule: ResourceSyncRule,
|
|
626
867
|
EnabledResourceType: EnabledResourceType
|
|
627
868
|
});
|
|
628
869
|
|
|
@@ -658,7 +899,7 @@ const $host = {
|
|
|
658
899
|
const apiVersion = {
|
|
659
900
|
parameterPath: "apiVersion",
|
|
660
901
|
mapper: {
|
|
661
|
-
defaultValue: "2021-08-
|
|
902
|
+
defaultValue: "2021-08-31-preview",
|
|
662
903
|
isConstant: true,
|
|
663
904
|
serializedName: "api-version",
|
|
664
905
|
type: {
|
|
@@ -723,6 +964,10 @@ const parameters = {
|
|
|
723
964
|
parameterPath: "parameters",
|
|
724
965
|
mapper: CustomLocation
|
|
725
966
|
};
|
|
967
|
+
const parameters2 = {
|
|
968
|
+
parameterPath: "parameters",
|
|
969
|
+
mapper: CustomLocationFindTargetResourceGroupProperties
|
|
970
|
+
};
|
|
726
971
|
const nextLink = {
|
|
727
972
|
parameterPath: "nextLink",
|
|
728
973
|
mapper: {
|
|
@@ -734,6 +979,25 @@ const nextLink = {
|
|
|
734
979
|
},
|
|
735
980
|
skipEncoding: true
|
|
736
981
|
};
|
|
982
|
+
const childResourceName = {
|
|
983
|
+
parameterPath: "childResourceName",
|
|
984
|
+
mapper: {
|
|
985
|
+
constraints: {
|
|
986
|
+
Pattern: new RegExp("^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"),
|
|
987
|
+
MaxLength: 63,
|
|
988
|
+
MinLength: 1
|
|
989
|
+
},
|
|
990
|
+
serializedName: "childResourceName",
|
|
991
|
+
required: true,
|
|
992
|
+
type: {
|
|
993
|
+
name: "String"
|
|
994
|
+
}
|
|
995
|
+
}
|
|
996
|
+
};
|
|
997
|
+
const parameters3 = {
|
|
998
|
+
parameterPath: "parameters",
|
|
999
|
+
mapper: ResourceSyncRule
|
|
1000
|
+
};
|
|
737
1001
|
|
|
738
1002
|
/*
|
|
739
1003
|
* Copyright (c) Microsoft Corporation.
|
|
@@ -1008,7 +1272,7 @@ class CustomLocationsImpl {
|
|
|
1008
1272
|
* @param options The options parameters.
|
|
1009
1273
|
*/
|
|
1010
1274
|
get(resourceGroupName, resourceName, options) {
|
|
1011
|
-
return this.client.sendOperationRequest({ resourceGroupName, resourceName, options }, getOperationSpec);
|
|
1275
|
+
return this.client.sendOperationRequest({ resourceGroupName, resourceName, options }, getOperationSpec$1);
|
|
1012
1276
|
}
|
|
1013
1277
|
/**
|
|
1014
1278
|
* Creates or updates a Custom Location in the specified Subscription and Resource Group
|
|
@@ -1041,12 +1305,14 @@ class CustomLocationsImpl {
|
|
|
1041
1305
|
}
|
|
1042
1306
|
};
|
|
1043
1307
|
});
|
|
1044
|
-
const lro = new LroImpl(sendOperation, { resourceGroupName, resourceName, parameters, options }, createOrUpdateOperationSpec);
|
|
1045
|
-
|
|
1308
|
+
const lro = new LroImpl(sendOperation, { resourceGroupName, resourceName, parameters, options }, createOrUpdateOperationSpec$1);
|
|
1309
|
+
const poller = new coreLro.LroEngine(lro, {
|
|
1046
1310
|
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
1047
1311
|
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
|
|
1048
1312
|
lroResourceLocationConfig: "azure-async-operation"
|
|
1049
1313
|
});
|
|
1314
|
+
yield poller.poll();
|
|
1315
|
+
return poller;
|
|
1050
1316
|
});
|
|
1051
1317
|
}
|
|
1052
1318
|
/**
|
|
@@ -1092,12 +1358,14 @@ class CustomLocationsImpl {
|
|
|
1092
1358
|
}
|
|
1093
1359
|
};
|
|
1094
1360
|
});
|
|
1095
|
-
const lro = new LroImpl(sendOperation, { resourceGroupName, resourceName, options }, deleteOperationSpec);
|
|
1096
|
-
|
|
1361
|
+
const lro = new LroImpl(sendOperation, { resourceGroupName, resourceName, options }, deleteOperationSpec$1);
|
|
1362
|
+
const poller = new coreLro.LroEngine(lro, {
|
|
1097
1363
|
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
1098
1364
|
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
|
|
1099
1365
|
lroResourceLocationConfig: "azure-async-operation"
|
|
1100
1366
|
});
|
|
1367
|
+
yield poller.poll();
|
|
1368
|
+
return poller;
|
|
1101
1369
|
});
|
|
1102
1370
|
}
|
|
1103
1371
|
/**
|
|
@@ -1120,7 +1388,7 @@ class CustomLocationsImpl {
|
|
|
1120
1388
|
* @param options The options parameters.
|
|
1121
1389
|
*/
|
|
1122
1390
|
update(resourceGroupName, resourceName, options) {
|
|
1123
|
-
return this.client.sendOperationRequest({ resourceGroupName, resourceName, options }, updateOperationSpec);
|
|
1391
|
+
return this.client.sendOperationRequest({ resourceGroupName, resourceName, options }, updateOperationSpec$1);
|
|
1124
1392
|
}
|
|
1125
1393
|
/**
|
|
1126
1394
|
* Gets the list of the Enabled Resource Types.
|
|
@@ -1131,6 +1399,17 @@ class CustomLocationsImpl {
|
|
|
1131
1399
|
_listEnabledResourceTypes(resourceGroupName, resourceName, options) {
|
|
1132
1400
|
return this.client.sendOperationRequest({ resourceGroupName, resourceName, options }, listEnabledResourceTypesOperationSpec);
|
|
1133
1401
|
}
|
|
1402
|
+
/**
|
|
1403
|
+
* Returns the target resource group associated with the resource sync rules of the Custom Location
|
|
1404
|
+
* that match the rules passed in with the Find Target Resource Group Request.
|
|
1405
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
1406
|
+
* @param resourceName Custom Locations name.
|
|
1407
|
+
* @param parameters Parameters of the find target resource group request.
|
|
1408
|
+
* @param options The options parameters.
|
|
1409
|
+
*/
|
|
1410
|
+
findTargetResourceGroup(resourceGroupName, resourceName, parameters, options) {
|
|
1411
|
+
return this.client.sendOperationRequest({ resourceGroupName, resourceName, parameters, options }, findTargetResourceGroupOperationSpec);
|
|
1412
|
+
}
|
|
1134
1413
|
/**
|
|
1135
1414
|
* ListOperationsNext
|
|
1136
1415
|
* @param nextLink The nextLink from the previous successful call to the ListOperations method.
|
|
@@ -1169,7 +1448,7 @@ class CustomLocationsImpl {
|
|
|
1169
1448
|
}
|
|
1170
1449
|
}
|
|
1171
1450
|
// Operation Specifications
|
|
1172
|
-
const serializer =
|
|
1451
|
+
const serializer$1 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
|
|
1173
1452
|
const listOperationsOperationSpec = {
|
|
1174
1453
|
path: "/providers/Microsoft.ExtendedLocation/operations",
|
|
1175
1454
|
httpMethod: "GET",
|
|
@@ -1184,7 +1463,7 @@ const listOperationsOperationSpec = {
|
|
|
1184
1463
|
queryParameters: [apiVersion],
|
|
1185
1464
|
urlParameters: [$host],
|
|
1186
1465
|
headerParameters: [accept],
|
|
1187
|
-
serializer
|
|
1466
|
+
serializer: serializer$1
|
|
1188
1467
|
};
|
|
1189
1468
|
const listBySubscriptionOperationSpec = {
|
|
1190
1469
|
path: "/subscriptions/{subscriptionId}/providers/Microsoft.ExtendedLocation/customLocations",
|
|
@@ -1200,7 +1479,7 @@ const listBySubscriptionOperationSpec = {
|
|
|
1200
1479
|
queryParameters: [apiVersion],
|
|
1201
1480
|
urlParameters: [$host, subscriptionId],
|
|
1202
1481
|
headerParameters: [accept],
|
|
1203
|
-
serializer
|
|
1482
|
+
serializer: serializer$1
|
|
1204
1483
|
};
|
|
1205
1484
|
const listByResourceGroupOperationSpec = {
|
|
1206
1485
|
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ExtendedLocation/customLocations",
|
|
@@ -1220,9 +1499,9 @@ const listByResourceGroupOperationSpec = {
|
|
|
1220
1499
|
resourceGroupName
|
|
1221
1500
|
],
|
|
1222
1501
|
headerParameters: [accept],
|
|
1223
|
-
serializer
|
|
1502
|
+
serializer: serializer$1
|
|
1224
1503
|
};
|
|
1225
|
-
const getOperationSpec = {
|
|
1504
|
+
const getOperationSpec$1 = {
|
|
1226
1505
|
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ExtendedLocation/customLocations/{resourceName}",
|
|
1227
1506
|
httpMethod: "GET",
|
|
1228
1507
|
responses: {
|
|
@@ -1241,9 +1520,9 @@ const getOperationSpec = {
|
|
|
1241
1520
|
resourceName
|
|
1242
1521
|
],
|
|
1243
1522
|
headerParameters: [accept],
|
|
1244
|
-
serializer
|
|
1523
|
+
serializer: serializer$1
|
|
1245
1524
|
};
|
|
1246
|
-
const createOrUpdateOperationSpec = {
|
|
1525
|
+
const createOrUpdateOperationSpec$1 = {
|
|
1247
1526
|
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ExtendedLocation/customLocations/{resourceName}",
|
|
1248
1527
|
httpMethod: "PUT",
|
|
1249
1528
|
responses: {
|
|
@@ -1273,9 +1552,9 @@ const createOrUpdateOperationSpec = {
|
|
|
1273
1552
|
],
|
|
1274
1553
|
headerParameters: [accept, contentType],
|
|
1275
1554
|
mediaType: "json",
|
|
1276
|
-
serializer
|
|
1555
|
+
serializer: serializer$1
|
|
1277
1556
|
};
|
|
1278
|
-
const deleteOperationSpec = {
|
|
1557
|
+
const deleteOperationSpec$1 = {
|
|
1279
1558
|
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ExtendedLocation/customLocations/{resourceName}",
|
|
1280
1559
|
httpMethod: "DELETE",
|
|
1281
1560
|
responses: {
|
|
@@ -1295,9 +1574,9 @@ const deleteOperationSpec = {
|
|
|
1295
1574
|
resourceName
|
|
1296
1575
|
],
|
|
1297
1576
|
headerParameters: [accept],
|
|
1298
|
-
serializer
|
|
1577
|
+
serializer: serializer$1
|
|
1299
1578
|
};
|
|
1300
|
-
const updateOperationSpec = {
|
|
1579
|
+
const updateOperationSpec$1 = {
|
|
1301
1580
|
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ExtendedLocation/customLocations/{resourceName}",
|
|
1302
1581
|
httpMethod: "PATCH",
|
|
1303
1582
|
responses: {
|
|
@@ -1331,7 +1610,7 @@ const updateOperationSpec = {
|
|
|
1331
1610
|
],
|
|
1332
1611
|
headerParameters: [accept, contentType],
|
|
1333
1612
|
mediaType: "json",
|
|
1334
|
-
serializer
|
|
1613
|
+
serializer: serializer$1
|
|
1335
1614
|
};
|
|
1336
1615
|
const listEnabledResourceTypesOperationSpec = {
|
|
1337
1616
|
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ExtendedLocation/customLocations/{resourceName}/enabledResourceTypes",
|
|
@@ -1352,23 +1631,47 @@ const listEnabledResourceTypesOperationSpec = {
|
|
|
1352
1631
|
resourceName
|
|
1353
1632
|
],
|
|
1354
1633
|
headerParameters: [accept],
|
|
1355
|
-
serializer
|
|
1634
|
+
serializer: serializer$1
|
|
1356
1635
|
};
|
|
1357
|
-
const
|
|
1358
|
-
path: "{
|
|
1359
|
-
httpMethod: "
|
|
1636
|
+
const findTargetResourceGroupOperationSpec = {
|
|
1637
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ExtendedLocation/customLocations/{resourceName}/findTargetResourceGroup",
|
|
1638
|
+
httpMethod: "POST",
|
|
1360
1639
|
responses: {
|
|
1361
1640
|
200: {
|
|
1362
|
-
bodyMapper:
|
|
1641
|
+
bodyMapper: CustomLocationFindTargetResourceGroupResult
|
|
1363
1642
|
},
|
|
1643
|
+
204: {},
|
|
1364
1644
|
default: {
|
|
1365
1645
|
bodyMapper: ErrorResponse
|
|
1366
1646
|
}
|
|
1367
1647
|
},
|
|
1648
|
+
requestBody: parameters2,
|
|
1368
1649
|
queryParameters: [apiVersion],
|
|
1369
|
-
urlParameters: [
|
|
1650
|
+
urlParameters: [
|
|
1651
|
+
$host,
|
|
1652
|
+
subscriptionId,
|
|
1653
|
+
resourceGroupName,
|
|
1654
|
+
resourceName
|
|
1655
|
+
],
|
|
1656
|
+
headerParameters: [accept, contentType],
|
|
1657
|
+
mediaType: "json",
|
|
1658
|
+
serializer: serializer$1
|
|
1659
|
+
};
|
|
1660
|
+
const listOperationsNextOperationSpec = {
|
|
1661
|
+
path: "{nextLink}",
|
|
1662
|
+
httpMethod: "GET",
|
|
1663
|
+
responses: {
|
|
1664
|
+
200: {
|
|
1665
|
+
bodyMapper: CustomLocationOperationsList
|
|
1666
|
+
},
|
|
1667
|
+
default: {
|
|
1668
|
+
bodyMapper: ErrorResponse
|
|
1669
|
+
}
|
|
1670
|
+
},
|
|
1671
|
+
queryParameters: [apiVersion],
|
|
1672
|
+
urlParameters: [$host, nextLink],
|
|
1370
1673
|
headerParameters: [accept],
|
|
1371
|
-
serializer
|
|
1674
|
+
serializer: serializer$1
|
|
1372
1675
|
};
|
|
1373
1676
|
const listBySubscriptionNextOperationSpec = {
|
|
1374
1677
|
path: "{nextLink}",
|
|
@@ -1388,7 +1691,7 @@ const listBySubscriptionNextOperationSpec = {
|
|
|
1388
1691
|
nextLink
|
|
1389
1692
|
],
|
|
1390
1693
|
headerParameters: [accept],
|
|
1391
|
-
serializer
|
|
1694
|
+
serializer: serializer$1
|
|
1392
1695
|
};
|
|
1393
1696
|
const listByResourceGroupNextOperationSpec = {
|
|
1394
1697
|
path: "{nextLink}",
|
|
@@ -1409,7 +1712,7 @@ const listByResourceGroupNextOperationSpec = {
|
|
|
1409
1712
|
nextLink
|
|
1410
1713
|
],
|
|
1411
1714
|
headerParameters: [accept],
|
|
1412
|
-
serializer
|
|
1715
|
+
serializer: serializer$1
|
|
1413
1716
|
};
|
|
1414
1717
|
const listEnabledResourceTypesNextOperationSpec = {
|
|
1415
1718
|
path: "{nextLink}",
|
|
@@ -1431,6 +1734,400 @@ const listEnabledResourceTypesNextOperationSpec = {
|
|
|
1431
1734
|
nextLink
|
|
1432
1735
|
],
|
|
1433
1736
|
headerParameters: [accept],
|
|
1737
|
+
serializer: serializer$1
|
|
1738
|
+
};
|
|
1739
|
+
|
|
1740
|
+
/*
|
|
1741
|
+
* Copyright (c) Microsoft Corporation.
|
|
1742
|
+
* Licensed under the MIT License.
|
|
1743
|
+
*
|
|
1744
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
1745
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
1746
|
+
*/
|
|
1747
|
+
/// <reference lib="esnext.asynciterable" />
|
|
1748
|
+
/** Class containing ResourceSyncRules operations. */
|
|
1749
|
+
class ResourceSyncRulesImpl {
|
|
1750
|
+
/**
|
|
1751
|
+
* Initialize a new instance of the class ResourceSyncRules class.
|
|
1752
|
+
* @param client Reference to the service client
|
|
1753
|
+
*/
|
|
1754
|
+
constructor(client) {
|
|
1755
|
+
this.client = client;
|
|
1756
|
+
}
|
|
1757
|
+
/**
|
|
1758
|
+
* Gets a list of Resource Sync Rules in the specified subscription. The operation returns properties
|
|
1759
|
+
* of each Resource Sync Rule
|
|
1760
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
1761
|
+
* @param resourceName Custom Locations name.
|
|
1762
|
+
* @param options The options parameters.
|
|
1763
|
+
*/
|
|
1764
|
+
listByCustomLocationID(resourceGroupName, resourceName, options) {
|
|
1765
|
+
const iter = this.listByCustomLocationIDPagingAll(resourceGroupName, resourceName, options);
|
|
1766
|
+
return {
|
|
1767
|
+
next() {
|
|
1768
|
+
return iter.next();
|
|
1769
|
+
},
|
|
1770
|
+
[Symbol.asyncIterator]() {
|
|
1771
|
+
return this;
|
|
1772
|
+
},
|
|
1773
|
+
byPage: () => {
|
|
1774
|
+
return this.listByCustomLocationIDPagingPage(resourceGroupName, resourceName, options);
|
|
1775
|
+
}
|
|
1776
|
+
};
|
|
1777
|
+
}
|
|
1778
|
+
listByCustomLocationIDPagingPage(resourceGroupName, resourceName, options) {
|
|
1779
|
+
return tslib.__asyncGenerator(this, arguments, function* listByCustomLocationIDPagingPage_1() {
|
|
1780
|
+
let result = yield tslib.__await(this._listByCustomLocationID(resourceGroupName, resourceName, options));
|
|
1781
|
+
yield yield tslib.__await(result.value || []);
|
|
1782
|
+
let continuationToken = result.nextLink;
|
|
1783
|
+
while (continuationToken) {
|
|
1784
|
+
result = yield tslib.__await(this._listByCustomLocationIDNext(resourceGroupName, resourceName, continuationToken, options));
|
|
1785
|
+
continuationToken = result.nextLink;
|
|
1786
|
+
yield yield tslib.__await(result.value || []);
|
|
1787
|
+
}
|
|
1788
|
+
});
|
|
1789
|
+
}
|
|
1790
|
+
listByCustomLocationIDPagingAll(resourceGroupName, resourceName, options) {
|
|
1791
|
+
return tslib.__asyncGenerator(this, arguments, function* listByCustomLocationIDPagingAll_1() {
|
|
1792
|
+
var e_1, _a;
|
|
1793
|
+
try {
|
|
1794
|
+
for (var _b = tslib.__asyncValues(this.listByCustomLocationIDPagingPage(resourceGroupName, resourceName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
|
|
1795
|
+
const page = _c.value;
|
|
1796
|
+
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
|
|
1797
|
+
}
|
|
1798
|
+
}
|
|
1799
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
1800
|
+
finally {
|
|
1801
|
+
try {
|
|
1802
|
+
if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
|
|
1803
|
+
}
|
|
1804
|
+
finally { if (e_1) throw e_1.error; }
|
|
1805
|
+
}
|
|
1806
|
+
});
|
|
1807
|
+
}
|
|
1808
|
+
/**
|
|
1809
|
+
* Gets a list of Resource Sync Rules in the specified subscription. The operation returns properties
|
|
1810
|
+
* of each Resource Sync Rule
|
|
1811
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
1812
|
+
* @param resourceName Custom Locations name.
|
|
1813
|
+
* @param options The options parameters.
|
|
1814
|
+
*/
|
|
1815
|
+
_listByCustomLocationID(resourceGroupName, resourceName, options) {
|
|
1816
|
+
return this.client.sendOperationRequest({ resourceGroupName, resourceName, options }, listByCustomLocationIDOperationSpec);
|
|
1817
|
+
}
|
|
1818
|
+
/**
|
|
1819
|
+
* Gets the details of the resourceSyncRule with a specified resource group, subscription id Custom
|
|
1820
|
+
* Location resource name and Resource Sync Rule name.
|
|
1821
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
1822
|
+
* @param resourceName Custom Locations name.
|
|
1823
|
+
* @param childResourceName Resource Sync Rule name.
|
|
1824
|
+
* @param options The options parameters.
|
|
1825
|
+
*/
|
|
1826
|
+
get(resourceGroupName, resourceName, childResourceName, options) {
|
|
1827
|
+
return this.client.sendOperationRequest({ resourceGroupName, resourceName, childResourceName, options }, getOperationSpec);
|
|
1828
|
+
}
|
|
1829
|
+
/**
|
|
1830
|
+
* Creates or updates a Resource Sync Rule in the parent Custom Location, Subscription Id and Resource
|
|
1831
|
+
* Group
|
|
1832
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
1833
|
+
* @param resourceName Custom Locations name.
|
|
1834
|
+
* @param childResourceName Resource Sync Rule name.
|
|
1835
|
+
* @param parameters Parameters supplied to create or update a Resource Sync Rule.
|
|
1836
|
+
* @param options The options parameters.
|
|
1837
|
+
*/
|
|
1838
|
+
beginCreateOrUpdate(resourceGroupName, resourceName, childResourceName, parameters, options) {
|
|
1839
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
1840
|
+
const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
1841
|
+
return this.client.sendOperationRequest(args, spec);
|
|
1842
|
+
});
|
|
1843
|
+
const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
1844
|
+
var _a;
|
|
1845
|
+
let currentRawResponse = undefined;
|
|
1846
|
+
const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
|
|
1847
|
+
const callback = (rawResponse, flatResponse) => {
|
|
1848
|
+
currentRawResponse = rawResponse;
|
|
1849
|
+
providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
|
|
1850
|
+
};
|
|
1851
|
+
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
1852
|
+
const flatResponse = yield directSendOperation(updatedArgs, spec);
|
|
1853
|
+
return {
|
|
1854
|
+
flatResponse,
|
|
1855
|
+
rawResponse: {
|
|
1856
|
+
statusCode: currentRawResponse.status,
|
|
1857
|
+
body: currentRawResponse.parsedBody,
|
|
1858
|
+
headers: currentRawResponse.headers.toJSON()
|
|
1859
|
+
}
|
|
1860
|
+
};
|
|
1861
|
+
});
|
|
1862
|
+
const lro = new LroImpl(sendOperation, {
|
|
1863
|
+
resourceGroupName,
|
|
1864
|
+
resourceName,
|
|
1865
|
+
childResourceName,
|
|
1866
|
+
parameters,
|
|
1867
|
+
options
|
|
1868
|
+
}, createOrUpdateOperationSpec);
|
|
1869
|
+
const poller = new coreLro.LroEngine(lro, {
|
|
1870
|
+
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
1871
|
+
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
|
|
1872
|
+
lroResourceLocationConfig: "azure-async-operation"
|
|
1873
|
+
});
|
|
1874
|
+
yield poller.poll();
|
|
1875
|
+
return poller;
|
|
1876
|
+
});
|
|
1877
|
+
}
|
|
1878
|
+
/**
|
|
1879
|
+
* Creates or updates a Resource Sync Rule in the parent Custom Location, Subscription Id and Resource
|
|
1880
|
+
* Group
|
|
1881
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
1882
|
+
* @param resourceName Custom Locations name.
|
|
1883
|
+
* @param childResourceName Resource Sync Rule name.
|
|
1884
|
+
* @param parameters Parameters supplied to create or update a Resource Sync Rule.
|
|
1885
|
+
* @param options The options parameters.
|
|
1886
|
+
*/
|
|
1887
|
+
beginCreateOrUpdateAndWait(resourceGroupName, resourceName, childResourceName, parameters, options) {
|
|
1888
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
1889
|
+
const poller = yield this.beginCreateOrUpdate(resourceGroupName, resourceName, childResourceName, parameters, options);
|
|
1890
|
+
return poller.pollUntilDone();
|
|
1891
|
+
});
|
|
1892
|
+
}
|
|
1893
|
+
/**
|
|
1894
|
+
* Deletes the Resource Sync Rule with the specified Resource Sync Rule Name, Custom Location Resource
|
|
1895
|
+
* Name, Resource Group, and Subscription Id.
|
|
1896
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
1897
|
+
* @param resourceName Custom Locations name.
|
|
1898
|
+
* @param childResourceName Resource Sync Rule name.
|
|
1899
|
+
* @param options The options parameters.
|
|
1900
|
+
*/
|
|
1901
|
+
delete(resourceGroupName, resourceName, childResourceName, options) {
|
|
1902
|
+
return this.client.sendOperationRequest({ resourceGroupName, resourceName, childResourceName, options }, deleteOperationSpec);
|
|
1903
|
+
}
|
|
1904
|
+
/**
|
|
1905
|
+
* Updates a Resource Sync Rule with the specified Resource Sync Rule name in the specified Resource
|
|
1906
|
+
* Group, Subscription and Custom Location name.
|
|
1907
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
1908
|
+
* @param resourceName Custom Locations name.
|
|
1909
|
+
* @param childResourceName Resource Sync Rule name.
|
|
1910
|
+
* @param options The options parameters.
|
|
1911
|
+
*/
|
|
1912
|
+
beginUpdate(resourceGroupName, resourceName, childResourceName, options) {
|
|
1913
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
1914
|
+
const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
1915
|
+
return this.client.sendOperationRequest(args, spec);
|
|
1916
|
+
});
|
|
1917
|
+
const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
1918
|
+
var _a;
|
|
1919
|
+
let currentRawResponse = undefined;
|
|
1920
|
+
const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
|
|
1921
|
+
const callback = (rawResponse, flatResponse) => {
|
|
1922
|
+
currentRawResponse = rawResponse;
|
|
1923
|
+
providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
|
|
1924
|
+
};
|
|
1925
|
+
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
1926
|
+
const flatResponse = yield directSendOperation(updatedArgs, spec);
|
|
1927
|
+
return {
|
|
1928
|
+
flatResponse,
|
|
1929
|
+
rawResponse: {
|
|
1930
|
+
statusCode: currentRawResponse.status,
|
|
1931
|
+
body: currentRawResponse.parsedBody,
|
|
1932
|
+
headers: currentRawResponse.headers.toJSON()
|
|
1933
|
+
}
|
|
1934
|
+
};
|
|
1935
|
+
});
|
|
1936
|
+
const lro = new LroImpl(sendOperation, { resourceGroupName, resourceName, childResourceName, options }, updateOperationSpec);
|
|
1937
|
+
const poller = new coreLro.LroEngine(lro, {
|
|
1938
|
+
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
1939
|
+
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
|
|
1940
|
+
lroResourceLocationConfig: "azure-async-operation"
|
|
1941
|
+
});
|
|
1942
|
+
yield poller.poll();
|
|
1943
|
+
return poller;
|
|
1944
|
+
});
|
|
1945
|
+
}
|
|
1946
|
+
/**
|
|
1947
|
+
* Updates a Resource Sync Rule with the specified Resource Sync Rule name in the specified Resource
|
|
1948
|
+
* Group, Subscription and Custom Location name.
|
|
1949
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
1950
|
+
* @param resourceName Custom Locations name.
|
|
1951
|
+
* @param childResourceName Resource Sync Rule name.
|
|
1952
|
+
* @param options The options parameters.
|
|
1953
|
+
*/
|
|
1954
|
+
beginUpdateAndWait(resourceGroupName, resourceName, childResourceName, options) {
|
|
1955
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
1956
|
+
const poller = yield this.beginUpdate(resourceGroupName, resourceName, childResourceName, options);
|
|
1957
|
+
return poller.pollUntilDone();
|
|
1958
|
+
});
|
|
1959
|
+
}
|
|
1960
|
+
/**
|
|
1961
|
+
* ListByCustomLocationIDNext
|
|
1962
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
1963
|
+
* @param resourceName Custom Locations name.
|
|
1964
|
+
* @param nextLink The nextLink from the previous successful call to the ListByCustomLocationID method.
|
|
1965
|
+
* @param options The options parameters.
|
|
1966
|
+
*/
|
|
1967
|
+
_listByCustomLocationIDNext(resourceGroupName, resourceName, nextLink, options) {
|
|
1968
|
+
return this.client.sendOperationRequest({ resourceGroupName, resourceName, nextLink, options }, listByCustomLocationIDNextOperationSpec);
|
|
1969
|
+
}
|
|
1970
|
+
}
|
|
1971
|
+
// Operation Specifications
|
|
1972
|
+
const serializer = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
|
|
1973
|
+
const listByCustomLocationIDOperationSpec = {
|
|
1974
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ExtendedLocation/customLocations/{resourceName}/resourceSyncRules",
|
|
1975
|
+
httpMethod: "GET",
|
|
1976
|
+
responses: {
|
|
1977
|
+
200: {
|
|
1978
|
+
bodyMapper: ResourceSyncRuleListResult
|
|
1979
|
+
},
|
|
1980
|
+
default: {
|
|
1981
|
+
bodyMapper: ErrorResponse
|
|
1982
|
+
}
|
|
1983
|
+
},
|
|
1984
|
+
queryParameters: [apiVersion],
|
|
1985
|
+
urlParameters: [
|
|
1986
|
+
$host,
|
|
1987
|
+
subscriptionId,
|
|
1988
|
+
resourceGroupName,
|
|
1989
|
+
resourceName
|
|
1990
|
+
],
|
|
1991
|
+
headerParameters: [accept],
|
|
1992
|
+
serializer
|
|
1993
|
+
};
|
|
1994
|
+
const getOperationSpec = {
|
|
1995
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ExtendedLocation/customLocations/{resourceName}/resourceSyncRules/{childResourceName}",
|
|
1996
|
+
httpMethod: "GET",
|
|
1997
|
+
responses: {
|
|
1998
|
+
200: {
|
|
1999
|
+
bodyMapper: ResourceSyncRule
|
|
2000
|
+
},
|
|
2001
|
+
default: {
|
|
2002
|
+
bodyMapper: ErrorResponse
|
|
2003
|
+
}
|
|
2004
|
+
},
|
|
2005
|
+
queryParameters: [apiVersion],
|
|
2006
|
+
urlParameters: [
|
|
2007
|
+
$host,
|
|
2008
|
+
subscriptionId,
|
|
2009
|
+
resourceGroupName,
|
|
2010
|
+
resourceName,
|
|
2011
|
+
childResourceName
|
|
2012
|
+
],
|
|
2013
|
+
headerParameters: [accept],
|
|
2014
|
+
serializer
|
|
2015
|
+
};
|
|
2016
|
+
const createOrUpdateOperationSpec = {
|
|
2017
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ExtendedLocation/customLocations/{resourceName}/resourceSyncRules/{childResourceName}",
|
|
2018
|
+
httpMethod: "PUT",
|
|
2019
|
+
responses: {
|
|
2020
|
+
200: {
|
|
2021
|
+
bodyMapper: ResourceSyncRule
|
|
2022
|
+
},
|
|
2023
|
+
201: {
|
|
2024
|
+
bodyMapper: ResourceSyncRule
|
|
2025
|
+
},
|
|
2026
|
+
202: {
|
|
2027
|
+
bodyMapper: ResourceSyncRule
|
|
2028
|
+
},
|
|
2029
|
+
204: {
|
|
2030
|
+
bodyMapper: ResourceSyncRule
|
|
2031
|
+
},
|
|
2032
|
+
default: {
|
|
2033
|
+
bodyMapper: ErrorResponse
|
|
2034
|
+
}
|
|
2035
|
+
},
|
|
2036
|
+
requestBody: parameters3,
|
|
2037
|
+
queryParameters: [apiVersion],
|
|
2038
|
+
urlParameters: [
|
|
2039
|
+
$host,
|
|
2040
|
+
subscriptionId,
|
|
2041
|
+
resourceGroupName,
|
|
2042
|
+
resourceName,
|
|
2043
|
+
childResourceName
|
|
2044
|
+
],
|
|
2045
|
+
headerParameters: [accept, contentType],
|
|
2046
|
+
mediaType: "json",
|
|
2047
|
+
serializer
|
|
2048
|
+
};
|
|
2049
|
+
const deleteOperationSpec = {
|
|
2050
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ExtendedLocation/customLocations/{resourceName}/resourceSyncRules/{childResourceName}",
|
|
2051
|
+
httpMethod: "DELETE",
|
|
2052
|
+
responses: {
|
|
2053
|
+
200: {},
|
|
2054
|
+
204: {},
|
|
2055
|
+
default: {
|
|
2056
|
+
bodyMapper: ErrorResponse
|
|
2057
|
+
}
|
|
2058
|
+
},
|
|
2059
|
+
queryParameters: [apiVersion],
|
|
2060
|
+
urlParameters: [
|
|
2061
|
+
$host,
|
|
2062
|
+
subscriptionId,
|
|
2063
|
+
resourceGroupName,
|
|
2064
|
+
resourceName,
|
|
2065
|
+
childResourceName
|
|
2066
|
+
],
|
|
2067
|
+
headerParameters: [accept],
|
|
2068
|
+
serializer
|
|
2069
|
+
};
|
|
2070
|
+
const updateOperationSpec = {
|
|
2071
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ExtendedLocation/customLocations/{resourceName}/resourceSyncRules/{childResourceName}",
|
|
2072
|
+
httpMethod: "PATCH",
|
|
2073
|
+
responses: {
|
|
2074
|
+
200: {
|
|
2075
|
+
bodyMapper: ResourceSyncRule
|
|
2076
|
+
},
|
|
2077
|
+
201: {
|
|
2078
|
+
bodyMapper: ResourceSyncRule
|
|
2079
|
+
},
|
|
2080
|
+
202: {
|
|
2081
|
+
bodyMapper: ResourceSyncRule
|
|
2082
|
+
},
|
|
2083
|
+
204: {
|
|
2084
|
+
bodyMapper: ResourceSyncRule
|
|
2085
|
+
},
|
|
2086
|
+
default: {
|
|
2087
|
+
bodyMapper: ErrorResponse
|
|
2088
|
+
}
|
|
2089
|
+
},
|
|
2090
|
+
requestBody: {
|
|
2091
|
+
parameterPath: {
|
|
2092
|
+
tags: ["options", "tags"],
|
|
2093
|
+
priority: ["options", "priority"],
|
|
2094
|
+
selector: ["options", "selector"],
|
|
2095
|
+
targetResourceGroup: ["options", "targetResourceGroup"]
|
|
2096
|
+
},
|
|
2097
|
+
mapper: Object.assign(Object.assign({}, PatchableResourceSyncRule), { required: true })
|
|
2098
|
+
},
|
|
2099
|
+
queryParameters: [apiVersion],
|
|
2100
|
+
urlParameters: [
|
|
2101
|
+
$host,
|
|
2102
|
+
subscriptionId,
|
|
2103
|
+
resourceGroupName,
|
|
2104
|
+
resourceName,
|
|
2105
|
+
childResourceName
|
|
2106
|
+
],
|
|
2107
|
+
headerParameters: [accept, contentType],
|
|
2108
|
+
mediaType: "json",
|
|
2109
|
+
serializer
|
|
2110
|
+
};
|
|
2111
|
+
const listByCustomLocationIDNextOperationSpec = {
|
|
2112
|
+
path: "{nextLink}",
|
|
2113
|
+
httpMethod: "GET",
|
|
2114
|
+
responses: {
|
|
2115
|
+
200: {
|
|
2116
|
+
bodyMapper: ResourceSyncRuleListResult
|
|
2117
|
+
},
|
|
2118
|
+
default: {
|
|
2119
|
+
bodyMapper: ErrorResponse
|
|
2120
|
+
}
|
|
2121
|
+
},
|
|
2122
|
+
queryParameters: [apiVersion],
|
|
2123
|
+
urlParameters: [
|
|
2124
|
+
$host,
|
|
2125
|
+
subscriptionId,
|
|
2126
|
+
resourceGroupName,
|
|
2127
|
+
resourceName,
|
|
2128
|
+
nextLink
|
|
2129
|
+
],
|
|
2130
|
+
headerParameters: [accept],
|
|
1434
2131
|
serializer
|
|
1435
2132
|
};
|
|
1436
2133
|
|
|
@@ -1441,14 +2138,15 @@ const listEnabledResourceTypesNextOperationSpec = {
|
|
|
1441
2138
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
1442
2139
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
1443
2140
|
*/
|
|
1444
|
-
class
|
|
2141
|
+
class CustomLocationsManagementClient extends coreClient__namespace.ServiceClient {
|
|
1445
2142
|
/**
|
|
1446
|
-
* Initializes a new instance of the
|
|
2143
|
+
* Initializes a new instance of the CustomLocationsManagementClient class.
|
|
1447
2144
|
* @param credentials Subscription credentials which uniquely identify client subscription.
|
|
1448
2145
|
* @param subscriptionId The ID of the target subscription.
|
|
1449
2146
|
* @param options The parameter options
|
|
1450
2147
|
*/
|
|
1451
2148
|
constructor(credentials, subscriptionId, options) {
|
|
2149
|
+
var _a, _b;
|
|
1452
2150
|
if (credentials === undefined) {
|
|
1453
2151
|
throw new Error("'credentials' cannot be null");
|
|
1454
2152
|
}
|
|
@@ -1463,7 +2161,7 @@ class CustomLocationsManagementClientContext extends coreClient.ServiceClient {
|
|
|
1463
2161
|
requestContentType: "application/json; charset=utf-8",
|
|
1464
2162
|
credential: credentials
|
|
1465
2163
|
};
|
|
1466
|
-
const packageDetails = `azsdk-js-arm-extendedlocation/1.0.0-beta.
|
|
2164
|
+
const packageDetails = `azsdk-js-arm-extendedlocation/1.0.0-beta.2`;
|
|
1467
2165
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
1468
2166
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
1469
2167
|
: `${packageDetails}`;
|
|
@@ -1472,36 +2170,61 @@ class CustomLocationsManagementClientContext extends coreClient.ServiceClient {
|
|
|
1472
2170
|
}
|
|
1473
2171
|
const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
|
|
1474
2172
|
userAgentPrefix
|
|
1475
|
-
}, baseUri: options.endpoint
|
|
2173
|
+
}, baseUri: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
|
|
1476
2174
|
super(optionsWithDefaults);
|
|
2175
|
+
if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
|
|
2176
|
+
const pipelinePolicies = options.pipeline.getOrderedPolicies();
|
|
2177
|
+
const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
|
|
2178
|
+
coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName);
|
|
2179
|
+
if (!bearerTokenAuthenticationPolicyFound) {
|
|
2180
|
+
this.pipeline.removePolicy({
|
|
2181
|
+
name: coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName
|
|
2182
|
+
});
|
|
2183
|
+
this.pipeline.addPolicy(coreRestPipeline__namespace.bearerTokenAuthenticationPolicy({
|
|
2184
|
+
scopes: `${optionsWithDefaults.baseUri}/.default`,
|
|
2185
|
+
challengeCallbacks: {
|
|
2186
|
+
authorizeRequestOnChallenge: coreClient__namespace.authorizeRequestOnClaimChallenge
|
|
2187
|
+
}
|
|
2188
|
+
}));
|
|
2189
|
+
}
|
|
2190
|
+
}
|
|
1477
2191
|
// Parameter assignments
|
|
1478
2192
|
this.subscriptionId = subscriptionId;
|
|
1479
2193
|
// Assigning values to Constant parameters
|
|
1480
2194
|
this.$host = options.$host || "https://management.azure.com";
|
|
1481
|
-
this.apiVersion = options.apiVersion || "2021-08-
|
|
1482
|
-
}
|
|
1483
|
-
}
|
|
1484
|
-
|
|
1485
|
-
/*
|
|
1486
|
-
* Copyright (c) Microsoft Corporation.
|
|
1487
|
-
* Licensed under the MIT License.
|
|
1488
|
-
*
|
|
1489
|
-
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
1490
|
-
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
1491
|
-
*/
|
|
1492
|
-
class CustomLocationsManagementClient extends CustomLocationsManagementClientContext {
|
|
1493
|
-
/**
|
|
1494
|
-
* Initializes a new instance of the CustomLocationsManagementClient class.
|
|
1495
|
-
* @param credentials Subscription credentials which uniquely identify client subscription.
|
|
1496
|
-
* @param subscriptionId The ID of the target subscription.
|
|
1497
|
-
* @param options The parameter options
|
|
1498
|
-
*/
|
|
1499
|
-
constructor(credentials, subscriptionId, options) {
|
|
1500
|
-
super(credentials, subscriptionId, options);
|
|
2195
|
+
this.apiVersion = options.apiVersion || "2021-08-31-preview";
|
|
1501
2196
|
this.customLocations = new CustomLocationsImpl(this);
|
|
2197
|
+
this.resourceSyncRules = new ResourceSyncRulesImpl(this);
|
|
2198
|
+
this.addCustomApiVersionPolicy(options.apiVersion);
|
|
2199
|
+
}
|
|
2200
|
+
/** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
|
|
2201
|
+
addCustomApiVersionPolicy(apiVersion) {
|
|
2202
|
+
if (!apiVersion) {
|
|
2203
|
+
return;
|
|
2204
|
+
}
|
|
2205
|
+
const apiVersionPolicy = {
|
|
2206
|
+
name: "CustomApiVersionPolicy",
|
|
2207
|
+
sendRequest(request, next) {
|
|
2208
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
2209
|
+
const param = request.url.split("?");
|
|
2210
|
+
if (param.length > 1) {
|
|
2211
|
+
const newParams = param[1].split("&").map((item) => {
|
|
2212
|
+
if (item.indexOf("api-version") > -1) {
|
|
2213
|
+
return "api-version=" + apiVersion;
|
|
2214
|
+
}
|
|
2215
|
+
else {
|
|
2216
|
+
return item;
|
|
2217
|
+
}
|
|
2218
|
+
});
|
|
2219
|
+
request.url = param[0] + "?" + newParams.join("&");
|
|
2220
|
+
}
|
|
2221
|
+
return next(request);
|
|
2222
|
+
});
|
|
2223
|
+
}
|
|
2224
|
+
};
|
|
2225
|
+
this.pipeline.addPolicy(apiVersionPolicy);
|
|
1502
2226
|
}
|
|
1503
2227
|
}
|
|
1504
2228
|
|
|
1505
2229
|
exports.CustomLocationsManagementClient = CustomLocationsManagementClient;
|
|
1506
|
-
exports.CustomLocationsManagementClientContext = CustomLocationsManagementClientContext;
|
|
1507
2230
|
//# sourceMappingURL=index.js.map
|