Skip to content

Commit 1bb0cc9

Browse files
author
SDKAuto
committed
CodeGen from PR 25320 in Azure/azure-rest-api-specs
Merge 76beafbe96c121f2560e476036650eeb889a21a5 into 895c9c994480fb8e9d34b0d1973d57717ab0c979
1 parent e61abe4 commit 1bb0cc9

File tree

11 files changed

+82
-80
lines changed

11 files changed

+82
-80
lines changed

common/config/rush/pnpm-lock.yaml

Lines changed: 7 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/iothub/arm-iothub/CHANGELOG.md

Lines changed: 3 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,6 @@
11
# Release History
2-
3-
## 6.3.0-beta.3 (Unreleased)
4-
5-
### Features Added
6-
7-
### Breaking Changes
8-
9-
### Bugs Fixed
10-
11-
### Other Changes
12-
13-
## 6.3.0-beta.2 (2023-04-06)
2+
3+
## 6.3.0-beta.3 (2023-08-16)
144

155
**Features**
166

@@ -30,35 +20,14 @@
3020
- Interface IotHubProperties has a new optional parameter encryption
3121
- Interface IotHubProperties has a new optional parameter ipVersion
3222
- Interface IotHubProperties has a new optional parameter rootCertificate
33-
- Interface RoutingEndpoints has a new optional parameter cosmosDBSqlCollections
23+
- Interface RoutingEndpoints has a new optional parameter cosmosDBSqlContainers
3424
- Add parameters of IotHubResourceUpdateHeaders to TypeAlias IotHubResourceUpdateResponse
3525
- Added Enum KnownIpVersion
3626
- Enum KnownRoutingSource has a new value DigitalTwinChangeEvents
3727
- Enum KnownRoutingSource has a new value MqttBrokerMessages
3828
- Added function getContinuationToken
3929

40-
## 6.3.0-beta.1 (2022-12-06)
4130

42-
**Features**
43-
44-
- Added Interface EncryptionPropertiesDescription
45-
- Added Interface IotHubPropertiesDeviceStreams
46-
- Added Interface IotHubResourceCreateOrUpdateHeaders
47-
- Added Interface IotHubResourceDeleteHeaders
48-
- Added Interface IotHubResourceUpdateHeaders
49-
- Added Interface KeyVaultKeyProperties
50-
- Added Interface PrivateEndpointConnectionsDeleteHeaders
51-
- Added Interface PrivateEndpointConnectionsUpdateHeaders
52-
- Added Interface RootCertificateProperties
53-
- Added Interface RoutingCosmosDBSqlApiProperties
54-
- Interface IotHubProperties has a new optional parameter deviceStreams
55-
- Interface IotHubProperties has a new optional parameter encryption
56-
- Interface IotHubProperties has a new optional parameter rootCertificate
57-
- Interface RoutingEndpoints has a new optional parameter cosmosDBSqlCollections
58-
- Add parameters of IotHubResourceUpdateHeaders to TypeAlias IotHubResourceUpdateResponse
59-
- Enum KnownRoutingSource has a new value DigitalTwinChangeEvents
60-
- Enum KnownRoutingSource has a new value MqttBrokerMessages
61-
6231
## 6.2.0 (2022-08-18)
6332

6433
**Features**

sdk/iothub/arm-iothub/_meta.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"commit": "8725e0700974d2c8cba436b5696728ebc5a80f1b",
2+
"commit": "bcddb87efe7168f472d73482e1185881857be47e",
33
"readme": "specification/iothub/resource-manager/readme.md",
4-
"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\\iothub\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.10 --generate-sample=true",
4+
"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=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/iothub/resource-manager/readme.md --use=@autorest/typescript@^6.0.4",
55
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
6-
"release_tool": "@azure-tools/js-sdk-release-tools@2.6.2",
7-
"use": "@autorest/typescript@6.0.0-rc.10"
6+
"release_tool": "@azure-tools/js-sdk-release-tools@2.7.1",
7+
"use": "@autorest/typescript@^6.0.4"
88
}

sdk/iothub/arm-iothub/package.json

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
"node": ">=14.0.0"
99
},
1010
"dependencies": {
11-
"@azure/core-lro": "^2.5.0",
11+
"@azure/core-lro": "^2.5.4",
1212
"@azure/abort-controller": "^1.0.0",
1313
"@azure/core-paging": "^1.2.0",
1414
"@azure/core-client": "^1.7.0",
1515
"@azure/core-auth": "^1.3.0",
16-
"@azure/core-rest-pipeline": "^1.8.0",
16+
"@azure/core-rest-pipeline": "^1.12.0",
1717
"tslib": "^2.2.0"
1818
},
1919
"keywords": [
@@ -48,6 +48,7 @@
4848
"chai": "^4.2.0",
4949
"cross-env": "^7.0.2",
5050
"@types/node": "^14.0.0",
51+
"ts-node": "^10.0.0",
5152
"@azure/dev-tool": "^1.0.0"
5253
},
5354
"repository": {
@@ -111,13 +112,5 @@
111112
]
112113
},
113114
"autoPublish": true,
114-
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/iothub/arm-iothub",
115-
"//sampleConfiguration": {
116-
"productName": "",
117-
"productSlugs": [
118-
"azure"
119-
],
120-
"disableDocsMs": true,
121-
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-iothub?view=azure-node-preview"
122-
}
123-
}
115+
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/iothub/arm-iothub"
116+
}

sdk/iothub/arm-iothub/review/arm-iothub.api.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1170,7 +1170,7 @@ export interface RouteProperties {
11701170
// @public
11711171
export interface RoutingCosmosDBSqlApiProperties {
11721172
authenticationType?: AuthenticationType;
1173-
collectionName: string;
1173+
containerName: string;
11741174
databaseName: string;
11751175
endpointUri: string;
11761176
id?: string;
@@ -1186,7 +1186,7 @@ export interface RoutingCosmosDBSqlApiProperties {
11861186

11871187
// @public
11881188
export interface RoutingEndpoints {
1189-
cosmosDBSqlCollections?: RoutingCosmosDBSqlApiProperties[];
1189+
cosmosDBSqlContainers?: RoutingCosmosDBSqlApiProperties[];
11901190
eventHubs?: RoutingEventHubProperties[];
11911191
serviceBusQueues?: RoutingServiceBusQueueEndpointProperties[];
11921192
serviceBusTopics?: RoutingServiceBusTopicEndpointProperties[];

sdk/iothub/arm-iothub/src/iotHubClient.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ export class IotHubClient extends coreClient.ServiceClient {
119119

120120
// Assigning values to Constant parameters
121121
this.$host = options.$host || "https://management.azure.com";
122-
this.apiVersion = options.apiVersion || "2022-11-15-preview";
122+
this.apiVersion = options.apiVersion || "2023-06-30-preview";
123123
this.operations = new OperationsImpl(this);
124124
this.iotHubResource = new IotHubResourceImpl(this);
125125
this.resourceProviderCommon = new ResourceProviderCommonImpl(this);

sdk/iothub/arm-iothub/src/models/index.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -288,8 +288,8 @@ export interface RoutingEndpoints {
288288
eventHubs?: RoutingEventHubProperties[];
289289
/** The list of storage container endpoints that IoT hub routes messages to, based on the routing rules. */
290290
storageContainers?: RoutingStorageContainerProperties[];
291-
/** The list of Cosmos DB collection endpoints that IoT hub routes messages to, based on the routing rules. */
292-
cosmosDBSqlCollections?: RoutingCosmosDBSqlApiProperties[];
291+
/** The list of Cosmos DB container endpoints that IoT hub routes messages to, based on the routing rules. */
292+
cosmosDBSqlContainers?: RoutingCosmosDBSqlApiProperties[];
293293
}
294294

295295
/** The properties related to service bus queue endpoint types. */
@@ -394,33 +394,33 @@ export interface RoutingStorageContainerProperties {
394394
encoding?: RoutingStorageContainerPropertiesEncoding;
395395
}
396396

397-
/** The properties related to a cosmos DB sql collection endpoint. */
397+
/** The properties related to a cosmos DB sql container endpoint. */
398398
export interface RoutingCosmosDBSqlApiProperties {
399399
/** The name that identifies this endpoint. The name can only include alphanumeric characters, periods, underscores, hyphens and has a maximum length of 64 characters. The following names are reserved: events, fileNotifications, $default. Endpoint names must be unique across endpoint types. */
400400
name: string;
401-
/** Id of the cosmos DB sql collection endpoint */
401+
/** Id of the cosmos DB sql container endpoint */
402402
id?: string;
403403
/** The subscription identifier of the cosmos DB account. */
404404
subscriptionId?: string;
405405
/** The name of the resource group of the cosmos DB account. */
406406
resourceGroup?: string;
407407
/** The url of the cosmos DB account. It must include the protocol https:// */
408408
endpointUri: string;
409-
/** Method used to authenticate against the cosmos DB sql collection endpoint */
409+
/** Method used to authenticate against the cosmos DB sql container endpoint */
410410
authenticationType?: AuthenticationType;
411-
/** Managed identity properties of routing cosmos DB collection endpoint. */
411+
/** Managed identity properties of routing cosmos DB container endpoint. */
412412
identity?: ManagedIdentity;
413413
/** The primary key of the cosmos DB account. */
414414
primaryKey?: string;
415415
/** The secondary key of the cosmos DB account. */
416416
secondaryKey?: string;
417417
/** The name of the cosmos DB database in the cosmos DB account. */
418418
databaseName: string;
419-
/** The name of the cosmos DB sql collection in the cosmos DB database. */
420-
collectionName: string;
421-
/** The name of the partition key associated with this cosmos DB sql collection if one exists. This is an optional parameter. */
419+
/** The name of the cosmos DB sql container in the cosmos DB database. */
420+
containerName: string;
421+
/** The name of the partition key associated with this cosmos DB sql container if one exists. This is an optional parameter. */
422422
partitionKeyName?: string;
423-
/** The template for generating a synthetic partition key value for use with this cosmos DB sql collection. The template must include at least one of the following placeholders: {iothub}, {deviceid}, {DD}, {MM}, and {YYYY}. Any one placeholder may be specified at most once, but order and non-placeholder components are arbitrary. This parameter is only required if PartitionKeyName is specified. */
423+
/** The template for generating a synthetic partition key value for use with this cosmos DB sql container. The template must include at least one of the following placeholders: {iothub}, {deviceid}, {DD}, {MM}, and {YYYY}. Any one placeholder may be specified at most once, but order and non-placeholder components are arbitrary. This parameter is only required if PartitionKeyName is specified. */
424424
partitionKeyTemplate?: string;
425425
}
426426

sdk/iothub/arm-iothub/src/models/mappers.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -763,8 +763,8 @@ export const RoutingEndpoints: coreClient.CompositeMapper = {
763763
}
764764
}
765765
},
766-
cosmosDBSqlCollections: {
767-
serializedName: "cosmosDBSqlCollections",
766+
cosmosDBSqlContainers: {
767+
serializedName: "cosmosDBSqlContainers",
768768
type: {
769769
name: "Sequence",
770770
element: {
@@ -1171,8 +1171,8 @@ export const RoutingCosmosDBSqlApiProperties: coreClient.CompositeMapper = {
11711171
name: "String"
11721172
}
11731173
},
1174-
collectionName: {
1175-
serializedName: "collectionName",
1174+
containerName: {
1175+
serializedName: "containerName",
11761176
required: true,
11771177
type: {
11781178
name: "String"

sdk/iothub/arm-iothub/src/models/parameters.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export const $host: OperationURLParameter = {
5353
export const apiVersion: OperationQueryParameter = {
5454
parameterPath: "apiVersion",
5555
mapper: {
56-
defaultValue: "2022-11-15-preview",
56+
defaultValue: "2023-06-30-preview",
5757
isConstant: true,
5858
serializedName: "api-version",
5959
type: {
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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+
9+
import {
10+
Recorder,
11+
RecorderStartOptions,
12+
env
13+
} from "@azure-tools/test-recorder";
14+
import { assert } from "chai";
15+
import { Context } from "mocha";
16+
17+
const replaceableVariables: Record<string, string> = {
18+
AZURE_CLIENT_ID: "azure_client_id",
19+
AZURE_CLIENT_SECRET: "azure_client_secret",
20+
AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888",
21+
SUBSCRIPTION_ID: "azure_subscription_id"
22+
};
23+
24+
const recorderOptions: RecorderStartOptions = {
25+
envSetupForPlayback: replaceableVariables
26+
};
27+
28+
describe("My test", () => {
29+
let recorder: Recorder;
30+
31+
beforeEach(async function(this: Context) {
32+
recorder = new Recorder(this.currentTest);
33+
await recorder.start(recorderOptions);
34+
});
35+
36+
afterEach(async function() {
37+
await recorder.stop();
38+
});
39+
40+
it("sample test", async function() {
41+
console.log("Hi, I'm a test!");
42+
});
43+
});

0 commit comments

Comments
 (0)