iotcentral-track2-release (#21229)
* iotcentral-track2-release * update
This commit is contained in:
Родитель
29d8513db9
Коммит
e484d1ec10
|
@ -2337,11 +2337,11 @@ packages:
|
|||
resolution: {integrity: sha512-SRXjM+tfsSlA9VuG8hGO2nft2p8zjXCK1VcC6N4NXbBbYbSia9kzCChYQajIjzIqOOOuh5Ock6MmV2oux4jDZQ==}
|
||||
dev: false
|
||||
|
||||
/@types/concurrently/7.0.0:
|
||||
resolution: {integrity: sha512-pUOv0XBVexkfVOLWwzh8CMK7b+dnXGvq+/sJKfcws6b0vuMqNw8UeZUiaO9mWxfyS0eYGQyxg+J9EpVRxUCunA==}
|
||||
deprecated: This is a stub types definition. concurrently provides its own type definitions, so you do not need this installed.
|
||||
/@types/concurrently/6.4.0:
|
||||
resolution: {integrity: sha512-CYU1eyFHsIa2IZIsb8gfUOdiewfnZcyM2Hg1Zaq95xnmB0Ix/bTRM8SttqZ2Cjy6JGPZLttHjZewVsDg1yvnJg==}
|
||||
dependencies:
|
||||
concurrently: 6.5.1
|
||||
'@types/node': 17.0.23
|
||||
chalk: 4.1.2
|
||||
dev: false
|
||||
|
||||
/@types/connect/3.4.35:
|
||||
|
@ -3429,21 +3429,6 @@ packages:
|
|||
resolution: {integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=}
|
||||
dev: false
|
||||
|
||||
/concurrently/6.5.1:
|
||||
resolution: {integrity: sha512-FlSwNpGjWQfRwPLXvJ/OgysbBxPkWpiVjy1042b0U7on7S7qwwMIILRj7WTN1mTgqa582bG6NFuScOoh6Zgdag==}
|
||||
engines: {node: '>=10.0.0'}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
chalk: 4.1.2
|
||||
date-fns: 2.28.0
|
||||
lodash: 4.17.21
|
||||
rxjs: 6.6.7
|
||||
spawn-command: 0.0.2-1
|
||||
supports-color: 8.1.1
|
||||
tree-kill: 1.2.2
|
||||
yargs: 16.2.0
|
||||
dev: false
|
||||
|
||||
/concurrently/7.1.0:
|
||||
resolution: {integrity: sha512-Bz0tMlYKZRUDqJlNiF/OImojMB9ruKUz6GCfmhFnSapXgPe+3xzY4byqoKG9tUZ7L2PGEUjfLPOLfIX3labnmw==}
|
||||
engines: {node: ^12.20.0 || ^14.13.0 || >=16.0.0}
|
||||
|
@ -11183,27 +11168,28 @@ packages:
|
|||
dev: false
|
||||
|
||||
file:projects/arm-iotcentral.tgz:
|
||||
resolution: {integrity: sha512-eC76LaSbo3G0FH6PwiZ65UufrGsuP59H9UHPom5FOXtiHn+aSXSY7uc922GpWTPnRGTqpG0kmDt7MD9MD0Sh/A==, tarball: file:projects/arm-iotcentral.tgz}
|
||||
resolution: {integrity: sha512-Y2eSo2eVLCaQS+8Xj7QRK+L2APxKs/G1HXxRFM3IE78BCuaRal//vXFtzlHzS5sk9G7Mc7MI1/5D/TzIYwZikQ==, tarball: file:projects/arm-iotcentral.tgz}
|
||||
name: '@rush-temp/arm-iotcentral'
|
||||
version: 0.0.0
|
||||
dependencies:
|
||||
'@azure-tools/test-recorder': 1.0.2
|
||||
'@azure/identity': 2.0.4
|
||||
'@microsoft/api-extractor': 7.22.1
|
||||
'@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1
|
||||
'@rollup/plugin-json': 4.1.0_rollup@1.32.1
|
||||
'@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1
|
||||
'@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1
|
||||
'@rollup/plugin-commonjs': 21.0.3_rollup@2.70.1
|
||||
'@rollup/plugin-json': 4.1.0_rollup@2.70.1
|
||||
'@rollup/plugin-multi-entry': 4.1.0_rollup@2.70.1
|
||||
'@rollup/plugin-node-resolve': 13.2.0_rollup@2.70.1
|
||||
cross-env: 7.0.3
|
||||
mkdirp: 1.0.4
|
||||
mocha: 7.2.0
|
||||
rimraf: 3.0.2
|
||||
rollup: 1.32.1
|
||||
rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1
|
||||
rollup: 2.70.1
|
||||
rollup-plugin-sourcemaps: 0.6.3_rollup@2.70.1
|
||||
tslib: 2.3.1
|
||||
typescript: 4.2.4
|
||||
uglify-js: 3.15.4
|
||||
transitivePeerDependencies:
|
||||
- '@types/node'
|
||||
- debug
|
||||
- encoding
|
||||
- supports-color
|
||||
|
@ -14940,7 +14926,7 @@ packages:
|
|||
'@rollup/plugin-node-resolve': 13.2.0_rollup@2.70.1
|
||||
'@types/chai': 4.3.0
|
||||
'@types/chai-as-promised': 7.1.5
|
||||
'@types/concurrently': 7.0.0
|
||||
'@types/concurrently': 6.4.0
|
||||
'@types/fs-extra': 9.0.13
|
||||
'@types/minimist': 1.2.2
|
||||
'@types/mocha': 7.0.2
|
||||
|
|
|
@ -1,5 +1,75 @@
|
|||
# Release History
|
||||
|
||||
## 7.0.0-beta.1 (2022-04-06)
|
||||
|
||||
**Features**
|
||||
|
||||
- Added operation group PrivateEndpointConnections
|
||||
- Added operation group PrivateLinks
|
||||
- Added Interface AppsCreateOrUpdateHeaders
|
||||
- Added Interface AppsDeleteHeaders
|
||||
- Added Interface AppsUpdateHeaders
|
||||
- Added Interface ErrorAdditionalInfo
|
||||
- Added Interface ErrorDetail
|
||||
- Added Interface ErrorResponse
|
||||
- Added Interface NetworkRuleSetIpRule
|
||||
- Added Interface NetworkRuleSets
|
||||
- Added Interface PrivateEndpoint
|
||||
- Added Interface PrivateEndpointConnectionListResult
|
||||
- Added Interface PrivateEndpointConnectionsCreateHeaders
|
||||
- Added Interface PrivateEndpointConnectionsCreateOptionalParams
|
||||
- Added Interface PrivateEndpointConnectionsDeleteHeaders
|
||||
- Added Interface PrivateEndpointConnectionsDeleteOptionalParams
|
||||
- Added Interface PrivateEndpointConnectionsGetOptionalParams
|
||||
- Added Interface PrivateEndpointConnectionsListOptionalParams
|
||||
- Added Interface PrivateLinkResourceListResult
|
||||
- Added Interface PrivateLinkServiceConnectionState
|
||||
- Added Interface PrivateLinksGetOptionalParams
|
||||
- Added Interface PrivateLinksListOptionalParams
|
||||
- Added Interface SystemData
|
||||
- Added Type Alias AppsDeleteResponse
|
||||
- Added Type Alias CreatedByType
|
||||
- Added Type Alias NetworkAction
|
||||
- Added Type Alias PrivateEndpointConnection
|
||||
- Added Type Alias PrivateEndpointConnectionProvisioningState
|
||||
- Added Type Alias PrivateEndpointConnectionsCreateResponse
|
||||
- Added Type Alias PrivateEndpointConnectionsDeleteResponse
|
||||
- Added Type Alias PrivateEndpointConnectionsGetResponse
|
||||
- Added Type Alias PrivateEndpointConnectionsListResponse
|
||||
- Added Type Alias PrivateEndpointServiceConnectionStatus
|
||||
- Added Type Alias PrivateLinkResource
|
||||
- Added Type Alias PrivateLinksGetResponse
|
||||
- Added Type Alias PrivateLinksListResponse
|
||||
- Added Type Alias ProvisioningState
|
||||
- Added Type Alias PublicNetworkAccess
|
||||
- Added Type Alias TrackedResource
|
||||
- Interface AppPatch has a new optional parameter networkRuleSets
|
||||
- Interface AppPatch has a new optional parameter privateEndpointConnections
|
||||
- Interface AppPatch has a new optional parameter provisioningState
|
||||
- Interface AppPatch has a new optional parameter publicNetworkAccess
|
||||
- Interface Resource has a new optional parameter systemData
|
||||
- Class IotCentralClient has a new parameter privateEndpointConnections
|
||||
- Class IotCentralClient has a new parameter privateLinks
|
||||
- Add parameters of TrackedResource to TypeAlias App
|
||||
- Add parameters of AppsCreateOrUpdateHeaders to TypeAlias AppsCreateOrUpdateResponse
|
||||
- Type Alias App has a new parameter provisioningState
|
||||
- Type Alias App has a new parameter publicNetworkAccess
|
||||
- Type Alias App has a new parameter networkRuleSets
|
||||
- Type Alias App has a new parameter privateEndpointConnections
|
||||
- Added Enum KnownCreatedByType
|
||||
- Added Enum KnownNetworkAction
|
||||
- Added Enum KnownPrivateEndpointConnectionProvisioningState
|
||||
- Added Enum KnownPrivateEndpointServiceConnectionStatus
|
||||
- Added Enum KnownProvisioningState
|
||||
- Added Enum KnownPublicNetworkAccess
|
||||
|
||||
**Breaking Changes**
|
||||
|
||||
- Interface Resource no longer has parameter location
|
||||
- Interface Resource no longer has parameter tags
|
||||
- Delete parameters of Resource in TypeAlias App
|
||||
|
||||
|
||||
## 6.0.0 (2022-01-19)
|
||||
|
||||
The package of @azure/arm-iotcentral is using our next generation design principles since version 6.0.0, which contains breaking changes.
|
||||
|
|
|
@ -6,7 +6,7 @@ Use this API to manage IoT Central Applications in your Azure subscription.
|
|||
|
||||
[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/iotcentral/arm-iotcentral) |
|
||||
[Package (NPM)](https://www.npmjs.com/package/@azure/arm-iotcentral) |
|
||||
[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-iotcentral) |
|
||||
[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-iotcentral?view=azure-node-preview) |
|
||||
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)
|
||||
|
||||
## Getting started
|
||||
|
@ -16,6 +16,8 @@ Use this API to manage IoT Central Applications in your Azure subscription.
|
|||
- [LTS versions of Node.js](https://nodejs.org/about/releases/)
|
||||
- Latest versions of Safari, Chrome, Edge and Firefox.
|
||||
|
||||
See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details.
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- An [Azure subscription][azure_sub].
|
||||
|
@ -49,8 +51,17 @@ For more information about how to create an Azure AD Application check out [this
|
|||
```javascript
|
||||
const { IotCentralClient } = require("@azure/arm-iotcentral");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
// For client-side applications running in the browser, use InteractiveBrowserCredential instead of DefaultAzureCredential. See https://aka.ms/azsdk/js/identity/examples for more details.
|
||||
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const client = new IotCentralClient(new DefaultAzureCredential(), subscriptionId);
|
||||
|
||||
// For client-side applications running in the browser, use this code instead:
|
||||
// const credential = new InteractiveBrowserCredential({
|
||||
// tenantId: "<YOUR_TENANT_ID>",
|
||||
// clientId: "<YOUR_CLIENT_ID>"
|
||||
// });
|
||||
// const client = new IotCentralClient(credential, subscriptionId);
|
||||
```
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
{
|
||||
"commit": "1b0a465061c68175898f8f5d27f0301f42ce994c",
|
||||
"commit": "bc0d24cf6ad9c64f100584ba0409dc7373453533",
|
||||
"readme": "specification/iotcentral/resource-manager/readme.md",
|
||||
"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/iotspaces/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20220114.1 --generate-sample=true",
|
||||
"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:\\work\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\iotcentral\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-alpha.18.20220329.1 --generate-sample=true",
|
||||
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
|
||||
"use": "@autorest/typescript@6.0.0-alpha.16.20220114.1"
|
||||
"release_tool": "@azure-tools/js-sdk-release-tools@2.2.1",
|
||||
"use": "@autorest/typescript@6.0.0-alpha.18.20220329.1"
|
||||
}
|
|
@ -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-iotcentral.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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -3,8 +3,10 @@
|
|||
"sdk-type": "mgmt",
|
||||
"author": "Microsoft Corporation",
|
||||
"description": "A generated SDK for IotCentralClient.",
|
||||
"version": "6.0.0",
|
||||
"engines": { "node": ">=12.0.0" },
|
||||
"version": "7.0.0-beta.1",
|
||||
"engines": {
|
||||
"node": ">=12.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@azure/core-lro": "^2.2.0",
|
||||
"@azure/abort-controller": "^1.0.0",
|
||||
|
@ -14,20 +16,26 @@
|
|||
"@azure/core-rest-pipeline": "^1.1.0",
|
||||
"tslib": "^2.2.0"
|
||||
},
|
||||
"keywords": ["node", "azure", "typescript", "browser", "isomorphic"],
|
||||
"keywords": [
|
||||
"node",
|
||||
"azure",
|
||||
"typescript",
|
||||
"browser",
|
||||
"isomorphic"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist-esm/src/index.js",
|
||||
"types": "./types/arm-iotcentral.d.ts",
|
||||
"devDependencies": {
|
||||
"@microsoft/api-extractor": "^7.18.11",
|
||||
"@rollup/plugin-commonjs": "11.0.2",
|
||||
"@rollup/plugin-json": "^4.0.0",
|
||||
"@rollup/plugin-multi-entry": "^3.0.0",
|
||||
"@rollup/plugin-node-resolve": "^8.0.0",
|
||||
"@rollup/plugin-commonjs": "^21.0.1",
|
||||
"@rollup/plugin-json": "^4.1.0",
|
||||
"@rollup/plugin-multi-entry": "^4.1.0",
|
||||
"@rollup/plugin-node-resolve": "^13.1.3",
|
||||
"mkdirp": "^1.0.4",
|
||||
"rollup": "^1.16.3",
|
||||
"rollup-plugin-sourcemaps": "^0.4.2",
|
||||
"rollup": "^2.66.1",
|
||||
"rollup-plugin-sourcemaps": "^0.6.3",
|
||||
"typescript": "~4.2.0",
|
||||
"uglify-js": "^3.4.9",
|
||||
"rimraf": "^3.0.0",
|
||||
|
@ -41,7 +49,9 @@
|
|||
"type": "git",
|
||||
"url": "https://github.com/Azure/azure-sdk-for-js.git"
|
||||
},
|
||||
"bugs": { "url": "https://github.com/Azure/azure-sdk-for-js/issues" },
|
||||
"bugs": {
|
||||
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
|
||||
},
|
||||
"files": [
|
||||
"dist/**/*.js",
|
||||
"dist/**/*.js.map",
|
||||
|
@ -90,13 +100,18 @@
|
|||
"sideEffects": false,
|
||||
"//metadata": {
|
||||
"constantPaths": [
|
||||
{ "path": "src/IotCentralClient.ts", "prefix": "packageDetails" }
|
||||
{
|
||||
"path": "src/iotCentralClient.ts",
|
||||
"prefix": "packageDetails"
|
||||
}
|
||||
]
|
||||
},
|
||||
"autoPublish": true,
|
||||
"//sampleConfiguration": {
|
||||
"productName": "",
|
||||
"productSlugs": ["azure"],
|
||||
"productSlugs": [
|
||||
"azure"
|
||||
],
|
||||
"disableDocsMs": true,
|
||||
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-iotcentral?view=azure-node-preview"
|
||||
}
|
||||
|
|
|
@ -11,14 +11,18 @@ import { PollerLike } from '@azure/core-lro';
|
|||
import { PollOperationState } from '@azure/core-lro';
|
||||
|
||||
// @public
|
||||
export type App = Resource & {
|
||||
export type App = TrackedResource & {
|
||||
sku: AppSkuInfo;
|
||||
identity?: SystemAssignedServiceIdentity;
|
||||
readonly provisioningState?: ProvisioningState;
|
||||
readonly applicationId?: string;
|
||||
displayName?: string;
|
||||
subdomain?: string;
|
||||
template?: string;
|
||||
readonly state?: AppState;
|
||||
publicNetworkAccess?: PublicNetworkAccess;
|
||||
networkRuleSets?: NetworkRuleSets;
|
||||
readonly privateEndpointConnections?: PrivateEndpointConnection[];
|
||||
};
|
||||
|
||||
// @public
|
||||
|
@ -39,6 +43,10 @@ export interface AppPatch {
|
|||
readonly applicationId?: string;
|
||||
displayName?: string;
|
||||
identity?: SystemAssignedServiceIdentity;
|
||||
networkRuleSets?: NetworkRuleSets;
|
||||
readonly privateEndpointConnections?: PrivateEndpointConnection[];
|
||||
readonly provisioningState?: ProvisioningState;
|
||||
publicNetworkAccess?: PublicNetworkAccess;
|
||||
sku?: AppSkuInfo;
|
||||
readonly state?: AppState;
|
||||
subdomain?: string;
|
||||
|
@ -52,8 +60,8 @@ export interface AppPatch {
|
|||
export interface Apps {
|
||||
beginCreateOrUpdate(resourceGroupName: string, resourceName: string, app: App, options?: AppsCreateOrUpdateOptionalParams): Promise<PollerLike<PollOperationState<AppsCreateOrUpdateResponse>, AppsCreateOrUpdateResponse>>;
|
||||
beginCreateOrUpdateAndWait(resourceGroupName: string, resourceName: string, app: App, options?: AppsCreateOrUpdateOptionalParams): Promise<AppsCreateOrUpdateResponse>;
|
||||
beginDelete(resourceGroupName: string, resourceName: string, options?: AppsDeleteOptionalParams): Promise<PollerLike<PollOperationState<void>, void>>;
|
||||
beginDeleteAndWait(resourceGroupName: string, resourceName: string, options?: AppsDeleteOptionalParams): Promise<void>;
|
||||
beginDelete(resourceGroupName: string, resourceName: string, options?: AppsDeleteOptionalParams): Promise<PollerLike<PollOperationState<AppsDeleteResponse>, AppsDeleteResponse>>;
|
||||
beginDeleteAndWait(resourceGroupName: string, resourceName: string, options?: AppsDeleteOptionalParams): Promise<AppsDeleteResponse>;
|
||||
beginUpdate(resourceGroupName: string, resourceName: string, appPatch: AppPatch, options?: AppsUpdateOptionalParams): Promise<PollerLike<PollOperationState<AppsUpdateResponse>, AppsUpdateResponse>>;
|
||||
beginUpdateAndWait(resourceGroupName: string, resourceName: string, appPatch: AppPatch, options?: AppsUpdateOptionalParams): Promise<AppsUpdateResponse>;
|
||||
checkNameAvailability(operationInputs: OperationInputs, options?: AppsCheckNameAvailabilityOptionalParams): Promise<AppsCheckNameAvailabilityResponse>;
|
||||
|
@ -78,6 +86,12 @@ export interface AppsCheckSubdomainAvailabilityOptionalParams extends coreClient
|
|||
// @public
|
||||
export type AppsCheckSubdomainAvailabilityResponse = AppAvailabilityInfo;
|
||||
|
||||
// @public
|
||||
export interface AppsCreateOrUpdateHeaders {
|
||||
azureAsyncOperation?: string;
|
||||
retryAfter?: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface AppsCreateOrUpdateOptionalParams extends coreClient.OperationOptions {
|
||||
resumeFrom?: string;
|
||||
|
@ -85,7 +99,14 @@ export interface AppsCreateOrUpdateOptionalParams extends coreClient.OperationOp
|
|||
}
|
||||
|
||||
// @public
|
||||
export type AppsCreateOrUpdateResponse = App;
|
||||
export type AppsCreateOrUpdateResponse = AppsCreateOrUpdateHeaders & App;
|
||||
|
||||
// @public
|
||||
export interface AppsDeleteHeaders {
|
||||
azureAsyncOperation?: string;
|
||||
location?: string;
|
||||
retryAfter?: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface AppsDeleteOptionalParams extends coreClient.OperationOptions {
|
||||
|
@ -93,6 +114,9 @@ export interface AppsDeleteOptionalParams extends coreClient.OperationOptions {
|
|||
updateIntervalInMs?: number;
|
||||
}
|
||||
|
||||
// @public
|
||||
export type AppsDeleteResponse = AppsDeleteHeaders;
|
||||
|
||||
// @public
|
||||
export interface AppsGetOptionalParams extends coreClient.OperationOptions {
|
||||
}
|
||||
|
@ -153,6 +177,13 @@ export type AppsListTemplatesResponse = AppTemplatesResult;
|
|||
// @public
|
||||
export type AppState = string;
|
||||
|
||||
// @public
|
||||
export interface AppsUpdateHeaders {
|
||||
azureAsyncOperation?: string;
|
||||
location?: string;
|
||||
retryAfter?: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface AppsUpdateOptionalParams extends coreClient.OperationOptions {
|
||||
resumeFrom?: string;
|
||||
|
@ -160,7 +191,7 @@ export interface AppsUpdateOptionalParams extends coreClient.OperationOptions {
|
|||
}
|
||||
|
||||
// @public
|
||||
export type AppsUpdateResponse = App;
|
||||
export type AppsUpdateResponse = AppsUpdateHeaders;
|
||||
|
||||
// @public
|
||||
export interface AppTemplate {
|
||||
|
@ -187,19 +218,26 @@ export interface AppTemplatesResult {
|
|||
}
|
||||
|
||||
// @public
|
||||
export interface CloudError {
|
||||
export type CreatedByType = string;
|
||||
|
||||
// @public
|
||||
export interface ErrorAdditionalInfo {
|
||||
readonly info?: Record<string, unknown>;
|
||||
readonly type?: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface ErrorDetail {
|
||||
readonly additionalInfo?: ErrorAdditionalInfo[];
|
||||
readonly code?: string;
|
||||
details?: CloudErrorBody[];
|
||||
readonly details?: ErrorDetail[];
|
||||
readonly message?: string;
|
||||
readonly target?: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface CloudErrorBody {
|
||||
readonly code?: string;
|
||||
details?: CloudErrorBody[];
|
||||
readonly message?: string;
|
||||
readonly target?: string;
|
||||
export interface ErrorResponse {
|
||||
error?: ErrorDetail;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
|
@ -214,6 +252,10 @@ export class IotCentralClient extends coreClient.ServiceClient {
|
|||
// (undocumented)
|
||||
operations: Operations;
|
||||
// (undocumented)
|
||||
privateEndpointConnections: PrivateEndpointConnections;
|
||||
// (undocumented)
|
||||
privateLinks: PrivateLinks;
|
||||
// (undocumented)
|
||||
subscriptionId: string;
|
||||
}
|
||||
|
||||
|
@ -242,6 +284,72 @@ export enum KnownAppState {
|
|||
Suspended = "suspended"
|
||||
}
|
||||
|
||||
// @public
|
||||
export enum KnownCreatedByType {
|
||||
// (undocumented)
|
||||
Application = "Application",
|
||||
// (undocumented)
|
||||
Key = "Key",
|
||||
// (undocumented)
|
||||
ManagedIdentity = "ManagedIdentity",
|
||||
// (undocumented)
|
||||
User = "User"
|
||||
}
|
||||
|
||||
// @public
|
||||
export enum KnownNetworkAction {
|
||||
// (undocumented)
|
||||
Allow = "Allow",
|
||||
// (undocumented)
|
||||
Deny = "Deny"
|
||||
}
|
||||
|
||||
// @public
|
||||
export enum KnownPrivateEndpointConnectionProvisioningState {
|
||||
// (undocumented)
|
||||
Creating = "Creating",
|
||||
// (undocumented)
|
||||
Deleting = "Deleting",
|
||||
// (undocumented)
|
||||
Failed = "Failed",
|
||||
// (undocumented)
|
||||
Succeeded = "Succeeded"
|
||||
}
|
||||
|
||||
// @public
|
||||
export enum KnownPrivateEndpointServiceConnectionStatus {
|
||||
// (undocumented)
|
||||
Approved = "Approved",
|
||||
// (undocumented)
|
||||
Pending = "Pending",
|
||||
// (undocumented)
|
||||
Rejected = "Rejected"
|
||||
}
|
||||
|
||||
// @public
|
||||
export enum KnownProvisioningState {
|
||||
// (undocumented)
|
||||
Canceled = "Canceled",
|
||||
// (undocumented)
|
||||
Creating = "Creating",
|
||||
// (undocumented)
|
||||
Deleting = "Deleting",
|
||||
// (undocumented)
|
||||
Failed = "Failed",
|
||||
// (undocumented)
|
||||
Succeeded = "Succeeded",
|
||||
// (undocumented)
|
||||
Updating = "Updating"
|
||||
}
|
||||
|
||||
// @public
|
||||
export enum KnownPublicNetworkAccess {
|
||||
// (undocumented)
|
||||
Disabled = "Disabled",
|
||||
// (undocumented)
|
||||
Enabled = "Enabled"
|
||||
}
|
||||
|
||||
// @public
|
||||
export enum KnownSystemAssignedServiceIdentityType {
|
||||
// (undocumented)
|
||||
|
@ -250,6 +358,23 @@ export enum KnownSystemAssignedServiceIdentityType {
|
|||
SystemAssigned = "SystemAssigned"
|
||||
}
|
||||
|
||||
// @public
|
||||
export type NetworkAction = string;
|
||||
|
||||
// @public
|
||||
export interface NetworkRuleSetIpRule {
|
||||
filterName?: string;
|
||||
ipMask?: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface NetworkRuleSets {
|
||||
applyToDevices?: boolean;
|
||||
applyToIoTCentral?: boolean;
|
||||
defaultAction?: NetworkAction;
|
||||
ipRules?: NetworkRuleSetIpRule[];
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface Operation {
|
||||
display?: OperationDisplay;
|
||||
|
@ -297,14 +422,135 @@ export interface OperationsListOptionalParams extends coreClient.OperationOption
|
|||
// @public
|
||||
export type OperationsListResponse = OperationListResult;
|
||||
|
||||
// @public
|
||||
export interface PrivateEndpoint {
|
||||
readonly id?: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export type PrivateEndpointConnection = Resource & {
|
||||
readonly groupIds?: string[];
|
||||
privateEndpoint?: PrivateEndpoint;
|
||||
privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState;
|
||||
readonly provisioningState?: PrivateEndpointConnectionProvisioningState;
|
||||
};
|
||||
|
||||
// @public
|
||||
export interface PrivateEndpointConnectionListResult {
|
||||
value?: PrivateEndpointConnection[];
|
||||
}
|
||||
|
||||
// @public
|
||||
export type PrivateEndpointConnectionProvisioningState = string;
|
||||
|
||||
// @public
|
||||
export interface PrivateEndpointConnections {
|
||||
beginCreate(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, privateEndpointConnection: PrivateEndpointConnection, options?: PrivateEndpointConnectionsCreateOptionalParams): Promise<PollerLike<PollOperationState<PrivateEndpointConnectionsCreateResponse>, PrivateEndpointConnectionsCreateResponse>>;
|
||||
beginCreateAndWait(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, privateEndpointConnection: PrivateEndpointConnection, options?: PrivateEndpointConnectionsCreateOptionalParams): Promise<PrivateEndpointConnectionsCreateResponse>;
|
||||
beginDelete(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsDeleteOptionalParams): Promise<PollerLike<PollOperationState<PrivateEndpointConnectionsDeleteResponse>, PrivateEndpointConnectionsDeleteResponse>>;
|
||||
beginDeleteAndWait(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsDeleteOptionalParams): Promise<PrivateEndpointConnectionsDeleteResponse>;
|
||||
get(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsGetOptionalParams): Promise<PrivateEndpointConnectionsGetResponse>;
|
||||
list(resourceGroupName: string, resourceName: string, options?: PrivateEndpointConnectionsListOptionalParams): PagedAsyncIterableIterator<PrivateEndpointConnection>;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface PrivateEndpointConnectionsCreateHeaders {
|
||||
azureAsyncOperation?: string;
|
||||
retryAfter?: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface PrivateEndpointConnectionsCreateOptionalParams extends coreClient.OperationOptions {
|
||||
resumeFrom?: string;
|
||||
updateIntervalInMs?: number;
|
||||
}
|
||||
|
||||
// @public
|
||||
export type PrivateEndpointConnectionsCreateResponse = PrivateEndpointConnectionsCreateHeaders & PrivateEndpointConnection;
|
||||
|
||||
// @public
|
||||
export interface PrivateEndpointConnectionsDeleteHeaders {
|
||||
azureAsyncOperation?: string;
|
||||
location?: string;
|
||||
retryAfter?: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface PrivateEndpointConnectionsDeleteOptionalParams extends coreClient.OperationOptions {
|
||||
resumeFrom?: string;
|
||||
updateIntervalInMs?: number;
|
||||
}
|
||||
|
||||
// @public
|
||||
export type PrivateEndpointConnectionsDeleteResponse = PrivateEndpointConnectionsDeleteHeaders;
|
||||
|
||||
// @public
|
||||
export interface PrivateEndpointConnectionsGetOptionalParams extends coreClient.OperationOptions {
|
||||
}
|
||||
|
||||
// @public
|
||||
export type PrivateEndpointConnectionsGetResponse = PrivateEndpointConnection;
|
||||
|
||||
// @public
|
||||
export interface PrivateEndpointConnectionsListOptionalParams extends coreClient.OperationOptions {
|
||||
}
|
||||
|
||||
// @public
|
||||
export type PrivateEndpointConnectionsListResponse = PrivateEndpointConnectionListResult;
|
||||
|
||||
// @public
|
||||
export type PrivateEndpointServiceConnectionStatus = string;
|
||||
|
||||
// @public
|
||||
export type PrivateLinkResource = Resource & {
|
||||
readonly groupId?: string;
|
||||
readonly requiredMembers?: string[];
|
||||
requiredZoneNames?: string[];
|
||||
};
|
||||
|
||||
// @public
|
||||
export interface PrivateLinkResourceListResult {
|
||||
value?: PrivateLinkResource[];
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface PrivateLinks {
|
||||
get(resourceGroupName: string, resourceName: string, groupId: string, options?: PrivateLinksGetOptionalParams): Promise<PrivateLinksGetResponse>;
|
||||
list(resourceGroupName: string, resourceName: string, options?: PrivateLinksListOptionalParams): PagedAsyncIterableIterator<PrivateLinkResource>;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface PrivateLinkServiceConnectionState {
|
||||
actionsRequired?: string;
|
||||
description?: string;
|
||||
status?: PrivateEndpointServiceConnectionStatus;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface PrivateLinksGetOptionalParams extends coreClient.OperationOptions {
|
||||
}
|
||||
|
||||
// @public
|
||||
export type PrivateLinksGetResponse = PrivateLinkResource;
|
||||
|
||||
// @public
|
||||
export interface PrivateLinksListOptionalParams extends coreClient.OperationOptions {
|
||||
}
|
||||
|
||||
// @public
|
||||
export type PrivateLinksListResponse = PrivateLinkResourceListResult;
|
||||
|
||||
// @public
|
||||
export type ProvisioningState = string;
|
||||
|
||||
// @public
|
||||
export type PublicNetworkAccess = string;
|
||||
|
||||
// @public
|
||||
export interface Resource {
|
||||
readonly id?: string;
|
||||
location: string;
|
||||
readonly name?: string;
|
||||
tags?: {
|
||||
[propertyName: string]: string;
|
||||
};
|
||||
readonly systemData?: SystemData;
|
||||
readonly type?: string;
|
||||
}
|
||||
|
||||
|
@ -318,6 +564,24 @@ export interface SystemAssignedServiceIdentity {
|
|||
// @public
|
||||
export type SystemAssignedServiceIdentityType = string;
|
||||
|
||||
// @public
|
||||
export interface SystemData {
|
||||
createdAt?: Date;
|
||||
createdBy?: string;
|
||||
createdByType?: CreatedByType;
|
||||
lastModifiedAt?: Date;
|
||||
lastModifiedBy?: string;
|
||||
lastModifiedByType?: CreatedByType;
|
||||
}
|
||||
|
||||
// @public
|
||||
export type TrackedResource = Resource & {
|
||||
tags?: {
|
||||
[propertyName: string]: string;
|
||||
};
|
||||
location: string;
|
||||
};
|
||||
|
||||
// (No @packageDocumentation comment for this package)
|
||||
|
||||
```
|
||||
|
|
|
@ -14,54 +14,6 @@ import json from "@rollup/plugin-json";
|
|||
|
||||
import nodeBuiltins from "builtin-modules";
|
||||
|
||||
/**
|
||||
* Gets the proper configuration needed for rollup's commonJS plugin for @opentelemetry/api.
|
||||
*
|
||||
* NOTE: this manual configuration is only needed because OpenTelemetry uses an
|
||||
* __exportStar downleveled helper function to declare its exports which confuses
|
||||
* rollup's automatic discovery mechanism.
|
||||
*
|
||||
* @returns an object reference that can be `...`'d into your cjs() configuration.
|
||||
*/
|
||||
export function openTelemetryCommonJs() {
|
||||
const namedExports = {};
|
||||
|
||||
for (const key of [
|
||||
"@opentelemetry/api",
|
||||
"@azure/core-tracing/node_modules/@opentelemetry/api"
|
||||
]) {
|
||||
namedExports[key] = [
|
||||
"SpanKind",
|
||||
"TraceFlags",
|
||||
"getSpan",
|
||||
"setSpan",
|
||||
"SpanStatusCode",
|
||||
"getSpanContext",
|
||||
"setSpanContext"
|
||||
];
|
||||
}
|
||||
|
||||
const releasedOpenTelemetryVersions = ["0.10.2", "1.0.0-rc.0"];
|
||||
|
||||
for (const version of releasedOpenTelemetryVersions) {
|
||||
namedExports[
|
||||
// working around a limitation in the rollup common.js plugin - it's not able to resolve these modules so the named exports listed above will not get applied. We have to drill down to the actual path.
|
||||
`../../../common/temp/node_modules/.pnpm/@opentelemetry/api@${version}/node_modules/@opentelemetry/api/build/src/index.js`
|
||||
] = [
|
||||
"SpanKind",
|
||||
"TraceFlags",
|
||||
"getSpan",
|
||||
"setSpan",
|
||||
"StatusCode",
|
||||
"CanonicalCode",
|
||||
"getSpanContext",
|
||||
"setSpanContext"
|
||||
];
|
||||
}
|
||||
|
||||
return namedExports;
|
||||
}
|
||||
|
||||
// #region Warning Handler
|
||||
|
||||
/**
|
||||
|
@ -69,7 +21,7 @@ export function openTelemetryCommonJs() {
|
|||
* the function returns `true`, then the warning will not be displayed.
|
||||
*/
|
||||
|
||||
function ignoreNiseSinonEvalWarnings(warning) {
|
||||
function ignoreNiseSinonEval(warning) {
|
||||
return (
|
||||
warning.code === "EVAL" &&
|
||||
warning.id &&
|
||||
|
@ -78,17 +30,14 @@ function ignoreNiseSinonEvalWarnings(warning) {
|
|||
);
|
||||
}
|
||||
|
||||
function ignoreChaiCircularDependencyWarnings(warning) {
|
||||
function ignoreChaiCircularDependency(warning) {
|
||||
return (
|
||||
warning.code === "CIRCULAR_DEPENDENCY" &&
|
||||
warning.importer && warning.importer.includes("node_modules/chai") === true
|
||||
);
|
||||
}
|
||||
|
||||
const warningInhibitors = [
|
||||
ignoreChaiCircularDependencyWarnings,
|
||||
ignoreNiseSinonEvalWarnings
|
||||
];
|
||||
const warningInhibitors = [ignoreChaiCircularDependency, ignoreNiseSinonEval];
|
||||
|
||||
/**
|
||||
* Construct a warning handler for the shared rollup configuration
|
||||
|
@ -122,22 +71,7 @@ function makeBrowserTestConfig() {
|
|||
nodeResolve({
|
||||
mainFields: ["module", "browser"]
|
||||
}),
|
||||
cjs({
|
||||
namedExports: {
|
||||
// Chai's strange internal architecture makes it impossible to statically
|
||||
// analyze its exports.
|
||||
chai: [
|
||||
"version",
|
||||
"use",
|
||||
"util",
|
||||
"config",
|
||||
"expect",
|
||||
"should",
|
||||
"assert"
|
||||
],
|
||||
...openTelemetryCommonJs()
|
||||
}
|
||||
}),
|
||||
cjs(),
|
||||
json(),
|
||||
sourcemaps()
|
||||
//viz({ filename: "dist-test/browser-stats.html", sourcemap: true })
|
||||
|
@ -173,7 +107,7 @@ export function makeConfig(pkg, options) {
|
|||
],
|
||||
output: { file: "dist/index.js", format: "cjs", sourcemap: true },
|
||||
preserveSymlinks: false,
|
||||
plugins: [sourcemaps(), nodeResolve(), cjs()]
|
||||
plugins: [sourcemaps(), nodeResolve()]
|
||||
};
|
||||
|
||||
const config = [baseConfig];
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* 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.
|
||||
import { OperationInputs, IotCentralClient } from "@azure/arm-iotcentral";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Check if an IoT Central application name is available.
|
||||
*
|
||||
* @summary Check if an IoT Central application name is available.
|
||||
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/Apps_CheckNameAvailability.json
|
||||
*/
|
||||
async function appsCheckNameAvailability() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const operationInputs: OperationInputs = {
|
||||
name: "myiotcentralapp",
|
||||
type: "IoTApps"
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new IotCentralClient(credential, subscriptionId);
|
||||
const result = await client.apps.checkNameAvailability(operationInputs);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
appsCheckNameAvailability().catch(console.error);
|
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* 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.
|
||||
import { OperationInputs, IotCentralClient } from "@azure/arm-iotcentral";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Check if an IoT Central application subdomain is available.
|
||||
*
|
||||
* @summary Check if an IoT Central application subdomain is available.
|
||||
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/Apps_CheckSubdomainAvailability.json
|
||||
*/
|
||||
async function appsSubdomainAvailability() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const operationInputs: OperationInputs = {
|
||||
name: "myiotcentralapp",
|
||||
type: "IoTApps"
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new IotCentralClient(credential, subscriptionId);
|
||||
const result = await client.apps.checkSubdomainAvailability(operationInputs);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
appsSubdomainAvailability().catch(console.error);
|
|
@ -0,0 +1,42 @@
|
|||
/*
|
||||
* 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.
|
||||
import { App, IotCentralClient } from "@azure/arm-iotcentral";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Create or update the metadata of an IoT Central application. The usual pattern to modify a property is to retrieve the IoT Central application metadata and security metadata, and then combine them with the modified values in a new body to update the IoT Central application.
|
||||
*
|
||||
* @summary Create or update the metadata of an IoT Central application. The usual pattern to modify a property is to retrieve the IoT Central application metadata and security metadata, and then combine them with the modified values in a new body to update the IoT Central application.
|
||||
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/Apps_CreateOrUpdate.json
|
||||
*/
|
||||
async function appsCreateOrUpdate() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = "resRg";
|
||||
const resourceName = "myIoTCentralApp";
|
||||
const app: App = {
|
||||
displayName: "My IoT Central App",
|
||||
identity: { type: "SystemAssigned" },
|
||||
location: "westus",
|
||||
sku: { name: "ST2" },
|
||||
subdomain: "my-iot-central-app",
|
||||
template: "iotc-pnp-preview@1.0.0"
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new IotCentralClient(credential, subscriptionId);
|
||||
const result = await client.apps.beginCreateOrUpdateAndWait(
|
||||
resourceGroupName,
|
||||
resourceName,
|
||||
app
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
appsCreateOrUpdate().catch(console.error);
|
|
@ -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.
|
||||
import { IotCentralClient } from "@azure/arm-iotcentral";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Delete an IoT Central application.
|
||||
*
|
||||
* @summary Delete an IoT Central application.
|
||||
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/Apps_Delete.json
|
||||
*/
|
||||
async function appsDelete() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = "resRg";
|
||||
const resourceName = "myIoTCentralApp";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new IotCentralClient(credential, subscriptionId);
|
||||
const result = await client.apps.beginDeleteAndWait(
|
||||
resourceGroupName,
|
||||
resourceName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
appsDelete().catch(console.error);
|
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
* 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.
|
||||
import { IotCentralClient } from "@azure/arm-iotcentral";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Get the metadata of an IoT Central application.
|
||||
*
|
||||
* @summary Get the metadata of an IoT Central application.
|
||||
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/Apps_Get.json
|
||||
*/
|
||||
async function appsGet() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = "resRg";
|
||||
const resourceName = "myIoTCentralApp";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new IotCentralClient(credential, subscriptionId);
|
||||
const result = await client.apps.get(resourceGroupName, resourceName);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
appsGet().catch(console.error);
|
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* 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.
|
||||
import { IotCentralClient } from "@azure/arm-iotcentral";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Get all the IoT Central Applications in a resource group.
|
||||
*
|
||||
* @summary Get all the IoT Central Applications in a resource group.
|
||||
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/Apps_ListByResourceGroup.json
|
||||
*/
|
||||
async function appsListByResourceGroup() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = "resRg";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new IotCentralClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.apps.listByResourceGroup(resourceGroupName)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
appsListByResourceGroup().catch(console.error);
|
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
* 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.
|
||||
import { IotCentralClient } from "@azure/arm-iotcentral";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Get all IoT Central Applications in a subscription.
|
||||
*
|
||||
* @summary Get all IoT Central Applications in a subscription.
|
||||
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/Apps_ListBySubscription.json
|
||||
*/
|
||||
async function appsListBySubscription() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new IotCentralClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.apps.listBySubscription()) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
appsListBySubscription().catch(console.error);
|
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
* 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.
|
||||
import { IotCentralClient } from "@azure/arm-iotcentral";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Get all available application templates.
|
||||
*
|
||||
* @summary Get all available application templates.
|
||||
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/Apps_Templates.json
|
||||
*/
|
||||
async function appsListTemplates() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new IotCentralClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.apps.listTemplates()) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
appsListTemplates().catch(console.error);
|
|
@ -0,0 +1,38 @@
|
|||
/*
|
||||
* 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.
|
||||
import { AppPatch, IotCentralClient } from "@azure/arm-iotcentral";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Update the metadata of an IoT Central application.
|
||||
*
|
||||
* @summary Update the metadata of an IoT Central application.
|
||||
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/Apps_Update.json
|
||||
*/
|
||||
async function appsUpdate() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = "resRg";
|
||||
const resourceName = "myIoTCentralApp";
|
||||
const appPatch: AppPatch = {
|
||||
displayName: "My IoT Central App 2",
|
||||
identity: { type: "SystemAssigned" }
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new IotCentralClient(credential, subscriptionId);
|
||||
const result = await client.apps.beginUpdateAndWait(
|
||||
resourceGroupName,
|
||||
resourceName,
|
||||
appPatch
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
appsUpdate().catch(console.error);
|
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
* 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.
|
||||
import { IotCentralClient } from "@azure/arm-iotcentral";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Lists all of the available IoT Central Resource Provider operations.
|
||||
*
|
||||
* @summary Lists all of the available IoT Central Resource Provider operations.
|
||||
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/Operations_List.json
|
||||
*/
|
||||
async function operationsList() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new IotCentralClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.operations.list()) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
operationsList().catch(console.error);
|
|
@ -0,0 +1,46 @@
|
|||
/*
|
||||
* 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.
|
||||
import {
|
||||
PrivateEndpointConnection,
|
||||
IotCentralClient
|
||||
} from "@azure/arm-iotcentral";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Update a private endpoint connection.
|
||||
*
|
||||
* @summary Update a private endpoint connection.
|
||||
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/PrivateEndpointConnections_Update.json
|
||||
*/
|
||||
async function privateEndpointConnectionsUpdate() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = "resRg";
|
||||
const resourceName = "myIoTCentralApp";
|
||||
const privateEndpointConnectionName = "myIoTCentralAppEndpoint";
|
||||
const privateEndpointConnection: PrivateEndpointConnection = {
|
||||
privateLinkServiceConnectionState: {
|
||||
description: "Auto-approved",
|
||||
actionsRequired: "None",
|
||||
status: "Approved"
|
||||
}
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new IotCentralClient(credential, subscriptionId);
|
||||
const result = await client.privateEndpointConnections.beginCreateAndWait(
|
||||
resourceGroupName,
|
||||
resourceName,
|
||||
privateEndpointConnectionName,
|
||||
privateEndpointConnection
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
privateEndpointConnectionsUpdate().catch(console.error);
|
|
@ -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.
|
||||
import { IotCentralClient } from "@azure/arm-iotcentral";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Deletes a private endpoint connection from the IoT Central Application.
|
||||
*
|
||||
* @summary Deletes a private endpoint connection from the IoT Central Application.
|
||||
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/PrivateEndpointConnections_Delete.json
|
||||
*/
|
||||
async function privateEndpointConnectionsDelete() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = "resRg";
|
||||
const resourceName = "myIoTCentralApp";
|
||||
const privateEndpointConnectionName = "myIoTCentralAppEndpoint";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new IotCentralClient(credential, subscriptionId);
|
||||
const result = await client.privateEndpointConnections.beginDeleteAndWait(
|
||||
resourceGroupName,
|
||||
resourceName,
|
||||
privateEndpointConnectionName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
privateEndpointConnectionsDelete().catch(console.error);
|
|
@ -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.
|
||||
import { IotCentralClient } from "@azure/arm-iotcentral";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Get the metadata of a private endpoint connection for the IoT Central Application.
|
||||
*
|
||||
* @summary Get the metadata of a private endpoint connection for the IoT Central Application.
|
||||
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/PrivateEndpointConnections_Get.json
|
||||
*/
|
||||
async function privateEndpointConnectionsGet() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = "resRg";
|
||||
const resourceName = "myIoTCentralApp";
|
||||
const privateEndpointConnectionName = "myIoTCentralAppEndpoint";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new IotCentralClient(credential, subscriptionId);
|
||||
const result = await client.privateEndpointConnections.get(
|
||||
resourceGroupName,
|
||||
resourceName,
|
||||
privateEndpointConnectionName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
privateEndpointConnectionsGet().catch(console.error);
|
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
* 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.
|
||||
import { IotCentralClient } from "@azure/arm-iotcentral";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Get all private endpoint connections of a IoT Central Application.
|
||||
*
|
||||
* @summary Get all private endpoint connections of a IoT Central Application.
|
||||
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/PrivateEndpointConnections_List.json
|
||||
*/
|
||||
async function privateEndpointConnectionsList() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = "resRg";
|
||||
const resourceName = "myIoTCentralApp";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new IotCentralClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.privateEndpointConnections.list(
|
||||
resourceGroupName,
|
||||
resourceName
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
privateEndpointConnectionsList().catch(console.error);
|
|
@ -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.
|
||||
import { IotCentralClient } from "@azure/arm-iotcentral";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Get a private link resource of a IoT Central Application.
|
||||
*
|
||||
* @summary Get a private link resource of a IoT Central Application.
|
||||
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/PrivateLinks_Get.json
|
||||
*/
|
||||
async function privateLinksGet() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = "resRg";
|
||||
const resourceName = "myIoTCentralApp";
|
||||
const groupId = "iotApp";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new IotCentralClient(credential, subscriptionId);
|
||||
const result = await client.privateLinks.get(
|
||||
resourceGroupName,
|
||||
resourceName,
|
||||
groupId
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
privateLinksGet().catch(console.error);
|
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
* 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.
|
||||
import { IotCentralClient } from "@azure/arm-iotcentral";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Get all private link resources of a IoT Central Application.
|
||||
*
|
||||
* @summary Get all private link resources of a IoT Central Application.
|
||||
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/PrivateLinks_List.json
|
||||
*/
|
||||
async function privateLinksList() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = "resRg";
|
||||
const resourceName = "myIoTCentralApp";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new IotCentralClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.privateLinks.list(
|
||||
resourceGroupName,
|
||||
resourceName
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
privateLinksList().catch(console.error);
|
|
@ -1,68 +0,0 @@
|
|||
# client library samples for JavaScript
|
||||
|
||||
These sample programs show how to use the JavaScript client libraries for in some common scenarios.
|
||||
|
||||
| **File Name** | **Description** |
|
||||
| --------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| [appsCheckNameAvailability.js][appschecknameavailability] | Check if an IoT Central application name is available. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_CheckNameAvailability.json |
|
||||
| [appsCreateOrUpdate.js][appscreateorupdate] | Create or update the metadata of an IoT Central application. The usual pattern to modify a property is to retrieve the IoT Central application metadata and security metadata, and then combine them with the modified values in a new body to update the IoT Central application. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_CreateOrUpdate.json |
|
||||
| [appsDelete.js][appsdelete] | Delete an IoT Central application. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_Delete.json |
|
||||
| [appsGet.js][appsget] | Get the metadata of an IoT Central application. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_Get.json |
|
||||
| [appsListByResourceGroup.js][appslistbyresourcegroup] | Get all the IoT Central Applications in a resource group. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_ListByResourceGroup.json |
|
||||
| [appsListBySubscription.js][appslistbysubscription] | Get all IoT Central Applications in a subscription. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_ListBySubscription.json |
|
||||
| [appsListTemplates.js][appslisttemplates] | Get all available application templates. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_Templates.json |
|
||||
| [appsSubdomainAvailability.js][appssubdomainavailability] | Check if an IoT Central application subdomain is available. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_CheckSubdomainAvailability.json |
|
||||
| [appsUpdate.js][appsupdate] | Update the metadata of an IoT Central application. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_Update.json |
|
||||
| [operationsList.js][operationslist] | Lists all of the available IoT Central Resource Provider operations. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Operations_List.json |
|
||||
|
||||
## Prerequisites
|
||||
|
||||
The sample programs are compatible with [LTS versions of Node.js](https://nodejs.org/about/releases/).
|
||||
|
||||
You need [an Azure subscription][freesub] to run these sample programs.
|
||||
|
||||
Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function.
|
||||
|
||||
Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package].
|
||||
|
||||
## Setup
|
||||
|
||||
To run the samples using the published version of the package:
|
||||
|
||||
1. Install the dependencies using `npm`:
|
||||
|
||||
```bash
|
||||
npm install
|
||||
```
|
||||
|
||||
2. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically.
|
||||
|
||||
3. Run whichever samples you like (note that some samples may require additional setup, see the table above):
|
||||
|
||||
```bash
|
||||
node appsCheckNameAvailability.js
|
||||
```
|
||||
|
||||
Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform):
|
||||
|
||||
```bash
|
||||
npx cross-env node appsCheckNameAvailability.js
|
||||
```
|
||||
|
||||
## Next Steps
|
||||
|
||||
Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients.
|
||||
|
||||
[appschecknameavailability]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v6/javascript/appsCheckNameAvailability.js
|
||||
[appscreateorupdate]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v6/javascript/appsCreateOrUpdate.js
|
||||
[appsdelete]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v6/javascript/appsDelete.js
|
||||
[appsget]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v6/javascript/appsGet.js
|
||||
[appslistbyresourcegroup]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v6/javascript/appsListByResourceGroup.js
|
||||
[appslistbysubscription]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v6/javascript/appsListBySubscription.js
|
||||
[appslisttemplates]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v6/javascript/appsListTemplates.js
|
||||
[appssubdomainavailability]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v6/javascript/appsSubdomainAvailability.js
|
||||
[appsupdate]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v6/javascript/appsUpdate.js
|
||||
[operationslist]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v6/javascript/operationsList.js
|
||||
[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-iotcentral?view=azure-node-preview
|
||||
[freesub]: https://azure.microsoft.com/free/
|
||||
[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/iotcentral/arm-iotcentral/README.md
|
|
@ -1,81 +0,0 @@
|
|||
# client library samples for TypeScript
|
||||
|
||||
These sample programs show how to use the TypeScript client libraries for in some common scenarios.
|
||||
|
||||
| **File Name** | **Description** |
|
||||
| --------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| [appsCheckNameAvailability.ts][appschecknameavailability] | Check if an IoT Central application name is available. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_CheckNameAvailability.json |
|
||||
| [appsCreateOrUpdate.ts][appscreateorupdate] | Create or update the metadata of an IoT Central application. The usual pattern to modify a property is to retrieve the IoT Central application metadata and security metadata, and then combine them with the modified values in a new body to update the IoT Central application. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_CreateOrUpdate.json |
|
||||
| [appsDelete.ts][appsdelete] | Delete an IoT Central application. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_Delete.json |
|
||||
| [appsGet.ts][appsget] | Get the metadata of an IoT Central application. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_Get.json |
|
||||
| [appsListByResourceGroup.ts][appslistbyresourcegroup] | Get all the IoT Central Applications in a resource group. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_ListByResourceGroup.json |
|
||||
| [appsListBySubscription.ts][appslistbysubscription] | Get all IoT Central Applications in a subscription. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_ListBySubscription.json |
|
||||
| [appsListTemplates.ts][appslisttemplates] | Get all available application templates. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_Templates.json |
|
||||
| [appsSubdomainAvailability.ts][appssubdomainavailability] | Check if an IoT Central application subdomain is available. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_CheckSubdomainAvailability.json |
|
||||
| [appsUpdate.ts][appsupdate] | Update the metadata of an IoT Central application. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_Update.json |
|
||||
| [operationsList.ts][operationslist] | Lists all of the available IoT Central Resource Provider operations. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Operations_List.json |
|
||||
|
||||
## Prerequisites
|
||||
|
||||
The sample programs are compatible with [LTS versions of Node.js](https://nodejs.org/about/releases/).
|
||||
|
||||
Before running the samples in Node, they must be compiled to JavaScript using the TypeScript compiler. For more information on TypeScript, see the [TypeScript documentation][typescript]. Install the TypeScript compiler using:
|
||||
|
||||
```bash
|
||||
npm install -g typescript
|
||||
```
|
||||
|
||||
You need [an Azure subscription][freesub] to run these sample programs.
|
||||
|
||||
Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function.
|
||||
|
||||
Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package].
|
||||
|
||||
## Setup
|
||||
|
||||
To run the samples using the published version of the package:
|
||||
|
||||
1. Install the dependencies using `npm`:
|
||||
|
||||
```bash
|
||||
npm install
|
||||
```
|
||||
|
||||
2. Compile the samples:
|
||||
|
||||
```bash
|
||||
npm run build
|
||||
```
|
||||
|
||||
3. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically.
|
||||
|
||||
4. Run whichever samples you like (note that some samples may require additional setup, see the table above):
|
||||
|
||||
```bash
|
||||
node dist/appsCheckNameAvailability.js
|
||||
```
|
||||
|
||||
Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform):
|
||||
|
||||
```bash
|
||||
npx cross-env node dist/appsCheckNameAvailability.js
|
||||
```
|
||||
|
||||
## Next Steps
|
||||
|
||||
Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients.
|
||||
|
||||
[appschecknameavailability]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v6/typescript/src/appsCheckNameAvailability.ts
|
||||
[appscreateorupdate]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v6/typescript/src/appsCreateOrUpdate.ts
|
||||
[appsdelete]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v6/typescript/src/appsDelete.ts
|
||||
[appsget]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v6/typescript/src/appsGet.ts
|
||||
[appslistbyresourcegroup]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v6/typescript/src/appsListByResourceGroup.ts
|
||||
[appslistbysubscription]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v6/typescript/src/appsListBySubscription.ts
|
||||
[appslisttemplates]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v6/typescript/src/appsListTemplates.ts
|
||||
[appssubdomainavailability]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v6/typescript/src/appsSubdomainAvailability.ts
|
||||
[appsupdate]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v6/typescript/src/appsUpdate.ts
|
||||
[operationslist]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v6/typescript/src/operationsList.ts
|
||||
[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-iotcentral?view=azure-node-preview
|
||||
[freesub]: https://azure.microsoft.com/free/
|
||||
[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/iotcentral/arm-iotcentral/README.md
|
||||
[typescript]: https://www.typescriptlang.org/docs/home.html
|
|
@ -0,0 +1,100 @@
|
|||
# client library samples for JavaScript (Beta)
|
||||
|
||||
These sample programs show how to use the JavaScript client libraries for in some common scenarios.
|
||||
|
||||
| **File Name** | **Description** |
|
||||
| ----------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| [appsCheckNameAvailability.js][appschecknameavailability] | Check if an IoT Central application name is available. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_CheckNameAvailability.json |
|
||||
| [appsCheckNameAvailabilitySample.js][appschecknameavailabilitysample] | Check if an IoT Central application name is available. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/Apps_CheckNameAvailability.json |
|
||||
| [appsCheckSubdomainAvailabilitySample.js][appschecksubdomainavailabilitysample] | Check if an IoT Central application subdomain is available. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/Apps_CheckSubdomainAvailability.json |
|
||||
| [appsCreateOrUpdate.js][appscreateorupdate] | Create or update the metadata of an IoT Central application. The usual pattern to modify a property is to retrieve the IoT Central application metadata and security metadata, and then combine them with the modified values in a new body to update the IoT Central application. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_CreateOrUpdate.json |
|
||||
| [appsCreateOrUpdateSample.js][appscreateorupdatesample] | Create or update the metadata of an IoT Central application. The usual pattern to modify a property is to retrieve the IoT Central application metadata and security metadata, and then combine them with the modified values in a new body to update the IoT Central application. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/Apps_CreateOrUpdate.json |
|
||||
| [appsDelete.js][appsdelete] | Delete an IoT Central application. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_Delete.json |
|
||||
| [appsDeleteSample.js][appsdeletesample] | Delete an IoT Central application. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/Apps_Delete.json |
|
||||
| [appsGet.js][appsget] | Get the metadata of an IoT Central application. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_Get.json |
|
||||
| [appsGetSample.js][appsgetsample] | Get the metadata of an IoT Central application. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/Apps_Get.json |
|
||||
| [appsListByResourceGroup.js][appslistbyresourcegroup] | Get all the IoT Central Applications in a resource group. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_ListByResourceGroup.json |
|
||||
| [appsListByResourceGroupSample.js][appslistbyresourcegroupsample] | Get all the IoT Central Applications in a resource group. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/Apps_ListByResourceGroup.json |
|
||||
| [appsListBySubscription.js][appslistbysubscription] | Get all IoT Central Applications in a subscription. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_ListBySubscription.json |
|
||||
| [appsListBySubscriptionSample.js][appslistbysubscriptionsample] | Get all IoT Central Applications in a subscription. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/Apps_ListBySubscription.json |
|
||||
| [appsListTemplates.js][appslisttemplates] | Get all available application templates. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_Templates.json |
|
||||
| [appsListTemplatesSample.js][appslisttemplatessample] | Get all available application templates. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/Apps_Templates.json |
|
||||
| [appsSubdomainAvailability.js][appssubdomainavailability] | Check if an IoT Central application subdomain is available. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_CheckSubdomainAvailability.json |
|
||||
| [appsUpdate.js][appsupdate] | Update the metadata of an IoT Central application. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_Update.json |
|
||||
| [appsUpdateSample.js][appsupdatesample] | Update the metadata of an IoT Central application. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/Apps_Update.json |
|
||||
| [operationsList.js][operationslist] | Lists all of the available IoT Central Resource Provider operations. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Operations_List.json |
|
||||
| [operationsListSample.js][operationslistsample] | Lists all of the available IoT Central Resource Provider operations. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/Operations_List.json |
|
||||
| [privateEndpointConnectionsCreateSample.js][privateendpointconnectionscreatesample] | Update a private endpoint connection. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/PrivateEndpointConnections_Update.json |
|
||||
| [privateEndpointConnectionsDeleteSample.js][privateendpointconnectionsdeletesample] | Deletes a private endpoint connection from the IoT Central Application. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/PrivateEndpointConnections_Delete.json |
|
||||
| [privateEndpointConnectionsGetSample.js][privateendpointconnectionsgetsample] | Get the metadata of a private endpoint connection for the IoT Central Application. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/PrivateEndpointConnections_Get.json |
|
||||
| [privateEndpointConnectionsListSample.js][privateendpointconnectionslistsample] | Get all private endpoint connections of a IoT Central Application. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/PrivateEndpointConnections_List.json |
|
||||
| [privateLinksGetSample.js][privatelinksgetsample] | Get a private link resource of a IoT Central Application. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/PrivateLinks_Get.json |
|
||||
| [privateLinksListSample.js][privatelinkslistsample] | Get all private link resources of a IoT Central Application. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/PrivateLinks_List.json |
|
||||
|
||||
## Prerequisites
|
||||
|
||||
The sample programs are compatible with [LTS versions of Node.js](https://nodejs.org/about/releases/).
|
||||
|
||||
You need [an Azure subscription][freesub] to run these sample programs.
|
||||
|
||||
Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function.
|
||||
|
||||
Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package].
|
||||
|
||||
## Setup
|
||||
|
||||
To run the samples using the published version of the package:
|
||||
|
||||
1. Install the dependencies using `npm`:
|
||||
|
||||
```bash
|
||||
npm install
|
||||
```
|
||||
|
||||
2. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically.
|
||||
|
||||
3. Run whichever samples you like (note that some samples may require additional setup, see the table above):
|
||||
|
||||
```bash
|
||||
node appsCheckNameAvailability.js
|
||||
```
|
||||
|
||||
Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform):
|
||||
|
||||
```bash
|
||||
npx cross-env node appsCheckNameAvailability.js
|
||||
```
|
||||
|
||||
## Next Steps
|
||||
|
||||
Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients.
|
||||
|
||||
[appschecknameavailability]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v7-beta/javascript/appsCheckNameAvailability.js
|
||||
[appschecknameavailabilitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v7-beta/javascript/appsCheckNameAvailabilitySample.js
|
||||
[appschecksubdomainavailabilitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v7-beta/javascript/appsCheckSubdomainAvailabilitySample.js
|
||||
[appscreateorupdate]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v7-beta/javascript/appsCreateOrUpdate.js
|
||||
[appscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v7-beta/javascript/appsCreateOrUpdateSample.js
|
||||
[appsdelete]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v7-beta/javascript/appsDelete.js
|
||||
[appsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v7-beta/javascript/appsDeleteSample.js
|
||||
[appsget]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v7-beta/javascript/appsGet.js
|
||||
[appsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v7-beta/javascript/appsGetSample.js
|
||||
[appslistbyresourcegroup]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v7-beta/javascript/appsListByResourceGroup.js
|
||||
[appslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v7-beta/javascript/appsListByResourceGroupSample.js
|
||||
[appslistbysubscription]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v7-beta/javascript/appsListBySubscription.js
|
||||
[appslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v7-beta/javascript/appsListBySubscriptionSample.js
|
||||
[appslisttemplates]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v7-beta/javascript/appsListTemplates.js
|
||||
[appslisttemplatessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v7-beta/javascript/appsListTemplatesSample.js
|
||||
[appssubdomainavailability]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v7-beta/javascript/appsSubdomainAvailability.js
|
||||
[appsupdate]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v7-beta/javascript/appsUpdate.js
|
||||
[appsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v7-beta/javascript/appsUpdateSample.js
|
||||
[operationslist]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v7-beta/javascript/operationsList.js
|
||||
[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v7-beta/javascript/operationsListSample.js
|
||||
[privateendpointconnectionscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v7-beta/javascript/privateEndpointConnectionsCreateSample.js
|
||||
[privateendpointconnectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v7-beta/javascript/privateEndpointConnectionsDeleteSample.js
|
||||
[privateendpointconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v7-beta/javascript/privateEndpointConnectionsGetSample.js
|
||||
[privateendpointconnectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v7-beta/javascript/privateEndpointConnectionsListSample.js
|
||||
[privatelinksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v7-beta/javascript/privateLinksGetSample.js
|
||||
[privatelinkslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v7-beta/javascript/privateLinksListSample.js
|
||||
[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-iotcentral?view=azure-node-preview
|
||||
[freesub]: https://azure.microsoft.com/free/
|
||||
[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/iotcentral/arm-iotcentral/README.md
|
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* 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.
|
||||
const { IotCentralClient } = require("@azure/arm-iotcentral");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Check if an IoT Central application name is available.
|
||||
*
|
||||
* @summary Check if an IoT Central application name is available.
|
||||
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/Apps_CheckNameAvailability.json
|
||||
*/
|
||||
async function appsCheckNameAvailability() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const operationInputs = {
|
||||
name: "myiotcentralapp",
|
||||
type: "IoTApps",
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new IotCentralClient(credential, subscriptionId);
|
||||
const result = await client.apps.checkNameAvailability(operationInputs);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
appsCheckNameAvailability().catch(console.error);
|
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* 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.
|
||||
const { IotCentralClient } = require("@azure/arm-iotcentral");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Check if an IoT Central application subdomain is available.
|
||||
*
|
||||
* @summary Check if an IoT Central application subdomain is available.
|
||||
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/Apps_CheckSubdomainAvailability.json
|
||||
*/
|
||||
async function appsSubdomainAvailability() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const operationInputs = {
|
||||
name: "myiotcentralapp",
|
||||
type: "IoTApps",
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new IotCentralClient(credential, subscriptionId);
|
||||
const result = await client.apps.checkSubdomainAvailability(operationInputs);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
appsSubdomainAvailability().catch(console.error);
|
|
@ -0,0 +1,38 @@
|
|||
/*
|
||||
* 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.
|
||||
const { IotCentralClient } = require("@azure/arm-iotcentral");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Create or update the metadata of an IoT Central application. The usual pattern to modify a property is to retrieve the IoT Central application metadata and security metadata, and then combine them with the modified values in a new body to update the IoT Central application.
|
||||
*
|
||||
* @summary Create or update the metadata of an IoT Central application. The usual pattern to modify a property is to retrieve the IoT Central application metadata and security metadata, and then combine them with the modified values in a new body to update the IoT Central application.
|
||||
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/Apps_CreateOrUpdate.json
|
||||
*/
|
||||
async function appsCreateOrUpdate() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = "resRg";
|
||||
const resourceName = "myIoTCentralApp";
|
||||
const app = {
|
||||
displayName: "My IoT Central App",
|
||||
identity: { type: "SystemAssigned" },
|
||||
location: "westus",
|
||||
sku: { name: "ST2" },
|
||||
subdomain: "my-iot-central-app",
|
||||
template: "iotc-pnp-preview@1.0.0",
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new IotCentralClient(credential, subscriptionId);
|
||||
const result = await client.apps.beginCreateOrUpdateAndWait(resourceGroupName, resourceName, app);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
appsCreateOrUpdate().catch(console.error);
|
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
* 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.
|
||||
const { IotCentralClient } = require("@azure/arm-iotcentral");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Delete an IoT Central application.
|
||||
*
|
||||
* @summary Delete an IoT Central application.
|
||||
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/Apps_Delete.json
|
||||
*/
|
||||
async function appsDelete() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = "resRg";
|
||||
const resourceName = "myIoTCentralApp";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new IotCentralClient(credential, subscriptionId);
|
||||
const result = await client.apps.beginDeleteAndWait(resourceGroupName, resourceName);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
appsDelete().catch(console.error);
|
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
* 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.
|
||||
const { IotCentralClient } = require("@azure/arm-iotcentral");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Get the metadata of an IoT Central application.
|
||||
*
|
||||
* @summary Get the metadata of an IoT Central application.
|
||||
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/Apps_Get.json
|
||||
*/
|
||||
async function appsGet() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = "resRg";
|
||||
const resourceName = "myIoTCentralApp";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new IotCentralClient(credential, subscriptionId);
|
||||
const result = await client.apps.get(resourceGroupName, resourceName);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
appsGet().catch(console.error);
|
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* 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.
|
||||
const { IotCentralClient } = require("@azure/arm-iotcentral");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Get all the IoT Central Applications in a resource group.
|
||||
*
|
||||
* @summary Get all the IoT Central Applications in a resource group.
|
||||
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/Apps_ListByResourceGroup.json
|
||||
*/
|
||||
async function appsListByResourceGroup() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = "resRg";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new IotCentralClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.apps.listByResourceGroup(resourceGroupName)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
appsListByResourceGroup().catch(console.error);
|
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
* 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.
|
||||
const { IotCentralClient } = require("@azure/arm-iotcentral");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Get all IoT Central Applications in a subscription.
|
||||
*
|
||||
* @summary Get all IoT Central Applications in a subscription.
|
||||
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/Apps_ListBySubscription.json
|
||||
*/
|
||||
async function appsListBySubscription() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new IotCentralClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.apps.listBySubscription()) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
appsListBySubscription().catch(console.error);
|
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
* 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.
|
||||
const { IotCentralClient } = require("@azure/arm-iotcentral");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Get all available application templates.
|
||||
*
|
||||
* @summary Get all available application templates.
|
||||
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/Apps_Templates.json
|
||||
*/
|
||||
async function appsListTemplates() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new IotCentralClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.apps.listTemplates()) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
appsListTemplates().catch(console.error);
|
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
* 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.
|
||||
const { IotCentralClient } = require("@azure/arm-iotcentral");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Update the metadata of an IoT Central application.
|
||||
*
|
||||
* @summary Update the metadata of an IoT Central application.
|
||||
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/Apps_Update.json
|
||||
*/
|
||||
async function appsUpdate() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = "resRg";
|
||||
const resourceName = "myIoTCentralApp";
|
||||
const appPatch = {
|
||||
displayName: "My IoT Central App 2",
|
||||
identity: { type: "SystemAssigned" },
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new IotCentralClient(credential, subscriptionId);
|
||||
const result = await client.apps.beginUpdateAndWait(resourceGroupName, resourceName, appPatch);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
appsUpdate().catch(console.error);
|
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
* 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.
|
||||
const { IotCentralClient } = require("@azure/arm-iotcentral");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Lists all of the available IoT Central Resource Provider operations.
|
||||
*
|
||||
* @summary Lists all of the available IoT Central Resource Provider operations.
|
||||
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/Operations_List.json
|
||||
*/
|
||||
async function operationsList() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new IotCentralClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.operations.list()) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
operationsList().catch(console.error);
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"name": "@azure-samples/arm-iotcentral-js",
|
||||
"name": "@azure-samples/arm-iotcentral-js-beta",
|
||||
"private": true,
|
||||
"version": "1.0.0",
|
||||
"description": " client library samples for JavaScript",
|
||||
"description": " client library samples for JavaScript (Beta)",
|
||||
"engines": {
|
||||
"node": ">=12.0.0"
|
||||
},
|
||||
|
@ -25,7 +25,7 @@
|
|||
},
|
||||
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/iotcentral/arm-iotcentral",
|
||||
"dependencies": {
|
||||
"@azure/arm-iotcentral": "latest",
|
||||
"@azure/arm-iotcentral": "next",
|
||||
"dotenv": "latest",
|
||||
"@azure/identity": "^2.0.1"
|
||||
}
|
|
@ -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.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
const { IotCentralClient } = require("@azure/arm-iotcentral");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Update a private endpoint connection.
|
||||
*
|
||||
* @summary Update a private endpoint connection.
|
||||
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/PrivateEndpointConnections_Update.json
|
||||
*/
|
||||
async function privateEndpointConnectionsUpdate() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = "resRg";
|
||||
const resourceName = "myIoTCentralApp";
|
||||
const privateEndpointConnectionName = "myIoTCentralAppEndpoint";
|
||||
const privateEndpointConnection = {
|
||||
privateLinkServiceConnectionState: {
|
||||
description: "Auto-approved",
|
||||
actionsRequired: "None",
|
||||
status: "Approved",
|
||||
},
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new IotCentralClient(credential, subscriptionId);
|
||||
const result = await client.privateEndpointConnections.beginCreateAndWait(
|
||||
resourceGroupName,
|
||||
resourceName,
|
||||
privateEndpointConnectionName,
|
||||
privateEndpointConnection
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
privateEndpointConnectionsUpdate().catch(console.error);
|
|
@ -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.
|
||||
const { IotCentralClient } = require("@azure/arm-iotcentral");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Deletes a private endpoint connection from the IoT Central Application.
|
||||
*
|
||||
* @summary Deletes a private endpoint connection from the IoT Central Application.
|
||||
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/PrivateEndpointConnections_Delete.json
|
||||
*/
|
||||
async function privateEndpointConnectionsDelete() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = "resRg";
|
||||
const resourceName = "myIoTCentralApp";
|
||||
const privateEndpointConnectionName = "myIoTCentralAppEndpoint";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new IotCentralClient(credential, subscriptionId);
|
||||
const result = await client.privateEndpointConnections.beginDeleteAndWait(
|
||||
resourceGroupName,
|
||||
resourceName,
|
||||
privateEndpointConnectionName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
privateEndpointConnectionsDelete().catch(console.error);
|
|
@ -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.
|
||||
const { IotCentralClient } = require("@azure/arm-iotcentral");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Get the metadata of a private endpoint connection for the IoT Central Application.
|
||||
*
|
||||
* @summary Get the metadata of a private endpoint connection for the IoT Central Application.
|
||||
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/PrivateEndpointConnections_Get.json
|
||||
*/
|
||||
async function privateEndpointConnectionsGet() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = "resRg";
|
||||
const resourceName = "myIoTCentralApp";
|
||||
const privateEndpointConnectionName = "myIoTCentralAppEndpoint";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new IotCentralClient(credential, subscriptionId);
|
||||
const result = await client.privateEndpointConnections.get(
|
||||
resourceGroupName,
|
||||
resourceName,
|
||||
privateEndpointConnectionName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
privateEndpointConnectionsGet().catch(console.error);
|
|
@ -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.
|
||||
const { IotCentralClient } = require("@azure/arm-iotcentral");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Get all private endpoint connections of a IoT Central Application.
|
||||
*
|
||||
* @summary Get all private endpoint connections of a IoT Central Application.
|
||||
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/PrivateEndpointConnections_List.json
|
||||
*/
|
||||
async function privateEndpointConnectionsList() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = "resRg";
|
||||
const resourceName = "myIoTCentralApp";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new IotCentralClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.privateEndpointConnections.list(resourceGroupName, resourceName)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
privateEndpointConnectionsList().catch(console.error);
|
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
* 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.
|
||||
const { IotCentralClient } = require("@azure/arm-iotcentral");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Get a private link resource of a IoT Central Application.
|
||||
*
|
||||
* @summary Get a private link resource of a IoT Central Application.
|
||||
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/PrivateLinks_Get.json
|
||||
*/
|
||||
async function privateLinksGet() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = "resRg";
|
||||
const resourceName = "myIoTCentralApp";
|
||||
const groupId = "iotApp";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new IotCentralClient(credential, subscriptionId);
|
||||
const result = await client.privateLinks.get(resourceGroupName, resourceName, groupId);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
privateLinksGet().catch(console.error);
|
|
@ -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.
|
||||
const { IotCentralClient } = require("@azure/arm-iotcentral");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Get all private link resources of a IoT Central Application.
|
||||
*
|
||||
* @summary Get all private link resources of a IoT Central Application.
|
||||
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/PrivateLinks_List.json
|
||||
*/
|
||||
async function privateLinksList() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = "resRg";
|
||||
const resourceName = "myIoTCentralApp";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new IotCentralClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.privateLinks.list(resourceGroupName, resourceName)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
privateLinksList().catch(console.error);
|
|
@ -0,0 +1,113 @@
|
|||
# client library samples for TypeScript (Beta)
|
||||
|
||||
These sample programs show how to use the TypeScript client libraries for in some common scenarios.
|
||||
|
||||
| **File Name** | **Description** |
|
||||
| ----------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| [appsCheckNameAvailability.ts][appschecknameavailability] | Check if an IoT Central application name is available. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_CheckNameAvailability.json |
|
||||
| [appsCheckNameAvailabilitySample.ts][appschecknameavailabilitysample] | Check if an IoT Central application name is available. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/Apps_CheckNameAvailability.json |
|
||||
| [appsCheckSubdomainAvailabilitySample.ts][appschecksubdomainavailabilitysample] | Check if an IoT Central application subdomain is available. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/Apps_CheckSubdomainAvailability.json |
|
||||
| [appsCreateOrUpdate.ts][appscreateorupdate] | Create or update the metadata of an IoT Central application. The usual pattern to modify a property is to retrieve the IoT Central application metadata and security metadata, and then combine them with the modified values in a new body to update the IoT Central application. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_CreateOrUpdate.json |
|
||||
| [appsCreateOrUpdateSample.ts][appscreateorupdatesample] | Create or update the metadata of an IoT Central application. The usual pattern to modify a property is to retrieve the IoT Central application metadata and security metadata, and then combine them with the modified values in a new body to update the IoT Central application. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/Apps_CreateOrUpdate.json |
|
||||
| [appsDelete.ts][appsdelete] | Delete an IoT Central application. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_Delete.json |
|
||||
| [appsDeleteSample.ts][appsdeletesample] | Delete an IoT Central application. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/Apps_Delete.json |
|
||||
| [appsGet.ts][appsget] | Get the metadata of an IoT Central application. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_Get.json |
|
||||
| [appsGetSample.ts][appsgetsample] | Get the metadata of an IoT Central application. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/Apps_Get.json |
|
||||
| [appsListByResourceGroup.ts][appslistbyresourcegroup] | Get all the IoT Central Applications in a resource group. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_ListByResourceGroup.json |
|
||||
| [appsListByResourceGroupSample.ts][appslistbyresourcegroupsample] | Get all the IoT Central Applications in a resource group. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/Apps_ListByResourceGroup.json |
|
||||
| [appsListBySubscription.ts][appslistbysubscription] | Get all IoT Central Applications in a subscription. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_ListBySubscription.json |
|
||||
| [appsListBySubscriptionSample.ts][appslistbysubscriptionsample] | Get all IoT Central Applications in a subscription. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/Apps_ListBySubscription.json |
|
||||
| [appsListTemplates.ts][appslisttemplates] | Get all available application templates. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_Templates.json |
|
||||
| [appsListTemplatesSample.ts][appslisttemplatessample] | Get all available application templates. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/Apps_Templates.json |
|
||||
| [appsSubdomainAvailability.ts][appssubdomainavailability] | Check if an IoT Central application subdomain is available. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_CheckSubdomainAvailability.json |
|
||||
| [appsUpdate.ts][appsupdate] | Update the metadata of an IoT Central application. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_Update.json |
|
||||
| [appsUpdateSample.ts][appsupdatesample] | Update the metadata of an IoT Central application. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/Apps_Update.json |
|
||||
| [operationsList.ts][operationslist] | Lists all of the available IoT Central Resource Provider operations. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Operations_List.json |
|
||||
| [operationsListSample.ts][operationslistsample] | Lists all of the available IoT Central Resource Provider operations. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/Operations_List.json |
|
||||
| [privateEndpointConnectionsCreateSample.ts][privateendpointconnectionscreatesample] | Update a private endpoint connection. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/PrivateEndpointConnections_Update.json |
|
||||
| [privateEndpointConnectionsDeleteSample.ts][privateendpointconnectionsdeletesample] | Deletes a private endpoint connection from the IoT Central Application. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/PrivateEndpointConnections_Delete.json |
|
||||
| [privateEndpointConnectionsGetSample.ts][privateendpointconnectionsgetsample] | Get the metadata of a private endpoint connection for the IoT Central Application. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/PrivateEndpointConnections_Get.json |
|
||||
| [privateEndpointConnectionsListSample.ts][privateendpointconnectionslistsample] | Get all private endpoint connections of a IoT Central Application. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/PrivateEndpointConnections_List.json |
|
||||
| [privateLinksGetSample.ts][privatelinksgetsample] | Get a private link resource of a IoT Central Application. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/PrivateLinks_Get.json |
|
||||
| [privateLinksListSample.ts][privatelinkslistsample] | Get all private link resources of a IoT Central Application. x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/PrivateLinks_List.json |
|
||||
|
||||
## Prerequisites
|
||||
|
||||
The sample programs are compatible with [LTS versions of Node.js](https://nodejs.org/about/releases/).
|
||||
|
||||
Before running the samples in Node, they must be compiled to JavaScript using the TypeScript compiler. For more information on TypeScript, see the [TypeScript documentation][typescript]. Install the TypeScript compiler using:
|
||||
|
||||
```bash
|
||||
npm install -g typescript
|
||||
```
|
||||
|
||||
You need [an Azure subscription][freesub] to run these sample programs.
|
||||
|
||||
Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function.
|
||||
|
||||
Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package].
|
||||
|
||||
## Setup
|
||||
|
||||
To run the samples using the published version of the package:
|
||||
|
||||
1. Install the dependencies using `npm`:
|
||||
|
||||
```bash
|
||||
npm install
|
||||
```
|
||||
|
||||
2. Compile the samples:
|
||||
|
||||
```bash
|
||||
npm run build
|
||||
```
|
||||
|
||||
3. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically.
|
||||
|
||||
4. Run whichever samples you like (note that some samples may require additional setup, see the table above):
|
||||
|
||||
```bash
|
||||
node dist/appsCheckNameAvailability.js
|
||||
```
|
||||
|
||||
Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform):
|
||||
|
||||
```bash
|
||||
npx cross-env node dist/appsCheckNameAvailability.js
|
||||
```
|
||||
|
||||
## Next Steps
|
||||
|
||||
Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients.
|
||||
|
||||
[appschecknameavailability]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v7-beta/typescript/src/appsCheckNameAvailability.ts
|
||||
[appschecknameavailabilitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v7-beta/typescript/src/appsCheckNameAvailabilitySample.ts
|
||||
[appschecksubdomainavailabilitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v7-beta/typescript/src/appsCheckSubdomainAvailabilitySample.ts
|
||||
[appscreateorupdate]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v7-beta/typescript/src/appsCreateOrUpdate.ts
|
||||
[appscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v7-beta/typescript/src/appsCreateOrUpdateSample.ts
|
||||
[appsdelete]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v7-beta/typescript/src/appsDelete.ts
|
||||
[appsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v7-beta/typescript/src/appsDeleteSample.ts
|
||||
[appsget]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v7-beta/typescript/src/appsGet.ts
|
||||
[appsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v7-beta/typescript/src/appsGetSample.ts
|
||||
[appslistbyresourcegroup]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v7-beta/typescript/src/appsListByResourceGroup.ts
|
||||
[appslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v7-beta/typescript/src/appsListByResourceGroupSample.ts
|
||||
[appslistbysubscription]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v7-beta/typescript/src/appsListBySubscription.ts
|
||||
[appslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v7-beta/typescript/src/appsListBySubscriptionSample.ts
|
||||
[appslisttemplates]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v7-beta/typescript/src/appsListTemplates.ts
|
||||
[appslisttemplatessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v7-beta/typescript/src/appsListTemplatesSample.ts
|
||||
[appssubdomainavailability]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v7-beta/typescript/src/appsSubdomainAvailability.ts
|
||||
[appsupdate]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v7-beta/typescript/src/appsUpdate.ts
|
||||
[appsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v7-beta/typescript/src/appsUpdateSample.ts
|
||||
[operationslist]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v7-beta/typescript/src/operationsList.ts
|
||||
[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v7-beta/typescript/src/operationsListSample.ts
|
||||
[privateendpointconnectionscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v7-beta/typescript/src/privateEndpointConnectionsCreateSample.ts
|
||||
[privateendpointconnectionsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v7-beta/typescript/src/privateEndpointConnectionsDeleteSample.ts
|
||||
[privateendpointconnectionsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v7-beta/typescript/src/privateEndpointConnectionsGetSample.ts
|
||||
[privateendpointconnectionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v7-beta/typescript/src/privateEndpointConnectionsListSample.ts
|
||||
[privatelinksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v7-beta/typescript/src/privateLinksGetSample.ts
|
||||
[privatelinkslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/iotcentral/arm-iotcentral/samples/v7-beta/typescript/src/privateLinksListSample.ts
|
||||
[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-iotcentral?view=azure-node-preview
|
||||
[freesub]: https://azure.microsoft.com/free/
|
||||
[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/iotcentral/arm-iotcentral/README.md
|
||||
[typescript]: https://www.typescriptlang.org/docs/home.html
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"name": "@azure-samples/arm-iotcentral-ts",
|
||||
"name": "@azure-samples/arm-iotcentral-ts-beta",
|
||||
"private": true,
|
||||
"version": "1.0.0",
|
||||
"description": " client library samples for TypeScript",
|
||||
"description": " client library samples for TypeScript (Beta)",
|
||||
"engines": {
|
||||
"node": ">=12.0.0"
|
||||
},
|
||||
|
@ -29,7 +29,7 @@
|
|||
},
|
||||
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/iotcentral/arm-iotcentral",
|
||||
"dependencies": {
|
||||
"@azure/arm-iotcentral": "latest",
|
||||
"@azure/arm-iotcentral": "next",
|
||||
"dotenv": "latest",
|
||||
"@azure/identity": "^2.0.1"
|
||||
},
|
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* 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.
|
||||
import { OperationInputs, IotCentralClient } from "@azure/arm-iotcentral";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Check if an IoT Central application name is available.
|
||||
*
|
||||
* @summary Check if an IoT Central application name is available.
|
||||
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/Apps_CheckNameAvailability.json
|
||||
*/
|
||||
async function appsCheckNameAvailability() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const operationInputs: OperationInputs = {
|
||||
name: "myiotcentralapp",
|
||||
type: "IoTApps"
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new IotCentralClient(credential, subscriptionId);
|
||||
const result = await client.apps.checkNameAvailability(operationInputs);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
appsCheckNameAvailability().catch(console.error);
|
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* 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.
|
||||
import { OperationInputs, IotCentralClient } from "@azure/arm-iotcentral";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Check if an IoT Central application subdomain is available.
|
||||
*
|
||||
* @summary Check if an IoT Central application subdomain is available.
|
||||
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/Apps_CheckSubdomainAvailability.json
|
||||
*/
|
||||
async function appsSubdomainAvailability() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const operationInputs: OperationInputs = {
|
||||
name: "myiotcentralapp",
|
||||
type: "IoTApps"
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new IotCentralClient(credential, subscriptionId);
|
||||
const result = await client.apps.checkSubdomainAvailability(operationInputs);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
appsSubdomainAvailability().catch(console.error);
|
|
@ -0,0 +1,42 @@
|
|||
/*
|
||||
* 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.
|
||||
import { App, IotCentralClient } from "@azure/arm-iotcentral";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Create or update the metadata of an IoT Central application. The usual pattern to modify a property is to retrieve the IoT Central application metadata and security metadata, and then combine them with the modified values in a new body to update the IoT Central application.
|
||||
*
|
||||
* @summary Create or update the metadata of an IoT Central application. The usual pattern to modify a property is to retrieve the IoT Central application metadata and security metadata, and then combine them with the modified values in a new body to update the IoT Central application.
|
||||
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/Apps_CreateOrUpdate.json
|
||||
*/
|
||||
async function appsCreateOrUpdate() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = "resRg";
|
||||
const resourceName = "myIoTCentralApp";
|
||||
const app: App = {
|
||||
displayName: "My IoT Central App",
|
||||
identity: { type: "SystemAssigned" },
|
||||
location: "westus",
|
||||
sku: { name: "ST2" },
|
||||
subdomain: "my-iot-central-app",
|
||||
template: "iotc-pnp-preview@1.0.0"
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new IotCentralClient(credential, subscriptionId);
|
||||
const result = await client.apps.beginCreateOrUpdateAndWait(
|
||||
resourceGroupName,
|
||||
resourceName,
|
||||
app
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
appsCreateOrUpdate().catch(console.error);
|
|
@ -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.
|
||||
import { IotCentralClient } from "@azure/arm-iotcentral";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Delete an IoT Central application.
|
||||
*
|
||||
* @summary Delete an IoT Central application.
|
||||
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/Apps_Delete.json
|
||||
*/
|
||||
async function appsDelete() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = "resRg";
|
||||
const resourceName = "myIoTCentralApp";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new IotCentralClient(credential, subscriptionId);
|
||||
const result = await client.apps.beginDeleteAndWait(
|
||||
resourceGroupName,
|
||||
resourceName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
appsDelete().catch(console.error);
|
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
* 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.
|
||||
import { IotCentralClient } from "@azure/arm-iotcentral";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Get the metadata of an IoT Central application.
|
||||
*
|
||||
* @summary Get the metadata of an IoT Central application.
|
||||
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/Apps_Get.json
|
||||
*/
|
||||
async function appsGet() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = "resRg";
|
||||
const resourceName = "myIoTCentralApp";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new IotCentralClient(credential, subscriptionId);
|
||||
const result = await client.apps.get(resourceGroupName, resourceName);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
appsGet().catch(console.error);
|
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* 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.
|
||||
import { IotCentralClient } from "@azure/arm-iotcentral";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Get all the IoT Central Applications in a resource group.
|
||||
*
|
||||
* @summary Get all the IoT Central Applications in a resource group.
|
||||
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/Apps_ListByResourceGroup.json
|
||||
*/
|
||||
async function appsListByResourceGroup() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = "resRg";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new IotCentralClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.apps.listByResourceGroup(resourceGroupName)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
appsListByResourceGroup().catch(console.error);
|
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
* 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.
|
||||
import { IotCentralClient } from "@azure/arm-iotcentral";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Get all IoT Central Applications in a subscription.
|
||||
*
|
||||
* @summary Get all IoT Central Applications in a subscription.
|
||||
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/Apps_ListBySubscription.json
|
||||
*/
|
||||
async function appsListBySubscription() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new IotCentralClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.apps.listBySubscription()) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
appsListBySubscription().catch(console.error);
|
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
* 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.
|
||||
import { IotCentralClient } from "@azure/arm-iotcentral";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Get all available application templates.
|
||||
*
|
||||
* @summary Get all available application templates.
|
||||
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/Apps_Templates.json
|
||||
*/
|
||||
async function appsListTemplates() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new IotCentralClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.apps.listTemplates()) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
appsListTemplates().catch(console.error);
|
|
@ -0,0 +1,38 @@
|
|||
/*
|
||||
* 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.
|
||||
import { AppPatch, IotCentralClient } from "@azure/arm-iotcentral";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Update the metadata of an IoT Central application.
|
||||
*
|
||||
* @summary Update the metadata of an IoT Central application.
|
||||
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/Apps_Update.json
|
||||
*/
|
||||
async function appsUpdate() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = "resRg";
|
||||
const resourceName = "myIoTCentralApp";
|
||||
const appPatch: AppPatch = {
|
||||
displayName: "My IoT Central App 2",
|
||||
identity: { type: "SystemAssigned" }
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new IotCentralClient(credential, subscriptionId);
|
||||
const result = await client.apps.beginUpdateAndWait(
|
||||
resourceGroupName,
|
||||
resourceName,
|
||||
appPatch
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
appsUpdate().catch(console.error);
|
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
* 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.
|
||||
import { IotCentralClient } from "@azure/arm-iotcentral";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Lists all of the available IoT Central Resource Provider operations.
|
||||
*
|
||||
* @summary Lists all of the available IoT Central Resource Provider operations.
|
||||
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/Operations_List.json
|
||||
*/
|
||||
async function operationsList() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new IotCentralClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.operations.list()) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
operationsList().catch(console.error);
|
|
@ -0,0 +1,46 @@
|
|||
/*
|
||||
* 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.
|
||||
import {
|
||||
PrivateEndpointConnection,
|
||||
IotCentralClient
|
||||
} from "@azure/arm-iotcentral";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Update a private endpoint connection.
|
||||
*
|
||||
* @summary Update a private endpoint connection.
|
||||
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/PrivateEndpointConnections_Update.json
|
||||
*/
|
||||
async function privateEndpointConnectionsUpdate() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = "resRg";
|
||||
const resourceName = "myIoTCentralApp";
|
||||
const privateEndpointConnectionName = "myIoTCentralAppEndpoint";
|
||||
const privateEndpointConnection: PrivateEndpointConnection = {
|
||||
privateLinkServiceConnectionState: {
|
||||
description: "Auto-approved",
|
||||
actionsRequired: "None",
|
||||
status: "Approved"
|
||||
}
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new IotCentralClient(credential, subscriptionId);
|
||||
const result = await client.privateEndpointConnections.beginCreateAndWait(
|
||||
resourceGroupName,
|
||||
resourceName,
|
||||
privateEndpointConnectionName,
|
||||
privateEndpointConnection
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
privateEndpointConnectionsUpdate().catch(console.error);
|
|
@ -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.
|
||||
import { IotCentralClient } from "@azure/arm-iotcentral";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Deletes a private endpoint connection from the IoT Central Application.
|
||||
*
|
||||
* @summary Deletes a private endpoint connection from the IoT Central Application.
|
||||
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/PrivateEndpointConnections_Delete.json
|
||||
*/
|
||||
async function privateEndpointConnectionsDelete() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = "resRg";
|
||||
const resourceName = "myIoTCentralApp";
|
||||
const privateEndpointConnectionName = "myIoTCentralAppEndpoint";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new IotCentralClient(credential, subscriptionId);
|
||||
const result = await client.privateEndpointConnections.beginDeleteAndWait(
|
||||
resourceGroupName,
|
||||
resourceName,
|
||||
privateEndpointConnectionName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
privateEndpointConnectionsDelete().catch(console.error);
|
|
@ -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.
|
||||
import { IotCentralClient } from "@azure/arm-iotcentral";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Get the metadata of a private endpoint connection for the IoT Central Application.
|
||||
*
|
||||
* @summary Get the metadata of a private endpoint connection for the IoT Central Application.
|
||||
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/PrivateEndpointConnections_Get.json
|
||||
*/
|
||||
async function privateEndpointConnectionsGet() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = "resRg";
|
||||
const resourceName = "myIoTCentralApp";
|
||||
const privateEndpointConnectionName = "myIoTCentralAppEndpoint";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new IotCentralClient(credential, subscriptionId);
|
||||
const result = await client.privateEndpointConnections.get(
|
||||
resourceGroupName,
|
||||
resourceName,
|
||||
privateEndpointConnectionName
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
privateEndpointConnectionsGet().catch(console.error);
|
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
* 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.
|
||||
import { IotCentralClient } from "@azure/arm-iotcentral";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Get all private endpoint connections of a IoT Central Application.
|
||||
*
|
||||
* @summary Get all private endpoint connections of a IoT Central Application.
|
||||
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/PrivateEndpointConnections_List.json
|
||||
*/
|
||||
async function privateEndpointConnectionsList() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = "resRg";
|
||||
const resourceName = "myIoTCentralApp";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new IotCentralClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.privateEndpointConnections.list(
|
||||
resourceGroupName,
|
||||
resourceName
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
privateEndpointConnectionsList().catch(console.error);
|
|
@ -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.
|
||||
import { IotCentralClient } from "@azure/arm-iotcentral";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Get a private link resource of a IoT Central Application.
|
||||
*
|
||||
* @summary Get a private link resource of a IoT Central Application.
|
||||
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/PrivateLinks_Get.json
|
||||
*/
|
||||
async function privateLinksGet() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = "resRg";
|
||||
const resourceName = "myIoTCentralApp";
|
||||
const groupId = "iotApp";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new IotCentralClient(credential, subscriptionId);
|
||||
const result = await client.privateLinks.get(
|
||||
resourceGroupName,
|
||||
resourceName,
|
||||
groupId
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
privateLinksGet().catch(console.error);
|
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
* 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.
|
||||
import { IotCentralClient } from "@azure/arm-iotcentral";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Get all private link resources of a IoT Central Application.
|
||||
*
|
||||
* @summary Get all private link resources of a IoT Central Application.
|
||||
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/PrivateLinks_List.json
|
||||
*/
|
||||
async function privateLinksList() {
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = "resRg";
|
||||
const resourceName = "myIoTCentralApp";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new IotCentralClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.privateLinks.list(
|
||||
resourceGroupName,
|
||||
resourceName
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
privateLinksList().catch(console.error);
|
|
@ -8,8 +8,18 @@
|
|||
|
||||
import * as coreClient from "@azure/core-client";
|
||||
import * as coreAuth from "@azure/core-auth";
|
||||
import { AppsImpl, OperationsImpl } from "./operations";
|
||||
import { Apps, Operations } from "./operationsInterfaces";
|
||||
import {
|
||||
AppsImpl,
|
||||
PrivateEndpointConnectionsImpl,
|
||||
PrivateLinksImpl,
|
||||
OperationsImpl
|
||||
} from "./operations";
|
||||
import {
|
||||
Apps,
|
||||
PrivateEndpointConnections,
|
||||
PrivateLinks,
|
||||
Operations
|
||||
} from "./operationsInterfaces";
|
||||
import { IotCentralClientOptionalParams } from "./models";
|
||||
|
||||
export class IotCentralClient extends coreClient.ServiceClient {
|
||||
|
@ -44,7 +54,7 @@ export class IotCentralClient extends coreClient.ServiceClient {
|
|||
credential: credentials
|
||||
};
|
||||
|
||||
const packageDetails = `azsdk-js-arm-iotcentral/6.0.0`;
|
||||
const packageDetails = `azsdk-js-arm-iotcentral/7.0.0-beta.1`;
|
||||
const userAgentPrefix =
|
||||
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
||||
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
||||
|
@ -59,7 +69,8 @@ export class IotCentralClient extends coreClient.ServiceClient {
|
|||
userAgentOptions: {
|
||||
userAgentPrefix
|
||||
},
|
||||
baseUri: options.endpoint || "https://management.azure.com"
|
||||
baseUri:
|
||||
options.endpoint ?? options.baseUri ?? "https://management.azure.com"
|
||||
};
|
||||
super(optionsWithDefaults);
|
||||
// Parameter assignments
|
||||
|
@ -67,11 +78,15 @@ export class IotCentralClient extends coreClient.ServiceClient {
|
|||
|
||||
// Assigning values to Constant parameters
|
||||
this.$host = options.$host || "https://management.azure.com";
|
||||
this.apiVersion = options.apiVersion || "2021-06-01";
|
||||
this.apiVersion = options.apiVersion || "2021-11-01-preview";
|
||||
this.apps = new AppsImpl(this);
|
||||
this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this);
|
||||
this.privateLinks = new PrivateLinksImpl(this);
|
||||
this.operations = new OperationsImpl(this);
|
||||
}
|
||||
|
||||
apps: Apps;
|
||||
privateEndpointConnections: PrivateEndpointConnections;
|
||||
privateLinks: PrivateLinks;
|
||||
operations: Operations;
|
||||
}
|
||||
|
|
|
@ -8,6 +8,85 @@
|
|||
|
||||
import * as coreClient from "@azure/core-client";
|
||||
|
||||
/** Network Rule Set Properties of this IoT Central application. */
|
||||
export interface NetworkRuleSets {
|
||||
/** Whether these rules apply for device connectivity to IoT Hub and Device Provisioning service associated with this application. */
|
||||
applyToDevices?: boolean;
|
||||
/** Whether these rules apply for connectivity via IoT Central web portal and APIs. */
|
||||
applyToIoTCentral?: boolean;
|
||||
/** The default network action to apply. */
|
||||
defaultAction?: NetworkAction;
|
||||
/** List of IP rules. */
|
||||
ipRules?: NetworkRuleSetIpRule[];
|
||||
}
|
||||
|
||||
/** An object for an IP range that will be allowed access. */
|
||||
export interface NetworkRuleSetIpRule {
|
||||
/** The readable name of the IP rule. */
|
||||
filterName?: string;
|
||||
/** The CIDR block defining the IP range. */
|
||||
ipMask?: string;
|
||||
}
|
||||
|
||||
/** The private endpoint resource. */
|
||||
export interface PrivateEndpoint {
|
||||
/**
|
||||
* The ARM identifier for private endpoint.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly id?: string;
|
||||
}
|
||||
|
||||
/** A collection of information about the state of the connection between service consumer and provider. */
|
||||
export interface PrivateLinkServiceConnectionState {
|
||||
/** Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. */
|
||||
status?: PrivateEndpointServiceConnectionStatus;
|
||||
/** The reason for approval/rejection of the connection. */
|
||||
description?: string;
|
||||
/** A message indicating if changes on the service provider require any updates on the consumer. */
|
||||
actionsRequired?: string;
|
||||
}
|
||||
|
||||
/** Common fields that are returned in the response for all Azure Resource Manager resources */
|
||||
export interface Resource {
|
||||
/**
|
||||
* Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly id?: string;
|
||||
/**
|
||||
* The name of the resource
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly name?: string;
|
||||
/**
|
||||
* The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly type?: string;
|
||||
/**
|
||||
* Azure Resource Manager metadata containing createdBy and modifiedBy information.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly systemData?: SystemData;
|
||||
}
|
||||
|
||||
/** Metadata pertaining to creation and last modification of the resource. */
|
||||
export interface SystemData {
|
||||
/** The identity that created the resource. */
|
||||
createdBy?: string;
|
||||
/** The type of identity that created the resource. */
|
||||
createdByType?: CreatedByType;
|
||||
/** The timestamp of resource creation (UTC). */
|
||||
createdAt?: Date;
|
||||
/** The identity that last modified the resource. */
|
||||
lastModifiedBy?: string;
|
||||
/** The type of identity that last modified the resource. */
|
||||
lastModifiedByType?: CreatedByType;
|
||||
/** The timestamp of resource last modification (UTC) */
|
||||
lastModifiedAt?: Date;
|
||||
}
|
||||
|
||||
/** Information about the SKU of the IoT Central application. */
|
||||
export interface AppSkuInfo {
|
||||
/** The name of the SKU. */
|
||||
|
@ -30,69 +109,53 @@ export interface SystemAssignedServiceIdentity {
|
|||
type: SystemAssignedServiceIdentityType;
|
||||
}
|
||||
|
||||
/** The common properties of an ARM resource. */
|
||||
export interface Resource {
|
||||
/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */
|
||||
export interface ErrorResponse {
|
||||
/** The error object. */
|
||||
error?: ErrorDetail;
|
||||
}
|
||||
|
||||
/** The error detail. */
|
||||
export interface ErrorDetail {
|
||||
/**
|
||||
* The ARM resource identifier.
|
||||
* The error code.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly id?: string;
|
||||
readonly code?: string;
|
||||
/**
|
||||
* The ARM resource name.
|
||||
* The error message.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly name?: string;
|
||||
readonly message?: string;
|
||||
/**
|
||||
* The resource type.
|
||||
* The error target.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly target?: string;
|
||||
/**
|
||||
* The error details.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly details?: ErrorDetail[];
|
||||
/**
|
||||
* The error additional info.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly additionalInfo?: ErrorAdditionalInfo[];
|
||||
}
|
||||
|
||||
/** The resource management error additional info. */
|
||||
export interface ErrorAdditionalInfo {
|
||||
/**
|
||||
* The additional info type.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly type?: string;
|
||||
/** The resource location. */
|
||||
location: string;
|
||||
/** The resource tags. */
|
||||
tags?: { [propertyName: string]: string };
|
||||
}
|
||||
|
||||
/** Error details. */
|
||||
export interface CloudError {
|
||||
/**
|
||||
* The error code.
|
||||
* The additional info.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly code?: string;
|
||||
/**
|
||||
* The error message.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly message?: string;
|
||||
/**
|
||||
* The target of the particular error.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly target?: string;
|
||||
/** A list of additional details about the error. */
|
||||
details?: CloudErrorBody[];
|
||||
}
|
||||
|
||||
/** Details of error response. */
|
||||
export interface CloudErrorBody {
|
||||
/**
|
||||
* The error code.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly code?: string;
|
||||
/**
|
||||
* The error message.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly message?: string;
|
||||
/**
|
||||
* The target of the particular error.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly target?: string;
|
||||
/** A list of additional details about the error. */
|
||||
details?: CloudErrorBody[];
|
||||
readonly info?: Record<string, unknown>;
|
||||
}
|
||||
|
||||
/** The description of the IoT Central application. */
|
||||
|
@ -103,6 +166,11 @@ export interface AppPatch {
|
|||
sku?: AppSkuInfo;
|
||||
/** The managed identities for the IoT Central application. */
|
||||
identity?: SystemAssignedServiceIdentity;
|
||||
/**
|
||||
* The provisioning state of the application.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly provisioningState?: ProvisioningState;
|
||||
/**
|
||||
* The ID of the application.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
|
@ -119,6 +187,15 @@ export interface AppPatch {
|
|||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly state?: AppState;
|
||||
/** Whether requests from the public network are allowed. */
|
||||
publicNetworkAccess?: PublicNetworkAccess;
|
||||
/** Network Rule Set Properties of this IoT Central application. */
|
||||
networkRuleSets?: NetworkRuleSets;
|
||||
/**
|
||||
* Private endpoint connections created on this IoT Central application.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly privateEndpointConnections?: PrivateEndpointConnection[];
|
||||
}
|
||||
|
||||
/** A list of IoT Central Applications with a next link. */
|
||||
|
@ -129,6 +206,18 @@ export interface AppListResult {
|
|||
value?: App[];
|
||||
}
|
||||
|
||||
/** List of private endpoint connections associated with the specified resource. */
|
||||
export interface PrivateEndpointConnectionListResult {
|
||||
/** Array of private endpoint connections. */
|
||||
value?: PrivateEndpointConnection[];
|
||||
}
|
||||
|
||||
/** A list of private link resources. */
|
||||
export interface PrivateLinkResourceListResult {
|
||||
/** Array of private link resources */
|
||||
value?: PrivateLinkResource[];
|
||||
}
|
||||
|
||||
/** Input values. */
|
||||
export interface OperationInputs {
|
||||
/** The name of the IoT Central application instance to check. */
|
||||
|
@ -281,12 +370,59 @@ export interface OperationDisplay {
|
|||
readonly description?: string;
|
||||
}
|
||||
|
||||
/** The private endpoint connection resource. */
|
||||
export type PrivateEndpointConnection = Resource & {
|
||||
/**
|
||||
* The group ids for the private endpoint resource.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly groupIds?: string[];
|
||||
/** The private endpoint resource. */
|
||||
privateEndpoint?: PrivateEndpoint;
|
||||
/** A collection of information about the state of the connection between service consumer and provider. */
|
||||
privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState;
|
||||
/**
|
||||
* The provisioning state of the private endpoint connection resource.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly provisioningState?: PrivateEndpointConnectionProvisioningState;
|
||||
};
|
||||
|
||||
/** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */
|
||||
export type TrackedResource = Resource & {
|
||||
/** Resource tags. */
|
||||
tags?: { [propertyName: string]: string };
|
||||
/** The geo-location where the resource lives */
|
||||
location: string;
|
||||
};
|
||||
|
||||
/** A private link resource. */
|
||||
export type PrivateLinkResource = Resource & {
|
||||
/**
|
||||
* The private link resource group id.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly groupId?: string;
|
||||
/**
|
||||
* The private link resource required member names.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly requiredMembers?: string[];
|
||||
/** The private link resource private link DNS zone name. */
|
||||
requiredZoneNames?: string[];
|
||||
};
|
||||
|
||||
/** The IoT Central application. */
|
||||
export type App = Resource & {
|
||||
export type App = TrackedResource & {
|
||||
/** A valid instance SKU. */
|
||||
sku: AppSkuInfo;
|
||||
/** The managed identities for the IoT Central application. */
|
||||
identity?: SystemAssignedServiceIdentity;
|
||||
/**
|
||||
* The provisioning state of the application.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly provisioningState?: ProvisioningState;
|
||||
/**
|
||||
* The ID of the application.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
|
@ -303,8 +439,87 @@ export type App = Resource & {
|
|||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly state?: AppState;
|
||||
/** Whether requests from the public network are allowed. */
|
||||
publicNetworkAccess?: PublicNetworkAccess;
|
||||
/** Network Rule Set Properties of this IoT Central application. */
|
||||
networkRuleSets?: NetworkRuleSets;
|
||||
/**
|
||||
* Private endpoint connections created on this IoT Central application.
|
||||
* NOTE: This property will not be serialized. It can only be populated by the server.
|
||||
*/
|
||||
readonly privateEndpointConnections?: PrivateEndpointConnection[];
|
||||
};
|
||||
|
||||
/** Defines headers for Apps_createOrUpdate operation. */
|
||||
export interface AppsCreateOrUpdateHeaders {
|
||||
/** URL to query for status of the operation. Returns current state, progress, and error metadata for the operation. */
|
||||
azureAsyncOperation?: string;
|
||||
/** How long the user should wait before making a follow-up request. */
|
||||
retryAfter?: string;
|
||||
}
|
||||
|
||||
/** Defines headers for Apps_update operation. */
|
||||
export interface AppsUpdateHeaders {
|
||||
/** URL to query for status of the operation. Returns current state, progress, and error metadata for the operation. */
|
||||
azureAsyncOperation?: string;
|
||||
/** URL to query for status of the operation. Returns 202 Accepted while the operation is in progress. */
|
||||
location?: string;
|
||||
/** How long the user should wait before making a follow-up request. */
|
||||
retryAfter?: string;
|
||||
}
|
||||
|
||||
/** Defines headers for Apps_delete operation. */
|
||||
export interface AppsDeleteHeaders {
|
||||
/** URL to query for status of the operation. Returns current state, progress, and error metadata for the operation. */
|
||||
azureAsyncOperation?: string;
|
||||
/** URL to query for status of the operation. Returns 202 Accepted while the operation is in progress. */
|
||||
location?: string;
|
||||
/** How long the user should wait before making a follow-up request. */
|
||||
retryAfter?: string;
|
||||
}
|
||||
|
||||
/** Defines headers for PrivateEndpointConnections_create operation. */
|
||||
export interface PrivateEndpointConnectionsCreateHeaders {
|
||||
/** URL to query for status of the operation. Returns current state, progress, and error metadata for the operation. */
|
||||
azureAsyncOperation?: string;
|
||||
/** How long the user should wait before making a follow-up request. */
|
||||
retryAfter?: string;
|
||||
}
|
||||
|
||||
/** Defines headers for PrivateEndpointConnections_delete operation. */
|
||||
export interface PrivateEndpointConnectionsDeleteHeaders {
|
||||
/** URL to query for status of the operation. Returns current state, progress, and error metadata for the operation. */
|
||||
azureAsyncOperation?: string;
|
||||
/** URL to query for status of the operation. Returns 202 Accepted while the operation is in progress. */
|
||||
location?: string;
|
||||
/** How long the user should wait before making a follow-up request. */
|
||||
retryAfter?: string;
|
||||
}
|
||||
|
||||
/** Known values of {@link ProvisioningState} that the service accepts. */
|
||||
export enum KnownProvisioningState {
|
||||
Creating = "Creating",
|
||||
Deleting = "Deleting",
|
||||
Updating = "Updating",
|
||||
Succeeded = "Succeeded",
|
||||
Failed = "Failed",
|
||||
Canceled = "Canceled"
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines values for ProvisioningState. \
|
||||
* {@link KnownProvisioningState} can be used interchangeably with ProvisioningState,
|
||||
* this enum contains the known values that the service supports.
|
||||
* ### Known values supported by the service
|
||||
* **Creating** \
|
||||
* **Deleting** \
|
||||
* **Updating** \
|
||||
* **Succeeded** \
|
||||
* **Failed** \
|
||||
* **Canceled**
|
||||
*/
|
||||
export type ProvisioningState = string;
|
||||
|
||||
/** Known values of {@link AppState} that the service accepts. */
|
||||
export enum KnownAppState {
|
||||
Created = "created",
|
||||
|
@ -321,6 +536,96 @@ export enum KnownAppState {
|
|||
*/
|
||||
export type AppState = string;
|
||||
|
||||
/** Known values of {@link PublicNetworkAccess} that the service accepts. */
|
||||
export enum KnownPublicNetworkAccess {
|
||||
Enabled = "Enabled",
|
||||
Disabled = "Disabled"
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines values for PublicNetworkAccess. \
|
||||
* {@link KnownPublicNetworkAccess} can be used interchangeably with PublicNetworkAccess,
|
||||
* this enum contains the known values that the service supports.
|
||||
* ### Known values supported by the service
|
||||
* **Enabled** \
|
||||
* **Disabled**
|
||||
*/
|
||||
export type PublicNetworkAccess = string;
|
||||
|
||||
/** Known values of {@link NetworkAction} that the service accepts. */
|
||||
export enum KnownNetworkAction {
|
||||
Allow = "Allow",
|
||||
Deny = "Deny"
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines values for NetworkAction. \
|
||||
* {@link KnownNetworkAction} can be used interchangeably with NetworkAction,
|
||||
* this enum contains the known values that the service supports.
|
||||
* ### Known values supported by the service
|
||||
* **Allow** \
|
||||
* **Deny**
|
||||
*/
|
||||
export type NetworkAction = string;
|
||||
|
||||
/** Known values of {@link PrivateEndpointServiceConnectionStatus} that the service accepts. */
|
||||
export enum KnownPrivateEndpointServiceConnectionStatus {
|
||||
Pending = "Pending",
|
||||
Approved = "Approved",
|
||||
Rejected = "Rejected"
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines values for PrivateEndpointServiceConnectionStatus. \
|
||||
* {@link KnownPrivateEndpointServiceConnectionStatus} can be used interchangeably with PrivateEndpointServiceConnectionStatus,
|
||||
* this enum contains the known values that the service supports.
|
||||
* ### Known values supported by the service
|
||||
* **Pending** \
|
||||
* **Approved** \
|
||||
* **Rejected**
|
||||
*/
|
||||
export type PrivateEndpointServiceConnectionStatus = string;
|
||||
|
||||
/** Known values of {@link PrivateEndpointConnectionProvisioningState} that the service accepts. */
|
||||
export enum KnownPrivateEndpointConnectionProvisioningState {
|
||||
Succeeded = "Succeeded",
|
||||
Creating = "Creating",
|
||||
Deleting = "Deleting",
|
||||
Failed = "Failed"
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines values for PrivateEndpointConnectionProvisioningState. \
|
||||
* {@link KnownPrivateEndpointConnectionProvisioningState} can be used interchangeably with PrivateEndpointConnectionProvisioningState,
|
||||
* this enum contains the known values that the service supports.
|
||||
* ### Known values supported by the service
|
||||
* **Succeeded** \
|
||||
* **Creating** \
|
||||
* **Deleting** \
|
||||
* **Failed**
|
||||
*/
|
||||
export type PrivateEndpointConnectionProvisioningState = string;
|
||||
|
||||
/** Known values of {@link CreatedByType} that the service accepts. */
|
||||
export enum KnownCreatedByType {
|
||||
User = "User",
|
||||
Application = "Application",
|
||||
ManagedIdentity = "ManagedIdentity",
|
||||
Key = "Key"
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines values for CreatedByType. \
|
||||
* {@link KnownCreatedByType} can be used interchangeably with CreatedByType,
|
||||
* this enum contains the known values that the service supports.
|
||||
* ### Known values supported by the service
|
||||
* **User** \
|
||||
* **Application** \
|
||||
* **ManagedIdentity** \
|
||||
* **Key**
|
||||
*/
|
||||
export type CreatedByType = string;
|
||||
|
||||
/** Known values of {@link AppSku} that the service accepts. */
|
||||
export enum KnownAppSku {
|
||||
ST0 = "ST0",
|
||||
|
@ -371,7 +676,7 @@ export interface AppsCreateOrUpdateOptionalParams
|
|||
}
|
||||
|
||||
/** Contains response data for the createOrUpdate operation. */
|
||||
export type AppsCreateOrUpdateResponse = App;
|
||||
export type AppsCreateOrUpdateResponse = AppsCreateOrUpdateHeaders & App;
|
||||
|
||||
/** Optional parameters. */
|
||||
export interface AppsUpdateOptionalParams extends coreClient.OperationOptions {
|
||||
|
@ -382,7 +687,7 @@ export interface AppsUpdateOptionalParams extends coreClient.OperationOptions {
|
|||
}
|
||||
|
||||
/** Contains response data for the update operation. */
|
||||
export type AppsUpdateResponse = App;
|
||||
export type AppsUpdateResponse = AppsUpdateHeaders;
|
||||
|
||||
/** Optional parameters. */
|
||||
export interface AppsDeleteOptionalParams extends coreClient.OperationOptions {
|
||||
|
@ -392,6 +697,9 @@ export interface AppsDeleteOptionalParams extends coreClient.OperationOptions {
|
|||
resumeFrom?: string;
|
||||
}
|
||||
|
||||
/** Contains response data for the delete operation. */
|
||||
export type AppsDeleteResponse = AppsDeleteHeaders;
|
||||
|
||||
/** Optional parameters. */
|
||||
export interface AppsListBySubscriptionOptionalParams
|
||||
extends coreClient.OperationOptions {}
|
||||
|
@ -448,6 +756,59 @@ export interface AppsListTemplatesNextOptionalParams
|
|||
/** Contains response data for the listTemplatesNext operation. */
|
||||
export type AppsListTemplatesNextResponse = AppTemplatesResult;
|
||||
|
||||
/** Optional parameters. */
|
||||
export interface PrivateEndpointConnectionsGetOptionalParams
|
||||
extends coreClient.OperationOptions {}
|
||||
|
||||
/** Contains response data for the get operation. */
|
||||
export type PrivateEndpointConnectionsGetResponse = PrivateEndpointConnection;
|
||||
|
||||
/** Optional parameters. */
|
||||
export interface PrivateEndpointConnectionsCreateOptionalParams
|
||||
extends coreClient.OperationOptions {
|
||||
/** Delay to wait until next poll, in milliseconds. */
|
||||
updateIntervalInMs?: number;
|
||||
/** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */
|
||||
resumeFrom?: string;
|
||||
}
|
||||
|
||||
/** Contains response data for the create operation. */
|
||||
export type PrivateEndpointConnectionsCreateResponse = PrivateEndpointConnectionsCreateHeaders &
|
||||
PrivateEndpointConnection;
|
||||
|
||||
/** Optional parameters. */
|
||||
export interface PrivateEndpointConnectionsDeleteOptionalParams
|
||||
extends coreClient.OperationOptions {
|
||||
/** Delay to wait until next poll, in milliseconds. */
|
||||
updateIntervalInMs?: number;
|
||||
/** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */
|
||||
resumeFrom?: string;
|
||||
}
|
||||
|
||||
/** Contains response data for the delete operation. */
|
||||
export type PrivateEndpointConnectionsDeleteResponse = PrivateEndpointConnectionsDeleteHeaders;
|
||||
|
||||
/** Optional parameters. */
|
||||
export interface PrivateEndpointConnectionsListOptionalParams
|
||||
extends coreClient.OperationOptions {}
|
||||
|
||||
/** Contains response data for the list operation. */
|
||||
export type PrivateEndpointConnectionsListResponse = PrivateEndpointConnectionListResult;
|
||||
|
||||
/** Optional parameters. */
|
||||
export interface PrivateLinksGetOptionalParams
|
||||
extends coreClient.OperationOptions {}
|
||||
|
||||
/** Contains response data for the get operation. */
|
||||
export type PrivateLinksGetResponse = PrivateLinkResource;
|
||||
|
||||
/** Optional parameters. */
|
||||
export interface PrivateLinksListOptionalParams
|
||||
extends coreClient.OperationOptions {}
|
||||
|
||||
/** Contains response data for the list operation. */
|
||||
export type PrivateLinksListResponse = PrivateLinkResourceListResult;
|
||||
|
||||
/** Optional parameters. */
|
||||
export interface OperationsListOptionalParams
|
||||
extends coreClient.OperationOptions {}
|
||||
|
|
|
@ -8,6 +8,191 @@
|
|||
|
||||
import * as coreClient from "@azure/core-client";
|
||||
|
||||
export const NetworkRuleSets: coreClient.CompositeMapper = {
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "NetworkRuleSets",
|
||||
modelProperties: {
|
||||
applyToDevices: {
|
||||
serializedName: "applyToDevices",
|
||||
type: {
|
||||
name: "Boolean"
|
||||
}
|
||||
},
|
||||
applyToIoTCentral: {
|
||||
serializedName: "applyToIoTCentral",
|
||||
type: {
|
||||
name: "Boolean"
|
||||
}
|
||||
},
|
||||
defaultAction: {
|
||||
serializedName: "defaultAction",
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
},
|
||||
ipRules: {
|
||||
serializedName: "ipRules",
|
||||
type: {
|
||||
name: "Sequence",
|
||||
element: {
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "NetworkRuleSetIpRule"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const NetworkRuleSetIpRule: coreClient.CompositeMapper = {
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "NetworkRuleSetIpRule",
|
||||
modelProperties: {
|
||||
filterName: {
|
||||
serializedName: "filterName",
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
},
|
||||
ipMask: {
|
||||
serializedName: "ipMask",
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const PrivateEndpoint: coreClient.CompositeMapper = {
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "PrivateEndpoint",
|
||||
modelProperties: {
|
||||
id: {
|
||||
serializedName: "id",
|
||||
readOnly: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const PrivateLinkServiceConnectionState: coreClient.CompositeMapper = {
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "PrivateLinkServiceConnectionState",
|
||||
modelProperties: {
|
||||
status: {
|
||||
serializedName: "status",
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
},
|
||||
description: {
|
||||
serializedName: "description",
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
},
|
||||
actionsRequired: {
|
||||
serializedName: "actionsRequired",
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const Resource: coreClient.CompositeMapper = {
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "Resource",
|
||||
modelProperties: {
|
||||
id: {
|
||||
serializedName: "id",
|
||||
readOnly: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
},
|
||||
name: {
|
||||
serializedName: "name",
|
||||
readOnly: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
},
|
||||
type: {
|
||||
serializedName: "type",
|
||||
readOnly: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
},
|
||||
systemData: {
|
||||
serializedName: "systemData",
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "SystemData"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const SystemData: coreClient.CompositeMapper = {
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "SystemData",
|
||||
modelProperties: {
|
||||
createdBy: {
|
||||
serializedName: "createdBy",
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
},
|
||||
createdByType: {
|
||||
serializedName: "createdByType",
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
},
|
||||
createdAt: {
|
||||
serializedName: "createdAt",
|
||||
type: {
|
||||
name: "DateTime"
|
||||
}
|
||||
},
|
||||
lastModifiedBy: {
|
||||
serializedName: "lastModifiedBy",
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
},
|
||||
lastModifiedByType: {
|
||||
serializedName: "lastModifiedByType",
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
},
|
||||
lastModifiedAt: {
|
||||
serializedName: "lastModifiedAt",
|
||||
type: {
|
||||
name: "DateTime"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const AppSkuInfo: coreClient.CompositeMapper = {
|
||||
type: {
|
||||
name: "Composite",
|
||||
|
@ -54,99 +239,26 @@ export const SystemAssignedServiceIdentity: coreClient.CompositeMapper = {
|
|||
}
|
||||
};
|
||||
|
||||
export const Resource: coreClient.CompositeMapper = {
|
||||
export const ErrorResponse: coreClient.CompositeMapper = {
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "Resource",
|
||||
className: "ErrorResponse",
|
||||
modelProperties: {
|
||||
id: {
|
||||
serializedName: "id",
|
||||
readOnly: true,
|
||||
error: {
|
||||
serializedName: "error",
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
},
|
||||
name: {
|
||||
constraints: {
|
||||
Pattern: new RegExp("^(?![0-9]+$)(?!-)[a-zA-Z0-9-]{2,99}[a-zA-Z0-9]$")
|
||||
},
|
||||
serializedName: "name",
|
||||
readOnly: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
},
|
||||
type: {
|
||||
serializedName: "type",
|
||||
readOnly: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
},
|
||||
location: {
|
||||
serializedName: "location",
|
||||
required: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
},
|
||||
tags: {
|
||||
serializedName: "tags",
|
||||
type: {
|
||||
name: "Dictionary",
|
||||
value: { type: { name: "String" } }
|
||||
name: "Composite",
|
||||
className: "ErrorDetail"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const CloudError: coreClient.CompositeMapper = {
|
||||
export const ErrorDetail: coreClient.CompositeMapper = {
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "CloudError",
|
||||
modelProperties: {
|
||||
code: {
|
||||
serializedName: "error.code",
|
||||
readOnly: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
},
|
||||
message: {
|
||||
serializedName: "error.message",
|
||||
readOnly: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
},
|
||||
target: {
|
||||
serializedName: "error.target",
|
||||
readOnly: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
},
|
||||
details: {
|
||||
serializedName: "error.details",
|
||||
type: {
|
||||
name: "Sequence",
|
||||
element: {
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "CloudErrorBody"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const CloudErrorBody: coreClient.CompositeMapper = {
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "CloudErrorBody",
|
||||
className: "ErrorDetail",
|
||||
modelProperties: {
|
||||
code: {
|
||||
serializedName: "code",
|
||||
|
@ -171,15 +283,53 @@ export const CloudErrorBody: coreClient.CompositeMapper = {
|
|||
},
|
||||
details: {
|
||||
serializedName: "details",
|
||||
readOnly: true,
|
||||
type: {
|
||||
name: "Sequence",
|
||||
element: {
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "CloudErrorBody"
|
||||
className: "ErrorDetail"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
additionalInfo: {
|
||||
serializedName: "additionalInfo",
|
||||
readOnly: true,
|
||||
type: {
|
||||
name: "Sequence",
|
||||
element: {
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "ErrorAdditionalInfo"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const ErrorAdditionalInfo: coreClient.CompositeMapper = {
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "ErrorAdditionalInfo",
|
||||
modelProperties: {
|
||||
type: {
|
||||
serializedName: "type",
|
||||
readOnly: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
},
|
||||
info: {
|
||||
serializedName: "info",
|
||||
readOnly: true,
|
||||
type: {
|
||||
name: "Dictionary",
|
||||
value: { type: { name: "any" } }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -211,6 +361,13 @@ export const AppPatch: coreClient.CompositeMapper = {
|
|||
className: "SystemAssignedServiceIdentity"
|
||||
}
|
||||
},
|
||||
provisioningState: {
|
||||
serializedName: "properties.provisioningState",
|
||||
readOnly: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
},
|
||||
applicationId: {
|
||||
serializedName: "properties.applicationId",
|
||||
readOnly: true,
|
||||
|
@ -242,6 +399,32 @@ export const AppPatch: coreClient.CompositeMapper = {
|
|||
type: {
|
||||
name: "String"
|
||||
}
|
||||
},
|
||||
publicNetworkAccess: {
|
||||
serializedName: "properties.publicNetworkAccess",
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
},
|
||||
networkRuleSets: {
|
||||
serializedName: "properties.networkRuleSets",
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "NetworkRuleSets"
|
||||
}
|
||||
},
|
||||
privateEndpointConnections: {
|
||||
serializedName: "properties.privateEndpointConnections",
|
||||
readOnly: true,
|
||||
type: {
|
||||
name: "Sequence",
|
||||
element: {
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "PrivateEndpointConnection"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -274,6 +457,48 @@ export const AppListResult: coreClient.CompositeMapper = {
|
|||
}
|
||||
};
|
||||
|
||||
export const PrivateEndpointConnectionListResult: coreClient.CompositeMapper = {
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "PrivateEndpointConnectionListResult",
|
||||
modelProperties: {
|
||||
value: {
|
||||
serializedName: "value",
|
||||
type: {
|
||||
name: "Sequence",
|
||||
element: {
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "PrivateEndpointConnection"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const PrivateLinkResourceListResult: coreClient.CompositeMapper = {
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "PrivateLinkResourceListResult",
|
||||
modelProperties: {
|
||||
value: {
|
||||
serializedName: "value",
|
||||
type: {
|
||||
name: "Sequence",
|
||||
element: {
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "PrivateLinkResource"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const OperationInputs: coreClient.CompositeMapper = {
|
||||
type: {
|
||||
name: "Composite",
|
||||
|
@ -552,12 +777,119 @@ export const OperationDisplay: coreClient.CompositeMapper = {
|
|||
}
|
||||
};
|
||||
|
||||
export const PrivateEndpointConnection: coreClient.CompositeMapper = {
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "PrivateEndpointConnection",
|
||||
modelProperties: {
|
||||
...Resource.type.modelProperties,
|
||||
groupIds: {
|
||||
serializedName: "properties.groupIds",
|
||||
readOnly: true,
|
||||
type: {
|
||||
name: "Sequence",
|
||||
element: {
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
privateEndpoint: {
|
||||
serializedName: "properties.privateEndpoint",
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "PrivateEndpoint"
|
||||
}
|
||||
},
|
||||
privateLinkServiceConnectionState: {
|
||||
serializedName: "properties.privateLinkServiceConnectionState",
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "PrivateLinkServiceConnectionState"
|
||||
}
|
||||
},
|
||||
provisioningState: {
|
||||
serializedName: "properties.provisioningState",
|
||||
readOnly: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const TrackedResource: coreClient.CompositeMapper = {
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "TrackedResource",
|
||||
modelProperties: {
|
||||
...Resource.type.modelProperties,
|
||||
tags: {
|
||||
serializedName: "tags",
|
||||
type: {
|
||||
name: "Dictionary",
|
||||
value: { type: { name: "String" } }
|
||||
}
|
||||
},
|
||||
location: {
|
||||
serializedName: "location",
|
||||
required: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const PrivateLinkResource: coreClient.CompositeMapper = {
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "PrivateLinkResource",
|
||||
modelProperties: {
|
||||
...Resource.type.modelProperties,
|
||||
groupId: {
|
||||
serializedName: "properties.groupId",
|
||||
readOnly: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
},
|
||||
requiredMembers: {
|
||||
serializedName: "properties.requiredMembers",
|
||||
readOnly: true,
|
||||
type: {
|
||||
name: "Sequence",
|
||||
element: {
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
requiredZoneNames: {
|
||||
serializedName: "properties.requiredZoneNames",
|
||||
type: {
|
||||
name: "Sequence",
|
||||
element: {
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const App: coreClient.CompositeMapper = {
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "App",
|
||||
modelProperties: {
|
||||
...Resource.type.modelProperties,
|
||||
...TrackedResource.type.modelProperties,
|
||||
sku: {
|
||||
serializedName: "sku",
|
||||
type: {
|
||||
|
@ -572,6 +904,13 @@ export const App: coreClient.CompositeMapper = {
|
|||
className: "SystemAssignedServiceIdentity"
|
||||
}
|
||||
},
|
||||
provisioningState: {
|
||||
serializedName: "properties.provisioningState",
|
||||
readOnly: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
},
|
||||
applicationId: {
|
||||
serializedName: "properties.applicationId",
|
||||
readOnly: true,
|
||||
|
@ -603,6 +942,155 @@ export const App: coreClient.CompositeMapper = {
|
|||
type: {
|
||||
name: "String"
|
||||
}
|
||||
},
|
||||
publicNetworkAccess: {
|
||||
serializedName: "properties.publicNetworkAccess",
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
},
|
||||
networkRuleSets: {
|
||||
serializedName: "properties.networkRuleSets",
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "NetworkRuleSets"
|
||||
}
|
||||
},
|
||||
privateEndpointConnections: {
|
||||
serializedName: "properties.privateEndpointConnections",
|
||||
readOnly: true,
|
||||
type: {
|
||||
name: "Sequence",
|
||||
element: {
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "PrivateEndpointConnection"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const AppsCreateOrUpdateHeaders: coreClient.CompositeMapper = {
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "AppsCreateOrUpdateHeaders",
|
||||
modelProperties: {
|
||||
azureAsyncOperation: {
|
||||
serializedName: "azure-asyncoperation",
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
},
|
||||
retryAfter: {
|
||||
serializedName: "retry-after",
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const AppsUpdateHeaders: coreClient.CompositeMapper = {
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "AppsUpdateHeaders",
|
||||
modelProperties: {
|
||||
azureAsyncOperation: {
|
||||
serializedName: "azure-asyncoperation",
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
},
|
||||
location: {
|
||||
serializedName: "location",
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
},
|
||||
retryAfter: {
|
||||
serializedName: "retry-after",
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const AppsDeleteHeaders: coreClient.CompositeMapper = {
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "AppsDeleteHeaders",
|
||||
modelProperties: {
|
||||
azureAsyncOperation: {
|
||||
serializedName: "azure-asyncoperation",
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
},
|
||||
location: {
|
||||
serializedName: "location",
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
},
|
||||
retryAfter: {
|
||||
serializedName: "retry-after",
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const PrivateEndpointConnectionsCreateHeaders: coreClient.CompositeMapper = {
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "PrivateEndpointConnectionsCreateHeaders",
|
||||
modelProperties: {
|
||||
azureAsyncOperation: {
|
||||
serializedName: "azure-asyncoperation",
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
},
|
||||
retryAfter: {
|
||||
serializedName: "retry-after",
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const PrivateEndpointConnectionsDeleteHeaders: coreClient.CompositeMapper = {
|
||||
type: {
|
||||
name: "Composite",
|
||||
className: "PrivateEndpointConnectionsDeleteHeaders",
|
||||
modelProperties: {
|
||||
azureAsyncOperation: {
|
||||
serializedName: "azure-asyncoperation",
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
},
|
||||
location: {
|
||||
serializedName: "location",
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
},
|
||||
retryAfter: {
|
||||
serializedName: "retry-after",
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,7 +14,8 @@ import {
|
|||
import {
|
||||
App as AppMapper,
|
||||
AppPatch as AppPatchMapper,
|
||||
OperationInputs as OperationInputsMapper
|
||||
OperationInputs as OperationInputsMapper,
|
||||
PrivateEndpointConnection as PrivateEndpointConnectionMapper
|
||||
} from "../models/mappers";
|
||||
|
||||
export const accept: OperationParameter = {
|
||||
|
@ -44,7 +45,7 @@ export const $host: OperationURLParameter = {
|
|||
export const apiVersion: OperationQueryParameter = {
|
||||
parameterPath: "apiVersion",
|
||||
mapper: {
|
||||
defaultValue: "2021-06-01",
|
||||
defaultValue: "2021-11-01-preview",
|
||||
isConstant: true,
|
||||
serializedName: "api-version",
|
||||
type: {
|
||||
|
@ -124,3 +125,30 @@ export const nextLink: OperationURLParameter = {
|
|||
},
|
||||
skipEncoding: true
|
||||
};
|
||||
|
||||
export const privateEndpointConnectionName: OperationURLParameter = {
|
||||
parameterPath: "privateEndpointConnectionName",
|
||||
mapper: {
|
||||
serializedName: "privateEndpointConnectionName",
|
||||
required: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const privateEndpointConnection: OperationParameter = {
|
||||
parameterPath: "privateEndpointConnection",
|
||||
mapper: PrivateEndpointConnectionMapper
|
||||
};
|
||||
|
||||
export const groupId: OperationURLParameter = {
|
||||
parameterPath: "groupId",
|
||||
mapper: {
|
||||
serializedName: "groupId",
|
||||
required: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -31,6 +31,7 @@ import {
|
|||
AppsUpdateOptionalParams,
|
||||
AppsUpdateResponse,
|
||||
AppsDeleteOptionalParams,
|
||||
AppsDeleteResponse,
|
||||
AppsListBySubscriptionResponse,
|
||||
AppsListByResourceGroupResponse,
|
||||
OperationInputs,
|
||||
|
@ -275,10 +276,12 @@ export class AppsImpl implements Apps {
|
|||
{ resourceGroupName, resourceName, app, options },
|
||||
createOrUpdateOperationSpec
|
||||
);
|
||||
return new LroEngine(lro, {
|
||||
const poller = new LroEngine(lro, {
|
||||
resumeFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs
|
||||
});
|
||||
await poller.poll();
|
||||
return poller;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -364,10 +367,12 @@ export class AppsImpl implements Apps {
|
|||
{ resourceGroupName, resourceName, appPatch, options },
|
||||
updateOperationSpec
|
||||
);
|
||||
return new LroEngine(lro, {
|
||||
const poller = new LroEngine(lro, {
|
||||
resumeFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs
|
||||
});
|
||||
await poller.poll();
|
||||
return poller;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -402,11 +407,13 @@ export class AppsImpl implements Apps {
|
|||
resourceGroupName: string,
|
||||
resourceName: string,
|
||||
options?: AppsDeleteOptionalParams
|
||||
): Promise<PollerLike<PollOperationState<void>, void>> {
|
||||
): Promise<
|
||||
PollerLike<PollOperationState<AppsDeleteResponse>, AppsDeleteResponse>
|
||||
> {
|
||||
const directSendOperation = async (
|
||||
args: coreClient.OperationArguments,
|
||||
spec: coreClient.OperationSpec
|
||||
): Promise<void> => {
|
||||
): Promise<AppsDeleteResponse> => {
|
||||
return this.client.sendOperationRequest(args, spec);
|
||||
};
|
||||
const sendOperation = async (
|
||||
|
@ -447,10 +454,12 @@ export class AppsImpl implements Apps {
|
|||
{ resourceGroupName, resourceName, options },
|
||||
deleteOperationSpec
|
||||
);
|
||||
return new LroEngine(lro, {
|
||||
const poller = new LroEngine(lro, {
|
||||
resumeFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs
|
||||
});
|
||||
await poller.poll();
|
||||
return poller;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -463,7 +472,7 @@ export class AppsImpl implements Apps {
|
|||
resourceGroupName: string,
|
||||
resourceName: string,
|
||||
options?: AppsDeleteOptionalParams
|
||||
): Promise<void> {
|
||||
): Promise<AppsDeleteResponse> {
|
||||
const poller = await this.beginDelete(
|
||||
resourceGroupName,
|
||||
resourceName,
|
||||
|
@ -604,7 +613,7 @@ const getOperationSpec: coreClient.OperationSpec = {
|
|||
bodyMapper: Mappers.App
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.CloudError
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
|
@ -623,19 +632,23 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = {
|
|||
httpMethod: "PUT",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.App
|
||||
bodyMapper: Mappers.App,
|
||||
headersMapper: Mappers.AppsCreateOrUpdateHeaders
|
||||
},
|
||||
201: {
|
||||
bodyMapper: Mappers.App
|
||||
bodyMapper: Mappers.App,
|
||||
headersMapper: Mappers.AppsCreateOrUpdateHeaders
|
||||
},
|
||||
202: {
|
||||
bodyMapper: Mappers.App
|
||||
bodyMapper: Mappers.App,
|
||||
headersMapper: Mappers.AppsCreateOrUpdateHeaders
|
||||
},
|
||||
204: {
|
||||
bodyMapper: Mappers.App
|
||||
bodyMapper: Mappers.App,
|
||||
headersMapper: Mappers.AppsCreateOrUpdateHeaders
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.CloudError
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
requestBody: Parameters.app,
|
||||
|
@ -656,19 +669,19 @@ const updateOperationSpec: coreClient.OperationSpec = {
|
|||
httpMethod: "PATCH",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.App
|
||||
headersMapper: Mappers.AppsUpdateHeaders
|
||||
},
|
||||
201: {
|
||||
bodyMapper: Mappers.App
|
||||
headersMapper: Mappers.AppsUpdateHeaders
|
||||
},
|
||||
202: {
|
||||
bodyMapper: Mappers.App
|
||||
headersMapper: Mappers.AppsUpdateHeaders
|
||||
},
|
||||
204: {
|
||||
bodyMapper: Mappers.App
|
||||
headersMapper: Mappers.AppsUpdateHeaders
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.CloudError
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
requestBody: Parameters.appPatch,
|
||||
|
@ -688,12 +701,20 @@ const deleteOperationSpec: coreClient.OperationSpec = {
|
|||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTCentral/iotApps/{resourceName}",
|
||||
httpMethod: "DELETE",
|
||||
responses: {
|
||||
200: {},
|
||||
201: {},
|
||||
202: {},
|
||||
204: {},
|
||||
200: {
|
||||
headersMapper: Mappers.AppsDeleteHeaders
|
||||
},
|
||||
201: {
|
||||
headersMapper: Mappers.AppsDeleteHeaders
|
||||
},
|
||||
202: {
|
||||
headersMapper: Mappers.AppsDeleteHeaders
|
||||
},
|
||||
204: {
|
||||
headersMapper: Mappers.AppsDeleteHeaders
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.CloudError
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
|
@ -715,7 +736,7 @@ const listBySubscriptionOperationSpec: coreClient.OperationSpec = {
|
|||
bodyMapper: Mappers.AppListResult
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.CloudError
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
|
@ -732,7 +753,7 @@ const listByResourceGroupOperationSpec: coreClient.OperationSpec = {
|
|||
bodyMapper: Mappers.AppListResult
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.CloudError
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
|
@ -753,7 +774,7 @@ const checkNameAvailabilityOperationSpec: coreClient.OperationSpec = {
|
|||
bodyMapper: Mappers.AppAvailabilityInfo
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.CloudError
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
requestBody: Parameters.operationInputs,
|
||||
|
@ -772,7 +793,7 @@ const checkSubdomainAvailabilityOperationSpec: coreClient.OperationSpec = {
|
|||
bodyMapper: Mappers.AppAvailabilityInfo
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.CloudError
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
requestBody: Parameters.operationInputs,
|
||||
|
@ -791,7 +812,7 @@ const listTemplatesOperationSpec: coreClient.OperationSpec = {
|
|||
bodyMapper: Mappers.AppTemplatesResult
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.CloudError
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
|
@ -807,7 +828,7 @@ const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = {
|
|||
bodyMapper: Mappers.AppListResult
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.CloudError
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
|
@ -827,7 +848,7 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = {
|
|||
bodyMapper: Mappers.AppListResult
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.CloudError
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
|
@ -848,7 +869,7 @@ const listTemplatesNextOperationSpec: coreClient.OperationSpec = {
|
|||
bodyMapper: Mappers.AppTemplatesResult
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.CloudError
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
|
|
|
@ -7,4 +7,6 @@
|
|||
*/
|
||||
|
||||
export * from "./apps";
|
||||
export * from "./privateEndpointConnections";
|
||||
export * from "./privateLinks";
|
||||
export * from "./operations";
|
||||
|
|
|
@ -111,7 +111,7 @@ const listOperationSpec: coreClient.OperationSpec = {
|
|||
bodyMapper: Mappers.OperationListResult
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.CloudError
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
|
@ -127,7 +127,7 @@ const listNextOperationSpec: coreClient.OperationSpec = {
|
|||
bodyMapper: Mappers.OperationListResult
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.CloudError
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
|
|
|
@ -0,0 +1,449 @@
|
|||
/*
|
||||
* 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 { PagedAsyncIterableIterator } from "@azure/core-paging";
|
||||
import { PrivateEndpointConnections } from "../operationsInterfaces";
|
||||
import * as coreClient from "@azure/core-client";
|
||||
import * as Mappers from "../models/mappers";
|
||||
import * as Parameters from "../models/parameters";
|
||||
import { IotCentralClient } from "../iotCentralClient";
|
||||
import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
|
||||
import { LroImpl } from "../lroImpl";
|
||||
import {
|
||||
PrivateEndpointConnection,
|
||||
PrivateEndpointConnectionsListOptionalParams,
|
||||
PrivateEndpointConnectionsGetOptionalParams,
|
||||
PrivateEndpointConnectionsGetResponse,
|
||||
PrivateEndpointConnectionsCreateOptionalParams,
|
||||
PrivateEndpointConnectionsCreateResponse,
|
||||
PrivateEndpointConnectionsDeleteOptionalParams,
|
||||
PrivateEndpointConnectionsDeleteResponse,
|
||||
PrivateEndpointConnectionsListResponse
|
||||
} from "../models";
|
||||
|
||||
/// <reference lib="esnext.asynciterable" />
|
||||
/** Class containing PrivateEndpointConnections operations. */
|
||||
export class PrivateEndpointConnectionsImpl
|
||||
implements PrivateEndpointConnections {
|
||||
private readonly client: IotCentralClient;
|
||||
|
||||
/**
|
||||
* Initialize a new instance of the class PrivateEndpointConnections class.
|
||||
* @param client Reference to the service client
|
||||
*/
|
||||
constructor(client: IotCentralClient) {
|
||||
this.client = client;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all private endpoint connections of a IoT Central Application.
|
||||
* @param resourceGroupName The name of the resource group that contains the IoT Central application.
|
||||
* @param resourceName The ARM resource name of the IoT Central application.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
public list(
|
||||
resourceGroupName: string,
|
||||
resourceName: string,
|
||||
options?: PrivateEndpointConnectionsListOptionalParams
|
||||
): PagedAsyncIterableIterator<PrivateEndpointConnection> {
|
||||
const iter = this.listPagingAll(resourceGroupName, resourceName, options);
|
||||
return {
|
||||
next() {
|
||||
return iter.next();
|
||||
},
|
||||
[Symbol.asyncIterator]() {
|
||||
return this;
|
||||
},
|
||||
byPage: () => {
|
||||
return this.listPagingPage(resourceGroupName, resourceName, options);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private async *listPagingPage(
|
||||
resourceGroupName: string,
|
||||
resourceName: string,
|
||||
options?: PrivateEndpointConnectionsListOptionalParams
|
||||
): AsyncIterableIterator<PrivateEndpointConnection[]> {
|
||||
let result = await this._list(resourceGroupName, resourceName, options);
|
||||
yield result.value || [];
|
||||
}
|
||||
|
||||
private async *listPagingAll(
|
||||
resourceGroupName: string,
|
||||
resourceName: string,
|
||||
options?: PrivateEndpointConnectionsListOptionalParams
|
||||
): AsyncIterableIterator<PrivateEndpointConnection> {
|
||||
for await (const page of this.listPagingPage(
|
||||
resourceGroupName,
|
||||
resourceName,
|
||||
options
|
||||
)) {
|
||||
yield* page;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the metadata of a private endpoint connection for the IoT Central Application.
|
||||
* @param resourceGroupName The name of the resource group that contains the IoT Central application.
|
||||
* @param resourceName The ARM resource name of the IoT Central application.
|
||||
* @param privateEndpointConnectionName The private endpoint connection name.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
get(
|
||||
resourceGroupName: string,
|
||||
resourceName: string,
|
||||
privateEndpointConnectionName: string,
|
||||
options?: PrivateEndpointConnectionsGetOptionalParams
|
||||
): Promise<PrivateEndpointConnectionsGetResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{
|
||||
resourceGroupName,
|
||||
resourceName,
|
||||
privateEndpointConnectionName,
|
||||
options
|
||||
},
|
||||
getOperationSpec
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update a private endpoint connection.
|
||||
* @param resourceGroupName The name of the resource group that contains the IoT Central application.
|
||||
* @param resourceName The ARM resource name of the IoT Central application.
|
||||
* @param privateEndpointConnectionName The private endpoint connection name.
|
||||
* @param privateEndpointConnection The private endpoint connection metadata.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
async beginCreate(
|
||||
resourceGroupName: string,
|
||||
resourceName: string,
|
||||
privateEndpointConnectionName: string,
|
||||
privateEndpointConnection: PrivateEndpointConnection,
|
||||
options?: PrivateEndpointConnectionsCreateOptionalParams
|
||||
): Promise<
|
||||
PollerLike<
|
||||
PollOperationState<PrivateEndpointConnectionsCreateResponse>,
|
||||
PrivateEndpointConnectionsCreateResponse
|
||||
>
|
||||
> {
|
||||
const directSendOperation = async (
|
||||
args: coreClient.OperationArguments,
|
||||
spec: coreClient.OperationSpec
|
||||
): Promise<PrivateEndpointConnectionsCreateResponse> => {
|
||||
return this.client.sendOperationRequest(args, spec);
|
||||
};
|
||||
const sendOperation = async (
|
||||
args: coreClient.OperationArguments,
|
||||
spec: coreClient.OperationSpec
|
||||
) => {
|
||||
let currentRawResponse:
|
||||
| coreClient.FullOperationResponse
|
||||
| undefined = undefined;
|
||||
const providedCallback = args.options?.onResponse;
|
||||
const callback: coreClient.RawResponseCallback = (
|
||||
rawResponse: coreClient.FullOperationResponse,
|
||||
flatResponse: unknown
|
||||
) => {
|
||||
currentRawResponse = rawResponse;
|
||||
providedCallback?.(rawResponse, flatResponse);
|
||||
};
|
||||
const updatedArgs = {
|
||||
...args,
|
||||
options: {
|
||||
...args.options,
|
||||
onResponse: callback
|
||||
}
|
||||
};
|
||||
const flatResponse = await directSendOperation(updatedArgs, spec);
|
||||
return {
|
||||
flatResponse,
|
||||
rawResponse: {
|
||||
statusCode: currentRawResponse!.status,
|
||||
body: currentRawResponse!.parsedBody,
|
||||
headers: currentRawResponse!.headers.toJSON()
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
const lro = new LroImpl(
|
||||
sendOperation,
|
||||
{
|
||||
resourceGroupName,
|
||||
resourceName,
|
||||
privateEndpointConnectionName,
|
||||
privateEndpointConnection,
|
||||
options
|
||||
},
|
||||
createOperationSpec
|
||||
);
|
||||
const poller = new LroEngine(lro, {
|
||||
resumeFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs
|
||||
});
|
||||
await poller.poll();
|
||||
return poller;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update a private endpoint connection.
|
||||
* @param resourceGroupName The name of the resource group that contains the IoT Central application.
|
||||
* @param resourceName The ARM resource name of the IoT Central application.
|
||||
* @param privateEndpointConnectionName The private endpoint connection name.
|
||||
* @param privateEndpointConnection The private endpoint connection metadata.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
async beginCreateAndWait(
|
||||
resourceGroupName: string,
|
||||
resourceName: string,
|
||||
privateEndpointConnectionName: string,
|
||||
privateEndpointConnection: PrivateEndpointConnection,
|
||||
options?: PrivateEndpointConnectionsCreateOptionalParams
|
||||
): Promise<PrivateEndpointConnectionsCreateResponse> {
|
||||
const poller = await this.beginCreate(
|
||||
resourceGroupName,
|
||||
resourceName,
|
||||
privateEndpointConnectionName,
|
||||
privateEndpointConnection,
|
||||
options
|
||||
);
|
||||
return poller.pollUntilDone();
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a private endpoint connection from the IoT Central Application.
|
||||
* @param resourceGroupName The name of the resource group that contains the IoT Central application.
|
||||
* @param resourceName The ARM resource name of the IoT Central application.
|
||||
* @param privateEndpointConnectionName The private endpoint connection name.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
async beginDelete(
|
||||
resourceGroupName: string,
|
||||
resourceName: string,
|
||||
privateEndpointConnectionName: string,
|
||||
options?: PrivateEndpointConnectionsDeleteOptionalParams
|
||||
): Promise<
|
||||
PollerLike<
|
||||
PollOperationState<PrivateEndpointConnectionsDeleteResponse>,
|
||||
PrivateEndpointConnectionsDeleteResponse
|
||||
>
|
||||
> {
|
||||
const directSendOperation = async (
|
||||
args: coreClient.OperationArguments,
|
||||
spec: coreClient.OperationSpec
|
||||
): Promise<PrivateEndpointConnectionsDeleteResponse> => {
|
||||
return this.client.sendOperationRequest(args, spec);
|
||||
};
|
||||
const sendOperation = async (
|
||||
args: coreClient.OperationArguments,
|
||||
spec: coreClient.OperationSpec
|
||||
) => {
|
||||
let currentRawResponse:
|
||||
| coreClient.FullOperationResponse
|
||||
| undefined = undefined;
|
||||
const providedCallback = args.options?.onResponse;
|
||||
const callback: coreClient.RawResponseCallback = (
|
||||
rawResponse: coreClient.FullOperationResponse,
|
||||
flatResponse: unknown
|
||||
) => {
|
||||
currentRawResponse = rawResponse;
|
||||
providedCallback?.(rawResponse, flatResponse);
|
||||
};
|
||||
const updatedArgs = {
|
||||
...args,
|
||||
options: {
|
||||
...args.options,
|
||||
onResponse: callback
|
||||
}
|
||||
};
|
||||
const flatResponse = await directSendOperation(updatedArgs, spec);
|
||||
return {
|
||||
flatResponse,
|
||||
rawResponse: {
|
||||
statusCode: currentRawResponse!.status,
|
||||
body: currentRawResponse!.parsedBody,
|
||||
headers: currentRawResponse!.headers.toJSON()
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
const lro = new LroImpl(
|
||||
sendOperation,
|
||||
{
|
||||
resourceGroupName,
|
||||
resourceName,
|
||||
privateEndpointConnectionName,
|
||||
options
|
||||
},
|
||||
deleteOperationSpec
|
||||
);
|
||||
const poller = new LroEngine(lro, {
|
||||
resumeFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs
|
||||
});
|
||||
await poller.poll();
|
||||
return poller;
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a private endpoint connection from the IoT Central Application.
|
||||
* @param resourceGroupName The name of the resource group that contains the IoT Central application.
|
||||
* @param resourceName The ARM resource name of the IoT Central application.
|
||||
* @param privateEndpointConnectionName The private endpoint connection name.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
async beginDeleteAndWait(
|
||||
resourceGroupName: string,
|
||||
resourceName: string,
|
||||
privateEndpointConnectionName: string,
|
||||
options?: PrivateEndpointConnectionsDeleteOptionalParams
|
||||
): Promise<PrivateEndpointConnectionsDeleteResponse> {
|
||||
const poller = await this.beginDelete(
|
||||
resourceGroupName,
|
||||
resourceName,
|
||||
privateEndpointConnectionName,
|
||||
options
|
||||
);
|
||||
return poller.pollUntilDone();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all private endpoint connections of a IoT Central Application.
|
||||
* @param resourceGroupName The name of the resource group that contains the IoT Central application.
|
||||
* @param resourceName The ARM resource name of the IoT Central application.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
private _list(
|
||||
resourceGroupName: string,
|
||||
resourceName: string,
|
||||
options?: PrivateEndpointConnectionsListOptionalParams
|
||||
): Promise<PrivateEndpointConnectionsListResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{ resourceGroupName, resourceName, options },
|
||||
listOperationSpec
|
||||
);
|
||||
}
|
||||
}
|
||||
// Operation Specifications
|
||||
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
||||
|
||||
const getOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTCentral/iotApps/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}",
|
||||
httpMethod: "GET",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.PrivateEndpointConnection
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.resourceGroupName,
|
||||
Parameters.resourceName,
|
||||
Parameters.privateEndpointConnectionName
|
||||
],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
};
|
||||
const createOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTCentral/iotApps/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}",
|
||||
httpMethod: "PUT",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.PrivateEndpointConnection,
|
||||
headersMapper: Mappers.PrivateEndpointConnectionsCreateHeaders
|
||||
},
|
||||
201: {
|
||||
bodyMapper: Mappers.PrivateEndpointConnection,
|
||||
headersMapper: Mappers.PrivateEndpointConnectionsCreateHeaders
|
||||
},
|
||||
202: {
|
||||
bodyMapper: Mappers.PrivateEndpointConnection,
|
||||
headersMapper: Mappers.PrivateEndpointConnectionsCreateHeaders
|
||||
},
|
||||
204: {
|
||||
bodyMapper: Mappers.PrivateEndpointConnection,
|
||||
headersMapper: Mappers.PrivateEndpointConnectionsCreateHeaders
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
requestBody: Parameters.privateEndpointConnection,
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.resourceGroupName,
|
||||
Parameters.resourceName,
|
||||
Parameters.privateEndpointConnectionName
|
||||
],
|
||||
headerParameters: [Parameters.accept, Parameters.contentType],
|
||||
mediaType: "json",
|
||||
serializer
|
||||
};
|
||||
const deleteOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTCentral/iotApps/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}",
|
||||
httpMethod: "DELETE",
|
||||
responses: {
|
||||
200: {
|
||||
headersMapper: Mappers.PrivateEndpointConnectionsDeleteHeaders
|
||||
},
|
||||
201: {
|
||||
headersMapper: Mappers.PrivateEndpointConnectionsDeleteHeaders
|
||||
},
|
||||
202: {
|
||||
headersMapper: Mappers.PrivateEndpointConnectionsDeleteHeaders
|
||||
},
|
||||
204: {
|
||||
headersMapper: Mappers.PrivateEndpointConnectionsDeleteHeaders
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.resourceGroupName,
|
||||
Parameters.resourceName,
|
||||
Parameters.privateEndpointConnectionName
|
||||
],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
};
|
||||
const listOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTCentral/iotApps/{resourceName}/privateEndpointConnections",
|
||||
httpMethod: "GET",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.PrivateEndpointConnectionListResult
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.resourceGroupName,
|
||||
Parameters.resourceName
|
||||
],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
};
|
|
@ -0,0 +1,167 @@
|
|||
/*
|
||||
* 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 { PagedAsyncIterableIterator } from "@azure/core-paging";
|
||||
import { PrivateLinks } from "../operationsInterfaces";
|
||||
import * as coreClient from "@azure/core-client";
|
||||
import * as Mappers from "../models/mappers";
|
||||
import * as Parameters from "../models/parameters";
|
||||
import { IotCentralClient } from "../iotCentralClient";
|
||||
import {
|
||||
PrivateLinkResource,
|
||||
PrivateLinksListOptionalParams,
|
||||
PrivateLinksGetOptionalParams,
|
||||
PrivateLinksGetResponse,
|
||||
PrivateLinksListResponse
|
||||
} from "../models";
|
||||
|
||||
/// <reference lib="esnext.asynciterable" />
|
||||
/** Class containing PrivateLinks operations. */
|
||||
export class PrivateLinksImpl implements PrivateLinks {
|
||||
private readonly client: IotCentralClient;
|
||||
|
||||
/**
|
||||
* Initialize a new instance of the class PrivateLinks class.
|
||||
* @param client Reference to the service client
|
||||
*/
|
||||
constructor(client: IotCentralClient) {
|
||||
this.client = client;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all private link resources of a IoT Central Application.
|
||||
* @param resourceGroupName The name of the resource group that contains the IoT Central application.
|
||||
* @param resourceName The ARM resource name of the IoT Central application.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
public list(
|
||||
resourceGroupName: string,
|
||||
resourceName: string,
|
||||
options?: PrivateLinksListOptionalParams
|
||||
): PagedAsyncIterableIterator<PrivateLinkResource> {
|
||||
const iter = this.listPagingAll(resourceGroupName, resourceName, options);
|
||||
return {
|
||||
next() {
|
||||
return iter.next();
|
||||
},
|
||||
[Symbol.asyncIterator]() {
|
||||
return this;
|
||||
},
|
||||
byPage: () => {
|
||||
return this.listPagingPage(resourceGroupName, resourceName, options);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private async *listPagingPage(
|
||||
resourceGroupName: string,
|
||||
resourceName: string,
|
||||
options?: PrivateLinksListOptionalParams
|
||||
): AsyncIterableIterator<PrivateLinkResource[]> {
|
||||
let result = await this._list(resourceGroupName, resourceName, options);
|
||||
yield result.value || [];
|
||||
}
|
||||
|
||||
private async *listPagingAll(
|
||||
resourceGroupName: string,
|
||||
resourceName: string,
|
||||
options?: PrivateLinksListOptionalParams
|
||||
): AsyncIterableIterator<PrivateLinkResource> {
|
||||
for await (const page of this.listPagingPage(
|
||||
resourceGroupName,
|
||||
resourceName,
|
||||
options
|
||||
)) {
|
||||
yield* page;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a private link resource of a IoT Central Application.
|
||||
* @param resourceGroupName The name of the resource group that contains the IoT Central application.
|
||||
* @param resourceName The ARM resource name of the IoT Central application.
|
||||
* @param groupId The private link resource name.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
get(
|
||||
resourceGroupName: string,
|
||||
resourceName: string,
|
||||
groupId: string,
|
||||
options?: PrivateLinksGetOptionalParams
|
||||
): Promise<PrivateLinksGetResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{ resourceGroupName, resourceName, groupId, options },
|
||||
getOperationSpec
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all private link resources of a IoT Central Application.
|
||||
* @param resourceGroupName The name of the resource group that contains the IoT Central application.
|
||||
* @param resourceName The ARM resource name of the IoT Central application.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
private _list(
|
||||
resourceGroupName: string,
|
||||
resourceName: string,
|
||||
options?: PrivateLinksListOptionalParams
|
||||
): Promise<PrivateLinksListResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{ resourceGroupName, resourceName, options },
|
||||
listOperationSpec
|
||||
);
|
||||
}
|
||||
}
|
||||
// Operation Specifications
|
||||
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
||||
|
||||
const getOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTCentral/iotApps/{resourceName}/privateLinkResources/{groupId}",
|
||||
httpMethod: "GET",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.PrivateLinkResource
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.resourceGroupName,
|
||||
Parameters.resourceName,
|
||||
Parameters.groupId
|
||||
],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
};
|
||||
const listOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTCentral/iotApps/{resourceName}/privateLinkResources",
|
||||
httpMethod: "GET",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.PrivateLinkResourceListResult
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.resourceGroupName,
|
||||
Parameters.resourceName
|
||||
],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
};
|
|
@ -22,6 +22,7 @@ import {
|
|||
AppsUpdateOptionalParams,
|
||||
AppsUpdateResponse,
|
||||
AppsDeleteOptionalParams,
|
||||
AppsDeleteResponse,
|
||||
OperationInputs,
|
||||
AppsCheckNameAvailabilityOptionalParams,
|
||||
AppsCheckNameAvailabilityResponse,
|
||||
|
@ -139,7 +140,9 @@ export interface Apps {
|
|||
resourceGroupName: string,
|
||||
resourceName: string,
|
||||
options?: AppsDeleteOptionalParams
|
||||
): Promise<PollerLike<PollOperationState<void>, void>>;
|
||||
): Promise<
|
||||
PollerLike<PollOperationState<AppsDeleteResponse>, AppsDeleteResponse>
|
||||
>;
|
||||
/**
|
||||
* Delete an IoT Central application.
|
||||
* @param resourceGroupName The name of the resource group that contains the IoT Central application.
|
||||
|
@ -150,7 +153,7 @@ export interface Apps {
|
|||
resourceGroupName: string,
|
||||
resourceName: string,
|
||||
options?: AppsDeleteOptionalParams
|
||||
): Promise<void>;
|
||||
): Promise<AppsDeleteResponse>;
|
||||
/**
|
||||
* Check if an IoT Central application name is available.
|
||||
* @param operationInputs Set the name parameter in the OperationInputs structure to the name of the
|
||||
|
|
|
@ -7,4 +7,6 @@
|
|||
*/
|
||||
|
||||
export * from "./apps";
|
||||
export * from "./privateEndpointConnections";
|
||||
export * from "./privateLinks";
|
||||
export * from "./operations";
|
||||
|
|
|
@ -0,0 +1,115 @@
|
|||
/*
|
||||
* 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 { PagedAsyncIterableIterator } from "@azure/core-paging";
|
||||
import { PollerLike, PollOperationState } from "@azure/core-lro";
|
||||
import {
|
||||
PrivateEndpointConnection,
|
||||
PrivateEndpointConnectionsListOptionalParams,
|
||||
PrivateEndpointConnectionsGetOptionalParams,
|
||||
PrivateEndpointConnectionsGetResponse,
|
||||
PrivateEndpointConnectionsCreateOptionalParams,
|
||||
PrivateEndpointConnectionsCreateResponse,
|
||||
PrivateEndpointConnectionsDeleteOptionalParams,
|
||||
PrivateEndpointConnectionsDeleteResponse
|
||||
} from "../models";
|
||||
|
||||
/// <reference lib="esnext.asynciterable" />
|
||||
/** Interface representing a PrivateEndpointConnections. */
|
||||
export interface PrivateEndpointConnections {
|
||||
/**
|
||||
* Get all private endpoint connections of a IoT Central Application.
|
||||
* @param resourceGroupName The name of the resource group that contains the IoT Central application.
|
||||
* @param resourceName The ARM resource name of the IoT Central application.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
list(
|
||||
resourceGroupName: string,
|
||||
resourceName: string,
|
||||
options?: PrivateEndpointConnectionsListOptionalParams
|
||||
): PagedAsyncIterableIterator<PrivateEndpointConnection>;
|
||||
/**
|
||||
* Get the metadata of a private endpoint connection for the IoT Central Application.
|
||||
* @param resourceGroupName The name of the resource group that contains the IoT Central application.
|
||||
* @param resourceName The ARM resource name of the IoT Central application.
|
||||
* @param privateEndpointConnectionName The private endpoint connection name.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
get(
|
||||
resourceGroupName: string,
|
||||
resourceName: string,
|
||||
privateEndpointConnectionName: string,
|
||||
options?: PrivateEndpointConnectionsGetOptionalParams
|
||||
): Promise<PrivateEndpointConnectionsGetResponse>;
|
||||
/**
|
||||
* Update a private endpoint connection.
|
||||
* @param resourceGroupName The name of the resource group that contains the IoT Central application.
|
||||
* @param resourceName The ARM resource name of the IoT Central application.
|
||||
* @param privateEndpointConnectionName The private endpoint connection name.
|
||||
* @param privateEndpointConnection The private endpoint connection metadata.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
beginCreate(
|
||||
resourceGroupName: string,
|
||||
resourceName: string,
|
||||
privateEndpointConnectionName: string,
|
||||
privateEndpointConnection: PrivateEndpointConnection,
|
||||
options?: PrivateEndpointConnectionsCreateOptionalParams
|
||||
): Promise<
|
||||
PollerLike<
|
||||
PollOperationState<PrivateEndpointConnectionsCreateResponse>,
|
||||
PrivateEndpointConnectionsCreateResponse
|
||||
>
|
||||
>;
|
||||
/**
|
||||
* Update a private endpoint connection.
|
||||
* @param resourceGroupName The name of the resource group that contains the IoT Central application.
|
||||
* @param resourceName The ARM resource name of the IoT Central application.
|
||||
* @param privateEndpointConnectionName The private endpoint connection name.
|
||||
* @param privateEndpointConnection The private endpoint connection metadata.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
beginCreateAndWait(
|
||||
resourceGroupName: string,
|
||||
resourceName: string,
|
||||
privateEndpointConnectionName: string,
|
||||
privateEndpointConnection: PrivateEndpointConnection,
|
||||
options?: PrivateEndpointConnectionsCreateOptionalParams
|
||||
): Promise<PrivateEndpointConnectionsCreateResponse>;
|
||||
/**
|
||||
* Deletes a private endpoint connection from the IoT Central Application.
|
||||
* @param resourceGroupName The name of the resource group that contains the IoT Central application.
|
||||
* @param resourceName The ARM resource name of the IoT Central application.
|
||||
* @param privateEndpointConnectionName The private endpoint connection name.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
beginDelete(
|
||||
resourceGroupName: string,
|
||||
resourceName: string,
|
||||
privateEndpointConnectionName: string,
|
||||
options?: PrivateEndpointConnectionsDeleteOptionalParams
|
||||
): Promise<
|
||||
PollerLike<
|
||||
PollOperationState<PrivateEndpointConnectionsDeleteResponse>,
|
||||
PrivateEndpointConnectionsDeleteResponse
|
||||
>
|
||||
>;
|
||||
/**
|
||||
* Deletes a private endpoint connection from the IoT Central Application.
|
||||
* @param resourceGroupName The name of the resource group that contains the IoT Central application.
|
||||
* @param resourceName The ARM resource name of the IoT Central application.
|
||||
* @param privateEndpointConnectionName The private endpoint connection name.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
beginDeleteAndWait(
|
||||
resourceGroupName: string,
|
||||
resourceName: string,
|
||||
privateEndpointConnectionName: string,
|
||||
options?: PrivateEndpointConnectionsDeleteOptionalParams
|
||||
): Promise<PrivateEndpointConnectionsDeleteResponse>;
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* 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 { PagedAsyncIterableIterator } from "@azure/core-paging";
|
||||
import {
|
||||
PrivateLinkResource,
|
||||
PrivateLinksListOptionalParams,
|
||||
PrivateLinksGetOptionalParams,
|
||||
PrivateLinksGetResponse
|
||||
} from "../models";
|
||||
|
||||
/// <reference lib="esnext.asynciterable" />
|
||||
/** Interface representing a PrivateLinks. */
|
||||
export interface PrivateLinks {
|
||||
/**
|
||||
* Get all private link resources of a IoT Central Application.
|
||||
* @param resourceGroupName The name of the resource group that contains the IoT Central application.
|
||||
* @param resourceName The ARM resource name of the IoT Central application.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
list(
|
||||
resourceGroupName: string,
|
||||
resourceName: string,
|
||||
options?: PrivateLinksListOptionalParams
|
||||
): PagedAsyncIterableIterator<PrivateLinkResource>;
|
||||
/**
|
||||
* Get a private link resource of a IoT Central Application.
|
||||
* @param resourceGroupName The name of the resource group that contains the IoT Central application.
|
||||
* @param resourceName The ARM resource name of the IoT Central application.
|
||||
* @param groupId The private link resource name.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
get(
|
||||
resourceGroupName: string,
|
||||
resourceName: string,
|
||||
groupId: string,
|
||||
options?: PrivateLinksGetOptionalParams
|
||||
): Promise<PrivateLinksGetResponse>;
|
||||
}
|
|
@ -9,12 +9,25 @@
|
|||
"esModuleInterop": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"lib": ["es6", "dom"],
|
||||
"lib": [
|
||||
"es6",
|
||||
"dom"
|
||||
],
|
||||
"declaration": true,
|
||||
"outDir": "./dist-esm",
|
||||
"importHelpers": true,
|
||||
"paths": { "@azure/arm-iotcentral": ["./src/index"] }
|
||||
},
|
||||
"include": ["./src/**/*.ts", "./test/**/*.ts", "samples-dev/**/*.ts"],
|
||||
"exclude": ["node_modules"]
|
||||
"paths": {
|
||||
"@azure/arm-iotcentral": [
|
||||
"./src/index"
|
||||
]
|
||||
}
|
||||
},
|
||||
"include": [
|
||||
"./src/**/*.ts",
|
||||
"./test/**/*.ts",
|
||||
"samples-dev/**/*.ts"
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules"
|
||||
]
|
||||
}
|
|
@ -9,7 +9,7 @@ trigger:
|
|||
paths:
|
||||
include:
|
||||
- sdk/iotcentral/ci.mgmt.yml
|
||||
- sdk/iotcentral/arm-iotcentral/
|
||||
- sdk/iotcentral/arm-iotcentral
|
||||
pr:
|
||||
branches:
|
||||
include:
|
||||
|
@ -22,8 +22,7 @@ pr:
|
|||
paths:
|
||||
include:
|
||||
- sdk/iotcentral/ci.mgmt.yml
|
||||
- sdk/iotcentral/arm-iotcentral/
|
||||
|
||||
- sdk/iotcentral/arm-iotcentral
|
||||
extends:
|
||||
template: /eng/pipelines/templates/stages/archetype-sdk-client.yml
|
||||
parameters:
|
||||
|
|
Загрузка…
Ссылка в новой задаче