@azure/arm-terraform 1.0.0-alpha.20250901.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/LICENSE +21 -0
- package/README.md +110 -0
- package/dist/browser/api/azureTerraformContext.d.ts +14 -0
- package/dist/browser/api/azureTerraformContext.d.ts.map +1 -0
- package/dist/browser/api/azureTerraformContext.js +38 -0
- package/dist/browser/api/azureTerraformContext.js.map +1 -0
- package/dist/browser/api/index.d.ts +5 -0
- package/dist/browser/api/index.d.ts.map +1 -0
- package/dist/browser/api/index.js +6 -0
- package/dist/browser/api/index.js.map +1 -0
- package/dist/browser/api/operations/index.d.ts +9 -0
- package/dist/browser/api/operations/index.d.ts.map +1 -0
- package/dist/browser/api/operations/index.js +22 -0
- package/dist/browser/api/operations/index.js.map +1 -0
- package/dist/browser/api/options.d.ts +10 -0
- package/dist/browser/api/options.d.ts.map +1 -0
- package/dist/browser/api/options.js +4 -0
- package/dist/browser/api/options.js.map +1 -0
- package/dist/browser/api/terraform/index.d.ts +9 -0
- package/dist/browser/api/terraform/index.d.ts.map +1 -0
- package/dist/browser/api/terraform/index.js +30 -0
- package/dist/browser/api/terraform/index.js.map +1 -0
- package/dist/browser/azureTerraformClient.d.ts +18 -0
- package/dist/browser/azureTerraformClient.d.ts.map +1 -0
- package/dist/browser/azureTerraformClient.js +29 -0
- package/dist/browser/azureTerraformClient.js.map +1 -0
- package/dist/browser/classic/index.d.ts +3 -0
- package/dist/browser/classic/index.d.ts.map +1 -0
- package/dist/browser/classic/index.js +4 -0
- package/dist/browser/classic/index.js.map +1 -0
- package/dist/browser/classic/operations/index.d.ts +14 -0
- package/dist/browser/classic/operations/index.d.ts.map +1 -0
- package/dist/browser/classic/operations/index.js +14 -0
- package/dist/browser/classic/operations/index.js.map +1 -0
- package/dist/browser/classic/terraform/index.d.ts +14 -0
- package/dist/browser/classic/terraform/index.d.ts.map +1 -0
- package/dist/browser/classic/terraform/index.js +14 -0
- package/dist/browser/classic/terraform/index.js.map +1 -0
- package/dist/browser/helpers/serializerHelpers.d.ts +3 -0
- package/dist/browser/helpers/serializerHelpers.d.ts.map +1 -0
- package/dist/browser/helpers/serializerHelpers.js +24 -0
- package/dist/browser/helpers/serializerHelpers.js.map +1 -0
- package/dist/browser/index.d.ts +8 -0
- package/dist/browser/index.d.ts.map +1 -0
- package/dist/browser/index.js +6 -0
- package/dist/browser/index.js.map +1 -0
- package/dist/browser/logger.d.ts +2 -0
- package/dist/browser/logger.d.ts.map +1 -0
- package/dist/browser/logger.js +5 -0
- package/dist/browser/logger.js.map +1 -0
- package/dist/browser/models/index.d.ts +2 -0
- package/dist/browser/models/index.d.ts.map +1 -0
- package/dist/browser/models/index.js +4 -0
- package/dist/browser/models/index.js.map +1 -0
- package/dist/browser/models/models.d.ts +232 -0
- package/dist/browser/models/models.d.ts.map +1 -0
- package/dist/browser/models/models.js +187 -0
- package/dist/browser/models/models.js.map +1 -0
- package/dist/browser/package.json +3 -0
- package/dist/browser/restorePollerHelpers.d.ts +21 -0
- package/dist/browser/restorePollerHelpers.d.ts.map +1 -0
- package/dist/browser/restorePollerHelpers.js +91 -0
- package/dist/browser/restorePollerHelpers.js.map +1 -0
- package/dist/browser/static-helpers/pagingHelpers.d.ts +72 -0
- package/dist/browser/static-helpers/pagingHelpers.d.ts.map +1 -0
- package/dist/browser/static-helpers/pagingHelpers.js +118 -0
- package/dist/browser/static-helpers/pagingHelpers.js.map +1 -0
- package/dist/browser/static-helpers/pollingHelpers.d.ts +30 -0
- package/dist/browser/static-helpers/pollingHelpers.d.ts.map +1 -0
- package/dist/browser/static-helpers/pollingHelpers.js +79 -0
- package/dist/browser/static-helpers/pollingHelpers.js.map +1 -0
- package/dist/commonjs/api/azureTerraformContext.d.ts +14 -0
- package/dist/commonjs/api/azureTerraformContext.d.ts.map +1 -0
- package/dist/commonjs/api/azureTerraformContext.js +41 -0
- package/dist/commonjs/api/azureTerraformContext.js.map +1 -0
- package/dist/commonjs/api/index.d.ts +5 -0
- package/dist/commonjs/api/index.d.ts.map +1 -0
- package/dist/commonjs/api/index.js +12 -0
- package/dist/commonjs/api/index.js.map +1 -0
- package/dist/commonjs/api/operations/index.d.ts +9 -0
- package/dist/commonjs/api/operations/index.d.ts.map +1 -0
- package/dist/commonjs/api/operations/index.js +27 -0
- package/dist/commonjs/api/operations/index.js.map +1 -0
- package/dist/commonjs/api/options.d.ts +10 -0
- package/dist/commonjs/api/options.d.ts.map +1 -0
- package/dist/commonjs/api/options.js +5 -0
- package/dist/commonjs/api/options.js.map +1 -0
- package/dist/commonjs/api/terraform/index.d.ts +9 -0
- package/dist/commonjs/api/terraform/index.d.ts.map +1 -0
- package/dist/commonjs/api/terraform/index.js +35 -0
- package/dist/commonjs/api/terraform/index.js.map +1 -0
- package/dist/commonjs/azureTerraformClient.d.ts +18 -0
- package/dist/commonjs/azureTerraformClient.d.ts.map +1 -0
- package/dist/commonjs/azureTerraformClient.js +33 -0
- package/dist/commonjs/azureTerraformClient.js.map +1 -0
- package/dist/commonjs/classic/index.d.ts +3 -0
- package/dist/commonjs/classic/index.d.ts.map +1 -0
- package/dist/commonjs/classic/index.js +5 -0
- package/dist/commonjs/classic/index.js.map +1 -0
- package/dist/commonjs/classic/operations/index.d.ts +14 -0
- package/dist/commonjs/classic/operations/index.d.ts.map +1 -0
- package/dist/commonjs/classic/operations/index.js +18 -0
- package/dist/commonjs/classic/operations/index.js.map +1 -0
- package/dist/commonjs/classic/terraform/index.d.ts +14 -0
- package/dist/commonjs/classic/terraform/index.d.ts.map +1 -0
- package/dist/commonjs/classic/terraform/index.js +18 -0
- package/dist/commonjs/classic/terraform/index.js.map +1 -0
- package/dist/commonjs/helpers/serializerHelpers.d.ts +3 -0
- package/dist/commonjs/helpers/serializerHelpers.d.ts.map +1 -0
- package/dist/commonjs/helpers/serializerHelpers.js +27 -0
- package/dist/commonjs/helpers/serializerHelpers.js.map +1 -0
- package/dist/commonjs/index.d.ts +8 -0
- package/dist/commonjs/index.d.ts.map +1 -0
- package/dist/commonjs/index.js +17 -0
- package/dist/commonjs/index.js.map +1 -0
- package/dist/commonjs/logger.d.ts +2 -0
- package/dist/commonjs/logger.d.ts.map +1 -0
- package/dist/commonjs/logger.js +8 -0
- package/dist/commonjs/logger.js.map +1 -0
- package/dist/commonjs/models/index.d.ts +2 -0
- package/dist/commonjs/models/index.d.ts.map +1 -0
- package/dist/commonjs/models/index.js +13 -0
- package/dist/commonjs/models/index.js.map +1 -0
- package/dist/commonjs/models/models.d.ts +232 -0
- package/dist/commonjs/models/models.d.ts.map +1 -0
- package/dist/commonjs/models/models.js +206 -0
- package/dist/commonjs/models/models.js.map +1 -0
- package/dist/commonjs/package.json +3 -0
- package/dist/commonjs/restorePollerHelpers.d.ts +21 -0
- package/dist/commonjs/restorePollerHelpers.d.ts.map +1 -0
- package/dist/commonjs/restorePollerHelpers.js +94 -0
- package/dist/commonjs/restorePollerHelpers.js.map +1 -0
- package/dist/commonjs/static-helpers/pagingHelpers.d.ts +72 -0
- package/dist/commonjs/static-helpers/pagingHelpers.d.ts.map +1 -0
- package/dist/commonjs/static-helpers/pagingHelpers.js +121 -0
- package/dist/commonjs/static-helpers/pagingHelpers.js.map +1 -0
- package/dist/commonjs/static-helpers/pollingHelpers.d.ts +30 -0
- package/dist/commonjs/static-helpers/pollingHelpers.d.ts.map +1 -0
- package/dist/commonjs/static-helpers/pollingHelpers.js +82 -0
- package/dist/commonjs/static-helpers/pollingHelpers.js.map +1 -0
- package/dist/commonjs/tsdoc-metadata.json +11 -0
- package/dist/esm/api/azureTerraformContext.d.ts +14 -0
- package/dist/esm/api/azureTerraformContext.d.ts.map +1 -0
- package/dist/esm/api/azureTerraformContext.js +38 -0
- package/dist/esm/api/azureTerraformContext.js.map +1 -0
- package/dist/esm/api/index.d.ts +5 -0
- package/dist/esm/api/index.d.ts.map +1 -0
- package/dist/esm/api/index.js +6 -0
- package/dist/esm/api/index.js.map +1 -0
- package/dist/esm/api/operations/index.d.ts +9 -0
- package/dist/esm/api/operations/index.d.ts.map +1 -0
- package/dist/esm/api/operations/index.js +22 -0
- package/dist/esm/api/operations/index.js.map +1 -0
- package/dist/esm/api/options.d.ts +10 -0
- package/dist/esm/api/options.d.ts.map +1 -0
- package/dist/esm/api/options.js +4 -0
- package/dist/esm/api/options.js.map +1 -0
- package/dist/esm/api/terraform/index.d.ts +9 -0
- package/dist/esm/api/terraform/index.d.ts.map +1 -0
- package/dist/esm/api/terraform/index.js +30 -0
- package/dist/esm/api/terraform/index.js.map +1 -0
- package/dist/esm/azureTerraformClient.d.ts +18 -0
- package/dist/esm/azureTerraformClient.d.ts.map +1 -0
- package/dist/esm/azureTerraformClient.js +29 -0
- package/dist/esm/azureTerraformClient.js.map +1 -0
- package/dist/esm/classic/index.d.ts +3 -0
- package/dist/esm/classic/index.d.ts.map +1 -0
- package/dist/esm/classic/index.js +4 -0
- package/dist/esm/classic/index.js.map +1 -0
- package/dist/esm/classic/operations/index.d.ts +14 -0
- package/dist/esm/classic/operations/index.d.ts.map +1 -0
- package/dist/esm/classic/operations/index.js +14 -0
- package/dist/esm/classic/operations/index.js.map +1 -0
- package/dist/esm/classic/terraform/index.d.ts +14 -0
- package/dist/esm/classic/terraform/index.d.ts.map +1 -0
- package/dist/esm/classic/terraform/index.js +14 -0
- package/dist/esm/classic/terraform/index.js.map +1 -0
- package/dist/esm/helpers/serializerHelpers.d.ts +3 -0
- package/dist/esm/helpers/serializerHelpers.d.ts.map +1 -0
- package/dist/esm/helpers/serializerHelpers.js +24 -0
- package/dist/esm/helpers/serializerHelpers.js.map +1 -0
- package/dist/esm/index.d.ts +8 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +6 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/logger.d.ts +2 -0
- package/dist/esm/logger.d.ts.map +1 -0
- package/dist/esm/logger.js +5 -0
- package/dist/esm/logger.js.map +1 -0
- package/dist/esm/models/index.d.ts +2 -0
- package/dist/esm/models/index.d.ts.map +1 -0
- package/dist/esm/models/index.js +4 -0
- package/dist/esm/models/index.js.map +1 -0
- package/dist/esm/models/models.d.ts +232 -0
- package/dist/esm/models/models.d.ts.map +1 -0
- package/dist/esm/models/models.js +187 -0
- package/dist/esm/models/models.js.map +1 -0
- package/dist/esm/package.json +3 -0
- package/dist/esm/restorePollerHelpers.d.ts +21 -0
- package/dist/esm/restorePollerHelpers.d.ts.map +1 -0
- package/dist/esm/restorePollerHelpers.js +91 -0
- package/dist/esm/restorePollerHelpers.js.map +1 -0
- package/dist/esm/static-helpers/pagingHelpers.d.ts +72 -0
- package/dist/esm/static-helpers/pagingHelpers.d.ts.map +1 -0
- package/dist/esm/static-helpers/pagingHelpers.js +118 -0
- package/dist/esm/static-helpers/pagingHelpers.js.map +1 -0
- package/dist/esm/static-helpers/pollingHelpers.d.ts +30 -0
- package/dist/esm/static-helpers/pollingHelpers.d.ts.map +1 -0
- package/dist/esm/static-helpers/pollingHelpers.js +79 -0
- package/dist/esm/static-helpers/pollingHelpers.js.map +1 -0
- package/dist/react-native/api/azureTerraformContext.d.ts +14 -0
- package/dist/react-native/api/azureTerraformContext.d.ts.map +1 -0
- package/dist/react-native/api/azureTerraformContext.js +38 -0
- package/dist/react-native/api/azureTerraformContext.js.map +1 -0
- package/dist/react-native/api/index.d.ts +5 -0
- package/dist/react-native/api/index.d.ts.map +1 -0
- package/dist/react-native/api/index.js +6 -0
- package/dist/react-native/api/index.js.map +1 -0
- package/dist/react-native/api/operations/index.d.ts +9 -0
- package/dist/react-native/api/operations/index.d.ts.map +1 -0
- package/dist/react-native/api/operations/index.js +22 -0
- package/dist/react-native/api/operations/index.js.map +1 -0
- package/dist/react-native/api/options.d.ts +10 -0
- package/dist/react-native/api/options.d.ts.map +1 -0
- package/dist/react-native/api/options.js +4 -0
- package/dist/react-native/api/options.js.map +1 -0
- package/dist/react-native/api/terraform/index.d.ts +9 -0
- package/dist/react-native/api/terraform/index.d.ts.map +1 -0
- package/dist/react-native/api/terraform/index.js +30 -0
- package/dist/react-native/api/terraform/index.js.map +1 -0
- package/dist/react-native/azureTerraformClient.d.ts +18 -0
- package/dist/react-native/azureTerraformClient.d.ts.map +1 -0
- package/dist/react-native/azureTerraformClient.js +29 -0
- package/dist/react-native/azureTerraformClient.js.map +1 -0
- package/dist/react-native/classic/index.d.ts +3 -0
- package/dist/react-native/classic/index.d.ts.map +1 -0
- package/dist/react-native/classic/index.js +4 -0
- package/dist/react-native/classic/index.js.map +1 -0
- package/dist/react-native/classic/operations/index.d.ts +14 -0
- package/dist/react-native/classic/operations/index.d.ts.map +1 -0
- package/dist/react-native/classic/operations/index.js +14 -0
- package/dist/react-native/classic/operations/index.js.map +1 -0
- package/dist/react-native/classic/terraform/index.d.ts +14 -0
- package/dist/react-native/classic/terraform/index.d.ts.map +1 -0
- package/dist/react-native/classic/terraform/index.js +14 -0
- package/dist/react-native/classic/terraform/index.js.map +1 -0
- package/dist/react-native/helpers/serializerHelpers.d.ts +3 -0
- package/dist/react-native/helpers/serializerHelpers.d.ts.map +1 -0
- package/dist/react-native/helpers/serializerHelpers.js +24 -0
- package/dist/react-native/helpers/serializerHelpers.js.map +1 -0
- package/dist/react-native/index.d.ts +8 -0
- package/dist/react-native/index.d.ts.map +1 -0
- package/dist/react-native/index.js +6 -0
- package/dist/react-native/index.js.map +1 -0
- package/dist/react-native/logger.d.ts +2 -0
- package/dist/react-native/logger.d.ts.map +1 -0
- package/dist/react-native/logger.js +5 -0
- package/dist/react-native/logger.js.map +1 -0
- package/dist/react-native/models/index.d.ts +2 -0
- package/dist/react-native/models/index.d.ts.map +1 -0
- package/dist/react-native/models/index.js +4 -0
- package/dist/react-native/models/index.js.map +1 -0
- package/dist/react-native/models/models.d.ts +232 -0
- package/dist/react-native/models/models.d.ts.map +1 -0
- package/dist/react-native/models/models.js +187 -0
- package/dist/react-native/models/models.js.map +1 -0
- package/dist/react-native/package.json +3 -0
- package/dist/react-native/restorePollerHelpers.d.ts +21 -0
- package/dist/react-native/restorePollerHelpers.d.ts.map +1 -0
- package/dist/react-native/restorePollerHelpers.js +91 -0
- package/dist/react-native/restorePollerHelpers.js.map +1 -0
- package/dist/react-native/static-helpers/pagingHelpers.d.ts +72 -0
- package/dist/react-native/static-helpers/pagingHelpers.d.ts.map +1 -0
- package/dist/react-native/static-helpers/pagingHelpers.js +118 -0
- package/dist/react-native/static-helpers/pagingHelpers.js.map +1 -0
- package/dist/react-native/static-helpers/pollingHelpers.d.ts +30 -0
- package/dist/react-native/static-helpers/pollingHelpers.d.ts.map +1 -0
- package/dist/react-native/static-helpers/pollingHelpers.js +79 -0
- package/dist/react-native/static-helpers/pollingHelpers.js.map +1 -0
- package/package.json +154 -0
- package/review/arm-terraform-models-node.api.md +149 -0
- package/review/arm-terraform-node.api.md +217 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAQlC,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,aAAa,EAAwB,MAAM,2BAA2B,CAAC;AAChF,OAAO,EAGL,SAAS,EAET,mBAAmB,EASnB,8BAA8B,EAI9B,WAAW,EAEX,eAAe,EAEf,aAAa,GACd,MAAM,mBAAmB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n PageSettings,\n ContinuablePage,\n PagedAsyncIterableIterator,\n} from \"./static-helpers/pagingHelpers.js\";\n\nexport { AzureTerraformClient } from \"./azureTerraformClient.js\";\nexport { restorePoller, RestorePollerOptions } from \"./restorePollerHelpers.js\";\nexport {\n BaseExportModel,\n BaseExportModelUnion,\n KnownType,\n Type,\n KnownTargetProvider,\n TargetProvider,\n ExportQuery,\n ExportResource,\n ExportResourceGroup,\n ErrorDetail,\n ErrorAdditionalInfo,\n TerraformOperationStatus,\n ExportResult,\n KnownResourceProvisioningState,\n ResourceProvisioningState,\n Operation,\n OperationDisplay,\n KnownOrigin,\n Origin,\n KnownActionType,\n ActionType,\n KnownVersions,\n} from \"./models/index.js\";\nexport {\n AzureTerraformClientOptionalParams,\n OperationsListOptionalParams,\n TerraformExportTerraformOptionalParams,\n} from \"./api/index.js\";\nexport { OperationsOperations, TerraformOperations } from \"./classic/index.js\";\nexport { PageSettings, ContinuablePage, PagedAsyncIterableIterator };\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/logger.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,MAAM,qCAAsC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/logger.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,MAAM,CAAC,MAAM,MAAM,GAAG,kBAAkB,CAAC,eAAe,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { createClientLogger } from \"@azure/logger\";\nexport const logger = createClientLogger(\"arm-terraform\");\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { BaseExportModel, BaseExportModelUnion, KnownType, Type, KnownTargetProvider, TargetProvider, ExportQuery, ExportResource, ExportResourceGroup, ErrorDetail, ErrorAdditionalInfo, TerraformOperationStatus, ExportResult, KnownResourceProvisioningState, ResourceProvisioningState, Operation, OperationDisplay, KnownOrigin, Origin, KnownActionType, ActionType, KnownVersions, } from "./models.js";
|
|
2
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/models/index.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,SAAS,EACT,IAAI,EACJ,mBAAmB,EACnB,cAAc,EACd,WAAW,EACX,cAAc,EACd,mBAAmB,EACnB,WAAW,EACX,mBAAmB,EACnB,wBAAwB,EACxB,YAAY,EACZ,8BAA8B,EAC9B,yBAAyB,EACzB,SAAS,EACT,gBAAgB,EAChB,WAAW,EACX,MAAM,EACN,eAAe,EACf,UAAU,EACV,aAAa,GACd,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/models/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAGL,SAAS,EAET,mBAAmB,EASnB,8BAA8B,EAI9B,WAAW,EAEX,eAAe,EAEf,aAAa,GACd,MAAM,aAAa,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport {\n BaseExportModel,\n BaseExportModelUnion,\n KnownType,\n Type,\n KnownTargetProvider,\n TargetProvider,\n ExportQuery,\n ExportResource,\n ExportResourceGroup,\n ErrorDetail,\n ErrorAdditionalInfo,\n TerraformOperationStatus,\n ExportResult,\n KnownResourceProvisioningState,\n ResourceProvisioningState,\n Operation,\n OperationDisplay,\n KnownOrigin,\n Origin,\n KnownActionType,\n ActionType,\n KnownVersions,\n} from \"./models.js\";\n"]}
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
/** The base export parameter */
|
|
2
|
+
export interface BaseExportModel {
|
|
3
|
+
/** The parameter type */
|
|
4
|
+
/** The discriminator possible values: ExportQuery, ExportResource, ExportResourceGroup */
|
|
5
|
+
type: Type;
|
|
6
|
+
/** The target Azure Terraform Provider */
|
|
7
|
+
targetProvider?: TargetProvider;
|
|
8
|
+
/** Whether to output all non-computed properties in the generated Terraform configuration? This probably needs manual modifications to make it valid */
|
|
9
|
+
fullProperties?: boolean;
|
|
10
|
+
/** Mask sensitive attributes in the Terraform configuration */
|
|
11
|
+
maskSensitive?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare function baseExportModelSerializer(item: BaseExportModel): any;
|
|
14
|
+
/** Alias for BaseExportModelUnion */
|
|
15
|
+
export type BaseExportModelUnion = ExportQuery | ExportResource | ExportResourceGroup | BaseExportModel;
|
|
16
|
+
export declare function baseExportModelUnionSerializer(item: BaseExportModelUnion): any;
|
|
17
|
+
/** The parameter type */
|
|
18
|
+
export declare enum KnownType {
|
|
19
|
+
ExportResource = "ExportResource",
|
|
20
|
+
ExportResourceGroup = "ExportResourceGroup",
|
|
21
|
+
ExportQuery = "ExportQuery"
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* The parameter type \
|
|
25
|
+
* {@link KnownType} can be used interchangeably with Type,
|
|
26
|
+
* this enum contains the known values that the service supports.
|
|
27
|
+
* ### Known values supported by the service
|
|
28
|
+
* **ExportResource** \
|
|
29
|
+
* **ExportResourceGroup** \
|
|
30
|
+
* **ExportQuery**
|
|
31
|
+
*/
|
|
32
|
+
export type Type = string;
|
|
33
|
+
/** The target Azure Terraform Provider */
|
|
34
|
+
export declare enum KnownTargetProvider {
|
|
35
|
+
/** https://registry.terraform.io/providers/hashicorp/azurerm/latest */
|
|
36
|
+
azurerm = "azurerm",
|
|
37
|
+
/** https://registry.terraform.io/providers/Azure/azapi/latest */
|
|
38
|
+
azapi = "azapi"
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* The target Azure Terraform Provider \
|
|
42
|
+
* {@link KnowntargetProvider} can be used interchangeably with targetProvider,
|
|
43
|
+
* this enum contains the known values that the service supports.
|
|
44
|
+
* ### Known values supported by the service
|
|
45
|
+
* **azurerm**: https:\//registry.terraform.io\/providers\/hashicorp\/azurerm\/latest \
|
|
46
|
+
* **azapi**: https:\//registry.terraform.io\/providers\/Azure\/azapi\/latest
|
|
47
|
+
*/
|
|
48
|
+
export type TargetProvider = string;
|
|
49
|
+
/** Export parameter for resources queried by ARG (Azure Resource Graph) */
|
|
50
|
+
export interface ExportQuery extends BaseExportModel {
|
|
51
|
+
/** The ARG where predicate. Note that you can combine multiple conditions in one `where` predicate, e.g. `resourceGroup =~ "my-rg" and type =~ "microsoft.network/virtualnetworks"` */
|
|
52
|
+
query: string;
|
|
53
|
+
/** The name pattern of the Terraform resources */
|
|
54
|
+
namePattern?: string;
|
|
55
|
+
/** Whether to recursively list child resources of the query result */
|
|
56
|
+
recursive?: boolean;
|
|
57
|
+
/** The parameter type */
|
|
58
|
+
type: "ExportQuery";
|
|
59
|
+
}
|
|
60
|
+
export declare function exportQuerySerializer(item: ExportQuery): any;
|
|
61
|
+
/** Export parameter for individual resources. */
|
|
62
|
+
export interface ExportResource extends BaseExportModel {
|
|
63
|
+
/** The id of the resource to be exported */
|
|
64
|
+
resourceIds: string[];
|
|
65
|
+
/** The Terraform resource name. Only works when `resourceIds` contains only one item. */
|
|
66
|
+
resourceName?: string;
|
|
67
|
+
/** The Terraform resource type. Only works when `resourceIds` contains only one item. */
|
|
68
|
+
resourceType?: string;
|
|
69
|
+
/** The name pattern of the Terraform resources */
|
|
70
|
+
namePattern?: string;
|
|
71
|
+
/** The parameter type */
|
|
72
|
+
type: "ExportResource";
|
|
73
|
+
}
|
|
74
|
+
export declare function exportResourceSerializer(item: ExportResource): any;
|
|
75
|
+
/** Export parameter for a resource group */
|
|
76
|
+
export interface ExportResourceGroup extends BaseExportModel {
|
|
77
|
+
/** The name of the resource group to be exported */
|
|
78
|
+
resourceGroupName: string;
|
|
79
|
+
/** The name pattern of the Terraform resources */
|
|
80
|
+
namePattern?: string;
|
|
81
|
+
/** The parameter type */
|
|
82
|
+
type: "ExportResourceGroup";
|
|
83
|
+
}
|
|
84
|
+
export declare function exportResourceGroupSerializer(item: ExportResourceGroup): any;
|
|
85
|
+
/** The error detail. */
|
|
86
|
+
export interface ErrorDetail {
|
|
87
|
+
/** The error code. */
|
|
88
|
+
readonly code?: string;
|
|
89
|
+
/** The error message. */
|
|
90
|
+
readonly message?: string;
|
|
91
|
+
/** The error target. */
|
|
92
|
+
readonly target?: string;
|
|
93
|
+
/** The error details. */
|
|
94
|
+
readonly details?: ErrorDetail[];
|
|
95
|
+
/** The error additional info. */
|
|
96
|
+
readonly additionalInfo?: ErrorAdditionalInfo[];
|
|
97
|
+
}
|
|
98
|
+
export declare function errorDetailDeserializer(item: any): ErrorDetail;
|
|
99
|
+
export declare function errorDetailArrayDeserializer(result: Array<ErrorDetail>): any[];
|
|
100
|
+
export declare function errorAdditionalInfoArrayDeserializer(result: Array<ErrorAdditionalInfo>): any[];
|
|
101
|
+
/** The resource management error additional info. */
|
|
102
|
+
export interface ErrorAdditionalInfo {
|
|
103
|
+
/** The additional info type. */
|
|
104
|
+
readonly type?: string;
|
|
105
|
+
/** The additional info. */
|
|
106
|
+
readonly info?: Record<string, any>;
|
|
107
|
+
}
|
|
108
|
+
export declare function errorAdditionalInfoDeserializer(item: any): ErrorAdditionalInfo;
|
|
109
|
+
/** model interface _ErrorAdditionalInfoInfo */
|
|
110
|
+
export interface _ErrorAdditionalInfoInfo {
|
|
111
|
+
}
|
|
112
|
+
export declare function _errorAdditionalInfoInfoDeserializer(item: any): _ErrorAdditionalInfoInfo;
|
|
113
|
+
/** The status of the LRO operation. */
|
|
114
|
+
export interface TerraformOperationStatus {
|
|
115
|
+
/** RP-specific properties for the operationStatus resource, only appears when operation ended with Succeeded status */
|
|
116
|
+
readonly properties?: ExportResult;
|
|
117
|
+
/** The operation status */
|
|
118
|
+
status: ResourceProvisioningState;
|
|
119
|
+
/** The name of the operationStatus resource */
|
|
120
|
+
readonly name?: string;
|
|
121
|
+
/** Operation start time */
|
|
122
|
+
readonly startTime?: Date;
|
|
123
|
+
/** Operation complete time */
|
|
124
|
+
readonly endTime?: Date;
|
|
125
|
+
/** The progress made toward completing the operation */
|
|
126
|
+
readonly percentComplete?: number;
|
|
127
|
+
/** Errors that occurred if the operation ended with Canceled or Failed status */
|
|
128
|
+
readonly error?: ErrorDetail;
|
|
129
|
+
}
|
|
130
|
+
export declare function terraformOperationStatusDeserializer(item: any): TerraformOperationStatus;
|
|
131
|
+
/** The Terraform export result */
|
|
132
|
+
export interface ExportResult {
|
|
133
|
+
/** The Terraform configuration content */
|
|
134
|
+
configuration?: string;
|
|
135
|
+
/** A list of Azure resources which are not exported to Terraform due to there is no corresponding resources in Terraform */
|
|
136
|
+
skippedResources?: string[];
|
|
137
|
+
/** A list of errors derived during exporting each resource */
|
|
138
|
+
errors?: ErrorDetail[];
|
|
139
|
+
}
|
|
140
|
+
export declare function exportResultDeserializer(item: any): ExportResult;
|
|
141
|
+
/** The provisioning state of a resource type. */
|
|
142
|
+
export declare enum KnownResourceProvisioningState {
|
|
143
|
+
/** Resource has been created. */
|
|
144
|
+
Succeeded = "Succeeded",
|
|
145
|
+
/** Resource creation failed. */
|
|
146
|
+
Failed = "Failed",
|
|
147
|
+
/** Resource creation was canceled. */
|
|
148
|
+
Canceled = "Canceled"
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* The provisioning state of a resource type. \
|
|
152
|
+
* {@link KnownResourceProvisioningState} can be used interchangeably with ResourceProvisioningState,
|
|
153
|
+
* this enum contains the known values that the service supports.
|
|
154
|
+
* ### Known values supported by the service
|
|
155
|
+
* **Succeeded**: Resource has been created. \
|
|
156
|
+
* **Failed**: Resource creation failed. \
|
|
157
|
+
* **Canceled**: Resource creation was canceled.
|
|
158
|
+
*/
|
|
159
|
+
export type ResourceProvisioningState = string;
|
|
160
|
+
/** A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. */
|
|
161
|
+
export interface _OperationListResult {
|
|
162
|
+
/** The Operation items on this page */
|
|
163
|
+
value: Operation[];
|
|
164
|
+
/** The link to the next page of items */
|
|
165
|
+
nextLink?: string;
|
|
166
|
+
}
|
|
167
|
+
export declare function _operationListResultDeserializer(item: any): _OperationListResult;
|
|
168
|
+
export declare function operationArrayDeserializer(result: Array<Operation>): any[];
|
|
169
|
+
/** Details of a REST API operation, returned from the Resource Provider Operations API */
|
|
170
|
+
export interface Operation {
|
|
171
|
+
/** The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action" */
|
|
172
|
+
readonly name?: string;
|
|
173
|
+
/** Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for Azure Resource Manager/control-plane operations. */
|
|
174
|
+
readonly isDataAction?: boolean;
|
|
175
|
+
/** Localized display information for this particular operation. */
|
|
176
|
+
readonly display?: OperationDisplay;
|
|
177
|
+
/** The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system" */
|
|
178
|
+
readonly origin?: Origin;
|
|
179
|
+
/** Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. */
|
|
180
|
+
actionType?: ActionType;
|
|
181
|
+
}
|
|
182
|
+
export declare function operationDeserializer(item: any): Operation;
|
|
183
|
+
/** Localized display information for and operation. */
|
|
184
|
+
export interface OperationDisplay {
|
|
185
|
+
/** The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". */
|
|
186
|
+
readonly provider?: string;
|
|
187
|
+
/** The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". */
|
|
188
|
+
readonly resource?: string;
|
|
189
|
+
/** The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", "Restart Virtual Machine". */
|
|
190
|
+
readonly operation?: string;
|
|
191
|
+
/** The short, localized friendly description of the operation; suitable for tool tips and detailed views. */
|
|
192
|
+
readonly description?: string;
|
|
193
|
+
}
|
|
194
|
+
export declare function operationDisplayDeserializer(item: any): OperationDisplay;
|
|
195
|
+
/** Known values of {@link Origin} that the service accepts. */
|
|
196
|
+
export declare enum KnownOrigin {
|
|
197
|
+
/** user */
|
|
198
|
+
User = "user",
|
|
199
|
+
/** system */
|
|
200
|
+
System = "system",
|
|
201
|
+
/** user,system */
|
|
202
|
+
UserSystem = "user,system"
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system" \
|
|
206
|
+
* {@link KnownOrigin} can be used interchangeably with Origin,
|
|
207
|
+
* this enum contains the known values that the service supports.
|
|
208
|
+
* ### Known values supported by the service
|
|
209
|
+
* **user** \
|
|
210
|
+
* **system** \
|
|
211
|
+
* **user,system**
|
|
212
|
+
*/
|
|
213
|
+
export type Origin = string;
|
|
214
|
+
/** Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. */
|
|
215
|
+
export declare enum KnownActionType {
|
|
216
|
+
/** Actions are for internal-only APIs. */
|
|
217
|
+
Internal = "Internal"
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. \
|
|
221
|
+
* {@link KnownActionType} can be used interchangeably with ActionType,
|
|
222
|
+
* this enum contains the known values that the service supports.
|
|
223
|
+
* ### Known values supported by the service
|
|
224
|
+
* **Internal**: Actions are for internal-only APIs.
|
|
225
|
+
*/
|
|
226
|
+
export type ActionType = string;
|
|
227
|
+
/** The available API versions. */
|
|
228
|
+
export declare enum KnownVersions {
|
|
229
|
+
/** The 2023-07-01-preview API version. */
|
|
230
|
+
v2023_07_01_preview = "2023-07-01-preview"
|
|
231
|
+
}
|
|
232
|
+
//# sourceMappingURL=models.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../src/models/models.ts"],"names":[],"mappings":"AAGA,gCAAgC;AAChC,MAAM,WAAW,eAAe;IAC9B,yBAAyB;IACzB,0FAA0F;IAC1F,IAAI,EAAE,IAAI,CAAC;IACX,0CAA0C;IAC1C,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,wJAAwJ;IACxJ,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,+DAA+D;IAC/D,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,wBAAgB,yBAAyB,CAAC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GAMG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC;AAEhC,kCAAkC;AAClC,oBAAY,aAAa;IACvB,0CAA0C;IAC1C,mBAAmB,uBAAuB;CAC3C"}
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
export function baseExportModelSerializer(item) {
|
|
4
|
+
return {
|
|
5
|
+
type: item["type"],
|
|
6
|
+
targetProvider: item["targetProvider"],
|
|
7
|
+
fullProperties: item["fullProperties"],
|
|
8
|
+
maskSensitive: item["maskSensitive"],
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
export function baseExportModelUnionSerializer(item) {
|
|
12
|
+
switch (item.type) {
|
|
13
|
+
case "ExportQuery":
|
|
14
|
+
return exportQuerySerializer(item);
|
|
15
|
+
case "ExportResource":
|
|
16
|
+
return exportResourceSerializer(item);
|
|
17
|
+
case "ExportResourceGroup":
|
|
18
|
+
return exportResourceGroupSerializer(item);
|
|
19
|
+
default:
|
|
20
|
+
return baseExportModelSerializer(item);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
/** The parameter type */
|
|
24
|
+
export var KnownType;
|
|
25
|
+
(function (KnownType) {
|
|
26
|
+
KnownType["ExportResource"] = "ExportResource";
|
|
27
|
+
KnownType["ExportResourceGroup"] = "ExportResourceGroup";
|
|
28
|
+
KnownType["ExportQuery"] = "ExportQuery";
|
|
29
|
+
})(KnownType || (KnownType = {}));
|
|
30
|
+
/** The target Azure Terraform Provider */
|
|
31
|
+
export var KnownTargetProvider;
|
|
32
|
+
(function (KnownTargetProvider) {
|
|
33
|
+
/** https://registry.terraform.io/providers/hashicorp/azurerm/latest */
|
|
34
|
+
KnownTargetProvider["azurerm"] = "azurerm";
|
|
35
|
+
/** https://registry.terraform.io/providers/Azure/azapi/latest */
|
|
36
|
+
KnownTargetProvider["azapi"] = "azapi";
|
|
37
|
+
})(KnownTargetProvider || (KnownTargetProvider = {}));
|
|
38
|
+
export function exportQuerySerializer(item) {
|
|
39
|
+
return {
|
|
40
|
+
type: item["type"],
|
|
41
|
+
targetProvider: item["targetProvider"],
|
|
42
|
+
fullProperties: item["fullProperties"],
|
|
43
|
+
maskSensitive: item["maskSensitive"],
|
|
44
|
+
query: item["query"],
|
|
45
|
+
namePattern: item["namePattern"],
|
|
46
|
+
recursive: item["recursive"],
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
export function exportResourceSerializer(item) {
|
|
50
|
+
return {
|
|
51
|
+
type: item["type"],
|
|
52
|
+
targetProvider: item["targetProvider"],
|
|
53
|
+
fullProperties: item["fullProperties"],
|
|
54
|
+
maskSensitive: item["maskSensitive"],
|
|
55
|
+
resourceIds: item["resourceIds"].map((p) => {
|
|
56
|
+
return p;
|
|
57
|
+
}),
|
|
58
|
+
resourceName: item["resourceName"],
|
|
59
|
+
resourceType: item["resourceType"],
|
|
60
|
+
namePattern: item["namePattern"],
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
export function exportResourceGroupSerializer(item) {
|
|
64
|
+
return {
|
|
65
|
+
type: item["type"],
|
|
66
|
+
targetProvider: item["targetProvider"],
|
|
67
|
+
fullProperties: item["fullProperties"],
|
|
68
|
+
maskSensitive: item["maskSensitive"],
|
|
69
|
+
resourceGroupName: item["resourceGroupName"],
|
|
70
|
+
namePattern: item["namePattern"],
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
export function errorDetailDeserializer(item) {
|
|
74
|
+
return {
|
|
75
|
+
code: item["code"],
|
|
76
|
+
message: item["message"],
|
|
77
|
+
target: item["target"],
|
|
78
|
+
details: !item["details"] ? item["details"] : errorDetailArrayDeserializer(item["details"]),
|
|
79
|
+
additionalInfo: !item["additionalInfo"]
|
|
80
|
+
? item["additionalInfo"]
|
|
81
|
+
: errorAdditionalInfoArrayDeserializer(item["additionalInfo"]),
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
export function errorDetailArrayDeserializer(result) {
|
|
85
|
+
return result.map((item) => {
|
|
86
|
+
return errorDetailDeserializer(item);
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
export function errorAdditionalInfoArrayDeserializer(result) {
|
|
90
|
+
return result.map((item) => {
|
|
91
|
+
return errorAdditionalInfoDeserializer(item);
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
export function errorAdditionalInfoDeserializer(item) {
|
|
95
|
+
return {
|
|
96
|
+
type: item["type"],
|
|
97
|
+
info: !item["info"] ? item["info"] : _errorAdditionalInfoInfoDeserializer(item["info"]),
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
export function _errorAdditionalInfoInfoDeserializer(item) {
|
|
101
|
+
return item;
|
|
102
|
+
}
|
|
103
|
+
export function terraformOperationStatusDeserializer(item) {
|
|
104
|
+
return {
|
|
105
|
+
properties: !item["properties"]
|
|
106
|
+
? item["properties"]
|
|
107
|
+
: exportResultDeserializer(item["properties"]),
|
|
108
|
+
status: item["status"],
|
|
109
|
+
name: item["name"],
|
|
110
|
+
startTime: !item["startTime"] ? item["startTime"] : new Date(item["startTime"]),
|
|
111
|
+
endTime: !item["endTime"] ? item["endTime"] : new Date(item["endTime"]),
|
|
112
|
+
percentComplete: item["percentComplete"],
|
|
113
|
+
error: !item["error"] ? item["error"] : errorDetailDeserializer(item["error"]),
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
export function exportResultDeserializer(item) {
|
|
117
|
+
return {
|
|
118
|
+
configuration: item["configuration"],
|
|
119
|
+
skippedResources: !item["skippedResources"]
|
|
120
|
+
? item["skippedResources"]
|
|
121
|
+
: item["skippedResources"].map((p) => {
|
|
122
|
+
return p;
|
|
123
|
+
}),
|
|
124
|
+
errors: !item["errors"] ? item["errors"] : errorDetailArrayDeserializer(item["errors"]),
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
/** The provisioning state of a resource type. */
|
|
128
|
+
export var KnownResourceProvisioningState;
|
|
129
|
+
(function (KnownResourceProvisioningState) {
|
|
130
|
+
/** Resource has been created. */
|
|
131
|
+
KnownResourceProvisioningState["Succeeded"] = "Succeeded";
|
|
132
|
+
/** Resource creation failed. */
|
|
133
|
+
KnownResourceProvisioningState["Failed"] = "Failed";
|
|
134
|
+
/** Resource creation was canceled. */
|
|
135
|
+
KnownResourceProvisioningState["Canceled"] = "Canceled";
|
|
136
|
+
})(KnownResourceProvisioningState || (KnownResourceProvisioningState = {}));
|
|
137
|
+
export function _operationListResultDeserializer(item) {
|
|
138
|
+
return {
|
|
139
|
+
value: operationArrayDeserializer(item["value"]),
|
|
140
|
+
nextLink: item["nextLink"],
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
export function operationArrayDeserializer(result) {
|
|
144
|
+
return result.map((item) => {
|
|
145
|
+
return operationDeserializer(item);
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
export function operationDeserializer(item) {
|
|
149
|
+
return {
|
|
150
|
+
name: item["name"],
|
|
151
|
+
isDataAction: item["isDataAction"],
|
|
152
|
+
display: !item["display"] ? item["display"] : operationDisplayDeserializer(item["display"]),
|
|
153
|
+
origin: item["origin"],
|
|
154
|
+
actionType: item["actionType"],
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
export function operationDisplayDeserializer(item) {
|
|
158
|
+
return {
|
|
159
|
+
provider: item["provider"],
|
|
160
|
+
resource: item["resource"],
|
|
161
|
+
operation: item["operation"],
|
|
162
|
+
description: item["description"],
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
/** Known values of {@link Origin} that the service accepts. */
|
|
166
|
+
export var KnownOrigin;
|
|
167
|
+
(function (KnownOrigin) {
|
|
168
|
+
/** user */
|
|
169
|
+
KnownOrigin["User"] = "user";
|
|
170
|
+
/** system */
|
|
171
|
+
KnownOrigin["System"] = "system";
|
|
172
|
+
/** user,system */
|
|
173
|
+
KnownOrigin["UserSystem"] = "user,system";
|
|
174
|
+
})(KnownOrigin || (KnownOrigin = {}));
|
|
175
|
+
/** Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. */
|
|
176
|
+
export var KnownActionType;
|
|
177
|
+
(function (KnownActionType) {
|
|
178
|
+
/** Actions are for internal-only APIs. */
|
|
179
|
+
KnownActionType["Internal"] = "Internal";
|
|
180
|
+
})(KnownActionType || (KnownActionType = {}));
|
|
181
|
+
/** The available API versions. */
|
|
182
|
+
export var KnownVersions;
|
|
183
|
+
(function (KnownVersions) {
|
|
184
|
+
/** The 2023-07-01-preview API version. */
|
|
185
|
+
KnownVersions["v2023_07_01_preview"] = "2023-07-01-preview";
|
|
186
|
+
})(KnownVersions || (KnownVersions = {}));
|
|
187
|
+
//# sourceMappingURL=models.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models.js","sourceRoot":"","sources":["../../../src/models/models.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAelC,MAAM,UAAU,yBAAyB,CAAC,IAAqB;IAC7D,OAAO;QACL,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC;QAClB,cAAc,EAAE,IAAI,CAAC,gBAAgB,CAAC;QACtC,cAAc,EAAE,IAAI,CAAC,gBAAgB,CAAC;QACtC,aAAa,EAAE,IAAI,CAAC,eAAe,CAAC;KACrC,CAAC;AACJ,CAAC;AASD,MAAM,UAAU,8BAA8B,CAAC,IAA0B;IACvE,QAAQ,IAAI,CAAC,IAAI,EAAE,CAAC;QAClB,KAAK,aAAa;YAChB,OAAO,qBAAqB,CAAC,IAAmB,CAAC,CAAC;QAEpD,KAAK,gBAAgB;YACnB,OAAO,wBAAwB,CAAC,IAAsB,CAAC,CAAC;QAE1D,KAAK,qBAAqB;YACxB,OAAO,6BAA6B,CAAC,IAA2B,CAAC,CAAC;QAEpE;YACE,OAAO,yBAAyB,CAAC,IAAI,CAAC,CAAC;IAC3C,CAAC;AACH,CAAC;AAED,yBAAyB;AACzB,MAAM,CAAN,IAAY,SAIX;AAJD,WAAY,SAA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MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC;QACtB,UAAU,EAAE,IAAI,CAAC,YAAY,CAAC;KAC/B,CAAC;AACJ,CAAC;AAcD,MAAM,UAAU,4BAA4B,CAAC,IAAS;IACpD,OAAO;QACL,QAAQ,EAAE,IAAI,CAAC,UAAU,CAAC;QAC1B,QAAQ,EAAE,IAAI,CAAC,UAAU,CAAC;QAC1B,SAAS,EAAE,IAAI,CAAC,WAAW,CAAC;QAC5B,WAAW,EAAE,IAAI,CAAC,aAAa,CAAC;KACjC,CAAC;AACJ,CAAC;AAED,+DAA+D;AAC/D,MAAM,CAAN,IAAY,WAOX;AAPD,WAAY,WAAW;IACrB,WAAW;IACX,4BAAa,CAAA;IACb,aAAa;IACb,gCAAiB,CAAA;IACjB,kBAAkB;IAClB,yCAA0B,CAAA;AAC5B,CAAC,EAPW,WAAW,KAAX,WAAW,QAOtB;AAaD,gHAAgH;AAChH,MAAM,CAAN,IAAY,eAGX;AAHD,WAAY,eAAe;IACzB,0CAA0C;IAC1C,wCAAqB,CAAA;AACvB,CAAC,EAHW,eAAe,KAAf,eAAe,QAG1B;AAWD,kCAAkC;AAClC,MAAM,CAAN,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,0CAA0C;IAC1C,2DAA0C,CAAA;AAC5C,CAAC,EAHW,aAAa,KAAb,aAAa,QAGxB","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/** The base export parameter */\nexport interface BaseExportModel {\n /** The parameter type */\n /** The discriminator possible values: ExportQuery, ExportResource, ExportResourceGroup */\n type: Type;\n /** The target Azure Terraform Provider */\n targetProvider?: TargetProvider;\n /** Whether to output all non-computed properties in the generated Terraform configuration? This probably needs manual modifications to make it valid */\n fullProperties?: boolean;\n /** Mask sensitive attributes in the Terraform configuration */\n maskSensitive?: boolean;\n}\n\nexport function baseExportModelSerializer(item: BaseExportModel): any {\n return {\n type: item[\"type\"],\n targetProvider: item[\"targetProvider\"],\n fullProperties: item[\"fullProperties\"],\n maskSensitive: item[\"maskSensitive\"],\n };\n}\n\n/** Alias for BaseExportModelUnion */\nexport type BaseExportModelUnion =\n | ExportQuery\n | ExportResource\n | ExportResourceGroup\n | BaseExportModel;\n\nexport function baseExportModelUnionSerializer(item: BaseExportModelUnion): any {\n switch (item.type) {\n case \"ExportQuery\":\n return exportQuerySerializer(item as ExportQuery);\n\n case \"ExportResource\":\n return exportResourceSerializer(item as ExportResource);\n\n case \"ExportResourceGroup\":\n return exportResourceGroupSerializer(item as ExportResourceGroup);\n\n default:\n return baseExportModelSerializer(item);\n }\n}\n\n/** The parameter type */\nexport enum KnownType {\n ExportResource = \"ExportResource\",\n ExportResourceGroup = \"ExportResourceGroup\",\n ExportQuery = \"ExportQuery\",\n}\n\n/**\n * The parameter type \\\n * {@link KnownType} can be used interchangeably with Type,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **ExportResource** \\\n * **ExportResourceGroup** \\\n * **ExportQuery**\n */\nexport type Type = string;\n\n/** The target Azure Terraform Provider */\nexport enum KnownTargetProvider {\n /** https://registry.terraform.io/providers/hashicorp/azurerm/latest */\n azurerm = \"azurerm\",\n /** https://registry.terraform.io/providers/Azure/azapi/latest */\n azapi = \"azapi\",\n}\n\n/**\n * The target Azure Terraform Provider \\\n * {@link KnowntargetProvider} can be used interchangeably with targetProvider,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **azurerm**: https:\\//registry.terraform.io\\/providers\\/hashicorp\\/azurerm\\/latest \\\n * **azapi**: https:\\//registry.terraform.io\\/providers\\/Azure\\/azapi\\/latest\n */\nexport type TargetProvider = string;\n\n/** Export parameter for resources queried by ARG (Azure Resource Graph) */\nexport interface ExportQuery extends BaseExportModel {\n /** The ARG where predicate. Note that you can combine multiple conditions in one `where` predicate, e.g. `resourceGroup =~ \"my-rg\" and type =~ \"microsoft.network/virtualnetworks\"` */\n query: string;\n /** The name pattern of the Terraform resources */\n namePattern?: string;\n /** Whether to recursively list child resources of the query result */\n recursive?: boolean;\n /** The parameter type */\n type: \"ExportQuery\";\n}\n\nexport function exportQuerySerializer(item: ExportQuery): any {\n return {\n type: item[\"type\"],\n targetProvider: item[\"targetProvider\"],\n fullProperties: item[\"fullProperties\"],\n maskSensitive: item[\"maskSensitive\"],\n query: item[\"query\"],\n namePattern: item[\"namePattern\"],\n recursive: item[\"recursive\"],\n };\n}\n\n/** Export parameter for individual resources. */\nexport interface ExportResource extends BaseExportModel {\n /** The id of the resource to be exported */\n resourceIds: string[];\n /** The Terraform resource name. Only works when `resourceIds` contains only one item. */\n resourceName?: string;\n /** The Terraform resource type. Only works when `resourceIds` contains only one item. */\n resourceType?: string;\n /** The name pattern of the Terraform resources */\n namePattern?: string;\n /** The parameter type */\n type: \"ExportResource\";\n}\n\nexport function exportResourceSerializer(item: ExportResource): any {\n return {\n type: item[\"type\"],\n targetProvider: item[\"targetProvider\"],\n fullProperties: item[\"fullProperties\"],\n maskSensitive: item[\"maskSensitive\"],\n resourceIds: item[\"resourceIds\"].map((p: any) => {\n return p;\n }),\n resourceName: item[\"resourceName\"],\n resourceType: item[\"resourceType\"],\n namePattern: item[\"namePattern\"],\n };\n}\n\n/** Export parameter for a resource group */\nexport interface ExportResourceGroup extends BaseExportModel {\n /** The name of the resource group to be exported */\n resourceGroupName: string;\n /** The name pattern of the Terraform resources */\n namePattern?: string;\n /** The parameter type */\n type: \"ExportResourceGroup\";\n}\n\nexport function exportResourceGroupSerializer(item: ExportResourceGroup): any {\n return {\n type: item[\"type\"],\n targetProvider: item[\"targetProvider\"],\n fullProperties: item[\"fullProperties\"],\n maskSensitive: item[\"maskSensitive\"],\n resourceGroupName: item[\"resourceGroupName\"],\n namePattern: item[\"namePattern\"],\n };\n}\n\n/** The error detail. */\nexport interface ErrorDetail {\n /** The error code. */\n readonly code?: string;\n /** The error message. */\n readonly message?: string;\n /** The error target. */\n readonly target?: string;\n /** The error details. */\n readonly details?: ErrorDetail[];\n /** The error additional info. */\n readonly additionalInfo?: ErrorAdditionalInfo[];\n}\n\nexport function errorDetailDeserializer(item: any): ErrorDetail {\n return {\n code: item[\"code\"],\n message: item[\"message\"],\n target: item[\"target\"],\n details: !item[\"details\"] ? item[\"details\"] : errorDetailArrayDeserializer(item[\"details\"]),\n additionalInfo: !item[\"additionalInfo\"]\n ? item[\"additionalInfo\"]\n : errorAdditionalInfoArrayDeserializer(item[\"additionalInfo\"]),\n };\n}\n\nexport function errorDetailArrayDeserializer(result: Array<ErrorDetail>): any[] {\n return result.map((item) => {\n return errorDetailDeserializer(item);\n });\n}\n\nexport function errorAdditionalInfoArrayDeserializer(result: Array<ErrorAdditionalInfo>): any[] {\n return result.map((item) => {\n return errorAdditionalInfoDeserializer(item);\n });\n}\n\n/** The resource management error additional info. */\nexport interface ErrorAdditionalInfo {\n /** The additional info type. */\n readonly type?: string;\n /** The additional info. */\n readonly info?: Record<string, any>;\n}\n\nexport function errorAdditionalInfoDeserializer(item: any): ErrorAdditionalInfo {\n return {\n type: item[\"type\"],\n info: !item[\"info\"] ? item[\"info\"] : _errorAdditionalInfoInfoDeserializer(item[\"info\"]),\n };\n}\n\n/** model interface _ErrorAdditionalInfoInfo */\nexport interface _ErrorAdditionalInfoInfo {}\n\nexport function _errorAdditionalInfoInfoDeserializer(item: any): _ErrorAdditionalInfoInfo {\n return item;\n}\n\n/** The status of the LRO operation. */\nexport interface TerraformOperationStatus {\n /** RP-specific properties for the operationStatus resource, only appears when operation ended with Succeeded status */\n readonly properties?: ExportResult;\n /** The operation status */\n status: ResourceProvisioningState;\n /** The name of the operationStatus resource */\n readonly name?: string;\n /** Operation start time */\n readonly startTime?: Date;\n /** Operation complete time */\n readonly endTime?: Date;\n /** The progress made toward completing the operation */\n readonly percentComplete?: number;\n /** Errors that occurred if the operation ended with Canceled or Failed status */\n readonly error?: ErrorDetail;\n}\n\nexport function terraformOperationStatusDeserializer(item: any): TerraformOperationStatus {\n return {\n properties: !item[\"properties\"]\n ? item[\"properties\"]\n : exportResultDeserializer(item[\"properties\"]),\n status: item[\"status\"],\n name: item[\"name\"],\n startTime: !item[\"startTime\"] ? item[\"startTime\"] : new Date(item[\"startTime\"]),\n endTime: !item[\"endTime\"] ? item[\"endTime\"] : new Date(item[\"endTime\"]),\n percentComplete: item[\"percentComplete\"],\n error: !item[\"error\"] ? item[\"error\"] : errorDetailDeserializer(item[\"error\"]),\n };\n}\n\n/** The Terraform export result */\nexport interface ExportResult {\n /** The Terraform configuration content */\n configuration?: string;\n /** A list of Azure resources which are not exported to Terraform due to there is no corresponding resources in Terraform */\n skippedResources?: string[];\n /** A list of errors derived during exporting each resource */\n errors?: ErrorDetail[];\n}\n\nexport function exportResultDeserializer(item: any): ExportResult {\n return {\n configuration: item[\"configuration\"],\n skippedResources: !item[\"skippedResources\"]\n ? item[\"skippedResources\"]\n : item[\"skippedResources\"].map((p: any) => {\n return p;\n }),\n errors: !item[\"errors\"] ? item[\"errors\"] : errorDetailArrayDeserializer(item[\"errors\"]),\n };\n}\n\n/** The provisioning state of a resource type. */\nexport enum KnownResourceProvisioningState {\n /** Resource has been created. */\n Succeeded = \"Succeeded\",\n /** Resource creation failed. */\n Failed = \"Failed\",\n /** Resource creation was canceled. */\n Canceled = \"Canceled\",\n}\n\n/**\n * The provisioning state of a resource type. \\\n * {@link KnownResourceProvisioningState} can be used interchangeably with ResourceProvisioningState,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **Succeeded**: Resource has been created. \\\n * **Failed**: Resource creation failed. \\\n * **Canceled**: Resource creation was canceled.\n */\nexport type ResourceProvisioningState = string;\n\n/** A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. */\nexport interface _OperationListResult {\n /** The Operation items on this page */\n value: Operation[];\n /** The link to the next page of items */\n nextLink?: string;\n}\n\nexport function _operationListResultDeserializer(item: any): _OperationListResult {\n return {\n value: operationArrayDeserializer(item[\"value\"]),\n nextLink: item[\"nextLink\"],\n };\n}\n\nexport function operationArrayDeserializer(result: Array<Operation>): any[] {\n return result.map((item) => {\n return operationDeserializer(item);\n });\n}\n\n/** Details of a REST API operation, returned from the Resource Provider Operations API */\nexport interface Operation {\n /** The name of the operation, as per Resource-Based Access Control (RBAC). Examples: \"Microsoft.Compute/virtualMachines/write\", \"Microsoft.Compute/virtualMachines/capture/action\" */\n readonly name?: string;\n /** Whether the operation applies to data-plane. This is \"true\" for data-plane operations and \"false\" for Azure Resource Manager/control-plane operations. */\n readonly isDataAction?: boolean;\n /** Localized display information for this particular operation. */\n readonly display?: OperationDisplay;\n /** The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\" */\n readonly origin?: Origin;\n /** Extensible enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs. */\n actionType?: ActionType;\n}\n\nexport function operationDeserializer(item: any): Operation {\n return {\n name: item[\"name\"],\n isDataAction: item[\"isDataAction\"],\n display: !item[\"display\"] ? item[\"display\"] : operationDisplayDeserializer(item[\"display\"]),\n origin: item[\"origin\"],\n actionType: item[\"actionType\"],\n };\n}\n\n/** Localized display information for and operation. */\nexport interface OperationDisplay {\n /** The localized friendly form of the resource provider name, e.g. \"Microsoft Monitoring Insights\" or \"Microsoft Compute\". */\n readonly provider?: string;\n /** The localized friendly name of the resource type related to this operation. E.g. \"Virtual Machines\" or \"Job Schedule Collections\". */\n readonly resource?: string;\n /** The concise, localized friendly name for the operation; suitable for dropdowns. E.g. \"Create or Update Virtual Machine\", \"Restart Virtual Machine\". */\n readonly operation?: string;\n /** The short, localized friendly description of the operation; suitable for tool tips and detailed views. */\n readonly description?: string;\n}\n\nexport function operationDisplayDeserializer(item: any): OperationDisplay {\n return {\n provider: item[\"provider\"],\n resource: item[\"resource\"],\n operation: item[\"operation\"],\n description: item[\"description\"],\n };\n}\n\n/** Known values of {@link Origin} that the service accepts. */\nexport enum KnownOrigin {\n /** user */\n User = \"user\",\n /** system */\n System = \"system\",\n /** user,system */\n UserSystem = \"user,system\",\n}\n\n/**\n * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\" \\\n * {@link KnownOrigin} can be used interchangeably with Origin,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **user** \\\n * **system** \\\n * **user,system**\n */\nexport type Origin = string;\n\n/** Extensible enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs. */\nexport enum KnownActionType {\n /** Actions are for internal-only APIs. */\n Internal = \"Internal\",\n}\n\n/**\n * Extensible enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs. \\\n * {@link KnownActionType} can be used interchangeably with ActionType,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **Internal**: Actions are for internal-only APIs.\n */\nexport type ActionType = string;\n\n/** The available API versions. */\nexport enum KnownVersions {\n /** The 2023-07-01-preview API version. */\n v2023_07_01_preview = \"2023-07-01-preview\",\n}\n"]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { AzureTerraformClient } from "./azureTerraformClient.js";
|
|
2
|
+
import { OperationOptions, PathUncheckedResponse } from "@azure-rest/core-client";
|
|
3
|
+
import { AbortSignalLike } from "@azure/abort-controller";
|
|
4
|
+
import { PollerLike, OperationState } from "@azure/core-lro";
|
|
5
|
+
export interface RestorePollerOptions<TResult, TResponse extends PathUncheckedResponse = PathUncheckedResponse> extends OperationOptions {
|
|
6
|
+
/** Delay to wait until next poll, in milliseconds. */
|
|
7
|
+
updateIntervalInMs?: number;
|
|
8
|
+
/**
|
|
9
|
+
* The signal which can be used to abort requests.
|
|
10
|
+
*/
|
|
11
|
+
abortSignal?: AbortSignalLike;
|
|
12
|
+
/** Deserialization function for raw response body */
|
|
13
|
+
processResponseBody?: (result: TResponse) => Promise<TResult>;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Creates a poller from the serialized state of another poller. This can be
|
|
17
|
+
* useful when you want to create pollers on a different host or a poller
|
|
18
|
+
* needs to be constructed after the original one is not in scope.
|
|
19
|
+
*/
|
|
20
|
+
export declare function restorePoller<TResponse extends PathUncheckedResponse, TResult>(client: AzureTerraformClient, serializedState: string, sourceOperation: (...args: any[]) => PollerLike<OperationState<TResult>, TResult>, options?: RestorePollerOptions<TResult>): PollerLike<OperationState<TResult>, TResult>;
|
|
21
|
+
//# sourceMappingURL=restorePollerHelpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"restorePollerHelpers.d.ts","sourceRoot":"","sources":["../../src/restorePollerHelpers.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAGjE,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAClF,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EACL,UAAU,EACV,cAAc,EAGf,MAAM,iBAAiB,CAAC;AAEzB,MAAM,WAAW,oBAAoB,CACnC,OAAO,EACP,SAAS,SAAS,qBAAqB,GAAG,qBAAqB,CAC/D,SAAQ,gBAAgB;IACxB,sDAAsD;IACtD,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;OAEG;IACH,WAAW,CAAC,EAAE,eAAe,CAAC;IAC9B,qDAAqD;IACrD,mBAAmB,CAAC,EAAE,CAAC,MAAM,EAAE,SAAS,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;CAC/D;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,SAAS,SAAS,qBAAqB,EAAE,OAAO,EAC5E,MAAM,EAAE,oBAAoB,EAC5B,eAAe,EAAE,MAAM,EACvB,eAAe,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,UAAU,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,EACjF,OAAO,CAAC,EAAE,oBAAoB,CAAC,OAAO,CAAC,GACtC,UAAU,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,CA+B9C"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
import { _terraformExportTerraformDeserialize } from "./api/terraform/index.js";
|
|
4
|
+
import { getLongRunningPoller } from "./static-helpers/pollingHelpers.js";
|
|
5
|
+
import { deserializeState, } from "@azure/core-lro";
|
|
6
|
+
/**
|
|
7
|
+
* Creates a poller from the serialized state of another poller. This can be
|
|
8
|
+
* useful when you want to create pollers on a different host or a poller
|
|
9
|
+
* needs to be constructed after the original one is not in scope.
|
|
10
|
+
*/
|
|
11
|
+
export function restorePoller(client, serializedState, sourceOperation, options) {
|
|
12
|
+
const pollerConfig = deserializeState(serializedState).config;
|
|
13
|
+
const { initialRequestUrl, requestMethod, metadata } = pollerConfig;
|
|
14
|
+
if (!initialRequestUrl || !requestMethod) {
|
|
15
|
+
throw new Error(`Invalid serialized state: ${serializedState} for sourceOperation ${sourceOperation?.name}`);
|
|
16
|
+
}
|
|
17
|
+
const resourceLocationConfig = metadata?.["resourceLocationConfig"];
|
|
18
|
+
const { deserializer, expectedStatuses = [] } = getDeserializationHelper(initialRequestUrl, requestMethod) ?? {};
|
|
19
|
+
const deserializeHelper = options?.processResponseBody ?? deserializer;
|
|
20
|
+
if (!deserializeHelper) {
|
|
21
|
+
throw new Error(`Please ensure the operation is in this client! We can't find its deserializeHelper for ${sourceOperation?.name}.`);
|
|
22
|
+
}
|
|
23
|
+
return getLongRunningPoller(client["_client"] ?? client, deserializeHelper, expectedStatuses, {
|
|
24
|
+
updateIntervalInMs: options?.updateIntervalInMs,
|
|
25
|
+
abortSignal: options?.abortSignal,
|
|
26
|
+
resourceLocationConfig,
|
|
27
|
+
restoreFrom: serializedState,
|
|
28
|
+
initialRequestUrl,
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
const deserializeMap = {
|
|
32
|
+
"POST /subscriptions/{subscriptionId}/providers/Microsoft.AzureTerraform/exportTerraform": {
|
|
33
|
+
deserializer: _terraformExportTerraformDeserialize,
|
|
34
|
+
expectedStatuses: ["202", "200"],
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
function getDeserializationHelper(urlStr, method) {
|
|
38
|
+
const path = new URL(urlStr).pathname;
|
|
39
|
+
const pathParts = path.split("/");
|
|
40
|
+
// Traverse list to match the longest candidate
|
|
41
|
+
// matchedLen: the length of candidate path
|
|
42
|
+
// matchedValue: the matched status code array
|
|
43
|
+
let matchedLen = -1, matchedValue;
|
|
44
|
+
// Iterate the responseMap to find a match
|
|
45
|
+
for (const [key, value] of Object.entries(deserializeMap)) {
|
|
46
|
+
// Extracting the path from the map key which is in format
|
|
47
|
+
// GET /path/foo
|
|
48
|
+
if (!key.startsWith(method)) {
|
|
49
|
+
continue;
|
|
50
|
+
}
|
|
51
|
+
const candidatePath = getPathFromMapKey(key);
|
|
52
|
+
// Get each part of the url path
|
|
53
|
+
const candidateParts = candidatePath.split("/");
|
|
54
|
+
// track if we have found a match to return the values found.
|
|
55
|
+
let found = true;
|
|
56
|
+
for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {
|
|
57
|
+
if (candidateParts[i]?.startsWith("{") && candidateParts[i]?.indexOf("}") !== -1) {
|
|
58
|
+
const start = candidateParts[i].indexOf("}") + 1, end = candidateParts[i]?.length;
|
|
59
|
+
// If the current part of the candidate is a "template" part
|
|
60
|
+
// Try to use the suffix of pattern to match the path
|
|
61
|
+
// {guid} ==> $
|
|
62
|
+
// {guid}:export ==> :export$
|
|
63
|
+
const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test(pathParts[j] || "");
|
|
64
|
+
if (!isMatched) {
|
|
65
|
+
found = false;
|
|
66
|
+
break;
|
|
67
|
+
}
|
|
68
|
+
continue;
|
|
69
|
+
}
|
|
70
|
+
// If the candidate part is not a template and
|
|
71
|
+
// the parts don't match mark the candidate as not found
|
|
72
|
+
// to move on with the next candidate path.
|
|
73
|
+
if (candidateParts[i] !== pathParts[j]) {
|
|
74
|
+
found = false;
|
|
75
|
+
break;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
// We finished evaluating the current candidate parts
|
|
79
|
+
// Update the matched value if and only if we found the longer pattern
|
|
80
|
+
if (found && candidatePath.length > matchedLen) {
|
|
81
|
+
matchedLen = candidatePath.length;
|
|
82
|
+
matchedValue = value;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return matchedValue;
|
|
86
|
+
}
|
|
87
|
+
function getPathFromMapKey(mapKey) {
|
|
88
|
+
const pathStart = mapKey.indexOf("/");
|
|
89
|
+
return mapKey.slice(pathStart);
|
|
90
|
+
}
|
|
91
|
+
//# sourceMappingURL=restorePollerHelpers.js.map
|