diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml
index 99321d0907bc..097f3b10fde7 100644
--- a/common/config/rush/pnpm-lock.yaml
+++ b/common/config/rush/pnpm-lock.yaml
@@ -1,7 +1,7 @@
lockfileVersion: '6.0'
settings:
- autoInstallPeers: true
+ autoInstallPeers: false
excludeLinksFromLockfile: false
dependencies:
@@ -4495,7 +4495,7 @@ packages:
dependencies:
semver: 7.5.4
shelljs: 0.8.5
- typescript: 5.3.0-dev.20231030
+ typescript: 5.4.0-dev.20231113
dev: false
/eastasianwidth@0.2.0:
@@ -9261,8 +9261,8 @@ packages:
hasBin: true
dev: false
- /typescript@5.3.0-dev.20231030:
- resolution: {integrity: sha512-azWrF0lAiu8cBHNr6yq3RDkU/DtQScvT48ea3Ngq6oXJ/GPO0n96wCFSRQA5UbZlVVf3fAAqsUfvOdohRbrPVg==}
+ /typescript@5.4.0-dev.20231113:
+ resolution: {integrity: sha512-5K165L/tImARYZDKwwT2ER9qKt0n56E8jxldXfAVpq8qNqX5o2SvpoPrzCi+eddkHJHl1gPf26xiE+7R6//1Gg==}
engines: {node: '>=14.17'}
hasBin: true
dev: false
@@ -11244,19 +11244,22 @@ packages:
dev: false
file:projects/arm-changes.tgz:
- resolution: {integrity: sha512-U+53YLqBl3DmErXW9glVzD+hP6pA58tpTcHqN13AL6aru5tQawBPW/utqB/usJIKGcBkZVVkVScxSU+YBSVNow==, tarball: file:projects/arm-changes.tgz}
+ resolution: {integrity: sha512-IoZQZqVTX4O5LvlxANEL8hINywPKDllOOg5qn8ml5LJpsWEZKoxqwJN/LbkmXw/UGKCXh53ZHqQHPd7BANAbsA==, tarball: file:projects/arm-changes.tgz}
name: '@rush-temp/arm-changes'
version: 0.0.0
dependencies:
'@azure/identity': 3.3.2
'@microsoft/api-extractor': 7.38.0(@types/node@18.18.7)
'@types/chai': 4.3.9
+ '@types/mocha': 10.0.3
'@types/node': 18.18.7
chai: 4.3.10
cross-env: 7.0.3
- mkdirp: 1.0.4
+ dotenv: 16.3.1
+ esm: 3.2.25
+ mkdirp: 2.1.6
mocha: 10.2.0
- rimraf: 3.0.2
+ rimraf: 5.0.5
ts-node: 10.9.1(@types/node@18.18.7)(typescript@5.2.2)
tslib: 2.6.2
typescript: 5.2.2
@@ -12672,19 +12675,22 @@ packages:
dev: false
file:projects/arm-features.tgz:
- resolution: {integrity: sha512-73VI4IzvKvfyxA73Z92X5QZfVjbR7AB7d/4hHd2HnfimfCbRZYE0ymm+YzERPQ+gvCSqcrnpCXqha9JMgfUT1Q==, tarball: file:projects/arm-features.tgz}
+ resolution: {integrity: sha512-NXeHywRnaUSRdFF+vpIsYDGej8NH5P8SBY85GotGH3aDvuiISFLiw2tma4wDAcTu9Kk6ZnlJcyBYxpJvbwD1PQ==, tarball: file:projects/arm-features.tgz}
name: '@rush-temp/arm-features'
version: 0.0.0
dependencies:
'@azure/identity': 3.3.2
'@microsoft/api-extractor': 7.38.0(@types/node@18.18.7)
'@types/chai': 4.3.9
+ '@types/mocha': 10.0.3
'@types/node': 18.18.7
chai: 4.3.10
cross-env: 7.0.3
- mkdirp: 1.0.4
+ dotenv: 16.3.1
+ esm: 3.2.25
+ mkdirp: 2.1.6
mocha: 10.2.0
- rimraf: 3.0.2
+ rimraf: 5.0.5
ts-node: 10.9.1(@types/node@18.18.7)(typescript@5.2.2)
tslib: 2.6.2
typescript: 5.2.2
@@ -13266,19 +13272,22 @@ packages:
dev: false
file:projects/arm-links.tgz:
- resolution: {integrity: sha512-QnQUc0vJ/Saqt/0YmlnG1jxOfGFn4+leDjpLVE0Gnh9MKnLESwDO29wVpI4O+85u6rOgVX26vjgl/uJYaY9VYw==, tarball: file:projects/arm-links.tgz}
+ resolution: {integrity: sha512-yWyTzzPDk4jWoCvycP6C+q/ZR0dtUKpFqjV0t235Z2tJFFmTCQw/qECNh7af8LbLwxDDkYM2OyKwV4fpzI1Gxw==, tarball: file:projects/arm-links.tgz}
name: '@rush-temp/arm-links'
version: 0.0.0
dependencies:
'@azure/identity': 3.3.2
'@microsoft/api-extractor': 7.38.0(@types/node@18.18.7)
'@types/chai': 4.3.9
+ '@types/mocha': 10.0.3
'@types/node': 18.18.7
chai: 4.3.10
cross-env: 7.0.3
- mkdirp: 1.0.4
+ dotenv: 16.3.1
+ esm: 3.2.25
+ mkdirp: 2.1.6
mocha: 10.2.0
- rimraf: 3.0.2
+ rimraf: 5.0.5
ts-node: 10.9.1(@types/node@18.18.7)(typescript@5.2.2)
tslib: 2.6.2
typescript: 5.2.2
@@ -13340,19 +13349,22 @@ packages:
dev: false
file:projects/arm-locks.tgz:
- resolution: {integrity: sha512-94xTc2vXU8VXC0dNd7kFQuGTQGuKxmkC8/v834Ls2TVSOM8IlFPzYwzDBOksNSXMo5+GHOUuNZlV7MXAZwvSNg==, tarball: file:projects/arm-locks.tgz}
+ resolution: {integrity: sha512-Qta5O/juj+vMo5M9P2IGAAg4Q2zMOG98sfxgoHW29m5lDrvNHyfRWYzB3FZGa/q9zy4mKL7/VP/14LqqDefJUA==, tarball: file:projects/arm-locks.tgz}
name: '@rush-temp/arm-locks'
version: 0.0.0
dependencies:
'@azure/identity': 3.3.2
'@microsoft/api-extractor': 7.38.0(@types/node@18.18.7)
'@types/chai': 4.3.9
+ '@types/mocha': 10.0.3
'@types/node': 18.18.7
chai: 4.3.10
cross-env: 7.0.3
- mkdirp: 1.0.4
+ dotenv: 16.3.1
+ esm: 3.2.25
+ mkdirp: 2.1.6
mocha: 10.2.0
- rimraf: 3.0.2
+ rimraf: 5.0.5
ts-node: 10.9.1(@types/node@18.18.7)(typescript@5.2.2)
tslib: 2.6.2
typescript: 5.2.2
@@ -13484,20 +13496,22 @@ packages:
dev: false
file:projects/arm-managedapplications.tgz:
- resolution: {integrity: sha512-TXwaskNL9KGRS7hlbbePM6Cz9U+GBcfbaGIWQX/sJL26IdYy7iw3CjjQfiXb7y8bQy/37OvbcbIErPz6MNI7eA==, tarball: file:projects/arm-managedapplications.tgz}
+ resolution: {integrity: sha512-P2fGjmfU1HujB69+c2B/H8FfUN0CRk9Ppkzb3gHI2/z8vsPXTMuVwlVsb3V++AR58PHaHBh90wTQHdcDvb1CZQ==, tarball: file:projects/arm-managedapplications.tgz}
name: '@rush-temp/arm-managedapplications'
version: 0.0.0
dependencies:
'@azure/identity': 3.3.2
'@microsoft/api-extractor': 7.38.0(@types/node@18.18.7)
'@types/chai': 4.3.9
+ '@types/mocha': 10.0.3
'@types/node': 18.18.7
chai: 4.3.10
cross-env: 7.0.3
dotenv: 16.3.1
+ esm: 3.2.25
mkdirp: 2.1.6
mocha: 10.2.0
- rimraf: 3.0.2
+ rimraf: 5.0.5
ts-node: 10.9.1(@types/node@18.18.7)(typescript@5.2.2)
tslib: 2.6.2
typescript: 5.2.2
@@ -14319,20 +14333,22 @@ packages:
dev: false
file:projects/arm-policy.tgz:
- resolution: {integrity: sha512-/dhmPL/hUyUFBeA/k+1Ex91Deni5MOfUdESJsLZf9oiDhsQ0V+pUve/VPCCTPsEykUDOe1gsV5MeifYikk+1Sg==, tarball: file:projects/arm-policy.tgz}
+ resolution: {integrity: sha512-X+uRjHvIL7SbVz1nr9vDhJjnGWBUuAKuDj9F3NFvbik8+pLYBIVXLIXNc87r8S80RjWm06MM2oYRBhZZDMW7sw==, tarball: file:projects/arm-policy.tgz}
name: '@rush-temp/arm-policy'
version: 0.0.0
dependencies:
'@azure/identity': 3.3.2
'@microsoft/api-extractor': 7.38.0(@types/node@18.18.7)
'@types/chai': 4.3.9
+ '@types/mocha': 10.0.3
'@types/node': 18.18.7
chai: 4.3.10
cross-env: 7.0.3
dotenv: 16.3.1
+ esm: 3.2.25
mkdirp: 2.1.6
mocha: 10.2.0
- rimraf: 3.0.2
+ rimraf: 5.0.5
ts-node: 10.9.1(@types/node@18.18.7)(typescript@5.2.2)
tslib: 2.6.2
typescript: 5.2.2
@@ -14939,20 +14955,22 @@ packages:
dev: false
file:projects/arm-resources-subscriptions.tgz:
- resolution: {integrity: sha512-YHy6SVysSN0aGFDukP9Qs6+gPgHGP7TTMm/XukH5QfSb1zC5qfXL+jzHCHHfIsooTiJcRk9aYHHFxpoBqhnZ8w==, tarball: file:projects/arm-resources-subscriptions.tgz}
+ resolution: {integrity: sha512-To/H5lb6H5b+iXA05h8vVVAFV2172cUpMjDGA9JFKu8epZPhXH0TBze5A17cfZT+dx1rk7dCIoXy+cC4zYqehg==, tarball: file:projects/arm-resources-subscriptions.tgz}
name: '@rush-temp/arm-resources-subscriptions'
version: 0.0.0
dependencies:
'@azure/identity': 3.3.2
'@microsoft/api-extractor': 7.38.0(@types/node@18.18.7)
'@types/chai': 4.3.9
+ '@types/mocha': 10.0.3
'@types/node': 18.18.7
chai: 4.3.10
cross-env: 7.0.3
dotenv: 16.3.1
+ esm: 3.2.25
mkdirp: 2.1.6
mocha: 10.2.0
- rimraf: 3.0.2
+ rimraf: 5.0.5
ts-node: 10.9.1(@types/node@18.18.7)(typescript@5.2.2)
tslib: 2.6.2
typescript: 5.2.2
@@ -14964,20 +14982,22 @@ packages:
dev: false
file:projects/arm-resources.tgz:
- resolution: {integrity: sha512-ws2q0Vy1XQtuQ49TTUZflbpF8KzNPc4ZmsXkPSSt74DGobaMJeW9dSrU3TwjtxDJ5hiKVYpe4SXVujDYmckHvg==, tarball: file:projects/arm-resources.tgz}
+ resolution: {integrity: sha512-7SxmLyKRl2wuoM1ask677P5Om+oxLQx5FW+eMma80uJH/5U8+Pu6xX4nTXaTYZQlRWxFseJOXIA47nLTU80qjA==, tarball: file:projects/arm-resources.tgz}
name: '@rush-temp/arm-resources'
version: 0.0.0
dependencies:
'@azure/identity': 3.3.2
'@microsoft/api-extractor': 7.38.0(@types/node@18.18.7)
'@types/chai': 4.3.9
+ '@types/mocha': 10.0.3
'@types/node': 18.18.7
chai: 4.3.10
cross-env: 7.0.3
dotenv: 16.3.1
+ esm: 3.2.25
mkdirp: 2.1.6
mocha: 10.2.0
- rimraf: 3.0.2
+ rimraf: 5.0.5
ts-node: 10.9.1(@types/node@18.18.7)(typescript@5.2.2)
tslib: 2.6.2
typescript: 5.2.2
@@ -15801,19 +15821,22 @@ packages:
dev: false
file:projects/arm-templatespecs.tgz:
- resolution: {integrity: sha512-AQ1/4GfE52L7URXCOgJogRx8mmaYdddU22c04o+OcyeVVe5kZCBoHrazzv3HYucih9qubMB/BScsBXWC+VyYQQ==, tarball: file:projects/arm-templatespecs.tgz}
+ resolution: {integrity: sha512-nb1TNYl2Nd+mcLDQbqXgxuOST9N3yzh+8wIBN9mKn1n9pijzoT67koIX4dj6mSB5cjx/WciWy3uhwAyugLntRA==, tarball: file:projects/arm-templatespecs.tgz}
name: '@rush-temp/arm-templatespecs'
version: 0.0.0
dependencies:
'@azure/identity': 3.3.2
'@microsoft/api-extractor': 7.38.0(@types/node@18.18.7)
'@types/chai': 4.3.9
+ '@types/mocha': 10.0.3
'@types/node': 18.18.7
chai: 4.3.10
cross-env: 7.0.3
- mkdirp: 1.0.4
+ dotenv: 16.3.1
+ esm: 3.2.25
+ mkdirp: 2.1.6
mocha: 10.2.0
- rimraf: 3.0.2
+ rimraf: 5.0.5
ts-node: 10.9.1(@types/node@18.18.7)(typescript@5.2.2)
tslib: 2.6.2
typescript: 5.2.2
@@ -20375,7 +20398,7 @@ packages:
dev: false
file:projects/storage-blob-changefeed.tgz:
- resolution: {integrity: sha512-2LtIcl6t12irIaBaBSP/ytxkJA5VSRJ2RUg08UJEi/NVLHhjpx+NQQn/a/ebeAwpa2DefdSkfHRhgh7zn8Qzzg==, tarball: file:projects/storage-blob-changefeed.tgz}
+ resolution: {integrity: sha512-nBVNUHVbjsSyKfoA2uJNvG+jlJEW9Oq12K9Oha1C6GVY1rZhEpcWrkob0RJe/sCDdrMo0MBUnvL7+PkUsvhR8w==, tarball: file:projects/storage-blob-changefeed.tgz}
name: '@rush-temp/storage-blob-changefeed'
version: 0.0.0
dependencies:
diff --git a/sdk/resources/arm-resources/CHANGELOG.md b/sdk/resources/arm-resources/CHANGELOG.md
index 657dbf98ef5e..d8207cad7d52 100644
--- a/sdk/resources/arm-resources/CHANGELOG.md
+++ b/sdk/resources/arm-resources/CHANGELOG.md
@@ -1,15 +1,12 @@
# Release History
+
+## 6.0.0 (2023-11-14)
+
+**Breaking Changes**
-## 5.2.1 (Unreleased)
-
-### Features Added
-
-### Breaking Changes
-
-### Bugs Fixed
-
-### Other Changes
-
+ - Class ResourceManagementClient has a new signature
+
+
## 5.2.0 (2023-03-13)
**Features**
@@ -63,4 +60,4 @@ To understand the detail of the change, please refer to [Changelog](https://aka.
To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/js-track2-migration-guide).
-To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/js/mgmt/quickstart ).
+To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart).
diff --git a/sdk/resources/arm-resources/_meta.json b/sdk/resources/arm-resources/_meta.json
index e588fd1b883e..3f6c4ed12d09 100644
--- a/sdk/resources/arm-resources/_meta.json
+++ b/sdk/resources/arm-resources/_meta.json
@@ -1,8 +1,8 @@
{
- "commit": "a42f1b58607091c4f255ead152a8ef323fa0b280",
- "readme": "specification\\resources\\resource-manager\\readme.md",
- "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\resources\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.9.20230306.1 --generate-sample=true",
- "repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
- "release_tool": "@azure-tools/js-sdk-release-tools@2.6.2",
- "use": "@autorest/typescript@6.0.0-rc.9.20230306.1"
+ "commit": "5c6dd74a84214a512f2eba2339e688d93c0b5b3d",
+ "readme": "specification/resources/resource-manager/readme.md",
+ "autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/resources/resource-manager/readme.md --use=@autorest/typescript@^6.0.11",
+ "repository_url": "https://github.com/openapi-env-test/azure-rest-api-specs.git",
+ "release_tool": "@azure-tools/js-sdk-release-tools@2.7.4",
+ "use": "@autorest/typescript@^6.0.11"
}
\ No newline at end of file
diff --git a/sdk/resources/arm-resources/package.json b/sdk/resources/arm-resources/package.json
index 03ceea051fa2..030d4c470eb6 100644
--- a/sdk/resources/arm-resources/package.json
+++ b/sdk/resources/arm-resources/package.json
@@ -3,17 +3,17 @@
"sdk-type": "mgmt",
"author": "Microsoft Corporation",
"description": "A generated SDK for ResourceManagementClient.",
- "version": "5.2.1",
+ "version": "6.0.0",
"engines": {
"node": ">=18.0.0"
},
"dependencies": {
- "@azure/core-lro": "^2.5.0",
+ "@azure/core-lro": "^2.5.4",
"@azure/abort-controller": "^1.0.0",
"@azure/core-paging": "^1.2.0",
"@azure/core-client": "^1.7.0",
"@azure/core-auth": "^1.3.0",
- "@azure/core-rest-pipeline": "^1.8.0",
+ "@azure/core-rest-pipeline": "^1.12.0",
"tslib": "^2.2.0"
},
"keywords": [
@@ -32,17 +32,19 @@
"mkdirp": "^2.1.2",
"typescript": "~5.2.0",
"uglify-js": "^3.4.9",
- "rimraf": "^3.0.0",
+ "rimraf": "^5.0.0",
"dotenv": "^16.0.0",
+ "@azure/dev-tool": "^1.0.0",
"@azure/identity": "^3.3.0",
"@azure-tools/test-recorder": "^3.0.0",
"@azure-tools/test-credential": "^1.0.0",
"mocha": "^10.0.0",
+ "@types/mocha": "^10.0.0",
+ "esm": "^3.2.18",
"@types/chai": "^4.2.8",
"chai": "^4.2.0",
"cross-env": "^7.0.2",
"@types/node": "^18.0.0",
- "@azure/dev-tool": "^1.0.0",
"ts-node": "^10.0.0"
},
"repository": {
@@ -77,7 +79,7 @@
"extract-api": "api-extractor run --local",
"lint": "echo skipped",
"audit": "echo skipped",
- "clean": "rimraf dist dist-browser dist-esm test-dist temp types *.tgz *.log",
+ "clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
"build:node": "echo skipped",
"build:browser": "echo skipped",
"build:test": "echo skipped",
@@ -105,13 +107,5 @@
]
},
"autoPublish": true,
- "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/resources/arm-resources",
- "//sampleConfiguration": {
- "productName": "",
- "productSlugs": [
- "azure"
- ],
- "disableDocsMs": true,
- "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-resources?view=azure-node-preview"
- }
-}
+ "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/resources/arm-resources"
+}
\ No newline at end of file
diff --git a/sdk/resources/arm-resources/review/arm-resources.api.md b/sdk/resources/arm-resources/review/arm-resources.api.md
index 4d8eb74a80a8..e16d22c260de 100644
--- a/sdk/resources/arm-resources/review/arm-resources.api.md
+++ b/sdk/resources/arm-resources/review/arm-resources.api.md
@@ -1354,6 +1354,7 @@ export class ResourceManagementClient extends coreClient.ServiceClient {
// (undocumented)
$host: string;
constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: ResourceManagementClientOptionalParams);
+ constructor(credentials: coreAuth.TokenCredential, options?: ResourceManagementClientOptionalParams);
// (undocumented)
apiVersion: string;
// (undocumented)
@@ -1371,7 +1372,7 @@ export class ResourceManagementClient extends coreClient.ServiceClient {
// (undocumented)
resources: Resources;
// (undocumented)
- subscriptionId: string;
+ subscriptionId?: string;
// (undocumented)
tagsOperations: TagsOperations;
}
diff --git a/sdk/resources/arm-resources/src/models/index.ts b/sdk/resources/arm-resources/src/models/index.ts
index 2c57cb76c149..5b4fff55b89f 100644
--- a/sdk/resources/arm-resources/src/models/index.ts
+++ b/sdk/resources/arm-resources/src/models/index.ts
@@ -1963,7 +1963,7 @@ export interface ResourcesListOptionalParams
extends coreClient.OperationOptions {
/** The filter to apply on the operation.
Filter comparison operators include `eq` (equals) and `ne` (not equals) and may be used with the following properties: `location`, `resourceType`, `name`, `resourceGroup`, `identity`, `identity/principalId`, `plan`, `plan/publisher`, `plan/product`, `plan/name`, `plan/version`, and `plan/promotionCode`.
For example, to filter by a resource type, use `$filter=resourceType eq 'Microsoft.Network/virtualNetworks'`
`substringof(value, property)` can be used to filter for substrings of the following currently-supported properties: `name` and `resourceGroup`
For example, to get all resources with 'demo' anywhere in the resource name, use `$filter=substringof('demo', name)`
Multiple substring operations can also be combined using `and`/`or` operators.
Note that any truncated number of results queried via `$top` may also not be compatible when using a filter.
Resources can be filtered by tag names and values. For example, to filter for a tag name and value, use `$filter=tagName eq 'tag1' and tagValue eq 'Value1'`. Note that when resources are filtered by tag name and value, the original tags for each resource will not be returned in the results. Any list of additional properties queried via `$expand` may also not be compatible when filtering by tag names/values.
For tag names only, resources can be filtered by prefix using the following syntax: `$filter=startswith(tagName, 'depart')`. This query will return all resources with a tag name prefixed by the phrase `depart` (i.e.`department`, `departureDate`, `departureTime`, etc.)
Note that some properties can be combined when filtering resources, which include the following: `substringof() and/or resourceType`, `plan and plan/publisher and plan/name`, and `identity and identity/principalId`. */
filter?: string;
- /** The number of results to return. If null is passed, returns all resources. */
+ /** The number of recommendations per page if a paged version of this API is being used. */
top?: number;
/** Comma-separated list of additional properties to be included in the response. Valid values include `createdTime`, `changedTime` and `provisioningState`. For example, `$expand=createdTime,changedTime`. */
expand?: string;
diff --git a/sdk/resources/arm-resources/src/operations/resources.ts b/sdk/resources/arm-resources/src/operations/resources.ts
index 71347bd79aaf..40d36faf9d19 100644
--- a/sdk/resources/arm-resources/src/operations/resources.ts
+++ b/sdk/resources/arm-resources/src/operations/resources.ts
@@ -831,7 +831,9 @@ export class ResourcesImpl implements Resources {
}
/**
- * Checks by ID whether a resource exists.
+ * Checks by ID whether a resource exists. This API currently works only for a limited set of Resource
+ * providers. In the event that a Resource provider does not implement this API, ARM will respond with
+ * a 405. The alternative then is to use the GET API to check for the existence of the resource.
* @param resourceId The fully qualified ID of the resource, including the resource name and resource
* type. Use the format,
* /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
diff --git a/sdk/resources/arm-resources/src/operationsInterfaces/resources.ts b/sdk/resources/arm-resources/src/operationsInterfaces/resources.ts
index 4a0e0e0452be..dbb3d01e5cb4 100644
--- a/sdk/resources/arm-resources/src/operationsInterfaces/resources.ts
+++ b/sdk/resources/arm-resources/src/operationsInterfaces/resources.ts
@@ -298,7 +298,9 @@ export interface Resources {
options?: ResourcesGetOptionalParams
): Promise;
/**
- * Checks by ID whether a resource exists.
+ * Checks by ID whether a resource exists. This API currently works only for a limited set of Resource
+ * providers. In the event that a Resource provider does not implement this API, ARM will respond with
+ * a 405. The alternative then is to use the GET API to check for the existence of the resource.
* @param resourceId The fully qualified ID of the resource, including the resource name and resource
* type. Use the format,
* /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
diff --git a/sdk/resources/arm-resources/src/resourceManagementClient.ts b/sdk/resources/arm-resources/src/resourceManagementClient.ts
index b6e0ea258726..28ec694903cf 100644
--- a/sdk/resources/arm-resources/src/resourceManagementClient.ts
+++ b/sdk/resources/arm-resources/src/resourceManagementClient.ts
@@ -39,7 +39,7 @@ import { ResourceManagementClientOptionalParams } from "./models";
export class ResourceManagementClient extends coreClient.ServiceClient {
$host: string;
apiVersion: string;
- subscriptionId: string;
+ subscriptionId?: string;
/**
* Initializes a new instance of the ResourceManagementClient class.
@@ -51,12 +51,26 @@ export class ResourceManagementClient extends coreClient.ServiceClient {
credentials: coreAuth.TokenCredential,
subscriptionId: string,
options?: ResourceManagementClientOptionalParams
+ );
+ constructor(
+ credentials: coreAuth.TokenCredential,
+ options?: ResourceManagementClientOptionalParams
+ );
+ constructor(
+ credentials: coreAuth.TokenCredential,
+ subscriptionIdOrOptions?: ResourceManagementClientOptionalParams | string,
+ options?: ResourceManagementClientOptionalParams
) {
if (credentials === undefined) {
throw new Error("'credentials' cannot be null");
}
- if (subscriptionId === undefined) {
- throw new Error("'subscriptionId' cannot be null");
+
+ let subscriptionId: string | undefined;
+
+ if (typeof subscriptionIdOrOptions === "string") {
+ subscriptionId = subscriptionIdOrOptions;
+ } else if (typeof subscriptionIdOrOptions === "object") {
+ options = subscriptionIdOrOptions;
}
// Initializing default values for options
@@ -68,7 +82,7 @@ export class ResourceManagementClient extends coreClient.ServiceClient {
credential: credentials
};
- const packageDetails = `azsdk-js-arm-resources/5.2.1`;
+ const packageDetails = `azsdk-js-arm-resources/6.0.0`;
const userAgentPrefix =
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
diff --git a/sdk/resources/arm-resources/test/sampleTest.ts b/sdk/resources/arm-resources/test/sampleTest.ts
new file mode 100644
index 000000000000..25aeb3ebcc36
--- /dev/null
+++ b/sdk/resources/arm-resources/test/sampleTest.ts
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the MIT License.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
+ */
+
+import {
+ Recorder,
+ RecorderStartOptions,
+ env
+} from "@azure-tools/test-recorder";
+import { assert } from "chai";
+import { Context } from "mocha";
+
+const replaceableVariables: Record = {
+ AZURE_CLIENT_ID: "azure_client_id",
+ AZURE_CLIENT_SECRET: "azure_client_secret",
+ AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888",
+ SUBSCRIPTION_ID: "azure_subscription_id"
+};
+
+const recorderOptions: RecorderStartOptions = {
+ envSetupForPlayback: replaceableVariables
+};
+
+describe("My test", () => {
+ let recorder: Recorder;
+
+ beforeEach(async function(this: Context) {
+ recorder = new Recorder(this.currentTest);
+ await recorder.start(recorderOptions);
+ });
+
+ afterEach(async function() {
+ await recorder.stop();
+ });
+
+ it("sample test", async function() {
+ console.log("Hi, I'm a test!");
+ });
+});
diff --git a/sdk/resources/arm-resources/tsconfig.json b/sdk/resources/arm-resources/tsconfig.json
index b26efa5c66ab..3e6ae96443f3 100644
--- a/sdk/resources/arm-resources/tsconfig.json
+++ b/sdk/resources/arm-resources/tsconfig.json
@@ -15,17 +15,11 @@
],
"declaration": true,
"outDir": "./dist-esm",
- "importHelpers": true,
- "paths": {
- "@azure/arm-resources": [
- "./src/index"
- ]
- }
+ "importHelpers": true
},
"include": [
"./src/**/*.ts",
- "./test/**/*.ts",
- "samples-dev/**/*.ts"
+ "./test/**/*.ts"
],
"exclude": [
"node_modules"