Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 12 additions & 11 deletions sdk/iothub/arm-iothub/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
# Release History

## 6.0.1 (Unreleased)

### Features Added

### Breaking Changes

### Bugs Fixed

### Other Changes


## 6.1.0 (2022-02-15)

**Features**

- Added Interface SystemData
- Added Type Alias CreatedByType
- Interface IotHubProperties has a new optional parameter enableDataResidency
- Type Alias IotHubDescription has a new parameter systemData
- Added Enum KnownCreatedByType


## 6.0.0 (2021-12-17)

The package of @azure/arm-iothub is using our next generation design principles since version 6.0.0, which contains breaking changes.
Expand Down
2 changes: 1 addition & 1 deletion sdk/iothub/arm-iothub/LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2021 Microsoft
Copyright (c) 2022 Microsoft

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
6 changes: 3 additions & 3 deletions sdk/iothub/arm-iothub/_meta.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"commit": "e6d1396612965f2af8df6bb941be19681147930a",
"commit": "5b02f0befa6eaaaf93afc11274795c651e6e3c0c",
"readme": "specification/iothub/resource-manager/readme.md",
"autorest_command": "autorest --version=3.1.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/iothub/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20211207.1",
"autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/iothub/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20220128.1 --generate-sample=true",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
"use": "@autorest/typescript@6.0.0-alpha.16.20211207.1"
"use": "@autorest/typescript@6.0.0-alpha.16.20220128.1"
}
25 changes: 19 additions & 6 deletions sdk/iothub/arm-iothub/api-extractor.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,31 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"mainEntryPointFilePath": "./dist-esm/src/index.d.ts",
"docModel": { "enabled": true },
"apiReport": { "enabled": true, "reportFolder": "./review" },
"docModel": {
"enabled": true
},
"apiReport": {
"enabled": true,
"reportFolder": "./review"
},
"dtsRollup": {
"enabled": true,
"untrimmedFilePath": "",
"publicTrimmedFilePath": "./types/arm-iothub.d.ts"
},
"messages": {
"tsdocMessageReporting": { "default": { "logLevel": "none" } },
"tsdocMessageReporting": {
"default": {
"logLevel": "none"
}
},
"extractorMessageReporting": {
"ae-missing-release-tag": { "logLevel": "none" },
"ae-unresolved-link": { "logLevel": "none" }
"ae-missing-release-tag": {
"logLevel": "none"
},
"ae-unresolved-link": {
"logLevel": "none"
}
}
}
}
}
22 changes: 19 additions & 3 deletions sdk/iothub/arm-iothub/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"sdk-type": "mgmt",
"author": "Microsoft Corporation",
"description": "A generated SDK for IotHubClient.",
"version": "6.0.1",
"version": "6.1.0",
"engines": {
"node": ">=12.0.0"
},
Expand Down Expand Up @@ -98,5 +98,21 @@
"docs": "echo skipped"
},
"sideEffects": false,
"autoPublish": true
}
"//metadata": {
"constantPaths": [
{
"path": "src/iotHubClient.ts",
"prefix": "packageDetails"
}
]
},
"autoPublish": true,
"//sampleConfiguration": {
"productName": "",
"productSlugs": [
"azure"
],
"disableDocsMs": true,
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-iothub?view=azure-node-preview"
}
}
27 changes: 27 additions & 0 deletions sdk/iothub/arm-iothub/review/arm-iothub.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,9 @@ export interface CloudToDeviceProperties {
maxDeliveryCount?: number;
}

// @public
export type CreatedByType = string;

// @public
export type DefaultAction = string;

Expand Down Expand Up @@ -333,6 +336,7 @@ export type IotHubDescription = Resource & {
properties?: IotHubProperties;
sku: IotHubSkuInfo;
identity?: ArmIdentity;
readonly systemData?: SystemData;
};

// @public
Expand Down Expand Up @@ -372,6 +376,7 @@ export interface IotHubProperties {
disableDeviceSAS?: boolean;
disableLocalAuth?: boolean;
disableModuleSAS?: boolean;
enableDataResidency?: boolean;
enableFileUploadNotifications?: boolean;
eventHubEndpoints?: {
[propertyName: string]: EventHubProperties;
Expand Down Expand Up @@ -742,6 +747,18 @@ export enum KnownCapabilities {
None = "None"
}

// @public
export enum KnownCreatedByType {
// (undocumented)
Application = "Application",
// (undocumented)
Key = "Key",
// (undocumented)
ManagedIdentity = "ManagedIdentity",
// (undocumented)
User = "User"
}

// @public
export enum KnownDefaultAction {
// (undocumented)
Expand Down Expand Up @@ -1256,6 +1273,16 @@ export interface StorageEndpointProperties {
sasTtlAsIso8601?: string;
}

// @public
export interface SystemData {
createdAt?: Date;
createdBy?: string;
createdByType?: CreatedByType;
lastModifiedAt?: Date;
lastModifiedBy?: string;
lastModifiedByType?: CreatedByType;
}

// @public
export interface TagsResource {
tags?: {
Expand Down
4 changes: 4 additions & 0 deletions sdk/iothub/arm-iothub/sample.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# App registration secret for AAD authentication
AZURE_CLIENT_SECRET=
AZURE_CLIENT_ID=
AZURE_TENANT_ID=
39 changes: 39 additions & 0 deletions sdk/iothub/arm-iothub/samples-dev/certificatesCreateOrUpdate.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
* 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.
*/

// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
/**
* This sample demonstrates how to Adds new or replaces existing certificate.
*
* @summary Adds new or replaces existing certificate.
* x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-02/examples/iothub_certificatescreateorupdate.json
*/
import { CertificateDescription, IotHubClient } from "@azure/arm-iothub";
import { DefaultAzureCredential } from "@azure/identity";

async function certificatesCreateOrUpdate() {
const subscriptionId = "91d12660-3dec-467a-be2a-213b5544ddc0";
const resourceGroupName = "myResourceGroup";
const resourceName = "iothub";
const certificateName = "cert";
const certificateDescription: CertificateDescription = {
properties: { certificate: "############################################" }
};
const credential = new DefaultAzureCredential();
const client = new IotHubClient(credential, subscriptionId);
const result = await client.certificates.createOrUpdate(
resourceGroupName,
resourceName,
certificateName,
certificateDescription
);
console.log(result);
}

certificatesCreateOrUpdate().catch(console.error);
37 changes: 37 additions & 0 deletions sdk/iothub/arm-iothub/samples-dev/certificatesDelete.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
* 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.
*/

// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
/**
* This sample demonstrates how to Deletes an existing X509 certificate or does nothing if it does not exist.
*
* @summary Deletes an existing X509 certificate or does nothing if it does not exist.
* x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-02/examples/iothub_certificatesdelete.json
*/
import { IotHubClient } from "@azure/arm-iothub";
import { DefaultAzureCredential } from "@azure/identity";

async function certificatesDelete() {
const subscriptionId = "91d12660-3dec-467a-be2a-213b5544ddc0";
const resourceGroupName = "myResourceGroup";
const resourceName = "myhub";
const certificateName = "cert";
const ifMatch = "AAAAAAAADGk=";
const credential = new DefaultAzureCredential();
const client = new IotHubClient(credential, subscriptionId);
const result = await client.certificates.delete(
resourceGroupName,
resourceName,
certificateName,
ifMatch
);
console.log(result);
}

certificatesDelete().catch(console.error);
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
* 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.
*/

// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
/**
* This sample demonstrates how to Generates verification code for proof of possession flow. The verification code will be used to generate a leaf certificate.
*
* @summary Generates verification code for proof of possession flow. The verification code will be used to generate a leaf certificate.
* x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-02/examples/iothub_generateverificationcode.json
*/
import { IotHubClient } from "@azure/arm-iothub";
import { DefaultAzureCredential } from "@azure/identity";

async function certificatesGenerateVerificationCode() {
const subscriptionId = "91d12660-3dec-467a-be2a-213b5544ddc0";
const resourceGroupName = "myResourceGroup";
const resourceName = "testHub";
const certificateName = "cert";
const ifMatch = "AAAAAAAADGk=";
const credential = new DefaultAzureCredential();
const client = new IotHubClient(credential, subscriptionId);
const result = await client.certificates.generateVerificationCode(
resourceGroupName,
resourceName,
certificateName,
ifMatch
);
console.log(result);
}

certificatesGenerateVerificationCode().catch(console.error);
35 changes: 35 additions & 0 deletions sdk/iothub/arm-iothub/samples-dev/certificatesGet.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
* 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.
*/

// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
/**
* This sample demonstrates how to Returns the certificate.
*
* @summary Returns the certificate.
* x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-02/examples/iothub_getcertificate.json
*/
import { IotHubClient } from "@azure/arm-iothub";
import { DefaultAzureCredential } from "@azure/identity";

async function certificatesGet() {
const subscriptionId = "91d12660-3dec-467a-be2a-213b5544ddc0";
const resourceGroupName = "myResourceGroup";
const resourceName = "testhub";
const certificateName = "cert";
const credential = new DefaultAzureCredential();
const client = new IotHubClient(credential, subscriptionId);
const result = await client.certificates.get(
resourceGroupName,
resourceName,
certificateName
);
console.log(result);
}

certificatesGet().catch(console.error);
33 changes: 33 additions & 0 deletions sdk/iothub/arm-iothub/samples-dev/certificatesListByIotHub.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* 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.
*/

// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
/**
* This sample demonstrates how to Returns the list of certificates.
*
* @summary Returns the list of certificates.
* x-ms-original-file: specification/iothub/resource-manager/Microsoft.Devices/stable/2021-07-02/examples/iothub_listcertificates.json
*/
import { IotHubClient } from "@azure/arm-iothub";
import { DefaultAzureCredential } from "@azure/identity";

async function certificatesListByIotHub() {
const subscriptionId = "91d12660-3dec-467a-be2a-213b5544ddc0";
const resourceGroupName = "myResourceGroup";
const resourceName = "testhub";
const credential = new DefaultAzureCredential();
const client = new IotHubClient(credential, subscriptionId);
const result = await client.certificates.listByIotHub(
resourceGroupName,
resourceName
);
console.log(result);
}

certificatesListByIotHub().catch(console.error);
Loading