@azure/arm-cognitiveservices 7.3.1 → 7.4.0-alpha.20230217.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.
Files changed (163) hide show
  1. package/CHANGELOG.md +71 -0
  2. package/LICENSE +1 -1
  3. package/dist/index.js +1232 -42
  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/samples-dev/accountsCreateSample.js +17 -8
  8. package/dist-esm/samples-dev/accountsCreateSample.js.map +1 -1
  9. package/dist-esm/samples-dev/accountsDeleteSample.js +12 -4
  10. package/dist-esm/samples-dev/accountsDeleteSample.js.map +1 -1
  11. package/dist-esm/samples-dev/accountsGetSample.js +12 -4
  12. package/dist-esm/samples-dev/accountsGetSample.js.map +1 -1
  13. package/dist-esm/samples-dev/accountsListByResourceGroupSample.js +12 -4
  14. package/dist-esm/samples-dev/accountsListByResourceGroupSample.js.map +1 -1
  15. package/dist-esm/samples-dev/accountsListKeysSample.js +12 -4
  16. package/dist-esm/samples-dev/accountsListKeysSample.js.map +1 -1
  17. package/dist-esm/samples-dev/accountsListModelsSample.js +11 -4
  18. package/dist-esm/samples-dev/accountsListModelsSample.js.map +1 -1
  19. package/dist-esm/samples-dev/accountsListSample.js +11 -3
  20. package/dist-esm/samples-dev/accountsListSample.js.map +1 -1
  21. package/dist-esm/samples-dev/accountsListSkusSample.js +12 -4
  22. package/dist-esm/samples-dev/accountsListSkusSample.js.map +1 -1
  23. package/dist-esm/samples-dev/accountsListUsagesSample.js +12 -4
  24. package/dist-esm/samples-dev/accountsListUsagesSample.js.map +1 -1
  25. package/dist-esm/samples-dev/accountsRegenerateKeySample.js +12 -4
  26. package/dist-esm/samples-dev/accountsRegenerateKeySample.js.map +1 -1
  27. package/dist-esm/samples-dev/accountsUpdateSample.js +12 -4
  28. package/dist-esm/samples-dev/accountsUpdateSample.js.map +1 -1
  29. package/dist-esm/samples-dev/checkDomainAvailabilitySample.js +11 -3
  30. package/dist-esm/samples-dev/checkDomainAvailabilitySample.js.map +1 -1
  31. package/dist-esm/samples-dev/checkSkuAvailabilitySample.js +11 -3
  32. package/dist-esm/samples-dev/checkSkuAvailabilitySample.js.map +1 -1
  33. package/dist-esm/samples-dev/commitmentPlansCreateOrUpdateAssociationSample.d.ts +2 -0
  34. package/dist-esm/samples-dev/commitmentPlansCreateOrUpdateAssociationSample.d.ts.map +1 -0
  35. package/dist-esm/samples-dev/commitmentPlansCreateOrUpdateAssociationSample.js +43 -0
  36. package/dist-esm/samples-dev/commitmentPlansCreateOrUpdateAssociationSample.js.map +1 -0
  37. package/dist-esm/samples-dev/commitmentPlansCreateOrUpdatePlanSample.d.ts +2 -0
  38. package/dist-esm/samples-dev/commitmentPlansCreateOrUpdatePlanSample.d.ts.map +1 -0
  39. package/dist-esm/samples-dev/commitmentPlansCreateOrUpdatePlanSample.js +50 -0
  40. package/dist-esm/samples-dev/commitmentPlansCreateOrUpdatePlanSample.js.map +1 -0
  41. package/dist-esm/samples-dev/commitmentPlansCreateOrUpdateSample.js +11 -4
  42. package/dist-esm/samples-dev/commitmentPlansCreateOrUpdateSample.js.map +1 -1
  43. package/dist-esm/samples-dev/commitmentPlansDeleteAssociationSample.d.ts +2 -0
  44. package/dist-esm/samples-dev/commitmentPlansDeleteAssociationSample.d.ts.map +1 -0
  45. package/dist-esm/samples-dev/commitmentPlansDeleteAssociationSample.js +40 -0
  46. package/dist-esm/samples-dev/commitmentPlansDeleteAssociationSample.js.map +1 -0
  47. package/dist-esm/samples-dev/commitmentPlansDeletePlanSample.d.ts +2 -0
  48. package/dist-esm/samples-dev/commitmentPlansDeletePlanSample.d.ts.map +1 -0
  49. package/dist-esm/samples-dev/commitmentPlansDeletePlanSample.js +39 -0
  50. package/dist-esm/samples-dev/commitmentPlansDeletePlanSample.js.map +1 -0
  51. package/dist-esm/samples-dev/commitmentPlansDeleteSample.js +11 -4
  52. package/dist-esm/samples-dev/commitmentPlansDeleteSample.js.map +1 -1
  53. package/dist-esm/samples-dev/commitmentPlansGetAssociationSample.d.ts +2 -0
  54. package/dist-esm/samples-dev/commitmentPlansGetAssociationSample.d.ts.map +1 -0
  55. package/dist-esm/samples-dev/commitmentPlansGetAssociationSample.js +40 -0
  56. package/dist-esm/samples-dev/commitmentPlansGetAssociationSample.js.map +1 -0
  57. package/dist-esm/samples-dev/commitmentPlansGetPlanSample.d.ts +2 -0
  58. package/dist-esm/samples-dev/commitmentPlansGetPlanSample.d.ts.map +1 -0
  59. package/dist-esm/samples-dev/commitmentPlansGetPlanSample.js +39 -0
  60. package/dist-esm/samples-dev/commitmentPlansGetPlanSample.js.map +1 -0
  61. package/dist-esm/samples-dev/commitmentPlansGetSample.js +11 -4
  62. package/dist-esm/samples-dev/commitmentPlansGetSample.js.map +1 -1
  63. package/dist-esm/samples-dev/commitmentPlansListAssociationsSample.d.ts +2 -0
  64. package/dist-esm/samples-dev/commitmentPlansListAssociationsSample.d.ts.map +1 -0
  65. package/dist-esm/samples-dev/commitmentPlansListAssociationsSample.js +53 -0
  66. package/dist-esm/samples-dev/commitmentPlansListAssociationsSample.js.map +1 -0
  67. package/dist-esm/samples-dev/commitmentPlansListPlansByResourceGroupSample.d.ts +2 -0
  68. package/dist-esm/samples-dev/commitmentPlansListPlansByResourceGroupSample.d.ts.map +1 -0
  69. package/dist-esm/samples-dev/commitmentPlansListPlansByResourceGroupSample.js +52 -0
  70. package/dist-esm/samples-dev/commitmentPlansListPlansByResourceGroupSample.js.map +1 -0
  71. package/dist-esm/samples-dev/commitmentPlansListPlansBySubscriptionSample.d.ts +2 -0
  72. package/dist-esm/samples-dev/commitmentPlansListPlansBySubscriptionSample.d.ts.map +1 -0
  73. package/dist-esm/samples-dev/commitmentPlansListPlansBySubscriptionSample.js +51 -0
  74. package/dist-esm/samples-dev/commitmentPlansListPlansBySubscriptionSample.js.map +1 -0
  75. package/dist-esm/samples-dev/commitmentPlansListSample.js +11 -4
  76. package/dist-esm/samples-dev/commitmentPlansListSample.js.map +1 -1
  77. package/dist-esm/samples-dev/commitmentPlansUpdatePlanSample.d.ts +2 -0
  78. package/dist-esm/samples-dev/commitmentPlansUpdatePlanSample.d.ts.map +1 -0
  79. package/dist-esm/samples-dev/commitmentPlansUpdatePlanSample.js +40 -0
  80. package/dist-esm/samples-dev/commitmentPlansUpdatePlanSample.js.map +1 -0
  81. package/dist-esm/samples-dev/commitmentTiersListSample.js +10 -3
  82. package/dist-esm/samples-dev/commitmentTiersListSample.js.map +1 -1
  83. package/dist-esm/samples-dev/deletedAccountsGetSample.js +12 -4
  84. package/dist-esm/samples-dev/deletedAccountsGetSample.js.map +1 -1
  85. package/dist-esm/samples-dev/deletedAccountsListSample.js +11 -3
  86. package/dist-esm/samples-dev/deletedAccountsListSample.js.map +1 -1
  87. package/dist-esm/samples-dev/deletedAccountsPurgeSample.js +12 -4
  88. package/dist-esm/samples-dev/deletedAccountsPurgeSample.js.map +1 -1
  89. package/dist-esm/samples-dev/deploymentsCreateOrUpdateSample.js +11 -4
  90. package/dist-esm/samples-dev/deploymentsCreateOrUpdateSample.js.map +1 -1
  91. package/dist-esm/samples-dev/deploymentsDeleteSample.js +11 -4
  92. package/dist-esm/samples-dev/deploymentsDeleteSample.js.map +1 -1
  93. package/dist-esm/samples-dev/deploymentsGetSample.js +11 -4
  94. package/dist-esm/samples-dev/deploymentsGetSample.js.map +1 -1
  95. package/dist-esm/samples-dev/deploymentsListSample.js +11 -4
  96. package/dist-esm/samples-dev/deploymentsListSample.js.map +1 -1
  97. package/dist-esm/samples-dev/operationsListSample.js +11 -3
  98. package/dist-esm/samples-dev/operationsListSample.js.map +1 -1
  99. package/dist-esm/samples-dev/privateEndpointConnectionsCreateOrUpdateSample.js +11 -4
  100. package/dist-esm/samples-dev/privateEndpointConnectionsCreateOrUpdateSample.js.map +1 -1
  101. package/dist-esm/samples-dev/privateEndpointConnectionsDeleteSample.js +11 -4
  102. package/dist-esm/samples-dev/privateEndpointConnectionsDeleteSample.js.map +1 -1
  103. package/dist-esm/samples-dev/privateEndpointConnectionsGetSample.js +11 -4
  104. package/dist-esm/samples-dev/privateEndpointConnectionsGetSample.js.map +1 -1
  105. package/dist-esm/samples-dev/privateEndpointConnectionsListSample.js +11 -4
  106. package/dist-esm/samples-dev/privateEndpointConnectionsListSample.js.map +1 -1
  107. package/dist-esm/samples-dev/privateLinkResourcesListSample.js +11 -4
  108. package/dist-esm/samples-dev/privateLinkResourcesListSample.js.map +1 -1
  109. package/dist-esm/samples-dev/resourceSkusListSample.js +11 -3
  110. package/dist-esm/samples-dev/resourceSkusListSample.js.map +1 -1
  111. package/dist-esm/src/cognitiveServicesManagementClient.js +2 -2
  112. package/dist-esm/src/models/index.d.ts +248 -0
  113. package/dist-esm/src/models/index.d.ts.map +1 -1
  114. package/dist-esm/src/models/index.js +36 -0
  115. package/dist-esm/src/models/index.js.map +1 -1
  116. package/dist-esm/src/models/mappers.d.ts +10 -0
  117. package/dist-esm/src/models/mappers.d.ts.map +1 -1
  118. package/dist-esm/src/models/mappers.js +259 -0
  119. package/dist-esm/src/models/mappers.js.map +1 -1
  120. package/dist-esm/src/models/parameters.d.ts +4 -0
  121. package/dist-esm/src/models/parameters.d.ts.map +1 -1
  122. package/dist-esm/src/models/parameters.js +36 -2
  123. package/dist-esm/src/models/parameters.js.map +1 -1
  124. package/dist-esm/src/operations/accounts.js +0 -3
  125. package/dist-esm/src/operations/accounts.js.map +1 -1
  126. package/dist-esm/src/operations/commitmentPlans.d.ts +181 -1
  127. package/dist-esm/src/operations/commitmentPlans.d.ts.map +1 -1
  128. package/dist-esm/src/operations/commitmentPlans.js +864 -5
  129. package/dist-esm/src/operations/commitmentPlans.js.map +1 -1
  130. package/dist-esm/src/operations/commitmentTiers.js +0 -1
  131. package/dist-esm/src/operations/commitmentTiers.js.map +1 -1
  132. package/dist-esm/src/operations/deletedAccounts.js +0 -1
  133. package/dist-esm/src/operations/deletedAccounts.js.map +1 -1
  134. package/dist-esm/src/operations/deployments.js +0 -1
  135. package/dist-esm/src/operations/deployments.js.map +1 -1
  136. package/dist-esm/src/operations/operations.js +0 -1
  137. package/dist-esm/src/operations/operations.js.map +1 -1
  138. package/dist-esm/src/operations/resourceSkus.js +0 -1
  139. package/dist-esm/src/operations/resourceSkus.js.map +1 -1
  140. package/dist-esm/src/operationsInterfaces/commitmentPlans.d.ts +132 -1
  141. package/dist-esm/src/operationsInterfaces/commitmentPlans.d.ts.map +1 -1
  142. package/dist-esm/src/pagingHelper.d.ts +4 -4
  143. package/dist-esm/src/pagingHelper.js +4 -4
  144. package/dist-esm/test/cognitiveservices_examples.d.ts.map +1 -1
  145. package/dist-esm/test/cognitiveservices_examples.js +19 -0
  146. package/dist-esm/test/cognitiveservices_examples.js.map +1 -1
  147. package/package.json +8 -7
  148. package/review/arm-cognitiveservices.api.md +220 -0
  149. package/src/cognitiveServicesManagementClient.ts +2 -2
  150. package/src/models/index.ts +287 -0
  151. package/src/models/mappers.ts +283 -0
  152. package/src/models/parameters.ts +42 -2
  153. package/src/operations/accounts.ts +0 -3
  154. package/src/operations/commitmentPlans.ts +1222 -47
  155. package/src/operations/commitmentTiers.ts +0 -1
  156. package/src/operations/deletedAccounts.ts +0 -1
  157. package/src/operations/deployments.ts +0 -1
  158. package/src/operations/operations.ts +0 -1
  159. package/src/operations/resourceSkus.ts +0 -1
  160. package/src/operationsInterfaces/commitmentPlans.ts +232 -1
  161. package/src/pagingHelper.ts +4 -4
  162. package/types/arm-cognitiveservices.d.ts +423 -4
  163. package/types/tsdoc-metadata.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"accountsListByResourceGroupSample.js","sourceRoot":"","sources":["../../samples-dev/accountsListByResourceGroupSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,iCAAiC,EAAE,MAAM,8BAA8B,CAAC;AACjF,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,2BAA2B;;;QACxC,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,iBAAiB,GAAG,iBAAiB,CAAC;QAC5C,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,iCAAiC,CAClD,UAAU,EACV,cAAc,CACf,CAAC;QACF,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;;YAC7B,KAAuB,IAAA,KAAA,cAAA,MAAM,CAAC,QAAQ,CAAC,mBAAmB,CACxD,iBAAiB,CAClB,CAAA,IAAA;gBAFU,IAAI,IAAI,WAAA,CAAA;gBAGjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACrB;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;;CACvB;AAED,2BAA2B,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
1
+ {"version":3,"file":"accountsListByResourceGroupSample.js","sourceRoot":"","sources":["../../samples-dev/accountsListByResourceGroupSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,iCAAiC,EAAE,MAAM,8BAA8B,CAAC;AACjF,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,2BAA2B;;;QACxC,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,mCAAmC,CAAC;YAChD,sCAAsC,CAAC;QACzC,MAAM,iBAAiB,GACrB,OAAO,CAAC,GAAG,CAAC,kCAAkC,CAAC,IAAI,iBAAiB,CAAC;QACvE,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,iCAAiC,CAClD,UAAU,EACV,cAAc,CACf,CAAC;QACF,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;;YAC7B,KAAuB,IAAA,KAAA,cAAA,MAAM,CAAC,QAAQ,CAAC,mBAAmB,CACxD,iBAAiB,CAClB,CAAA,IAAA;gBAFU,IAAI,IAAI,WAAA,CAAA;gBAGjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACrB;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;;CACvB;AAED,SAAe,IAAI;;QACjB,2BAA2B,EAAE,CAAC;IAChC,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -10,16 +10,19 @@ import { __awaiter } from "tslib";
10
10
  // Licensed under the MIT License.
11
11
  import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices";
12
12
  import { DefaultAzureCredential } from "@azure/identity";
13
+ import * as dotenv from "dotenv";
14
+ dotenv.config();
13
15
  /**
14
16
  * This sample demonstrates how to Lists the account keys for the specified Cognitive Services account.
15
17
  *
16
18
  * @summary Lists the account keys for the specified Cognitive Services account.
17
- * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-10-01/examples/ListKeys.json
19
+ * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-12-01/examples/ListKeys.json
18
20
  */
19
21
  function listKeys() {
20
22
  return __awaiter(this, void 0, void 0, function* () {
21
- const subscriptionId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";
22
- const resourceGroupName = "myResourceGroup";
23
+ const subscriptionId = process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] ||
24
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";
25
+ const resourceGroupName = process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "myResourceGroup";
23
26
  const accountName = "myAccount";
24
27
  const credential = new DefaultAzureCredential();
25
28
  const client = new CognitiveServicesManagementClient(credential, subscriptionId);
@@ -27,5 +30,10 @@ function listKeys() {
27
30
  console.log(result);
28
31
  });
29
32
  }
30
- listKeys().catch(console.error);
33
+ function main() {
34
+ return __awaiter(this, void 0, void 0, function* () {
35
+ listKeys();
36
+ });
37
+ }
38
+ main().catch(console.error);
31
39
  //# sourceMappingURL=accountsListKeysSample.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"accountsListKeysSample.js","sourceRoot":"","sources":["../../samples-dev/accountsListKeysSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,iCAAiC,EAAE,MAAM,8BAA8B,CAAC;AACjF,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,QAAQ;;QACrB,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,iBAAiB,GAAG,iBAAiB,CAAC;QAC5C,MAAM,WAAW,GAAG,WAAW,CAAC;QAChC,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,iCAAiC,CAClD,UAAU,EACV,cAAc,CACf,CAAC;QACF,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,iBAAiB,EAAE,WAAW,CAAC,CAAC;QAC9E,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,QAAQ,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
1
+ {"version":3,"file":"accountsListKeysSample.js","sourceRoot":"","sources":["../../samples-dev/accountsListKeysSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,iCAAiC,EAAE,MAAM,8BAA8B,CAAC;AACjF,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,QAAQ;;QACrB,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,mCAAmC,CAAC;YAChD,sCAAsC,CAAC;QACzC,MAAM,iBAAiB,GACrB,OAAO,CAAC,GAAG,CAAC,kCAAkC,CAAC,IAAI,iBAAiB,CAAC;QACvE,MAAM,WAAW,GAAG,WAAW,CAAC;QAChC,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,iCAAiC,CAClD,UAAU,EACV,cAAc,CACf,CAAC;QACF,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,iBAAiB,EAAE,WAAW,CAAC,CAAC;QAC9E,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,SAAe,IAAI;;QACjB,QAAQ,EAAE,CAAC;IACb,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -10,17 +10,19 @@ import { __asyncValues, __awaiter } from "tslib";
10
10
  // Licensed under the MIT License.
11
11
  import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices";
12
12
  import { DefaultAzureCredential } from "@azure/identity";
13
+ import * as dotenv from "dotenv";
14
+ dotenv.config();
13
15
  /**
14
16
  * This sample demonstrates how to List available Models for the requested Cognitive Services account
15
17
  *
16
18
  * @summary List available Models for the requested Cognitive Services account
17
- * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-10-01/examples/ListAccountModels.json
19
+ * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-12-01/examples/ListAccountModels.json
18
20
  */
19
21
  function listAccountModels() {
20
22
  var e_1, _a;
21
23
  return __awaiter(this, void 0, void 0, function* () {
22
- const subscriptionId = "subscriptionId";
23
- const resourceGroupName = "resourceGroupName";
24
+ const subscriptionId = process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || "subscriptionId";
25
+ const resourceGroupName = process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName";
24
26
  const accountName = "accountName";
25
27
  const credential = new DefaultAzureCredential();
26
28
  const client = new CognitiveServicesManagementClient(credential, subscriptionId);
@@ -41,5 +43,10 @@ function listAccountModels() {
41
43
  console.log(resArray);
42
44
  });
43
45
  }
44
- listAccountModels().catch(console.error);
46
+ function main() {
47
+ return __awaiter(this, void 0, void 0, function* () {
48
+ listAccountModels();
49
+ });
50
+ }
51
+ main().catch(console.error);
45
52
  //# sourceMappingURL=accountsListModelsSample.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"accountsListModelsSample.js","sourceRoot":"","sources":["../../samples-dev/accountsListModelsSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,iCAAiC,EAAE,MAAM,8BAA8B,CAAC;AACjF,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,iBAAiB;;;QAC9B,MAAM,cAAc,GAAG,gBAAgB,CAAC;QACxC,MAAM,iBAAiB,GAAG,mBAAmB,CAAC;QAC9C,MAAM,WAAW,GAAG,aAAa,CAAC;QAClC,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,iCAAiC,CAClD,UAAU,EACV,cAAc,CACf,CAAC;QACF,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;;YAC7B,KAAuB,IAAA,KAAA,cAAA,MAAM,CAAC,QAAQ,CAAC,UAAU,CAC/C,iBAAiB,EACjB,WAAW,CACZ,CAAA,IAAA;gBAHU,IAAI,IAAI,WAAA,CAAA;gBAIjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACrB;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;;CACvB;AAED,iBAAiB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
1
+ {"version":3,"file":"accountsListModelsSample.js","sourceRoot":"","sources":["../../samples-dev/accountsListModelsSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,iCAAiC,EAAE,MAAM,8BAA8B,CAAC;AACjF,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,iBAAiB;;;QAC9B,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,mCAAmC,CAAC,IAAI,gBAAgB,CAAC;QACvE,MAAM,iBAAiB,GACrB,OAAO,CAAC,GAAG,CAAC,kCAAkC,CAAC,IAAI,mBAAmB,CAAC;QACzE,MAAM,WAAW,GAAG,aAAa,CAAC;QAClC,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,iCAAiC,CAClD,UAAU,EACV,cAAc,CACf,CAAC;QACF,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;;YAC7B,KAAuB,IAAA,KAAA,cAAA,MAAM,CAAC,QAAQ,CAAC,UAAU,CAC/C,iBAAiB,EACjB,WAAW,CACZ,CAAA,IAAA;gBAHU,IAAI,IAAI,WAAA,CAAA;gBAIjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACrB;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;;CACvB;AAED,SAAe,IAAI;;QACjB,iBAAiB,EAAE,CAAC;IACtB,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -10,16 +10,19 @@ import { __asyncValues, __awaiter } from "tslib";
10
10
  // Licensed under the MIT License.
11
11
  import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices";
12
12
  import { DefaultAzureCredential } from "@azure/identity";
13
+ import * as dotenv from "dotenv";
14
+ dotenv.config();
13
15
  /**
14
16
  * This sample demonstrates how to Returns all the resources of a particular type belonging to a subscription.
15
17
  *
16
18
  * @summary Returns all the resources of a particular type belonging to a subscription.
17
- * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-10-01/examples/ListAccountsBySubscription.json
19
+ * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-12-01/examples/ListAccountsBySubscription.json
18
20
  */
19
21
  function listAccountsBySubscription() {
20
22
  var e_1, _a;
21
23
  return __awaiter(this, void 0, void 0, function* () {
22
- const subscriptionId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";
24
+ const subscriptionId = process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] ||
25
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";
23
26
  const credential = new DefaultAzureCredential();
24
27
  const client = new CognitiveServicesManagementClient(credential, subscriptionId);
25
28
  const resArray = new Array();
@@ -39,5 +42,10 @@ function listAccountsBySubscription() {
39
42
  console.log(resArray);
40
43
  });
41
44
  }
42
- listAccountsBySubscription().catch(console.error);
45
+ function main() {
46
+ return __awaiter(this, void 0, void 0, function* () {
47
+ listAccountsBySubscription();
48
+ });
49
+ }
50
+ main().catch(console.error);
43
51
  //# sourceMappingURL=accountsListSample.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"accountsListSample.js","sourceRoot":"","sources":["../../samples-dev/accountsListSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,iCAAiC,EAAE,MAAM,8BAA8B,CAAC;AACjF,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,0BAA0B;;;QACvC,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,iCAAiC,CAClD,UAAU,EACV,cAAc,CACf,CAAC;QACF,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;;YAC7B,KAAuB,IAAA,KAAA,cAAA,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAA,IAAA;gBAAlC,IAAI,IAAI,WAAA,CAAA;gBACjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACrB;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;;CACvB;AAED,0BAA0B,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
1
+ {"version":3,"file":"accountsListSample.js","sourceRoot":"","sources":["../../samples-dev/accountsListSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,iCAAiC,EAAE,MAAM,8BAA8B,CAAC;AACjF,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,0BAA0B;;;QACvC,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,mCAAmC,CAAC;YAChD,sCAAsC,CAAC;QACzC,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,iCAAiC,CAClD,UAAU,EACV,cAAc,CACf,CAAC;QACF,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;;YAC7B,KAAuB,IAAA,KAAA,cAAA,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAA,IAAA;gBAAlC,IAAI,IAAI,WAAA,CAAA;gBACjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACrB;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;;CACvB;AAED,SAAe,IAAI;;QACjB,0BAA0B,EAAE,CAAC;IAC/B,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -10,16 +10,19 @@ import { __awaiter } from "tslib";
10
10
  // Licensed under the MIT License.
11
11
  import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices";
12
12
  import { DefaultAzureCredential } from "@azure/identity";
13
+ import * as dotenv from "dotenv";
14
+ dotenv.config();
13
15
  /**
14
16
  * This sample demonstrates how to List available SKUs for the requested Cognitive Services account
15
17
  *
16
18
  * @summary List available SKUs for the requested Cognitive Services account
17
- * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-10-01/examples/ListSkus.json
19
+ * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-12-01/examples/ListSkus.json
18
20
  */
19
21
  function listSkUs() {
20
22
  return __awaiter(this, void 0, void 0, function* () {
21
- const subscriptionId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";
22
- const resourceGroupName = "myResourceGroup";
23
+ const subscriptionId = process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] ||
24
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";
25
+ const resourceGroupName = process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "myResourceGroup";
23
26
  const accountName = "myAccount";
24
27
  const credential = new DefaultAzureCredential();
25
28
  const client = new CognitiveServicesManagementClient(credential, subscriptionId);
@@ -27,5 +30,10 @@ function listSkUs() {
27
30
  console.log(result);
28
31
  });
29
32
  }
30
- listSkUs().catch(console.error);
33
+ function main() {
34
+ return __awaiter(this, void 0, void 0, function* () {
35
+ listSkUs();
36
+ });
37
+ }
38
+ main().catch(console.error);
31
39
  //# sourceMappingURL=accountsListSkusSample.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"accountsListSkusSample.js","sourceRoot":"","sources":["../../samples-dev/accountsListSkusSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,iCAAiC,EAAE,MAAM,8BAA8B,CAAC;AACjF,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,QAAQ;;QACrB,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,iBAAiB,GAAG,iBAAiB,CAAC;QAC5C,MAAM,WAAW,GAAG,WAAW,CAAC;QAChC,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,iCAAiC,CAClD,UAAU,EACV,cAAc,CACf,CAAC;QACF,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,iBAAiB,EAAE,WAAW,CAAC,CAAC;QAC9E,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,QAAQ,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
1
+ {"version":3,"file":"accountsListSkusSample.js","sourceRoot":"","sources":["../../samples-dev/accountsListSkusSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,iCAAiC,EAAE,MAAM,8BAA8B,CAAC;AACjF,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,QAAQ;;QACrB,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,mCAAmC,CAAC;YAChD,sCAAsC,CAAC;QACzC,MAAM,iBAAiB,GACrB,OAAO,CAAC,GAAG,CAAC,kCAAkC,CAAC,IAAI,iBAAiB,CAAC;QACvE,MAAM,WAAW,GAAG,WAAW,CAAC;QAChC,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,iCAAiC,CAClD,UAAU,EACV,cAAc,CACf,CAAC;QACF,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,iBAAiB,EAAE,WAAW,CAAC,CAAC;QAC9E,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,SAAe,IAAI;;QACjB,QAAQ,EAAE,CAAC;IACb,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -10,16 +10,19 @@ import { __awaiter } from "tslib";
10
10
  // Licensed under the MIT License.
11
11
  import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices";
12
12
  import { DefaultAzureCredential } from "@azure/identity";
13
+ import * as dotenv from "dotenv";
14
+ dotenv.config();
13
15
  /**
14
16
  * This sample demonstrates how to Get usages for the requested Cognitive Services account
15
17
  *
16
18
  * @summary Get usages for the requested Cognitive Services account
17
- * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-10-01/examples/GetUsages.json
19
+ * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-12-01/examples/GetUsages.json
18
20
  */
19
21
  function getUsages() {
20
22
  return __awaiter(this, void 0, void 0, function* () {
21
- const subscriptionId = "5a4f5c2e-6983-4ccb-bd34-2196d5b5bbd3";
22
- const resourceGroupName = "myResourceGroup";
23
+ const subscriptionId = process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] ||
24
+ "5a4f5c2e-6983-4ccb-bd34-2196d5b5bbd3";
25
+ const resourceGroupName = process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "myResourceGroup";
23
26
  const accountName = "TestUsage02";
24
27
  const credential = new DefaultAzureCredential();
25
28
  const client = new CognitiveServicesManagementClient(credential, subscriptionId);
@@ -27,5 +30,10 @@ function getUsages() {
27
30
  console.log(result);
28
31
  });
29
32
  }
30
- getUsages().catch(console.error);
33
+ function main() {
34
+ return __awaiter(this, void 0, void 0, function* () {
35
+ getUsages();
36
+ });
37
+ }
38
+ main().catch(console.error);
31
39
  //# sourceMappingURL=accountsListUsagesSample.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"accountsListUsagesSample.js","sourceRoot":"","sources":["../../samples-dev/accountsListUsagesSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,iCAAiC,EAAE,MAAM,8BAA8B,CAAC;AACjF,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,SAAS;;QACtB,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,iBAAiB,GAAG,iBAAiB,CAAC;QAC5C,MAAM,WAAW,GAAG,aAAa,CAAC;QAClC,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,iCAAiC,CAClD,UAAU,EACV,cAAc,CACf,CAAC;QACF,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,UAAU,CAC7C,iBAAiB,EACjB,WAAW,CACZ,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,SAAS,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
1
+ {"version":3,"file":"accountsListUsagesSample.js","sourceRoot":"","sources":["../../samples-dev/accountsListUsagesSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,iCAAiC,EAAE,MAAM,8BAA8B,CAAC;AACjF,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,SAAS;;QACtB,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,mCAAmC,CAAC;YAChD,sCAAsC,CAAC;QACzC,MAAM,iBAAiB,GACrB,OAAO,CAAC,GAAG,CAAC,kCAAkC,CAAC,IAAI,iBAAiB,CAAC;QACvE,MAAM,WAAW,GAAG,aAAa,CAAC;QAClC,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,iCAAiC,CAClD,UAAU,EACV,cAAc,CACf,CAAC;QACF,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,UAAU,CAC7C,iBAAiB,EACjB,WAAW,CACZ,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,SAAe,IAAI;;QACjB,SAAS,EAAE,CAAC;IACd,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -10,16 +10,19 @@ import { __awaiter } from "tslib";
10
10
  // Licensed under the MIT License.
11
11
  import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices";
12
12
  import { DefaultAzureCredential } from "@azure/identity";
13
+ import * as dotenv from "dotenv";
14
+ dotenv.config();
13
15
  /**
14
16
  * This sample demonstrates how to Regenerates the specified account key for the specified Cognitive Services account.
15
17
  *
16
18
  * @summary Regenerates the specified account key for the specified Cognitive Services account.
17
- * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-10-01/examples/RegenerateKey.json
19
+ * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-12-01/examples/RegenerateKey.json
18
20
  */
19
21
  function regenerateKeys() {
20
22
  return __awaiter(this, void 0, void 0, function* () {
21
- const subscriptionId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";
22
- const resourceGroupName = "myResourceGroup";
23
+ const subscriptionId = process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] ||
24
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";
25
+ const resourceGroupName = process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "myResourceGroup";
23
26
  const accountName = "myAccount";
24
27
  const keyName = "Key2";
25
28
  const credential = new DefaultAzureCredential();
@@ -28,5 +31,10 @@ function regenerateKeys() {
28
31
  console.log(result);
29
32
  });
30
33
  }
31
- regenerateKeys().catch(console.error);
34
+ function main() {
35
+ return __awaiter(this, void 0, void 0, function* () {
36
+ regenerateKeys();
37
+ });
38
+ }
39
+ main().catch(console.error);
32
40
  //# sourceMappingURL=accountsRegenerateKeySample.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"accountsRegenerateKeySample.js","sourceRoot":"","sources":["../../samples-dev/accountsRegenerateKeySample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,iCAAiC,EAAE,MAAM,8BAA8B,CAAC;AACjF,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,cAAc;;QAC3B,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,iBAAiB,GAAG,iBAAiB,CAAC;QAC5C,MAAM,WAAW,GAAG,WAAW,CAAC;QAChC,MAAM,OAAO,GAAG,MAAM,CAAC;QACvB,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,iCAAiC,CAClD,UAAU,EACV,cAAc,CACf,CAAC;QACF,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,aAAa,CAChD,iBAAiB,EACjB,WAAW,EACX,OAAO,CACR,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,cAAc,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
1
+ {"version":3,"file":"accountsRegenerateKeySample.js","sourceRoot":"","sources":["../../samples-dev/accountsRegenerateKeySample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,iCAAiC,EAAE,MAAM,8BAA8B,CAAC;AACjF,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,cAAc;;QAC3B,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,mCAAmC,CAAC;YAChD,sCAAsC,CAAC;QACzC,MAAM,iBAAiB,GACrB,OAAO,CAAC,GAAG,CAAC,kCAAkC,CAAC,IAAI,iBAAiB,CAAC;QACvE,MAAM,WAAW,GAAG,WAAW,CAAC;QAChC,MAAM,OAAO,GAAG,MAAM,CAAC;QACvB,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,iCAAiC,CAClD,UAAU,EACV,cAAc,CACf,CAAC;QACF,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,aAAa,CAChD,iBAAiB,EACjB,WAAW,EACX,OAAO,CACR,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,SAAe,IAAI;;QACjB,cAAc,EAAE,CAAC;IACnB,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -10,16 +10,19 @@ import { __awaiter } from "tslib";
10
10
  // Licensed under the MIT License.
11
11
  import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices";
12
12
  import { DefaultAzureCredential } from "@azure/identity";
13
+ import * as dotenv from "dotenv";
14
+ dotenv.config();
13
15
  /**
14
16
  * This sample demonstrates how to Updates a Cognitive Services account
15
17
  *
16
18
  * @summary Updates a Cognitive Services account
17
- * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-10-01/examples/UpdateAccount.json
19
+ * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-12-01/examples/UpdateAccount.json
18
20
  */
19
21
  function updateAccount() {
20
22
  return __awaiter(this, void 0, void 0, function* () {
21
- const subscriptionId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";
22
- const resourceGroupName = "bvttest";
23
+ const subscriptionId = process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] ||
24
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";
25
+ const resourceGroupName = process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "bvttest";
23
26
  const accountName = "bingSearch";
24
27
  const account = { location: "global", sku: { name: "S2" } };
25
28
  const credential = new DefaultAzureCredential();
@@ -28,5 +31,10 @@ function updateAccount() {
28
31
  console.log(result);
29
32
  });
30
33
  }
31
- updateAccount().catch(console.error);
34
+ function main() {
35
+ return __awaiter(this, void 0, void 0, function* () {
36
+ updateAccount();
37
+ });
38
+ }
39
+ main().catch(console.error);
32
40
  //# sourceMappingURL=accountsUpdateSample.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"accountsUpdateSample.js","sourceRoot":"","sources":["../../samples-dev/accountsUpdateSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAEL,iCAAiC,EAClC,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,aAAa;;QAC1B,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,iBAAiB,GAAG,SAAS,CAAC;QACpC,MAAM,WAAW,GAAG,YAAY,CAAC;QACjC,MAAM,OAAO,GAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC;QACrE,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,iCAAiC,CAClD,UAAU,EACV,cAAc,CACf,CAAC;QACF,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,kBAAkB,CACrD,iBAAiB,EACjB,WAAW,EACX,OAAO,CACR,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,aAAa,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
1
+ {"version":3,"file":"accountsUpdateSample.js","sourceRoot":"","sources":["../../samples-dev/accountsUpdateSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAEL,iCAAiC,EAClC,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,aAAa;;QAC1B,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,mCAAmC,CAAC;YAChD,sCAAsC,CAAC;QACzC,MAAM,iBAAiB,GACrB,OAAO,CAAC,GAAG,CAAC,kCAAkC,CAAC,IAAI,SAAS,CAAC;QAC/D,MAAM,WAAW,GAAG,YAAY,CAAC;QACjC,MAAM,OAAO,GAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC;QACrE,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,iCAAiC,CAClD,UAAU,EACV,cAAc,CACf,CAAC;QACF,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,kBAAkB,CACrD,iBAAiB,EACjB,WAAW,EACX,OAAO,CACR,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,SAAe,IAAI;;QACjB,aAAa,EAAE,CAAC;IAClB,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -10,15 +10,18 @@ import { __awaiter } from "tslib";
10
10
  // Licensed under the MIT License.
11
11
  import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices";
12
12
  import { DefaultAzureCredential } from "@azure/identity";
13
+ import * as dotenv from "dotenv";
14
+ dotenv.config();
13
15
  /**
14
16
  * This sample demonstrates how to Check whether a domain is available.
15
17
  *
16
18
  * @summary Check whether a domain is available.
17
- * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-10-01/examples/CheckDomainAvailability.json
19
+ * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-12-01/examples/CheckDomainAvailability.json
18
20
  */
19
21
  function checkSkuAvailability() {
20
22
  return __awaiter(this, void 0, void 0, function* () {
21
- const subscriptionId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";
23
+ const subscriptionId = process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] ||
24
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";
22
25
  const subdomainName = "contosodemoapp1";
23
26
  const typeParam = "Microsoft.CognitiveServices/accounts";
24
27
  const credential = new DefaultAzureCredential();
@@ -27,5 +30,10 @@ function checkSkuAvailability() {
27
30
  console.log(result);
28
31
  });
29
32
  }
30
- checkSkuAvailability().catch(console.error);
33
+ function main() {
34
+ return __awaiter(this, void 0, void 0, function* () {
35
+ checkSkuAvailability();
36
+ });
37
+ }
38
+ main().catch(console.error);
31
39
  //# sourceMappingURL=checkDomainAvailabilitySample.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"checkDomainAvailabilitySample.js","sourceRoot":"","sources":["../../samples-dev/checkDomainAvailabilitySample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,iCAAiC,EAAE,MAAM,8BAA8B,CAAC;AACjF,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,oBAAoB;;QACjC,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,aAAa,GAAG,iBAAiB,CAAC;QACxC,MAAM,SAAS,GAAG,sCAAsC,CAAC;QACzD,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,iCAAiC,CAClD,UAAU,EACV,cAAc,CACf,CAAC;QACF,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,uBAAuB,CAAC,aAAa,EAAE,SAAS,CAAC,CAAC;QAC9E,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,oBAAoB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
1
+ {"version":3,"file":"checkDomainAvailabilitySample.js","sourceRoot":"","sources":["../../samples-dev/checkDomainAvailabilitySample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,iCAAiC,EAAE,MAAM,8BAA8B,CAAC;AACjF,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,oBAAoB;;QACjC,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,mCAAmC,CAAC;YAChD,sCAAsC,CAAC;QACzC,MAAM,aAAa,GAAG,iBAAiB,CAAC;QACxC,MAAM,SAAS,GAAG,sCAAsC,CAAC;QACzD,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,iCAAiC,CAClD,UAAU,EACV,cAAc,CACf,CAAC;QACF,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,uBAAuB,CAAC,aAAa,EAAE,SAAS,CAAC,CAAC;QAC9E,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,SAAe,IAAI;;QACjB,oBAAoB,EAAE,CAAC;IACzB,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -10,15 +10,18 @@ import { __awaiter } from "tslib";
10
10
  // Licensed under the MIT License.
11
11
  import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices";
12
12
  import { DefaultAzureCredential } from "@azure/identity";
13
+ import * as dotenv from "dotenv";
14
+ dotenv.config();
13
15
  /**
14
16
  * This sample demonstrates how to Check available SKUs.
15
17
  *
16
18
  * @summary Check available SKUs.
17
- * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-10-01/examples/CheckSkuAvailability.json
19
+ * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-12-01/examples/CheckSkuAvailability.json
18
20
  */
19
21
  function checkSkuAvailability() {
20
22
  return __awaiter(this, void 0, void 0, function* () {
21
- const subscriptionId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";
23
+ const subscriptionId = process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] ||
24
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";
22
25
  const location = "westus";
23
26
  const skus = ["S0"];
24
27
  const kind = "Face";
@@ -29,5 +32,10 @@ function checkSkuAvailability() {
29
32
  console.log(result);
30
33
  });
31
34
  }
32
- checkSkuAvailability().catch(console.error);
35
+ function main() {
36
+ return __awaiter(this, void 0, void 0, function* () {
37
+ checkSkuAvailability();
38
+ });
39
+ }
40
+ main().catch(console.error);
33
41
  //# sourceMappingURL=checkSkuAvailabilitySample.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"checkSkuAvailabilitySample.js","sourceRoot":"","sources":["../../samples-dev/checkSkuAvailabilitySample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,iCAAiC,EAAE,MAAM,8BAA8B,CAAC;AACjF,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,oBAAoB;;QACjC,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,QAAQ,GAAG,QAAQ,CAAC;QAC1B,MAAM,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC;QACpB,MAAM,IAAI,GAAG,MAAM,CAAC;QACpB,MAAM,SAAS,GAAG,sCAAsC,CAAC;QACzD,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,iCAAiC,CAClD,UAAU,EACV,cAAc,CACf,CAAC;QACF,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,oBAAoB,CAC9C,QAAQ,EACR,IAAI,EACJ,IAAI,EACJ,SAAS,CACV,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,oBAAoB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
1
+ {"version":3,"file":"checkSkuAvailabilitySample.js","sourceRoot":"","sources":["../../samples-dev/checkSkuAvailabilitySample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,iCAAiC,EAAE,MAAM,8BAA8B,CAAC;AACjF,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,oBAAoB;;QACjC,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,mCAAmC,CAAC;YAChD,sCAAsC,CAAC;QACzC,MAAM,QAAQ,GAAG,QAAQ,CAAC;QAC1B,MAAM,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC;QACpB,MAAM,IAAI,GAAG,MAAM,CAAC;QACpB,MAAM,SAAS,GAAG,sCAAsC,CAAC;QACzD,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,iCAAiC,CAClD,UAAU,EACV,cAAc,CACf,CAAC;QACF,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,oBAAoB,CAC9C,QAAQ,EACR,IAAI,EACJ,IAAI,EACJ,SAAS,CACV,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,SAAe,IAAI;;QACjB,oBAAoB,EAAE,CAAC;IACzB,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=commitmentPlansCreateOrUpdateAssociationSample.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commitmentPlansCreateOrUpdateAssociationSample.d.ts","sourceRoot":"","sources":["../../samples-dev/commitmentPlansCreateOrUpdateAssociationSample.ts"],"names":[],"mappings":""}
@@ -0,0 +1,43 @@
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 { __awaiter } from "tslib";
9
+ // Copyright (c) Microsoft Corporation.
10
+ // Licensed under the MIT License.
11
+ import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices";
12
+ import { DefaultAzureCredential } from "@azure/identity";
13
+ import * as dotenv from "dotenv";
14
+ dotenv.config();
15
+ /**
16
+ * This sample demonstrates how to Create or update the association of the Cognitive Services commitment plan.
17
+ *
18
+ * @summary Create or update the association of the Cognitive Services commitment plan.
19
+ * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-12-01/examples/CreateSharedCommitmentPlanAssociation.json
20
+ */
21
+ function putCommitmentPlan() {
22
+ return __awaiter(this, void 0, void 0, function* () {
23
+ const subscriptionId = process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] ||
24
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";
25
+ const resourceGroupName = process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName";
26
+ const commitmentPlanName = "commitmentPlanName";
27
+ const commitmentPlanAssociationName = "commitmentPlanAssociationName";
28
+ const association = {
29
+ accountId: "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.CognitiveServices/accounts/accountName"
30
+ };
31
+ const credential = new DefaultAzureCredential();
32
+ const client = new CognitiveServicesManagementClient(credential, subscriptionId);
33
+ const result = yield client.commitmentPlans.beginCreateOrUpdateAssociationAndWait(resourceGroupName, commitmentPlanName, commitmentPlanAssociationName, association);
34
+ console.log(result);
35
+ });
36
+ }
37
+ function main() {
38
+ return __awaiter(this, void 0, void 0, function* () {
39
+ putCommitmentPlan();
40
+ });
41
+ }
42
+ main().catch(console.error);
43
+ //# sourceMappingURL=commitmentPlansCreateOrUpdateAssociationSample.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commitmentPlansCreateOrUpdateAssociationSample.js","sourceRoot":"","sources":["../../samples-dev/commitmentPlansCreateOrUpdateAssociationSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAEL,iCAAiC,EAClC,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,iBAAiB;;QAC9B,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,mCAAmC,CAAC;YAChD,sCAAsC,CAAC;QACzC,MAAM,iBAAiB,GACrB,OAAO,CAAC,GAAG,CAAC,kCAAkC,CAAC,IAAI,mBAAmB,CAAC;QACzE,MAAM,kBAAkB,GAAG,oBAAoB,CAAC;QAChD,MAAM,6BAA6B,GAAG,+BAA+B,CAAC;QACtE,MAAM,WAAW,GAAqC;YACpD,SAAS,EACP,2HAA2H;SAC9H,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,iCAAiC,CAClD,UAAU,EACV,cAAc,CACf,CAAC;QACF,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,eAAe,CAAC,qCAAqC,CAC/E,iBAAiB,EACjB,kBAAkB,EAClB,6BAA6B,EAC7B,WAAW,CACZ,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,SAAe,IAAI;;QACjB,iBAAiB,EAAE,CAAC;IACtB,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=commitmentPlansCreateOrUpdatePlanSample.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commitmentPlansCreateOrUpdatePlanSample.d.ts","sourceRoot":"","sources":["../../samples-dev/commitmentPlansCreateOrUpdatePlanSample.ts"],"names":[],"mappings":""}
@@ -0,0 +1,50 @@
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 { __awaiter } from "tslib";
9
+ // Copyright (c) Microsoft Corporation.
10
+ // Licensed under the MIT License.
11
+ import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices";
12
+ import { DefaultAzureCredential } from "@azure/identity";
13
+ import * as dotenv from "dotenv";
14
+ dotenv.config();
15
+ /**
16
+ * This sample demonstrates how to Create Cognitive Services commitment plan.
17
+ *
18
+ * @summary Create Cognitive Services commitment plan.
19
+ * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-12-01/examples/CreateSharedCommitmentPlan.json
20
+ */
21
+ function createCommitmentPlan() {
22
+ return __awaiter(this, void 0, void 0, function* () {
23
+ const subscriptionId = process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] ||
24
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";
25
+ const resourceGroupName = process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName";
26
+ const commitmentPlanName = "commitmentPlanName";
27
+ const commitmentPlan = {
28
+ kind: "SpeechServices",
29
+ location: "West US",
30
+ properties: {
31
+ autoRenew: true,
32
+ current: { tier: "T1" },
33
+ hostingModel: "Web",
34
+ planType: "STT"
35
+ },
36
+ sku: { name: "S0" }
37
+ };
38
+ const credential = new DefaultAzureCredential();
39
+ const client = new CognitiveServicesManagementClient(credential, subscriptionId);
40
+ const result = yield client.commitmentPlans.beginCreateOrUpdatePlanAndWait(resourceGroupName, commitmentPlanName, commitmentPlan);
41
+ console.log(result);
42
+ });
43
+ }
44
+ function main() {
45
+ return __awaiter(this, void 0, void 0, function* () {
46
+ createCommitmentPlan();
47
+ });
48
+ }
49
+ main().catch(console.error);
50
+ //# sourceMappingURL=commitmentPlansCreateOrUpdatePlanSample.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commitmentPlansCreateOrUpdatePlanSample.js","sourceRoot":"","sources":["../../samples-dev/commitmentPlansCreateOrUpdatePlanSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAEL,iCAAiC,EAClC,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,oBAAoB;;QACjC,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,mCAAmC,CAAC;YAChD,sCAAsC,CAAC;QACzC,MAAM,iBAAiB,GACrB,OAAO,CAAC,GAAG,CAAC,kCAAkC,CAAC,IAAI,mBAAmB,CAAC;QACzE,MAAM,kBAAkB,GAAG,oBAAoB,CAAC;QAChD,MAAM,cAAc,GAAmB;YACrC,IAAI,EAAE,gBAAgB;YACtB,QAAQ,EAAE,SAAS;YACnB,UAAU,EAAE;gBACV,SAAS,EAAE,IAAI;gBACf,OAAO,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE;gBACvB,YAAY,EAAE,KAAK;gBACnB,QAAQ,EAAE,KAAK;aAChB;YACD,GAAG,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE;SACpB,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,iCAAiC,CAClD,UAAU,EACV,cAAc,CACf,CAAC;QACF,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,eAAe,CAAC,8BAA8B,CACxE,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,CACf,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,SAAe,IAAI;;QACjB,oBAAoB,EAAE,CAAC;IACzB,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -10,16 +10,18 @@ import { __awaiter } from "tslib";
10
10
  // Licensed under the MIT License.
11
11
  import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices";
12
12
  import { DefaultAzureCredential } from "@azure/identity";
13
+ import * as dotenv from "dotenv";
14
+ dotenv.config();
13
15
  /**
14
16
  * This sample demonstrates how to Update the state of specified commitmentPlans associated with the Cognitive Services account.
15
17
  *
16
18
  * @summary Update the state of specified commitmentPlans associated with the Cognitive Services account.
17
- * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-10-01/examples/PutCommitmentPlan.json
19
+ * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-12-01/examples/PutCommitmentPlan.json
18
20
  */
19
21
  function putCommitmentPlan() {
20
22
  return __awaiter(this, void 0, void 0, function* () {
21
- const subscriptionId = "subscriptionId";
22
- const resourceGroupName = "resourceGroupName";
23
+ const subscriptionId = process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] || "subscriptionId";
24
+ const resourceGroupName = process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName";
23
25
  const accountName = "accountName";
24
26
  const commitmentPlanName = "commitmentPlanName";
25
27
  const commitmentPlan = {
@@ -36,5 +38,10 @@ function putCommitmentPlan() {
36
38
  console.log(result);
37
39
  });
38
40
  }
39
- putCommitmentPlan().catch(console.error);
41
+ function main() {
42
+ return __awaiter(this, void 0, void 0, function* () {
43
+ putCommitmentPlan();
44
+ });
45
+ }
46
+ main().catch(console.error);
40
47
  //# sourceMappingURL=commitmentPlansCreateOrUpdateSample.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"commitmentPlansCreateOrUpdateSample.js","sourceRoot":"","sources":["../../samples-dev/commitmentPlansCreateOrUpdateSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAEL,iCAAiC,EAClC,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,iBAAiB;;QAC9B,MAAM,cAAc,GAAG,gBAAgB,CAAC;QACxC,MAAM,iBAAiB,GAAG,mBAAmB,CAAC;QAC9C,MAAM,WAAW,GAAG,aAAa,CAAC;QAClC,MAAM,kBAAkB,GAAG,oBAAoB,CAAC;QAChD,MAAM,cAAc,GAAmB;YACrC,UAAU,EAAE;gBACV,SAAS,EAAE,IAAI;gBACf,OAAO,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE;gBACvB,YAAY,EAAE,KAAK;gBACnB,QAAQ,EAAE,aAAa;aACxB;SACF,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,iCAAiC,CAClD,UAAU,EACV,cAAc,CACf,CAAC;QACF,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,eAAe,CAAC,cAAc,CACxD,iBAAiB,EACjB,WAAW,EACX,kBAAkB,EAClB,cAAc,CACf,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,iBAAiB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
1
+ {"version":3,"file":"commitmentPlansCreateOrUpdateSample.js","sourceRoot":"","sources":["../../samples-dev/commitmentPlansCreateOrUpdateSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAEL,iCAAiC,EAClC,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,iBAAiB;;QAC9B,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,mCAAmC,CAAC,IAAI,gBAAgB,CAAC;QACvE,MAAM,iBAAiB,GACrB,OAAO,CAAC,GAAG,CAAC,kCAAkC,CAAC,IAAI,mBAAmB,CAAC;QACzE,MAAM,WAAW,GAAG,aAAa,CAAC;QAClC,MAAM,kBAAkB,GAAG,oBAAoB,CAAC;QAChD,MAAM,cAAc,GAAmB;YACrC,UAAU,EAAE;gBACV,SAAS,EAAE,IAAI;gBACf,OAAO,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE;gBACvB,YAAY,EAAE,KAAK;gBACnB,QAAQ,EAAE,aAAa;aACxB;SACF,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,iCAAiC,CAClD,UAAU,EACV,cAAc,CACf,CAAC;QACF,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,eAAe,CAAC,cAAc,CACxD,iBAAiB,EACjB,WAAW,EACX,kBAAkB,EAClB,cAAc,CACf,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,SAAe,IAAI;;QACjB,iBAAiB,EAAE,CAAC;IACtB,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=commitmentPlansDeleteAssociationSample.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commitmentPlansDeleteAssociationSample.d.ts","sourceRoot":"","sources":["../../samples-dev/commitmentPlansDeleteAssociationSample.ts"],"names":[],"mappings":""}
@@ -0,0 +1,40 @@
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 { __awaiter } from "tslib";
9
+ // Copyright (c) Microsoft Corporation.
10
+ // Licensed under the MIT License.
11
+ import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices";
12
+ import { DefaultAzureCredential } from "@azure/identity";
13
+ import * as dotenv from "dotenv";
14
+ dotenv.config();
15
+ /**
16
+ * This sample demonstrates how to Deletes the association of the Cognitive Services commitment plan.
17
+ *
18
+ * @summary Deletes the association of the Cognitive Services commitment plan.
19
+ * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-12-01/examples/DeleteSharedCommitmentPlanAssociation.json
20
+ */
21
+ function deleteCommitmentPlan() {
22
+ return __awaiter(this, void 0, void 0, function* () {
23
+ const subscriptionId = process.env["COGNITIVESERVICES_SUBSCRIPTION_ID"] ||
24
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";
25
+ const resourceGroupName = process.env["COGNITIVESERVICES_RESOURCE_GROUP"] || "resourceGroupName";
26
+ const commitmentPlanName = "commitmentPlanName";
27
+ const commitmentPlanAssociationName = "commitmentPlanAssociationName";
28
+ const credential = new DefaultAzureCredential();
29
+ const client = new CognitiveServicesManagementClient(credential, subscriptionId);
30
+ const result = yield client.commitmentPlans.beginDeleteAssociationAndWait(resourceGroupName, commitmentPlanName, commitmentPlanAssociationName);
31
+ console.log(result);
32
+ });
33
+ }
34
+ function main() {
35
+ return __awaiter(this, void 0, void 0, function* () {
36
+ deleteCommitmentPlan();
37
+ });
38
+ }
39
+ main().catch(console.error);
40
+ //# sourceMappingURL=commitmentPlansDeleteAssociationSample.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commitmentPlansDeleteAssociationSample.js","sourceRoot":"","sources":["../../samples-dev/commitmentPlansDeleteAssociationSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,iCAAiC,EAAE,MAAM,8BAA8B,CAAC;AACjF,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,oBAAoB;;QACjC,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,mCAAmC,CAAC;YAChD,sCAAsC,CAAC;QACzC,MAAM,iBAAiB,GACrB,OAAO,CAAC,GAAG,CAAC,kCAAkC,CAAC,IAAI,mBAAmB,CAAC;QACzE,MAAM,kBAAkB,GAAG,oBAAoB,CAAC;QAChD,MAAM,6BAA6B,GAAG,+BAA+B,CAAC;QACtE,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,iCAAiC,CAClD,UAAU,EACV,cAAc,CACf,CAAC;QACF,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,eAAe,CAAC,6BAA6B,CACvE,iBAAiB,EACjB,kBAAkB,EAClB,6BAA6B,CAC9B,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,SAAe,IAAI;;QACjB,oBAAoB,EAAE,CAAC;IACzB,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=commitmentPlansDeletePlanSample.d.ts.map