@azure/arm-links 2.0.0-beta.1 → 2.0.0

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 (95) hide show
  1. package/CHANGELOG.md +6 -11
  2. package/README.md +15 -9
  3. package/dist/index.js +6 -247
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.min.js +1 -1
  6. package/dist/index.min.js.map +1 -1
  7. package/dist-esm/src/index.d.ts +5 -0
  8. package/dist-esm/src/index.d.ts.map +1 -0
  9. package/{esm → dist-esm/src}/index.js +0 -1
  10. package/dist-esm/src/index.js.map +1 -0
  11. package/{esm → dist-esm/src}/managementLinkClient.d.ts +5 -2
  12. package/dist-esm/src/managementLinkClient.d.ts.map +1 -0
  13. package/{esm/managementLinkClientContext.js → dist-esm/src/managementLinkClient.js} +7 -4
  14. package/dist-esm/src/managementLinkClient.js.map +1 -0
  15. package/{esm → dist-esm/src}/models/index.d.ts +0 -17
  16. package/dist-esm/src/models/index.d.ts.map +1 -0
  17. package/{esm → dist-esm/src}/models/index.js +0 -0
  18. package/dist-esm/src/models/index.js.map +1 -0
  19. package/{esm → dist-esm/src}/models/mappers.d.ts +0 -0
  20. package/dist-esm/src/models/mappers.d.ts.map +1 -0
  21. package/{esm → dist-esm/src}/models/mappers.js +0 -0
  22. package/dist-esm/src/models/mappers.js.map +1 -0
  23. package/{esm → dist-esm/src}/models/parameters.d.ts +0 -0
  24. package/dist-esm/src/models/parameters.d.ts.map +1 -0
  25. package/{esm → dist-esm/src}/models/parameters.js +0 -0
  26. package/dist-esm/src/models/parameters.js.map +1 -0
  27. package/{esm → dist-esm/src}/operations/index.d.ts +0 -0
  28. package/dist-esm/src/operations/index.d.ts.map +1 -0
  29. package/{esm → dist-esm/src}/operations/index.js +0 -0
  30. package/dist-esm/src/operations/index.js.map +1 -0
  31. package/{esm → dist-esm/src}/operations/operations.d.ts +4 -19
  32. package/dist-esm/src/operations/operations.d.ts.map +1 -0
  33. package/{esm → dist-esm/src}/operations/operations.js +1 -72
  34. package/dist-esm/src/operations/operations.js.map +1 -0
  35. package/{esm/operationsInterfaces → dist-esm/src/operations}/resourceLinks.d.ts +43 -19
  36. package/dist-esm/src/operations/resourceLinks.d.ts.map +1 -0
  37. package/{esm → dist-esm/src}/operations/resourceLinks.js +1 -152
  38. package/dist-esm/src/operations/resourceLinks.js.map +1 -0
  39. package/{esm → dist-esm/src}/operationsInterfaces/index.d.ts +0 -0
  40. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
  41. package/{esm → dist-esm/src}/operationsInterfaces/index.js +0 -0
  42. package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
  43. package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
  44. package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
  45. package/{esm → dist-esm/src}/operationsInterfaces/operations.js +1 -1
  46. package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
  47. package/dist-esm/src/operationsInterfaces/resourceLinks.d.ts +45 -0
  48. package/dist-esm/src/operationsInterfaces/resourceLinks.d.ts.map +1 -0
  49. package/{esm → dist-esm/src}/operationsInterfaces/resourceLinks.js +1 -1
  50. package/dist-esm/src/operationsInterfaces/resourceLinks.js.map +1 -0
  51. package/dist-esm/test/links_examples.d.ts +4 -0
  52. package/dist-esm/test/links_examples.d.ts.map +1 -0
  53. package/dist-esm/test/links_examples.js +129 -0
  54. package/dist-esm/test/links_examples.js.map +1 -0
  55. package/package.json +28 -33
  56. package/review/arm-links.api.md +5 -36
  57. package/src/index.ts +0 -1
  58. package/src/managementLinkClient.ts +46 -3
  59. package/src/models/index.ts +0 -24
  60. package/src/operations/operations.ts +5 -82
  61. package/src/operations/resourceLinks.ts +5 -186
  62. package/src/operationsInterfaces/operations.ts +1 -15
  63. package/src/operationsInterfaces/resourceLinks.ts +0 -25
  64. package/tsconfig.json +2 -3
  65. package/{esm/index.d.ts → types/arm-links.d.ts} +4 -58
  66. package/types/tsdoc-metadata.json +11 -0
  67. package/esm/index.d.ts.map +0 -1
  68. package/esm/index.js.map +0 -1
  69. package/esm/managementLinkClient.d.ts.map +0 -1
  70. package/esm/managementLinkClient.js +0 -23
  71. package/esm/managementLinkClient.js.map +0 -1
  72. package/esm/managementLinkClientContext.d.ts +0 -16
  73. package/esm/managementLinkClientContext.d.ts.map +0 -1
  74. package/esm/managementLinkClientContext.js.map +0 -1
  75. package/esm/models/index.d.ts.map +0 -1
  76. package/esm/models/index.js.map +0 -1
  77. package/esm/models/mappers.d.ts.map +0 -1
  78. package/esm/models/mappers.js.map +0 -1
  79. package/esm/models/parameters.d.ts.map +0 -1
  80. package/esm/models/parameters.js.map +0 -1
  81. package/esm/operations/index.d.ts.map +0 -1
  82. package/esm/operations/index.js.map +0 -1
  83. package/esm/operations/operations.d.ts.map +0 -1
  84. package/esm/operations/operations.js.map +0 -1
  85. package/esm/operations/resourceLinks.d.ts +0 -120
  86. package/esm/operations/resourceLinks.d.ts.map +0 -1
  87. package/esm/operations/resourceLinks.js.map +0 -1
  88. package/esm/operationsInterfaces/index.d.ts.map +0 -1
  89. package/esm/operationsInterfaces/index.js.map +0 -1
  90. package/esm/operationsInterfaces/operations.d.ts +0 -18
  91. package/esm/operationsInterfaces/operations.d.ts.map +0 -1
  92. package/esm/operationsInterfaces/operations.js.map +0 -1
  93. package/esm/operationsInterfaces/resourceLinks.d.ts.map +0 -1
  94. package/esm/operationsInterfaces/resourceLinks.js.map +0 -1
  95. package/src/managementLinkClientContext.ts +0 -70
@@ -6,12 +6,11 @@
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
8
  import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
9
- import "@azure/core-paging";
10
9
  import * as coreClient from "@azure/core-client";
11
10
  import * as Mappers from "../models/mappers";
12
11
  import * as Parameters from "../models/parameters";
13
12
  /// <reference lib="esnext.asynciterable" />
14
- /** Class representing a Operations. */
13
+ /** Class containing Operations operations. */
15
14
  export class OperationsImpl {
16
15
  /**
17
16
  * Initialize a new instance of the class Operations class.
@@ -68,55 +67,6 @@ export class OperationsImpl {
68
67
  }
69
68
  });
70
69
  }
71
- /**
72
- * ListNext
73
- * @param nextLink The nextLink from the previous successful call to the List method.
74
- * @param options The options parameters.
75
- */
76
- listNext(nextLink, options) {
77
- const iter = this.listNextPagingAll(nextLink, options);
78
- return {
79
- next() {
80
- return iter.next();
81
- },
82
- [Symbol.asyncIterator]() {
83
- return this;
84
- },
85
- byPage: () => {
86
- return this.listNextPagingPage(nextLink, options);
87
- }
88
- };
89
- }
90
- listNextPagingPage(nextLink, options) {
91
- return __asyncGenerator(this, arguments, function* listNextPagingPage_1() {
92
- let result = yield __await(this._listNext(nextLink, options));
93
- yield yield __await(result.value || []);
94
- let continuationToken = result.nextLink;
95
- while (continuationToken) {
96
- result = yield __await(this._listNextNext(continuationToken, options));
97
- continuationToken = result.nextLink;
98
- yield yield __await(result.value || []);
99
- }
100
- });
101
- }
102
- listNextPagingAll(nextLink, options) {
103
- return __asyncGenerator(this, arguments, function* listNextPagingAll_1() {
104
- var e_2, _a;
105
- try {
106
- for (var _b = __asyncValues(this.listNextPagingPage(nextLink, options)), _c; _c = yield __await(_b.next()), !_c.done;) {
107
- const page = _c.value;
108
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
109
- }
110
- }
111
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
112
- finally {
113
- try {
114
- if (_c && !_c.done && (_a = _b.return)) yield __await(_a.call(_b));
115
- }
116
- finally { if (e_2) throw e_2.error; }
117
- }
118
- });
119
- }
120
70
  /**
121
71
  * Lists all of the available Microsoft.Resources REST API operations.
122
72
  * @param options The options parameters.
@@ -132,14 +82,6 @@ export class OperationsImpl {
132
82
  _listNext(nextLink, options) {
133
83
  return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec);
134
84
  }
135
- /**
136
- * ListNextNext
137
- * @param nextLink The nextLink from the previous successful call to the ListNext method.
138
- * @param options The options parameters.
139
- */
140
- _listNextNext(nextLink, options) {
141
- return this.client.sendOperationRequest({ nextLink, options }, listNextNextOperationSpec);
142
- }
143
85
  }
144
86
  // Operation Specifications
145
87
  const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
@@ -169,17 +111,4 @@ const listNextOperationSpec = {
169
111
  headerParameters: [Parameters.accept],
170
112
  serializer
171
113
  };
172
- const listNextNextOperationSpec = {
173
- path: "{nextLink}",
174
- httpMethod: "GET",
175
- responses: {
176
- 200: {
177
- bodyMapper: Mappers.OperationListResult
178
- }
179
- },
180
- queryParameters: [Parameters.apiVersion],
181
- urlParameters: [Parameters.$host, Parameters.nextLink],
182
- headerParameters: [Parameters.accept],
183
- serializer
184
- };
185
114
  //# sourceMappingURL=operations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../src/operations/operations.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAIH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,mBAAmB,CAAC;AAC7C,OAAO,KAAK,UAAU,MAAM,sBAAsB,CAAC;AAUnD,4CAA4C;AAC5C,8CAA8C;AAC9C,MAAM,OAAO,cAAc;IAGzB;;;OAGG;IACH,YAAY,MAA4B;QACtC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;OAGG;IACI,IAAI,CACT,OAAsC;QAEtC,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QACzC,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,GAAG,EAAE;gBACX,OAAO,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;YACtC,CAAC;SACF,CAAC;IACJ,CAAC;IAEc,cAAc,CA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EAAE;YACH,UAAU,EAAE,OAAO,CAAC,mBAAmB;SACxC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC;IACjC,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,qBAAqB,GAA6B;IACtD,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,mBAAmB;SACxC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,QAAQ,CAAC;IACtD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC"}
@@ -1,13 +1,22 @@
1
- import "@azure/core-paging";
2
1
  import { PagedAsyncIterableIterator } from "@azure/core-paging";
3
- import { ResourceLink, ResourceLinksListAtSubscriptionNextOptionalParams, ResourceLinksListAtSubscriptionOptionalParams, ResourceLinksListAtSourceScopeNextOptionalParams, ResourceLinksListAtSourceScopeOptionalParams, ResourceLinksDeleteOptionalParams, ResourceLinksCreateOrUpdateOptionalParams, ResourceLinksCreateOrUpdateResponse, ResourceLinksGetOptionalParams, ResourceLinksGetResponse } from "../models";
4
- /** Interface representing a ResourceLinks. */
5
- export interface ResourceLinks {
2
+ import { ResourceLinks } from "../operationsInterfaces";
3
+ import { ManagementLinkClient } from "../managementLinkClient";
4
+ import { ResourceLink, ResourceLinksListAtSubscriptionOptionalParams, ResourceLinksListAtSourceScopeOptionalParams, ResourceLinksDeleteOptionalParams, ResourceLinksCreateOrUpdateOptionalParams, ResourceLinksCreateOrUpdateResponse, ResourceLinksGetOptionalParams, ResourceLinksGetResponse } from "../models";
5
+ /** Class containing ResourceLinks operations. */
6
+ export declare class ResourceLinksImpl implements ResourceLinks {
7
+ private readonly client;
8
+ /**
9
+ * Initialize a new instance of the class ResourceLinks class.
10
+ * @param client Reference to the service client
11
+ */
12
+ constructor(client: ManagementLinkClient);
6
13
  /**
7
14
  * Gets all the linked resources for the subscription.
8
15
  * @param options The options parameters.
9
16
  */
10
17
  listAtSubscription(options?: ResourceLinksListAtSubscriptionOptionalParams): PagedAsyncIterableIterator<ResourceLink>;
18
+ private listAtSubscriptionPagingPage;
19
+ private listAtSubscriptionPagingAll;
11
20
  /**
12
21
  * Gets a list of resource links at and below the specified source scope.
13
22
  * @param scope The fully qualified ID of the scope for getting the resource links. For example, to
@@ -16,21 +25,8 @@ export interface ResourceLinks {
16
25
  * @param options The options parameters.
17
26
  */
18
27
  listAtSourceScope(scope: string, options?: ResourceLinksListAtSourceScopeOptionalParams): PagedAsyncIterableIterator<ResourceLink>;
19
- /**
20
- * ListAtSubscriptionNext
21
- * @param nextLink The nextLink from the previous successful call to the ListAtSubscription method.
22
- * @param options The options parameters.
23
- */
24
- listAtSubscriptionNext(nextLink: string, options?: ResourceLinksListAtSubscriptionNextOptionalParams): PagedAsyncIterableIterator<ResourceLink>;
25
- /**
26
- * ListAtSourceScopeNext
27
- * @param scope The fully qualified ID of the scope for getting the resource links. For example, to
28
- * list resource links at and under a resource group, set the scope to
29
- * /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup.
30
- * @param nextLink The nextLink from the previous successful call to the ListAtSourceScope method.
31
- * @param options The options parameters.
32
- */
33
- listAtSourceScopeNext(scope: string, nextLink: string, options?: ResourceLinksListAtSourceScopeNextOptionalParams): PagedAsyncIterableIterator<ResourceLink>;
28
+ private listAtSourceScopePagingPage;
29
+ private listAtSourceScopePagingAll;
34
30
  /**
35
31
  * Deletes a resource link with the specified ID.
36
32
  * @param linkId The fully qualified ID of the resource link. Use the format,
@@ -57,5 +53,33 @@ export interface ResourceLinks {
57
53
  * @param options The options parameters.
58
54
  */
59
55
  get(linkId: string, options?: ResourceLinksGetOptionalParams): Promise<ResourceLinksGetResponse>;
56
+ /**
57
+ * Gets all the linked resources for the subscription.
58
+ * @param options The options parameters.
59
+ */
60
+ private _listAtSubscription;
61
+ /**
62
+ * Gets a list of resource links at and below the specified source scope.
63
+ * @param scope The fully qualified ID of the scope for getting the resource links. For example, to
64
+ * list resource links at and under a resource group, set the scope to
65
+ * /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup.
66
+ * @param options The options parameters.
67
+ */
68
+ private _listAtSourceScope;
69
+ /**
70
+ * ListAtSubscriptionNext
71
+ * @param nextLink The nextLink from the previous successful call to the ListAtSubscription method.
72
+ * @param options The options parameters.
73
+ */
74
+ private _listAtSubscriptionNext;
75
+ /**
76
+ * ListAtSourceScopeNext
77
+ * @param scope The fully qualified ID of the scope for getting the resource links. For example, to
78
+ * list resource links at and under a resource group, set the scope to
79
+ * /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup.
80
+ * @param nextLink The nextLink from the previous successful call to the ListAtSourceScope method.
81
+ * @param options The options parameters.
82
+ */
83
+ private _listAtSourceScopeNext;
60
84
  }
61
85
  //# sourceMappingURL=resourceLinks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resourceLinks.d.ts","sourceRoot":"","sources":["../../../src/operations/resourceLinks.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAIxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EACL,YAAY,EAEZ,6CAA6C,EAE7C,4CAA4C,EAC5C,iCAAiC,EACjC,yCAAyC,EACzC,mCAAmC,EACnC,8BAA8B,EAC9B,wBAAwB,EAKzB,MAAM,WAAW,CAAC;AAGnB,iDAAiD;AACjD,qBAAa,iBAAkB,YAAW,aAAa;IACrD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAuB;IAE9C;;;OAGG;gBACS,MAAM,EAAE,oBAAoB;IAIxC;;;OAGG;IACI,kBAAkB,CACvB,OAAO,CAAC,EAAE,6CAA6C,GACtD,0BAA0B,CAAC,YAAY,CAAC;YAe5B,4BAA4B;YAa5B,2BAA2B;IAQ1C;;;;;;OAMG;IACI,iBAAiB,CACtB,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,4CAA4C,GACrD,0BAA0B,CAAC,YAAY,CAAC;YAe5B,2BAA2B;YAkB3B,0BAA0B;IASzC;;;;;;;OAOG;IACH,MAAM,CACJ,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,iCAAiC,GAC1C,OAAO,CAAC,IAAI,CAAC;IAOhB;;;;;;;;OAQG;IACH,cAAc,CACZ,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,YAAY,EACxB,OAAO,CAAC,EAAE,yCAAyC,GAClD,OAAO,CAAC,mCAAmC,CAAC;IAO/C;;;;;OAKG;IACH,GAAG,CACD,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,8BAA8B,GACvC,OAAO,CAAC,wBAAwB,CAAC;IAOpC;;;OAGG;IACH,OAAO,CAAC,mBAAmB;IAS3B;;;;;;OAMG;IACH,OAAO,CAAC,kBAAkB;IAU1B;;;;OAIG;IACH,OAAO,CAAC,uBAAuB;IAU/B;;;;;;;OAOG;IACH,OAAO,CAAC,sBAAsB;CAU/B"}
@@ -6,12 +6,11 @@
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
8
  import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
9
- import "@azure/core-paging";
10
9
  import * as coreClient from "@azure/core-client";
11
10
  import * as Mappers from "../models/mappers";
12
11
  import * as Parameters from "../models/parameters";
13
12
  /// <reference lib="esnext.asynciterable" />
14
- /** Class representing a ResourceLinks. */
13
+ /** Class containing ResourceLinks operations. */
15
14
  export class ResourceLinksImpl {
16
15
  /**
17
16
  * Initialize a new instance of the class ResourceLinks class.
@@ -119,107 +118,6 @@ export class ResourceLinksImpl {
119
118
  }
120
119
  });
121
120
  }
122
- /**
123
- * ListAtSubscriptionNext
124
- * @param nextLink The nextLink from the previous successful call to the ListAtSubscription method.
125
- * @param options The options parameters.
126
- */
127
- listAtSubscriptionNext(nextLink, options) {
128
- const iter = this.listAtSubscriptionNextPagingAll(nextLink, options);
129
- return {
130
- next() {
131
- return iter.next();
132
- },
133
- [Symbol.asyncIterator]() {
134
- return this;
135
- },
136
- byPage: () => {
137
- return this.listAtSubscriptionNextPagingPage(nextLink, options);
138
- }
139
- };
140
- }
141
- listAtSubscriptionNextPagingPage(nextLink, options) {
142
- return __asyncGenerator(this, arguments, function* listAtSubscriptionNextPagingPage_1() {
143
- let result = yield __await(this._listAtSubscriptionNext(nextLink, options));
144
- yield yield __await(result.value || []);
145
- let continuationToken = result.nextLink;
146
- while (continuationToken) {
147
- result = yield __await(this._listAtSubscriptionNextNext(continuationToken, options));
148
- continuationToken = result.nextLink;
149
- yield yield __await(result.value || []);
150
- }
151
- });
152
- }
153
- listAtSubscriptionNextPagingAll(nextLink, options) {
154
- return __asyncGenerator(this, arguments, function* listAtSubscriptionNextPagingAll_1() {
155
- var e_3, _a;
156
- try {
157
- for (var _b = __asyncValues(this.listAtSubscriptionNextPagingPage(nextLink, options)), _c; _c = yield __await(_b.next()), !_c.done;) {
158
- const page = _c.value;
159
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
160
- }
161
- }
162
- catch (e_3_1) { e_3 = { error: e_3_1 }; }
163
- finally {
164
- try {
165
- if (_c && !_c.done && (_a = _b.return)) yield __await(_a.call(_b));
166
- }
167
- finally { if (e_3) throw e_3.error; }
168
- }
169
- });
170
- }
171
- /**
172
- * ListAtSourceScopeNext
173
- * @param scope The fully qualified ID of the scope for getting the resource links. For example, to
174
- * list resource links at and under a resource group, set the scope to
175
- * /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup.
176
- * @param nextLink The nextLink from the previous successful call to the ListAtSourceScope method.
177
- * @param options The options parameters.
178
- */
179
- listAtSourceScopeNext(scope, nextLink, options) {
180
- const iter = this.listAtSourceScopeNextPagingAll(scope, nextLink, options);
181
- return {
182
- next() {
183
- return iter.next();
184
- },
185
- [Symbol.asyncIterator]() {
186
- return this;
187
- },
188
- byPage: () => {
189
- return this.listAtSourceScopeNextPagingPage(scope, nextLink, options);
190
- }
191
- };
192
- }
193
- listAtSourceScopeNextPagingPage(scope, nextLink, options) {
194
- return __asyncGenerator(this, arguments, function* listAtSourceScopeNextPagingPage_1() {
195
- let result = yield __await(this._listAtSourceScopeNext(scope, nextLink, options));
196
- yield yield __await(result.value || []);
197
- let continuationToken = result.nextLink;
198
- while (continuationToken) {
199
- result = yield __await(this._listAtSourceScopeNextNext(scope, continuationToken, options));
200
- continuationToken = result.nextLink;
201
- yield yield __await(result.value || []);
202
- }
203
- });
204
- }
205
- listAtSourceScopeNextPagingAll(scope, nextLink, options) {
206
- return __asyncGenerator(this, arguments, function* listAtSourceScopeNextPagingAll_1() {
207
- var e_4, _a;
208
- try {
209
- for (var _b = __asyncValues(this.listAtSourceScopeNextPagingPage(scope, nextLink, options)), _c; _c = yield __await(_b.next()), !_c.done;) {
210
- const page = _c.value;
211
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
212
- }
213
- }
214
- catch (e_4_1) { e_4 = { error: e_4_1 }; }
215
- finally {
216
- try {
217
- if (_c && !_c.done && (_a = _b.return)) yield __await(_a.call(_b));
218
- }
219
- finally { if (e_4) throw e_4.error; }
220
- }
221
- });
222
- }
223
121
  /**
224
122
  * Deletes a resource link with the specified ID.
225
123
  * @param linkId The fully qualified ID of the resource link. Use the format,
@@ -288,25 +186,6 @@ export class ResourceLinksImpl {
288
186
  _listAtSourceScopeNext(scope, nextLink, options) {
289
187
  return this.client.sendOperationRequest({ scope, nextLink, options }, listAtSourceScopeNextOperationSpec);
290
188
  }
291
- /**
292
- * ListAtSubscriptionNextNext
293
- * @param nextLink The nextLink from the previous successful call to the ListAtSubscriptionNext method.
294
- * @param options The options parameters.
295
- */
296
- _listAtSubscriptionNextNext(nextLink, options) {
297
- return this.client.sendOperationRequest({ nextLink, options }, listAtSubscriptionNextNextOperationSpec);
298
- }
299
- /**
300
- * ListAtSourceScopeNextNext
301
- * @param scope The fully qualified ID of the scope for getting the resource links. For example, to
302
- * list resource links at and under a resource group, set the scope to
303
- * /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup.
304
- * @param nextLink The nextLink from the previous successful call to the ListAtSourceScopeNext method.
305
- * @param options The options parameters.
306
- */
307
- _listAtSourceScopeNextNext(scope, nextLink, options) {
308
- return this.client.sendOperationRequest({ scope, nextLink, options }, listAtSourceScopeNextNextOperationSpec);
309
- }
310
189
  }
311
190
  // Operation Specifications
312
191
  const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
@@ -405,34 +284,4 @@ const listAtSourceScopeNextOperationSpec = {
405
284
  headerParameters: [Parameters.accept],
406
285
  serializer
407
286
  };
408
- const listAtSubscriptionNextNextOperationSpec = {
409
- path: "{nextLink}",
410
- httpMethod: "GET",
411
- responses: {
412
- 200: {
413
- bodyMapper: Mappers.ResourceLinkResult
414
- }
415
- },
416
- queryParameters: [Parameters.apiVersion, Parameters.filter],
417
- urlParameters: [
418
- Parameters.$host,
419
- Parameters.nextLink,
420
- Parameters.subscriptionId
421
- ],
422
- headerParameters: [Parameters.accept],
423
- serializer
424
- };
425
- const listAtSourceScopeNextNextOperationSpec = {
426
- path: "{nextLink}",
427
- httpMethod: "GET",
428
- responses: {
429
- 200: {
430
- bodyMapper: Mappers.ResourceLinkResult
431
- }
432
- },
433
- queryParameters: [Parameters.apiVersion, Parameters.filter1],
434
- urlParameters: [Parameters.$host, Parameters.nextLink, Parameters.scope],
435
- headerParameters: [Parameters.accept],
436
- serializer
437
- };
438
287
  //# sourceMappingURL=resourceLinks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resourceLinks.js","sourceRoot":"","sources":["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AAC,QAAQ;QACnB,UAAU,CAAC,cAAc;KAC1B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,kCAAkC,GAA6B;IACnE,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,kBAAkB;SACvC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,EAAE,UAAU,CAAC,OAAO,CAAC;IAC5D,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,KAAK,CAAC;IACxE,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/operationsInterfaces/index.ts"],"names":[],"mappings":"AAQA,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/operationsInterfaces/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
2
+ import { Operation, OperationsListOptionalParams } from "../models";
3
+ /** Interface representing a Operations. */
4
+ export interface Operations {
5
+ /**
6
+ * Lists all of the available Microsoft.Resources REST API operations.
7
+ * @param options The options parameters.
8
+ */
9
+ list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator<Operation>;
10
+ }
11
+ //# sourceMappingURL=operations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../../src/operationsInterfaces/operations.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,4BAA4B,EAAE,MAAM,WAAW,CAAC;AAGpE,2CAA2C;AAC3C,MAAM,WAAW,UAAU;IACzB;;;OAGG;IACH,IAAI,CACF,OAAO,CAAC,EAAE,4BAA4B,GACrC,0BAA0B,CAAC,SAAS,CAAC,CAAC;CAC1C"}
@@ -5,5 +5,5 @@
5
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
- import "@azure/core-paging";
8
+ export {};
9
9
  //# sourceMappingURL=operations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../src/operationsInterfaces/operations.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
@@ -0,0 +1,45 @@
1
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
2
+ import { ResourceLink, ResourceLinksListAtSubscriptionOptionalParams, ResourceLinksListAtSourceScopeOptionalParams, ResourceLinksDeleteOptionalParams, ResourceLinksCreateOrUpdateOptionalParams, ResourceLinksCreateOrUpdateResponse, ResourceLinksGetOptionalParams, ResourceLinksGetResponse } from "../models";
3
+ /** Interface representing a ResourceLinks. */
4
+ export interface ResourceLinks {
5
+ /**
6
+ * Gets all the linked resources for the subscription.
7
+ * @param options The options parameters.
8
+ */
9
+ listAtSubscription(options?: ResourceLinksListAtSubscriptionOptionalParams): PagedAsyncIterableIterator<ResourceLink>;
10
+ /**
11
+ * Gets a list of resource links at and below the specified source scope.
12
+ * @param scope The fully qualified ID of the scope for getting the resource links. For example, to
13
+ * list resource links at and under a resource group, set the scope to
14
+ * /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup.
15
+ * @param options The options parameters.
16
+ */
17
+ listAtSourceScope(scope: string, options?: ResourceLinksListAtSourceScopeOptionalParams): PagedAsyncIterableIterator<ResourceLink>;
18
+ /**
19
+ * Deletes a resource link with the specified ID.
20
+ * @param linkId The fully qualified ID of the resource link. Use the format,
21
+ * /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}.
22
+ * For example,
23
+ * /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
24
+ * @param options The options parameters.
25
+ */
26
+ delete(linkId: string, options?: ResourceLinksDeleteOptionalParams): Promise<void>;
27
+ /**
28
+ * Creates or updates a resource link between the specified resources.
29
+ * @param linkId The fully qualified ID of the resource link. Use the format,
30
+ * /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}.
31
+ * For example,
32
+ * /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
33
+ * @param parameters Parameters for creating or updating a resource link.
34
+ * @param options The options parameters.
35
+ */
36
+ createOrUpdate(linkId: string, parameters: ResourceLink, options?: ResourceLinksCreateOrUpdateOptionalParams): Promise<ResourceLinksCreateOrUpdateResponse>;
37
+ /**
38
+ * Gets a resource link with the specified ID.
39
+ * @param linkId The fully qualified Id of the resource link. For example,
40
+ * /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
41
+ * @param options The options parameters.
42
+ */
43
+ get(linkId: string, options?: ResourceLinksGetOptionalParams): Promise<ResourceLinksGetResponse>;
44
+ }
45
+ //# sourceMappingURL=resourceLinks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resourceLinks.d.ts","sourceRoot":"","sources":["../../../src/operationsInterfaces/resourceLinks.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EACL,YAAY,EACZ,6CAA6C,EAC7C,4CAA4C,EAC5C,iCAAiC,EACjC,yCAAyC,EACzC,mCAAmC,EACnC,8BAA8B,EAC9B,wBAAwB,EACzB,MAAM,WAAW,CAAC;AAGnB,8CAA8C;AAC9C,MAAM,WAAW,aAAa;IAC5B;;;OAGG;IACH,kBAAkB,CAChB,OAAO,CAAC,EAAE,6CAA6C,GACtD,0BAA0B,CAAC,YAAY,CAAC,CAAC;IAC5C;;;;;;OAMG;IACH,iBAAiB,CACf,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,4CAA4C,GACrD,0BAA0B,CAAC,YAAY,CAAC,CAAC;IAC5C;;;;;;;OAOG;IACH,MAAM,CACJ,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,iCAAiC,GAC1C,OAAO,CAAC,IAAI,CAAC,CAAC;IACjB;;;;;;;;OAQG;IACH,cAAc,CACZ,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,YAAY,EACxB,OAAO,CAAC,EAAE,yCAAyC,GAClD,OAAO,CAAC,mCAAmC,CAAC,CAAC;IAChD;;;;;OAKG;IACH,GAAG,CACD,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,8BAA8B,GACvC,OAAO,CAAC,wBAAwB,CAAC,CAAC;CACtC"}
@@ -5,5 +5,5 @@
5
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
- import "@azure/core-paging";
8
+ export {};
9
9
  //# sourceMappingURL=resourceLinks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resourceLinks.js","sourceRoot":"","sources":["../../../src/operationsInterfaces/resourceLinks.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
@@ -0,0 +1,4 @@
1
+ export declare const testPollingOptions: {
2
+ updateIntervalInMs: number | undefined;
3
+ };
4
+ //# sourceMappingURL=links_examples.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"links_examples.d.ts","sourceRoot":"","sources":["../../test/links_examples.ts"],"names":[],"mappings":"AAsCA,eAAO,MAAM,kBAAkB;;CAE9B,CAAC"}
@@ -0,0 +1,129 @@
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
+ import { __asyncValues, __awaiter } from "tslib";
9
+ import { env, record, isPlaybackMode } from "@azure-tools/test-recorder";
10
+ import * as assert from "assert";
11
+ import { ClientSecretCredential } from "@azure/identity";
12
+ import { ManagementLinkClient } from "../src/managementLinkClient";
13
+ import { ResourceManagementClient } from "@azure/arm-resources";
14
+ const recorderEnvSetup = {
15
+ replaceableVariables: {
16
+ AZURE_CLIENT_ID: "azure_client_id",
17
+ AZURE_CLIENT_SECRET: "azure_client_secret",
18
+ AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888",
19
+ SUBSCRIPTION_ID: "azure_subscription_id"
20
+ },
21
+ customizationsOnRecordings: [
22
+ (recording) => recording.replace(/"access_token":"[^"]*"/g, `"access_token":"access_token"`)
23
+ ],
24
+ queryParametersToSkip: []
25
+ };
26
+ export const testPollingOptions = {
27
+ updateIntervalInMs: isPlaybackMode() ? 0 : undefined,
28
+ };
29
+ describe("Links test", () => {
30
+ let recorder;
31
+ let subscriptionId;
32
+ let client;
33
+ let resources_client;
34
+ let location;
35
+ let resourceGroup;
36
+ let linksName;
37
+ let resourceName;
38
+ let resource2Id;
39
+ beforeEach(function () {
40
+ return __awaiter(this, void 0, void 0, function* () {
41
+ recorder = record(this, recorderEnvSetup);
42
+ subscriptionId = env.SUBSCRIPTION_ID;
43
+ // This is an example of how the environment variables are used
44
+ const credential = new ClientSecretCredential(env.AZURE_TENANT_ID, env.AZURE_CLIENT_ID, env.AZURE_CLIENT_SECRET);
45
+ client = new ManagementLinkClient(credential, subscriptionId);
46
+ resources_client = new ResourceManagementClient(credential, subscriptionId);
47
+ location = "eastus";
48
+ resourceGroup = "myjstest";
49
+ linksName = "myLink";
50
+ resourceName = "myresourcezzz";
51
+ });
52
+ });
53
+ afterEach(function () {
54
+ return __awaiter(this, void 0, void 0, function* () {
55
+ yield recorder.stop();
56
+ });
57
+ });
58
+ // async function create_resourceId() {
59
+ // const result = await resources_client.resources.beginCreateOrUpdateAndWait(resourceGroup,"Microsoft.Compute","","availabilitySets",resourceName,"2019-07-01",{ location: "eastus" });
60
+ // console.log(result)
61
+ // return result;
62
+ // }
63
+ // async function create_resourceId2() {
64
+ // const result = await resources_client.resources.beginCreateOrUpdateAndWait(resourceGroup,"Microsoft.Compute","","availabilitySets",resourceName+"2","2019-07-01",{ location: "eastus" });
65
+ // console.log(result)
66
+ // return result;
67
+ // }
68
+ it("resourceLinks create test", function () {
69
+ return __awaiter(this, void 0, void 0, function* () {
70
+ const res = yield client.resourceLinks.createOrUpdate("/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroup + "/providers/Microsoft.Compute/availabilitySets/myresourcezzz/providers/Microsoft.Resources/links/" + linksName, {
71
+ properties: {
72
+ targetId: "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroup + "/providers/Microsoft.Compute/availabilitySets/myresourcezzz2",
73
+ notes: "Testing links",
74
+ }
75
+ });
76
+ assert.equal(res.name, linksName);
77
+ });
78
+ });
79
+ it("resourceLinks get test", function () {
80
+ return __awaiter(this, void 0, void 0, function* () {
81
+ const linkId = "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroup + "/providers/Microsoft.Compute/availabilitySets/" + resourceName + "/providers/Microsoft.Resources/links/" + linksName;
82
+ const res = yield client.resourceLinks.get(linkId);
83
+ assert.equal(res.name, linksName);
84
+ });
85
+ });
86
+ it("resourceLinks list test", function () {
87
+ var e_1, _a;
88
+ return __awaiter(this, void 0, void 0, function* () {
89
+ const resArray = new Array();
90
+ try {
91
+ for (var _b = __asyncValues(client.resourceLinks.listAtSubscription()), _c; _c = yield _b.next(), !_c.done;) {
92
+ const item = _c.value;
93
+ resArray.push(item);
94
+ }
95
+ }
96
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
97
+ finally {
98
+ try {
99
+ if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
100
+ }
101
+ finally { if (e_1) throw e_1.error; }
102
+ }
103
+ assert.equal(resArray.length, 1);
104
+ });
105
+ });
106
+ it("resourceLinks delete test", function () {
107
+ var e_2, _a;
108
+ return __awaiter(this, void 0, void 0, function* () {
109
+ const linkId = "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroup + "/providers/Microsoft.Compute/availabilitySets/" + resourceName + "/providers/Microsoft.Resources/links/" + linksName;
110
+ const res = yield client.resourceLinks.delete(linkId);
111
+ const resArray = new Array();
112
+ try {
113
+ for (var _b = __asyncValues(client.resourceLinks.listAtSubscription()), _c; _c = yield _b.next(), !_c.done;) {
114
+ const item = _c.value;
115
+ resArray.push(item);
116
+ }
117
+ }
118
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
119
+ finally {
120
+ try {
121
+ if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
122
+ }
123
+ finally { if (e_2) throw e_2.error; }
124
+ }
125
+ assert.equal(resArray.length, 0);
126
+ });
127
+ });
128
+ });
129
+ //# sourceMappingURL=links_examples.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"links_examples.js","sourceRoot":"","sources":["../../test/links_examples.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,OAAO,EACL,GAAG,EACH,MAAM,EAIN,cAAc,EACf,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AACjC,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAEhE,MAAM,gBAAgB,GAA6B;IACjD,oBAAoB,EAAE;QACpB,eAAe,EAAE,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