@azure/arm-operations 4.0.0-beta.2 → 4.0.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/CHANGELOG.md +2 -2
  2. package/LICENSE +1 -1
  3. package/README.md +12 -1
  4. package/dist/index.js +124 -63
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.min.js +1 -1
  7. package/dist/index.min.js.map +1 -1
  8. package/dist-esm/samples-dev/managementAssociationsCreateOrUpdateSample.d.ts +2 -0
  9. package/dist-esm/samples-dev/managementAssociationsCreateOrUpdateSample.d.ts.map +1 -0
  10. package/dist-esm/samples-dev/managementAssociationsCreateOrUpdateSample.js +40 -0
  11. package/dist-esm/samples-dev/managementAssociationsCreateOrUpdateSample.js.map +1 -0
  12. package/dist-esm/samples-dev/managementAssociationsDeleteSample.d.ts +2 -0
  13. package/dist-esm/samples-dev/managementAssociationsDeleteSample.d.ts.map +1 -0
  14. package/dist-esm/samples-dev/managementAssociationsDeleteSample.js +34 -0
  15. package/dist-esm/samples-dev/managementAssociationsDeleteSample.js.map +1 -0
  16. package/dist-esm/samples-dev/managementAssociationsGetSample.d.ts +2 -0
  17. package/dist-esm/samples-dev/managementAssociationsGetSample.d.ts.map +1 -0
  18. package/dist-esm/samples-dev/managementAssociationsGetSample.js +34 -0
  19. package/dist-esm/samples-dev/managementAssociationsGetSample.js.map +1 -0
  20. package/dist-esm/samples-dev/managementAssociationsListBySubscriptionSample.d.ts +2 -0
  21. package/dist-esm/samples-dev/managementAssociationsListBySubscriptionSample.d.ts.map +1 -0
  22. package/dist-esm/samples-dev/managementAssociationsListBySubscriptionSample.js +29 -0
  23. package/dist-esm/samples-dev/managementAssociationsListBySubscriptionSample.js.map +1 -0
  24. package/dist-esm/samples-dev/managementConfigurationsCreateOrUpdateSample.d.ts +2 -0
  25. package/dist-esm/samples-dev/managementConfigurationsCreateOrUpdateSample.d.ts.map +1 -0
  26. package/dist-esm/samples-dev/managementConfigurationsCreateOrUpdateSample.js +32 -0
  27. package/dist-esm/samples-dev/managementConfigurationsCreateOrUpdateSample.js.map +1 -0
  28. package/dist-esm/samples-dev/managementConfigurationsDeleteSample.d.ts +2 -0
  29. package/dist-esm/samples-dev/managementConfigurationsDeleteSample.d.ts.map +1 -0
  30. package/dist-esm/samples-dev/managementConfigurationsDeleteSample.js +31 -0
  31. package/dist-esm/samples-dev/managementConfigurationsDeleteSample.js.map +1 -0
  32. package/dist-esm/samples-dev/managementConfigurationsGetSample.d.ts +2 -0
  33. package/dist-esm/samples-dev/managementConfigurationsGetSample.d.ts.map +1 -0
  34. package/dist-esm/samples-dev/managementConfigurationsGetSample.js +31 -0
  35. package/dist-esm/samples-dev/managementConfigurationsGetSample.js.map +1 -0
  36. package/dist-esm/samples-dev/managementConfigurationsListBySubscriptionSample.d.ts +2 -0
  37. package/dist-esm/samples-dev/managementConfigurationsListBySubscriptionSample.d.ts.map +1 -0
  38. package/dist-esm/samples-dev/managementConfigurationsListBySubscriptionSample.js +29 -0
  39. package/dist-esm/samples-dev/managementConfigurationsListBySubscriptionSample.js.map +1 -0
  40. package/dist-esm/samples-dev/operationsListSample.d.ts +2 -0
  41. package/dist-esm/samples-dev/operationsListSample.d.ts.map +1 -0
  42. package/dist-esm/samples-dev/operationsListSample.js +43 -0
  43. package/dist-esm/samples-dev/operationsListSample.js.map +1 -0
  44. package/dist-esm/samples-dev/solutionsCreateOrUpdateSample.d.ts +2 -0
  45. package/dist-esm/samples-dev/solutionsCreateOrUpdateSample.d.ts.map +1 -0
  46. package/dist-esm/samples-dev/solutionsCreateOrUpdateSample.js +51 -0
  47. package/dist-esm/samples-dev/solutionsCreateOrUpdateSample.js.map +1 -0
  48. package/dist-esm/samples-dev/solutionsDeleteSample.d.ts +2 -0
  49. package/dist-esm/samples-dev/solutionsDeleteSample.d.ts.map +1 -0
  50. package/dist-esm/samples-dev/solutionsDeleteSample.js +31 -0
  51. package/dist-esm/samples-dev/solutionsDeleteSample.js.map +1 -0
  52. package/dist-esm/samples-dev/solutionsGetSample.d.ts +2 -0
  53. package/dist-esm/samples-dev/solutionsGetSample.d.ts.map +1 -0
  54. package/dist-esm/samples-dev/solutionsGetSample.js +31 -0
  55. package/dist-esm/samples-dev/solutionsGetSample.js.map +1 -0
  56. package/dist-esm/samples-dev/solutionsListByResourceGroupSample.d.ts +2 -0
  57. package/dist-esm/samples-dev/solutionsListByResourceGroupSample.d.ts.map +1 -0
  58. package/dist-esm/samples-dev/solutionsListByResourceGroupSample.js +30 -0
  59. package/dist-esm/samples-dev/solutionsListByResourceGroupSample.js.map +1 -0
  60. package/dist-esm/samples-dev/solutionsListBySubscriptionSample.d.ts +2 -0
  61. package/dist-esm/samples-dev/solutionsListBySubscriptionSample.d.ts.map +1 -0
  62. package/dist-esm/samples-dev/solutionsListBySubscriptionSample.js +29 -0
  63. package/dist-esm/samples-dev/solutionsListBySubscriptionSample.js.map +1 -0
  64. package/dist-esm/samples-dev/solutionsUpdateSample.d.ts +2 -0
  65. package/dist-esm/samples-dev/solutionsUpdateSample.d.ts.map +1 -0
  66. package/dist-esm/samples-dev/solutionsUpdateSample.js +34 -0
  67. package/dist-esm/samples-dev/solutionsUpdateSample.js.map +1 -0
  68. package/dist-esm/src/operations/managementAssociations.d.ts +12 -3
  69. package/dist-esm/src/operations/managementAssociations.d.ts.map +1 -1
  70. package/dist-esm/src/operations/managementAssociations.js +37 -6
  71. package/dist-esm/src/operations/managementAssociations.js.map +1 -1
  72. package/dist-esm/src/operations/solutions.d.ts.map +1 -1
  73. package/dist-esm/src/operations/solutions.js +9 -3
  74. package/dist-esm/src/operations/solutions.js.map +1 -1
  75. package/dist-esm/src/operationsInterfaces/managementAssociations.d.ts +12 -3
  76. package/dist-esm/src/operationsInterfaces/managementAssociations.d.ts.map +1 -1
  77. package/dist-esm/src/operationsManagementClient.d.ts +1 -7
  78. package/dist-esm/src/operationsManagementClient.d.ts.map +1 -1
  79. package/dist-esm/src/operationsManagementClient.js +21 -18
  80. package/dist-esm/src/operationsManagementClient.js.map +1 -1
  81. package/package.json +40 -14
  82. package/review/arm-operations.api.md +4 -10
  83. package/rollup.config.js +6 -72
  84. package/src/operations/managementAssociations.ts +43 -3
  85. package/src/operations/solutions.ts +9 -3
  86. package/src/operationsInterfaces/managementAssociations.ts +18 -0
  87. package/src/operationsManagementClient.ts +27 -23
  88. package/tsconfig.json +19 -5
  89. package/types/arm-operations.d.ts +13 -10
  90. package/types/tsdoc-metadata.json +1 -1
package/package.json CHANGED
@@ -3,31 +3,39 @@
3
3
  "sdk-type": "mgmt",
4
4
  "author": "Microsoft Corporation",
5
5
  "description": "A generated SDK for OperationsManagementClient.",
6
- "version": "4.0.0-beta.2",
7
- "engines": { "node": ">=12.0.0" },
6
+ "version": "4.0.0-beta.3",
7
+ "engines": {
8
+ "node": ">=12.0.0"
9
+ },
8
10
  "dependencies": {
9
11
  "@azure/core-lro": "^2.2.0",
10
12
  "@azure/abort-controller": "^1.0.0",
11
13
  "@azure/core-paging": "^1.2.0",
12
- "@azure/core-client": "^1.0.0",
14
+ "@azure/core-client": "^1.5.0",
13
15
  "@azure/core-auth": "^1.3.0",
14
- "@azure/core-rest-pipeline": "^1.1.0",
16
+ "@azure/core-rest-pipeline": "^1.8.0",
15
17
  "tslib": "^2.2.0"
16
18
  },
17
- "keywords": ["node", "azure", "typescript", "browser", "isomorphic"],
19
+ "keywords": [
20
+ "node",
21
+ "azure",
22
+ "typescript",
23
+ "browser",
24
+ "isomorphic"
25
+ ],
18
26
  "license": "MIT",
19
27
  "main": "./dist/index.js",
20
28
  "module": "./dist-esm/src/index.js",
21
29
  "types": "./types/arm-operations.d.ts",
22
30
  "devDependencies": {
23
- "@microsoft/api-extractor": "^7.18.11",
24
- "@rollup/plugin-commonjs": "11.0.2",
25
- "@rollup/plugin-json": "^4.0.0",
26
- "@rollup/plugin-multi-entry": "^3.0.0",
27
- "@rollup/plugin-node-resolve": "^8.0.0",
31
+ "@microsoft/api-extractor": "7.18.11",
32
+ "@rollup/plugin-commonjs": "^21.0.1",
33
+ "@rollup/plugin-json": "^4.1.0",
34
+ "@rollup/plugin-multi-entry": "^4.1.0",
35
+ "@rollup/plugin-node-resolve": "^13.1.3",
28
36
  "mkdirp": "^1.0.4",
29
- "rollup": "^1.16.3",
30
- "rollup-plugin-sourcemaps": "^0.4.2",
37
+ "rollup": "^2.66.1",
38
+ "rollup-plugin-sourcemaps": "^0.6.3",
31
39
  "typescript": "~4.2.0",
32
40
  "uglify-js": "^3.4.9",
33
41
  "rimraf": "^3.0.0",
@@ -41,7 +49,9 @@
41
49
  "type": "git",
42
50
  "url": "https://github.com/Azure/azure-sdk-for-js.git"
43
51
  },
44
- "bugs": { "url": "https://github.com/Azure/azure-sdk-for-js/issues" },
52
+ "bugs": {
53
+ "url": "https://github.com/Azure/azure-sdk-for-js/issues"
54
+ },
45
55
  "files": [
46
56
  "dist/**/*.js",
47
57
  "dist/**/*.js.map",
@@ -88,5 +98,21 @@
88
98
  "docs": "echo skipped"
89
99
  },
90
100
  "sideEffects": false,
91
- "autoPublish": true
101
+ "//metadata": {
102
+ "constantPaths": [
103
+ {
104
+ "path": "src/operationsManagementClient.ts",
105
+ "prefix": "packageDetails"
106
+ }
107
+ ]
108
+ },
109
+ "autoPublish": true,
110
+ "//sampleConfiguration": {
111
+ "productName": "",
112
+ "productSlugs": [
113
+ "azure"
114
+ ],
115
+ "disableDocsMs": true,
116
+ "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-operations?view=azure-node-preview"
117
+ }
92
118
  }
@@ -48,9 +48,9 @@ export interface ManagementAssociationPropertiesList {
48
48
 
49
49
  // @public
50
50
  export interface ManagementAssociations {
51
- createOrUpdate(resourceGroupName: string, managementAssociationName: string, parameters: ManagementAssociation, options?: ManagementAssociationsCreateOrUpdateOptionalParams): Promise<ManagementAssociationsCreateOrUpdateResponse>;
52
- delete(resourceGroupName: string, managementAssociationName: string, options?: ManagementAssociationsDeleteOptionalParams): Promise<void>;
53
- get(resourceGroupName: string, managementAssociationName: string, options?: ManagementAssociationsGetOptionalParams): Promise<ManagementAssociationsGetResponse>;
51
+ createOrUpdate(resourceGroupName: string, providerName: string, resourceType: string, resourceName: string, managementAssociationName: string, parameters: ManagementAssociation, options?: ManagementAssociationsCreateOrUpdateOptionalParams): Promise<ManagementAssociationsCreateOrUpdateResponse>;
52
+ delete(resourceGroupName: string, providerName: string, resourceType: string, resourceName: string, managementAssociationName: string, options?: ManagementAssociationsDeleteOptionalParams): Promise<void>;
53
+ get(resourceGroupName: string, providerName: string, resourceType: string, resourceName: string, managementAssociationName: string, options?: ManagementAssociationsGetOptionalParams): Promise<ManagementAssociationsGetResponse>;
54
54
  listBySubscription(options?: ManagementAssociationsListBySubscriptionOptionalParams): Promise<ManagementAssociationsListBySubscriptionResponse>;
55
55
  }
56
56
 
@@ -169,7 +169,7 @@ export type OperationsListResponse = OperationListResult;
169
169
  export class OperationsManagementClient extends coreClient.ServiceClient {
170
170
  // (undocumented)
171
171
  $host: string;
172
- constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, providerName: string, resourceType: string, resourceName: string, options?: OperationsManagementClientOptionalParams);
172
+ constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: OperationsManagementClientOptionalParams);
173
173
  // (undocumented)
174
174
  apiVersion: string;
175
175
  // (undocumented)
@@ -179,12 +179,6 @@ export class OperationsManagementClient extends coreClient.ServiceClient {
179
179
  // (undocumented)
180
180
  operations: Operations;
181
181
  // (undocumented)
182
- providerName: string;
183
- // (undocumented)
184
- resourceName: string;
185
- // (undocumented)
186
- resourceType: string;
187
- // (undocumented)
188
182
  solutions: Solutions;
189
183
  // (undocumented)
190
184
  subscriptionId: string;
package/rollup.config.js CHANGED
@@ -14,62 +14,14 @@ import json from "@rollup/plugin-json";
14
14
 
15
15
  import nodeBuiltins from "builtin-modules";
16
16
 
17
- /**
18
- * Gets the proper configuration needed for rollup's commonJS plugin for @opentelemetry/api.
19
- *
20
- * NOTE: this manual configuration is only needed because OpenTelemetry uses an
21
- * __exportStar downleveled helper function to declare its exports which confuses
22
- * rollup's automatic discovery mechanism.
23
- *
24
- * @returns an object reference that can be `...`'d into your cjs() configuration.
25
- */
26
- export function openTelemetryCommonJs() {
27
- const namedExports = {};
28
-
29
- for (const key of [
30
- "@opentelemetry/api",
31
- "@azure/core-tracing/node_modules/@opentelemetry/api"
32
- ]) {
33
- namedExports[key] = [
34
- "SpanKind",
35
- "TraceFlags",
36
- "getSpan",
37
- "setSpan",
38
- "SpanStatusCode",
39
- "getSpanContext",
40
- "setSpanContext"
41
- ];
42
- }
43
-
44
- const releasedOpenTelemetryVersions = ["0.10.2", "1.0.0-rc.0"];
45
-
46
- for (const version of releasedOpenTelemetryVersions) {
47
- namedExports[
48
- // working around a limitation in the rollup common.js plugin - it's not able to resolve these modules so the named exports listed above will not get applied. We have to drill down to the actual path.
49
- `../../../common/temp/node_modules/.pnpm/@opentelemetry/api@${version}/node_modules/@opentelemetry/api/build/src/index.js`
50
- ] = [
51
- "SpanKind",
52
- "TraceFlags",
53
- "getSpan",
54
- "setSpan",
55
- "StatusCode",
56
- "CanonicalCode",
57
- "getSpanContext",
58
- "setSpanContext"
59
- ];
60
- }
61
-
62
- return namedExports;
63
- }
64
-
65
17
  // #region Warning Handler
66
18
 
67
19
  /**
68
- * A function that can determine whether a rollupwarning should be ignored. If
20
+ * A function that can determine whether a rollup warning should be ignored. If
69
21
  * the function returns `true`, then the warning will not be displayed.
70
22
  */
71
23
 
72
- function ignoreNiseSinonEvalWarnings(warning) {
24
+ function ignoreNiseSinonEval(warning) {
73
25
  return (
74
26
  warning.code === "EVAL" &&
75
27
  warning.id &&
@@ -78,17 +30,14 @@ function ignoreNiseSinonEvalWarnings(warning) {
78
30
  );
79
31
  }
80
32
 
81
- function ignoreChaiCircularDependencyWarnings(warning) {
33
+ function ignoreChaiCircularDependency(warning) {
82
34
  return (
83
35
  warning.code === "CIRCULAR_DEPENDENCY" &&
84
36
  warning.importer && warning.importer.includes("node_modules/chai") === true
85
37
  );
86
38
  }
87
39
 
88
- const warningInhibitors = [
89
- ignoreChaiCircularDependencyWarnings,
90
- ignoreNiseSinonEvalWarnings
91
- ];
40
+ const warningInhibitors = [ignoreChaiCircularDependency, ignoreNiseSinonEval];
92
41
 
93
42
  /**
94
43
  * Construct a warning handler for the shared rollup configuration
@@ -122,22 +71,7 @@ function makeBrowserTestConfig() {
122
71
  nodeResolve({
123
72
  mainFields: ["module", "browser"]
124
73
  }),
125
- cjs({
126
- namedExports: {
127
- // Chai's strange internal architecture makes it impossible to statically
128
- // analyze its exports.
129
- chai: [
130
- "version",
131
- "use",
132
- "util",
133
- "config",
134
- "expect",
135
- "should",
136
- "assert"
137
- ],
138
- ...openTelemetryCommonJs()
139
- }
140
- }),
74
+ cjs(),
141
75
  json(),
142
76
  sourcemaps()
143
77
  //viz({ filename: "dist-test/browser-stats.html", sourcemap: true })
@@ -173,7 +107,7 @@ export function makeConfig(pkg, options) {
173
107
  ],
174
108
  output: { file: "dist/index.js", format: "cjs", sourcemap: true },
175
109
  preserveSymlinks: false,
176
- plugins: [sourcemaps(), nodeResolve(), cjs()]
110
+ plugins: [sourcemaps(), nodeResolve()]
177
111
  };
178
112
 
179
113
  const config = [baseConfig];
@@ -50,18 +50,32 @@ export class ManagementAssociationsImpl implements ManagementAssociations {
50
50
  /**
51
51
  * Creates or updates the ManagementAssociation.
52
52
  * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
53
+ * @param providerName Provider name for the parent resource.
54
+ * @param resourceType Resource type for the parent resource
55
+ * @param resourceName Parent resource name.
53
56
  * @param managementAssociationName User ManagementAssociation Name.
54
57
  * @param parameters The parameters required to create ManagementAssociation extension.
55
58
  * @param options The options parameters.
56
59
  */
57
60
  createOrUpdate(
58
61
  resourceGroupName: string,
62
+ providerName: string,
63
+ resourceType: string,
64
+ resourceName: string,
59
65
  managementAssociationName: string,
60
66
  parameters: ManagementAssociation,
61
67
  options?: ManagementAssociationsCreateOrUpdateOptionalParams
62
68
  ): Promise<ManagementAssociationsCreateOrUpdateResponse> {
63
69
  return this.client.sendOperationRequest(
64
- { resourceGroupName, managementAssociationName, parameters, options },
70
+ {
71
+ resourceGroupName,
72
+ providerName,
73
+ resourceType,
74
+ resourceName,
75
+ managementAssociationName,
76
+ parameters,
77
+ options
78
+ },
65
79
  createOrUpdateOperationSpec
66
80
  );
67
81
  }
@@ -69,16 +83,29 @@ export class ManagementAssociationsImpl implements ManagementAssociations {
69
83
  /**
70
84
  * Deletes the ManagementAssociation in the subscription.
71
85
  * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
86
+ * @param providerName Provider name for the parent resource.
87
+ * @param resourceType Resource type for the parent resource
88
+ * @param resourceName Parent resource name.
72
89
  * @param managementAssociationName User ManagementAssociation Name.
73
90
  * @param options The options parameters.
74
91
  */
75
92
  delete(
76
93
  resourceGroupName: string,
94
+ providerName: string,
95
+ resourceType: string,
96
+ resourceName: string,
77
97
  managementAssociationName: string,
78
98
  options?: ManagementAssociationsDeleteOptionalParams
79
99
  ): Promise<void> {
80
100
  return this.client.sendOperationRequest(
81
- { resourceGroupName, managementAssociationName, options },
101
+ {
102
+ resourceGroupName,
103
+ providerName,
104
+ resourceType,
105
+ resourceName,
106
+ managementAssociationName,
107
+ options
108
+ },
82
109
  deleteOperationSpec
83
110
  );
84
111
  }
@@ -86,16 +113,29 @@ export class ManagementAssociationsImpl implements ManagementAssociations {
86
113
  /**
87
114
  * Retrieves the user ManagementAssociation.
88
115
  * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
116
+ * @param providerName Provider name for the parent resource.
117
+ * @param resourceType Resource type for the parent resource
118
+ * @param resourceName Parent resource name.
89
119
  * @param managementAssociationName User ManagementAssociation Name.
90
120
  * @param options The options parameters.
91
121
  */
92
122
  get(
93
123
  resourceGroupName: string,
124
+ providerName: string,
125
+ resourceType: string,
126
+ resourceName: string,
94
127
  managementAssociationName: string,
95
128
  options?: ManagementAssociationsGetOptionalParams
96
129
  ): Promise<ManagementAssociationsGetResponse> {
97
130
  return this.client.sendOperationRequest(
98
- { resourceGroupName, managementAssociationName, options },
131
+ {
132
+ resourceGroupName,
133
+ providerName,
134
+ resourceType,
135
+ resourceName,
136
+ managementAssociationName,
137
+ options
138
+ },
99
139
  getOperationSpec
100
140
  );
101
141
  }
@@ -103,10 +103,12 @@ export class SolutionsImpl implements Solutions {
103
103
  { resourceGroupName, solutionName, parameters, options },
104
104
  createOrUpdateOperationSpec
105
105
  );
106
- return new LroEngine(lro, {
106
+ const poller = new LroEngine(lro, {
107
107
  resumeFrom: options?.resumeFrom,
108
108
  intervalInMs: options?.updateIntervalInMs
109
109
  });
110
+ await poller.poll();
111
+ return poller;
110
112
  }
111
113
 
112
114
  /**
@@ -193,10 +195,12 @@ export class SolutionsImpl implements Solutions {
193
195
  { resourceGroupName, solutionName, parameters, options },
194
196
  updateOperationSpec
195
197
  );
196
- return new LroEngine(lro, {
198
+ const poller = new LroEngine(lro, {
197
199
  resumeFrom: options?.resumeFrom,
198
200
  intervalInMs: options?.updateIntervalInMs
199
201
  });
202
+ await poller.poll();
203
+ return poller;
200
204
  }
201
205
 
202
206
  /**
@@ -276,10 +280,12 @@ export class SolutionsImpl implements Solutions {
276
280
  { resourceGroupName, solutionName, options },
277
281
  deleteOperationSpec
278
282
  );
279
- return new LroEngine(lro, {
283
+ const poller = new LroEngine(lro, {
280
284
  resumeFrom: options?.resumeFrom,
281
285
  intervalInMs: options?.updateIntervalInMs
282
286
  });
287
+ await poller.poll();
288
+ return poller;
283
289
  }
284
290
 
285
291
  /**
@@ -29,12 +29,18 @@ export interface ManagementAssociations {
29
29
  /**
30
30
  * Creates or updates the ManagementAssociation.
31
31
  * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
32
+ * @param providerName Provider name for the parent resource.
33
+ * @param resourceType Resource type for the parent resource
34
+ * @param resourceName Parent resource name.
32
35
  * @param managementAssociationName User ManagementAssociation Name.
33
36
  * @param parameters The parameters required to create ManagementAssociation extension.
34
37
  * @param options The options parameters.
35
38
  */
36
39
  createOrUpdate(
37
40
  resourceGroupName: string,
41
+ providerName: string,
42
+ resourceType: string,
43
+ resourceName: string,
38
44
  managementAssociationName: string,
39
45
  parameters: ManagementAssociation,
40
46
  options?: ManagementAssociationsCreateOrUpdateOptionalParams
@@ -42,22 +48,34 @@ export interface ManagementAssociations {
42
48
  /**
43
49
  * Deletes the ManagementAssociation in the subscription.
44
50
  * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
51
+ * @param providerName Provider name for the parent resource.
52
+ * @param resourceType Resource type for the parent resource
53
+ * @param resourceName Parent resource name.
45
54
  * @param managementAssociationName User ManagementAssociation Name.
46
55
  * @param options The options parameters.
47
56
  */
48
57
  delete(
49
58
  resourceGroupName: string,
59
+ providerName: string,
60
+ resourceType: string,
61
+ resourceName: string,
50
62
  managementAssociationName: string,
51
63
  options?: ManagementAssociationsDeleteOptionalParams
52
64
  ): Promise<void>;
53
65
  /**
54
66
  * Retrieves the user ManagementAssociation.
55
67
  * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
68
+ * @param providerName Provider name for the parent resource.
69
+ * @param resourceType Resource type for the parent resource
70
+ * @param resourceName Parent resource name.
56
71
  * @param managementAssociationName User ManagementAssociation Name.
57
72
  * @param options The options parameters.
58
73
  */
59
74
  get(
60
75
  resourceGroupName: string,
76
+ providerName: string,
77
+ resourceType: string,
78
+ resourceName: string,
61
79
  managementAssociationName: string,
62
80
  options?: ManagementAssociationsGetOptionalParams
63
81
  ): Promise<ManagementAssociationsGetResponse>;
@@ -7,6 +7,7 @@
7
7
  */
8
8
 
9
9
  import * as coreClient from "@azure/core-client";
10
+ import * as coreRestPipeline from "@azure/core-rest-pipeline";
10
11
  import * as coreAuth from "@azure/core-auth";
11
12
  import {
12
13
  SolutionsImpl,
@@ -26,26 +27,17 @@ export class OperationsManagementClient extends coreClient.ServiceClient {
26
27
  $host: string;
27
28
  subscriptionId: string;
28
29
  apiVersion: string;
29
- providerName: string;
30
- resourceType: string;
31
- resourceName: string;
32
30
 
33
31
  /**
34
32
  * Initializes a new instance of the OperationsManagementClient class.
35
33
  * @param credentials Subscription credentials which uniquely identify client subscription.
36
34
  * @param subscriptionId Gets subscription credentials which uniquely identify Microsoft Azure
37
35
  * subscription. The subscription ID forms part of the URI for every service call.
38
- * @param providerName Provider name for the parent resource.
39
- * @param resourceType Resource type for the parent resource
40
- * @param resourceName Parent resource name.
41
36
  * @param options The parameter options
42
37
  */
43
38
  constructor(
44
39
  credentials: coreAuth.TokenCredential,
45
40
  subscriptionId: string,
46
- providerName: string,
47
- resourceType: string,
48
- resourceName: string,
49
41
  options?: OperationsManagementClientOptionalParams
50
42
  ) {
51
43
  if (credentials === undefined) {
@@ -54,15 +46,6 @@ export class OperationsManagementClient extends coreClient.ServiceClient {
54
46
  if (subscriptionId === undefined) {
55
47
  throw new Error("'subscriptionId' cannot be null");
56
48
  }
57
- if (providerName === undefined) {
58
- throw new Error("'providerName' cannot be null");
59
- }
60
- if (resourceType === undefined) {
61
- throw new Error("'resourceType' cannot be null");
62
- }
63
- if (resourceName === undefined) {
64
- throw new Error("'resourceName' cannot be null");
65
- }
66
49
 
67
50
  // Initializing default values for options
68
51
  if (!options) {
@@ -73,7 +56,7 @@ export class OperationsManagementClient extends coreClient.ServiceClient {
73
56
  credential: credentials
74
57
  };
75
58
 
76
- const packageDetails = `azsdk-js-arm-operations/4.0.0-beta.2`;
59
+ const packageDetails = `azsdk-js-arm-operations/4.0.0-beta.3`;
77
60
  const userAgentPrefix =
78
61
  options.userAgentOptions && options.userAgentOptions.userAgentPrefix
79
62
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
@@ -88,14 +71,35 @@ export class OperationsManagementClient extends coreClient.ServiceClient {
88
71
  userAgentOptions: {
89
72
  userAgentPrefix
90
73
  },
91
- baseUri: options.endpoint || "https://management.azure.com"
74
+ baseUri:
75
+ options.endpoint ?? options.baseUri ?? "https://management.azure.com"
92
76
  };
93
77
  super(optionsWithDefaults);
78
+
79
+ if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
80
+ const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();
81
+ const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(
82
+ (pipelinePolicy) =>
83
+ pipelinePolicy.name ===
84
+ coreRestPipeline.bearerTokenAuthenticationPolicyName
85
+ );
86
+ if (!bearerTokenAuthenticationPolicyFound) {
87
+ this.pipeline.removePolicy({
88
+ name: coreRestPipeline.bearerTokenAuthenticationPolicyName
89
+ });
90
+ this.pipeline.addPolicy(
91
+ coreRestPipeline.bearerTokenAuthenticationPolicy({
92
+ scopes: `${optionsWithDefaults.baseUri}/.default`,
93
+ challengeCallbacks: {
94
+ authorizeRequestOnChallenge:
95
+ coreClient.authorizeRequestOnClaimChallenge
96
+ }
97
+ })
98
+ );
99
+ }
100
+ }
94
101
  // Parameter assignments
95
102
  this.subscriptionId = subscriptionId;
96
- this.providerName = providerName;
97
- this.resourceType = resourceType;
98
- this.resourceName = resourceName;
99
103
 
100
104
  // Assigning values to Constant parameters
101
105
  this.$host = options.$host || "https://management.azure.com";
package/tsconfig.json CHANGED
@@ -9,11 +9,25 @@
9
9
  "esModuleInterop": true,
10
10
  "allowSyntheticDefaultImports": true,
11
11
  "forceConsistentCasingInFileNames": true,
12
- "lib": ["es6", "dom"],
12
+ "lib": [
13
+ "es6",
14
+ "dom"
15
+ ],
13
16
  "declaration": true,
14
17
  "outDir": "./dist-esm",
15
- "importHelpers": true
18
+ "importHelpers": true,
19
+ "paths": {
20
+ "@azure/arm-operations": [
21
+ "./src/index"
22
+ ]
23
+ }
16
24
  },
17
- "include": ["./src/**/*.ts", "./test/**/*.ts"],
18
- "exclude": ["node_modules"]
19
- }
25
+ "include": [
26
+ "./src/**/*.ts",
27
+ "./test/**/*.ts",
28
+ "samples-dev/**/*.ts"
29
+ ],
30
+ "exclude": [
31
+ "node_modules"
32
+ ]
33
+ }
@@ -71,25 +71,34 @@ export declare interface ManagementAssociations {
71
71
  /**
72
72
  * Creates or updates the ManagementAssociation.
73
73
  * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
74
+ * @param providerName Provider name for the parent resource.
75
+ * @param resourceType Resource type for the parent resource
76
+ * @param resourceName Parent resource name.
74
77
  * @param managementAssociationName User ManagementAssociation Name.
75
78
  * @param parameters The parameters required to create ManagementAssociation extension.
76
79
  * @param options The options parameters.
77
80
  */
78
- createOrUpdate(resourceGroupName: string, managementAssociationName: string, parameters: ManagementAssociation, options?: ManagementAssociationsCreateOrUpdateOptionalParams): Promise<ManagementAssociationsCreateOrUpdateResponse>;
81
+ createOrUpdate(resourceGroupName: string, providerName: string, resourceType: string, resourceName: string, managementAssociationName: string, parameters: ManagementAssociation, options?: ManagementAssociationsCreateOrUpdateOptionalParams): Promise<ManagementAssociationsCreateOrUpdateResponse>;
79
82
  /**
80
83
  * Deletes the ManagementAssociation in the subscription.
81
84
  * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
85
+ * @param providerName Provider name for the parent resource.
86
+ * @param resourceType Resource type for the parent resource
87
+ * @param resourceName Parent resource name.
82
88
  * @param managementAssociationName User ManagementAssociation Name.
83
89
  * @param options The options parameters.
84
90
  */
85
- delete(resourceGroupName: string, managementAssociationName: string, options?: ManagementAssociationsDeleteOptionalParams): Promise<void>;
91
+ delete(resourceGroupName: string, providerName: string, resourceType: string, resourceName: string, managementAssociationName: string, options?: ManagementAssociationsDeleteOptionalParams): Promise<void>;
86
92
  /**
87
93
  * Retrieves the user ManagementAssociation.
88
94
  * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
95
+ * @param providerName Provider name for the parent resource.
96
+ * @param resourceType Resource type for the parent resource
97
+ * @param resourceName Parent resource name.
89
98
  * @param managementAssociationName User ManagementAssociation Name.
90
99
  * @param options The options parameters.
91
100
  */
92
- get(resourceGroupName: string, managementAssociationName: string, options?: ManagementAssociationsGetOptionalParams): Promise<ManagementAssociationsGetResponse>;
101
+ get(resourceGroupName: string, providerName: string, resourceType: string, resourceName: string, managementAssociationName: string, options?: ManagementAssociationsGetOptionalParams): Promise<ManagementAssociationsGetResponse>;
93
102
  }
94
103
 
95
104
  /** Optional parameters. */
@@ -263,20 +272,14 @@ export declare class OperationsManagementClient extends coreClient.ServiceClient
263
272
  $host: string;
264
273
  subscriptionId: string;
265
274
  apiVersion: string;
266
- providerName: string;
267
- resourceType: string;
268
- resourceName: string;
269
275
  /**
270
276
  * Initializes a new instance of the OperationsManagementClient class.
271
277
  * @param credentials Subscription credentials which uniquely identify client subscription.
272
278
  * @param subscriptionId Gets subscription credentials which uniquely identify Microsoft Azure
273
279
  * subscription. The subscription ID forms part of the URI for every service call.
274
- * @param providerName Provider name for the parent resource.
275
- * @param resourceType Resource type for the parent resource
276
- * @param resourceName Parent resource name.
277
280
  * @param options The parameter options
278
281
  */
279
- constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, providerName: string, resourceType: string, resourceName: string, options?: OperationsManagementClientOptionalParams);
282
+ constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: OperationsManagementClientOptionalParams);
280
283
  solutions: Solutions;
281
284
  managementAssociations: ManagementAssociations;
282
285
  managementConfigurations: ManagementConfigurations;
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.19.2"
8
+ "packageVersion": "7.18.11"
9
9
  }
10
10
  ]
11
11
  }