diff --git a/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/LICENSE.txt b/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/LICENSE.txt index a70e8cf66038..ea8fb1516028 100644 --- a/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/LICENSE.txt +++ b/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2018 Microsoft +Copyright (c) 2020 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/README.md b/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/README.md index a3ee467ae318..f563e3dcdf27 100644 --- a/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/README.md +++ b/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/README.md @@ -9,27 +9,27 @@ This package contains an isomorphic SDK for IotDpsClient. ### How to Install -``` +```bash npm install @azure/arm-deviceprovisioningservices ``` ### How to use -#### nodejs - Authentication, client creation and list operations as an example written in TypeScript. +#### nodejs - client creation and list operations as an example written in TypeScript. ##### Install @azure/ms-rest-nodeauth -``` -npm install @azure/ms-rest-nodeauth +- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. +```bash +npm install @azure/ms-rest-nodeauth@"^3.0.0" ``` ##### Sample code -```ts -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { IotDpsClient, IotDpsModels, IotDpsMappers } from "@azure/arm-deviceprovisioningservices"; +While the below sample uses the interactive login, other authentication options can be found in the [README.md file of @azure/ms-rest-nodeauth](https://www.npmjs.com/package/@azure/ms-rest-nodeauth) package +```typescript +const msRestNodeAuth = require("@azure/ms-rest-nodeauth"); +const { IotDpsClient } = require("@azure/arm-deviceprovisioningservices"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; msRestNodeAuth.interactiveLogin().then((creds) => { @@ -47,7 +47,7 @@ msRestNodeAuth.interactiveLogin().then((creds) => { ##### Install @azure/ms-rest-browserauth -``` +```bash npm install @azure/ms-rest-browserauth ``` @@ -95,5 +95,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fdeviceprovisioningservices%2Farm-deviceprovisioningservices%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/README.png) diff --git a/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/package.json b/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/package.json index a1f070d5456d..c274bd66cf73 100644 --- a/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/package.json +++ b/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/package.json @@ -4,9 +4,9 @@ "description": "IotDpsClient Library with typescript type definitions for node.js and browser.", "version": "2.1.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.1.0", - "@azure/ms-rest-js": "^1.1.0", - "tslib": "^1.9.3" + "@azure/ms-rest-azure-js": "^2.0.1", + "@azure/ms-rest-js": "^2.0.4", + "tslib": "^1.10.0" }, "keywords": [ "node", @@ -20,18 +20,19 @@ "module": "./esm/iotDpsClient.js", "types": "./esm/iotDpsClient.d.ts", "devDependencies": { - "typescript": "^3.1.1", - "rollup": "^0.66.2", - "rollup-plugin-node-resolve": "^3.4.0", - "uglify-js": "^3.4.9" + "typescript": "^3.5.3", + "rollup": "^1.18.0", + "rollup-plugin-node-resolve": "^5.2.0", + "rollup-plugin-sourcemaps": "^0.4.2", + "uglify-js": "^3.6.0" }, - "homepage": "https://github.com/azure/azure-sdk-for-js/tree/master/sdk/deviceprovisioningservices/arm-deviceprovisioningservices", + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/deviceprovisioningservices/arm-deviceprovisioningservices", "repository": { "type": "git", - "url": "https://github.com/azure/azure-sdk-for-js.git" + "url": "https://github.com/Azure/azure-sdk-for-js.git" }, "bugs": { - "url": "https://github.com/azure/azure-sdk-for-js/issues" + "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, "files": [ "dist/**/*.js", @@ -43,6 +44,7 @@ "esm/**/*.d.ts", "esm/**/*.d.ts.map", "src/**/*.ts", + "README.md", "rollup.config.js", "tsconfig.json" ], diff --git a/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/rollup.config.js b/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/rollup.config.js index 17c78b89da67..dcf9e7b25d44 100644 --- a/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/rollup.config.js +++ b/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/rollup.config.js @@ -1,10 +1,16 @@ +import rollup from "rollup"; import nodeResolve from "rollup-plugin-node-resolve"; +import sourcemaps from "rollup-plugin-sourcemaps"; + /** - * @type {import('rollup').RollupFileOptions} + * @type {rollup.RollupFileOptions} */ const config = { - input: './esm/iotDpsClient.js', - external: ["@azure/ms-rest-js", "@azure/ms-rest-azure-js"], + input: "./esm/iotDpsClient.js", + external: [ + "@azure/ms-rest-js", + "@azure/ms-rest-azure-js" + ], output: { file: "./dist/arm-deviceprovisioningservices.js", format: "umd", @@ -15,17 +21,17 @@ const config = { "@azure/ms-rest-azure-js": "msRestAzure" }, banner: `/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */` }, plugins: [ - nodeResolve({ module: true }) + nodeResolve({ mainFields: ['module', 'main'] }), + sourcemaps() ] }; + export default config; diff --git a/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/src/iotDpsClient.ts b/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/src/iotDpsClient.ts index b5b09d14c58d..ea7a323c1164 100644 --- a/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/src/iotDpsClient.ts +++ b/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/src/iotDpsClient.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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 diff --git a/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/src/iotDpsClientContext.ts b/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/src/iotDpsClientContext.ts index 48146b6d20a3..2f412c4068c0 100644 --- a/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/src/iotDpsClientContext.ts +++ b/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/src/iotDpsClientContext.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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 @@ -13,7 +12,7 @@ import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-deviceprovisioningservices"; -const packageVersion = "0.1.0"; +const packageVersion = "2.1.0"; export class IotDpsClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials; @@ -44,7 +43,7 @@ export class IotDpsClientContext extends msRestAzure.AzureServiceClient { super(credentials, options); - this.apiVersion = '2018-01-22'; + this.apiVersion = '2020-09-01-preview'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; diff --git a/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/src/models/dpsCertificateMappers.ts b/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/src/models/dpsCertificateMappers.ts index 1f211111d514..d85143cf0997 100644 --- a/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/src/models/dpsCertificateMappers.ts +++ b/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/src/models/dpsCertificateMappers.ts @@ -1,28 +1,35 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - CertificateResponse, + ArmIdentity, + ArmUserIdentity, BaseResource, - CertificateProperties, - ErrorDetails, CertificateBodyDescription, CertificateListDescription, - VerificationCodeResponse, - VerificationCodeResponseProperties, - VerificationCodeRequest, - Resource, - ProvisioningServiceDescription, + CertificateProperties, + CertificateResponse, + EncryptionKeyIdentity, + EncryptionPropertiesDescription, + ErrorDetails, IotDpsPropertiesDescription, + IotDpsSkuInfo, IotHubDefinitionDescription, + IpFilterRule, + KeyVaultKeyProperties, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionProperties, + PrivateLinkServiceConnectionState, + ProvisioningServiceDescription, + Resource, SharedAccessSignatureAuthorizationRuleAccessRightsDescription, - IotDpsSkuInfo + VerificationCodeRequest, + VerificationCodeResponse, + VerificationCodeResponseProperties } from "../models/mappers"; - diff --git a/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/src/models/index.ts b/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/src/models/index.ts index 67af3c02b6fc..3a285c5f5de4 100644 --- a/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/src/models/index.ts +++ b/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/src/models/index.ts @@ -1,11 +1,9 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ import { BaseResource, CloudError, AzureServiceClientOptions } from "@azure/ms-rest-azure-js"; @@ -13,842 +11,909 @@ import * as msRest from "@azure/ms-rest-js"; export { BaseResource, CloudError }; - /** - * @interface - * An interface representing ErrorMesssage. * Error response containing message and code. - * */ export interface ErrorMesssage { /** - * @member {string} [code] standard error code + * standard error code */ code?: string; /** - * @member {string} [message] standard error description + * standard error description */ message?: string; /** - * @member {string} [details] detailed summary of error + * detailed summary of error */ details?: string; } /** - * @interface - * An interface representing AsyncOperationResult. * Result of a long running operation. - * */ export interface AsyncOperationResult { /** - * @member {string} [status] current status of a long running operation. + * current status of a long running operation. */ status?: string; /** - * @member {ErrorMesssage} [error] Error message containing code, description - * and details + * Error message containing code, description and details */ error?: ErrorMesssage; } /** - * @interface - * An interface representing CertificateProperties. * The description of an X509 CA Certificate. - * */ export interface CertificateProperties { /** - * @member {string} [subject] The certificate's subject name. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The certificate's subject name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly subject?: string; /** - * @member {Date} [expiry] The certificate's expiration date and time. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The certificate's expiration date and time. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly expiry?: Date; /** - * @member {string} [thumbprint] The certificate's thumbprint. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The certificate's thumbprint. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly thumbprint?: string; /** - * @member {boolean} [isVerified] Determines whether certificate has been - * verified. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Determines whether certificate has been verified. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly isVerified?: boolean; /** - * @member {Date} [created] The certificate's creation date and time. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The certificate's creation date and time. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly created?: Date; /** - * @member {Date} [updated] The certificate's last update date and time. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The certificate's last update date and time. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly updated?: Date; } /** - * @interface - * An interface representing CertificateResponse. * The X509 Certificate. - * - * @extends BaseResource */ export interface CertificateResponse extends BaseResource { /** - * @member {CertificateProperties} [properties] properties of a certificate + * properties of a certificate */ properties?: CertificateProperties; /** - * @member {string} [id] The resource identifier. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The resource identifier. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** - * @member {string} [name] The name of the certificate. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The name of the certificate. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; /** - * @member {string} [etag] The entity tag. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The entity tag. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly etag?: string; /** - * @member {string} [type] The resource type. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The resource type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly type?: string; } /** - * @interface - * An interface representing CertificateListDescription. * The JSON-serialized array of Certificate objects. - * */ export interface CertificateListDescription { /** - * @member {CertificateResponse[]} [value] The array of Certificate objects. + * The array of Certificate objects. */ value?: CertificateResponse[]; } /** - * @interface - * An interface representing CertificateBodyDescription. * The JSON-serialized X509 Certificate. - * */ export interface CertificateBodyDescription { /** - * @member {string} [certificate] Base-64 representation of the X509 leaf - * certificate .cer file or just .pem file content. + * Base-64 representation of the X509 leaf certificate .cer file or just .pem file content. */ certificate?: string; } /** - * @interface - * An interface representing IotDpsSkuInfo. - * List of possible provisoning service SKUs. - * + * List of possible provisioning service SKUs. */ export interface IotDpsSkuInfo { /** - * @member {IotDpsSku} [name] Sku name. Possible values include: 'S1' + * Sku name. Possible values include: 'S1' */ name?: IotDpsSku; /** - * @member {string} [tier] Pricing tier name of the provisioning service. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Pricing tier name of the provisioning service. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly tier?: string; /** - * @member {number} [capacity] The number of units to provision + * The number of units to provision */ capacity?: number; } /** - * @interface - * An interface representing IotHubDefinitionDescription. + * The properties of the KeyVault key. + */ +export interface KeyVaultKeyProperties { + /** + * The identifier of the key. + */ + keyIdentifier?: string; +} + +/** + * The properties of the identity used to access the key encryption key in KeyVault. + */ +export interface EncryptionKeyIdentity { + /** + * The user assigned identity. + */ + userAssignedIdentity?: string; +} + +/** + * The customer-managed encryption key (CMK) properties for the IoT DPS instance. + */ +export interface EncryptionPropertiesDescription { + /** + * The source of the encryption key. Typically, Microsoft.KeyVault + */ + keySource?: string; + /** + * The properties of the encryption key configured in KeyVault. + */ + keyVaultProperties?: KeyVaultKeyProperties[]; + /** + * The identity used to access the encryption key in KeyVault. + */ + identity?: EncryptionKeyIdentity; +} + +/** + * The IP filter rules for a provisioning Service. + */ +export interface IpFilterRule { + /** + * The name of the IP filter rule. + */ + filterName: string; + /** + * The desired action for requests captured by this rule. Possible values include: 'Accept', + * 'Reject' + */ + action: IpFilterActionType; + /** + * A string that contains the IP address range in CIDR notation for the rule. + */ + ipMask: string; + /** + * Target for requests captured by this rule. Possible values include: 'all', 'serviceApi', + * 'deviceApi' + */ + target?: IpFilterTargetType; +} + +/** + * The private endpoint property of a private endpoint connection + */ +export interface PrivateEndpoint { + /** + * The resource identifier. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; +} + +/** + * The current state of a private endpoint connection + */ +export interface PrivateLinkServiceConnectionState { + /** + * The status of a private endpoint connection. Possible values include: 'Pending', 'Approved', + * 'Rejected', 'Disconnected' + */ + status: PrivateLinkServiceConnectionStatus; + /** + * The description for the current state of a private endpoint connection + */ + description: string; + /** + * Actions required for a private endpoint connection + */ + actionsRequired?: string; +} + +/** + * The properties of a private endpoint connection + */ +export interface PrivateEndpointConnectionProperties { + /** + * The private endpoint property of a private endpoint connection + */ + privateEndpoint?: PrivateEndpoint; + /** + * The current state of a private endpoint connection + */ + privateLinkServiceConnectionState: PrivateLinkServiceConnectionState; +} + +/** + * The private endpoint connection of a provisioning service + */ +export interface PrivateEndpointConnection extends BaseResource { + /** + * The resource identifier. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * The resource name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * The resource type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * The properties of a private endpoint connection + */ + properties: PrivateEndpointConnectionProperties; +} + +/** * Description of the IoT hub. - * */ export interface IotHubDefinitionDescription { /** - * @member {boolean} [applyAllocationPolicy] flag for applying - * allocationPolicy or not for a given iot hub. + * flag for applying allocationPolicy or not for a given iot hub. */ applyAllocationPolicy?: boolean; /** - * @member {number} [allocationWeight] weight to apply for a given iot h. + * weight to apply for a given iot h. */ allocationWeight?: number; /** - * @member {string} [name] Host name of the IoT hub. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Host name of the IoT hub. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; /** - * @member {string} connectionString Connection string og the IoT hub. + * Connection string of the IoT hub. */ connectionString: string; /** - * @member {string} location ARM region of the IoT hub. + * ARM region of the IoT hub. */ location: string; } /** - * @interface - * An interface representing SharedAccessSignatureAuthorizationRuleAccessRightsDescription. * Description of the shared access key. - * */ export interface SharedAccessSignatureAuthorizationRuleAccessRightsDescription { /** - * @member {string} keyName Name of the key. + * Name of the key. */ keyName: string; /** - * @member {string} [primaryKey] Primary SAS key value. + * Primary SAS key value. */ primaryKey?: string; /** - * @member {string} [secondaryKey] Secondary SAS key value. + * Secondary SAS key value. */ secondaryKey?: string; /** - * @member {AccessRightsDescription} rights Rights that this key has. - * Possible values include: 'ServiceConfig', 'EnrollmentRead', - * 'EnrollmentWrite', 'DeviceConnect', 'RegistrationStatusRead', - * 'RegistrationStatusWrite' + * Rights that this key has. Possible values include: 'ServiceConfig', 'EnrollmentRead', + * 'EnrollmentWrite', 'DeviceConnect', 'RegistrationStatusRead', 'RegistrationStatusWrite' */ rights: AccessRightsDescription; } /** - * @interface - * An interface representing IotDpsPropertiesDescription. - * the service specific properties of a provisoning service, including keys, - * linked iot hubs, current state, and system generated properties such as - * hostname and idScope - * + * the service specific properties of a provisioning service, including keys, linked iot hubs, + * current state, and system generated properties such as hostname and idScope */ export interface IotDpsPropertiesDescription { /** - * @member {State} [state] Current state of the provisioning service. - * Possible values include: 'Activating', 'Active', 'Deleting', 'Deleted', - * 'ActivationFailed', 'DeletionFailed', 'Transitioning', 'Suspending', + * Current state of the provisioning service. Possible values include: 'Activating', 'Active', + * 'Deleting', 'Deleted', 'ActivationFailed', 'DeletionFailed', 'Transitioning', 'Suspending', * 'Suspended', 'Resuming', 'FailingOver', 'FailoverFailed' */ state?: State; /** - * @member {string} [provisioningState] The ARM provisioning state of the - * provisioning service. + * The encryption properties for the IoT DPS instance. + */ + encryption?: EncryptionPropertiesDescription; + /** + * Whether requests from Public Network are allowed. Possible values include: 'Enabled', + * 'Disabled' + */ + publicNetworkAccess?: PublicNetworkAccess; + /** + * The IP filter rules. + */ + ipFilterRules?: IpFilterRule[]; + /** + * Private endpoint connections created on this IotHub + */ + privateEndpointConnections?: PrivateEndpointConnection[]; + /** + * The ARM provisioning state of the provisioning service. */ provisioningState?: string; /** - * @member {IotHubDefinitionDescription[]} [iotHubs] List of IoT hubs - * assosciated with this provisioning service. + * List of IoT hubs associated with this provisioning service. */ iotHubs?: IotHubDefinitionDescription[]; /** - * @member {AllocationPolicy} [allocationPolicy] Allocation policy to be used - * by this provisioning service. Possible values include: 'Hashed', + * Allocation policy to be used by this provisioning service. Possible values include: 'Hashed', * 'GeoLatency', 'Static' */ allocationPolicy?: AllocationPolicy; /** - * @member {string} [serviceOperationsHostName] Service endpoint for - * provisioning service. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Service endpoint for provisioning service. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly serviceOperationsHostName?: string; /** - * @member {string} [deviceProvisioningHostName] Device endpoint for this - * provisioning service. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Device endpoint for this provisioning service. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly deviceProvisioningHostName?: string; /** - * @member {string} [idScope] Unique identifier of this provisioning service. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Unique identifier of this provisioning service. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly idScope?: string; /** - * @member {SharedAccessSignatureAuthorizationRuleAccessRightsDescription[]} - * [authorizationPolicies] List of authorization keys for a provisioning - * service. + * List of authorization keys for a provisioning service. */ authorizationPolicies?: SharedAccessSignatureAuthorizationRuleAccessRightsDescription[]; } /** - * @interface - * An interface representing Resource. + * The ARM UserAssigned identity information + */ +export interface ArmUserIdentity { + /** + * Principal Id + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly principalId?: string; + /** + * Client Id + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly clientId?: string; +} + +/** + * The set of ARM identities associated with the IoT DPS resource. + */ +export interface ArmIdentity { + /** + * Principal Id + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly principalId?: string; + /** + * Tenant Id + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly tenantId?: string; + /** + * Identity type. Only allowed values are SystemAssigned and UserAssigned. Comma separated if + * both for ex: SystemAssigned,UserAssigned. + */ + identityType?: string; + /** + * The set of UserAssigned identities associated with the IoT DPS resource. + */ + userAssignedIdentities?: { [propertyName: string]: ArmUserIdentity }; +} + +/** * The common properties of an Azure resource. - * - * @extends BaseResource */ export interface Resource extends BaseResource { /** - * @member {string} [id] The resource identifier. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The resource identifier. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** - * @member {string} [name] The resource name. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The resource name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; /** - * @member {string} [type] The resource type. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The resource type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly type?: string; /** - * @member {string} location The resource location. + * The resource location. */ location: string; /** - * @member {{ [propertyName: string]: string }} [tags] The resource tags. + * The resource tags. */ tags?: { [propertyName: string]: string }; } /** - * @interface - * An interface representing ProvisioningServiceDescription. * The description of the provisioning service. - * - * @extends Resource */ export interface ProvisioningServiceDescription extends Resource { /** - * @member {string} [etag] The Etag field is *not* required. If it is - * provided in the response body, it must also be provided as a header per - * the normal ETag convention. + * The Etag field is *not* required. If it is provided in the response body, it must also be + * provided as a header per the normal ETag convention. */ etag?: string; /** - * @member {IotDpsPropertiesDescription} properties Service specific - * properties for a provisioning service + * Service specific properties for a provisioning service */ properties: IotDpsPropertiesDescription; /** - * @member {IotDpsSkuInfo} sku Sku info for a provisioning Service. + * Sku info for a provisioning Service. */ sku: IotDpsSkuInfo; + /** + * The managed identities for the IotDps instance. + */ + identity?: ArmIdentity; +} + +/** + * The properties for a group information object + */ +export interface GroupIdInformationProperties { + /** + * The group id + */ + groupId?: string; + /** + * The required members for a specific group id + */ + requiredMembers?: string[]; + /** + * The required DNS zones for a specific group id + */ + requiredZoneNames?: string[]; +} + +/** + * The group information for creating a private endpoint on a provisioning service + */ +export interface GroupIdInformation { + /** + * The resource identifier. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * The resource name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * The resource type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * The properties for a group information object + */ + properties: GroupIdInformationProperties; +} + +/** + * The available private link resources for a provisioning service + */ +export interface PrivateLinkResources { + /** + * The list of available private link resources for a provisioning service + */ + value?: GroupIdInformation[]; } /** - * @interface - * An interface representing OperationDisplay. * The object that represents the operation. - * */ export interface OperationDisplay { /** - * @member {string} [provider] Service provider: Microsoft Devices. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Service provider: Microsoft Devices. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly provider?: string; /** - * @member {string} [resource] Resource Type: ProvisioningServices. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource Type: ProvisioningServices. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly resource?: string; /** - * @member {string} [operation] Name of the operation. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Name of the operation. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly operation?: string; } /** - * @interface - * An interface representing Operation. - * IoT Hub REST API operation. - * + * Provisioning Service REST API operation. */ export interface Operation { /** - * @member {string} [name] Operation name: {provider}/{resource}/{read | - * write | action | delete} - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Operation name: {provider}/{resource}/{read | write | action | delete} + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; /** - * @member {OperationDisplay} [display] The object that represents the - * operation. + * The object that represents the operation. */ display?: OperationDisplay; } /** - * @interface - * An interface representing ErrorDetails. * Error details. - * */ export interface ErrorDetails { /** - * @member {string} [code] The error code. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The error code. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly code?: string; /** - * @member {string} [httpStatusCode] The HTTP status code. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The HTTP status code. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly httpStatusCode?: string; /** - * @member {string} [message] The error message. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The error message. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly message?: string; /** - * @member {string} [details] The error details. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The error details. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly details?: string; } /** - * @interface - * An interface representing IotDpsSkuDefinition. - * Available Sku's of tier and units. - * + * Available SKUs of tier and units. */ export interface IotDpsSkuDefinition { /** - * @member {IotDpsSku} [name] Sku name. Possible values include: 'S1' + * Sku name. Possible values include: 'S1' */ name?: IotDpsSku; } /** - * @interface - * An interface representing OperationInputs. * Input values for operation results call. - * */ export interface OperationInputs { /** - * @member {string} name The name of the Provisioning Service to check. + * The name of the Provisioning Service to check. */ name: string; } /** - * @interface - * An interface representing NameAvailabilityInfo. * Description of name availability. - * */ export interface NameAvailabilityInfo { /** - * @member {boolean} [nameAvailable] specifies if a name is available or not + * specifies if a name is available or not */ nameAvailable?: boolean; /** - * @member {NameUnavailabilityReason} [reason] specifies the reason a name is - * unavailable. Possible values include: 'Invalid', 'AlreadyExists' + * specifies the reason a name is unavailable. Possible values include: 'Invalid', + * 'AlreadyExists' */ reason?: NameUnavailabilityReason; /** - * @member {string} [message] message containing a etailed reason name is - * unavailable + * message containing a detailed reason name is unavailable */ message?: string; } /** - * @interface - * An interface representing TagsResource. - * A container holding only the Tags for a resource, allowing the user to - * update the tags on a Provisioning Service instance. - * + * A container holding only the Tags for a resource, allowing the user to update the tags on a + * Provisioning Service instance. */ export interface TagsResource { /** - * @member {{ [propertyName: string]: string }} [tags] Resource tags + * Resource tags */ tags?: { [propertyName: string]: string }; } /** - * @interface * An interface representing VerificationCodeResponseProperties. */ export interface VerificationCodeResponseProperties { /** - * @member {string} [verificationCode] Verification code. + * Verification code. */ verificationCode?: string; /** - * @member {string} [subject] Certificate subject. + * Certificate subject. */ subject?: string; /** - * @member {string} [expiry] Code expiry. + * Code expiry. */ expiry?: string; /** - * @member {string} [thumbprint] Certificate thumbprint. + * Certificate thumbprint. */ thumbprint?: string; /** - * @member {boolean} [isVerified] Indicate if the certificate is verified by - * owner of private key. + * Indicate if the certificate is verified by owner of private key. */ isVerified?: boolean; /** - * @member {string} [created] Certificate created time. + * Certificate created time. */ created?: string; /** - * @member {string} [updated] Certificate updated time. + * Certificate updated time. */ updated?: string; } /** - * @interface - * An interface representing VerificationCodeResponse. * Description of the response of the verification code. - * - * @extends BaseResource */ export interface VerificationCodeResponse extends BaseResource { /** - * @member {string} [name] Name of certificate. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Name of certificate. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; /** - * @member {string} [etag] Request etag. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Request etag. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly etag?: string; /** - * @member {string} [id] The resource identifier. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The resource identifier. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** - * @member {string} [type] The resource type. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The resource type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly type?: string; - /** - * @member {VerificationCodeResponseProperties} [properties] - */ properties?: VerificationCodeResponseProperties; } /** - * @interface - * An interface representing VerificationCodeRequest. * The JSON-serialized leaf certificate - * */ export interface VerificationCodeRequest { /** - * @member {string} [certificate] base-64 representation of X509 certificate - * .cer file or just .pem file content. + * base-64 representation of X509 certificate .cer file or just .pem file content. */ certificate?: string; } /** - * @interface - * An interface representing DpsCertificateGetOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ export interface DpsCertificateGetOptionalParams extends msRest.RequestOptionsBase { /** - * @member {string} [ifMatch] ETag of the certificate. + * ETag of the certificate. */ ifMatch?: string; } /** - * @interface - * An interface representing DpsCertificateCreateOrUpdateOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ export interface DpsCertificateCreateOrUpdateOptionalParams extends msRest.RequestOptionsBase { /** - * @member {string} [ifMatch] ETag of the certificate. This is required to - * update an existing certificate, and ignored while creating a brand new - * certificate. + * ETag of the certificate. This is required to update an existing certificate, and ignored while + * creating a brand new certificate. */ ifMatch?: string; } /** - * @interface - * An interface representing DpsCertificateDeleteMethodOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ export interface DpsCertificateDeleteMethodOptionalParams extends msRest.RequestOptionsBase { /** - * @member {string} [certificatename] This is optional, and it is the Common - * Name of the certificate. + * This is optional, and it is the Common Name of the certificate. */ certificatename?: string; /** - * @member {Uint8Array} [certificaterawBytes] Raw data within the - * certificate. + * Raw data within the certificate. */ certificaterawBytes?: Uint8Array; /** - * @member {boolean} [certificateisVerified] Indicates if certificate has - * been verified by owner of the private key. + * Indicates if certificate has been verified by owner of the private key. */ certificateisVerified?: boolean; /** - * @member {CertificatePurpose} [certificatepurpose] A description that - * mentions the purpose of the certificate. Possible values include: + * A description that mentions the purpose of the certificate. Possible values include: * 'clientAuthentication', 'serverAuthentication' */ certificatepurpose?: CertificatePurpose; /** - * @member {Date} [certificatecreated] Time the certificate is created. + * Time the certificate is created. */ certificatecreated?: Date; /** - * @member {Date} [certificatelastUpdated] Time the certificate is last - * updated. + * Time the certificate is last updated. */ certificatelastUpdated?: Date; /** - * @member {boolean} [certificatehasPrivateKey] Indicates if the certificate - * contains a private key. + * Indicates if the certificate contains a private key. */ certificatehasPrivateKey?: boolean; /** - * @member {string} [certificatenonce] Random number generated to indicate - * Proof of Possession. + * Random number generated to indicate Proof of Possession. */ certificatenonce?: string; } /** - * @interface - * An interface representing DpsCertificateGenerateVerificationCodeOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ export interface DpsCertificateGenerateVerificationCodeOptionalParams extends msRest.RequestOptionsBase { /** - * @member {string} [certificatename] Common Name for the certificate. + * Common Name for the certificate. */ certificatename?: string; /** - * @member {Uint8Array} [certificaterawBytes] Raw data of certificate. + * Raw data of certificate. */ certificaterawBytes?: Uint8Array; /** - * @member {boolean} [certificateisVerified] Indicates if the certificate has - * been verified by owner of the private key. + * Indicates if the certificate has been verified by owner of the private key. */ certificateisVerified?: boolean; /** - * @member {CertificatePurpose} [certificatepurpose] Description mentioning - * the purpose of the certificate. Possible values include: + * Description mentioning the purpose of the certificate. Possible values include: * 'clientAuthentication', 'serverAuthentication' */ certificatepurpose?: CertificatePurpose; /** - * @member {Date} [certificatecreated] Certificate creation time. + * Certificate creation time. */ certificatecreated?: Date; /** - * @member {Date} [certificatelastUpdated] Certificate last updated time. + * Certificate last updated time. */ certificatelastUpdated?: Date; /** - * @member {boolean} [certificatehasPrivateKey] Indicates if the certificate - * contains private key. + * Indicates if the certificate contains private key. */ certificatehasPrivateKey?: boolean; /** - * @member {string} [certificatenonce] Random number generated to indicate - * Proof of Possession. + * Random number generated to indicate Proof of Possession. */ certificatenonce?: string; } /** - * @interface - * An interface representing DpsCertificateVerifyCertificateOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ export interface DpsCertificateVerifyCertificateOptionalParams extends msRest.RequestOptionsBase { /** - * @member {string} [certificatename] Common Name for the certificate. + * Common Name for the certificate. */ certificatename?: string; /** - * @member {Uint8Array} [certificaterawBytes] Raw data of certificate. + * Raw data of certificate. */ certificaterawBytes?: Uint8Array; /** - * @member {boolean} [certificateisVerified] Indicates if the certificate has - * been verified by owner of the private key. + * Indicates if the certificate has been verified by owner of the private key. */ certificateisVerified?: boolean; /** - * @member {CertificatePurpose} [certificatepurpose] Describe the purpose of - * the certificate. Possible values include: 'clientAuthentication', + * Describe the purpose of the certificate. Possible values include: 'clientAuthentication', * 'serverAuthentication' */ certificatepurpose?: CertificatePurpose; /** - * @member {Date} [certificatecreated] Certificate creation time. + * Certificate creation time. */ certificatecreated?: Date; /** - * @member {Date} [certificatelastUpdated] Certificate last updated time. + * Certificate last updated time. */ certificatelastUpdated?: Date; /** - * @member {boolean} [certificatehasPrivateKey] Indicates if the certificate - * contains private key. + * Indicates if the certificate contains private key. */ certificatehasPrivateKey?: boolean; /** - * @member {string} [certificatenonce] Random number generated to indicate - * Proof of Possession. + * Random number generated to indicate Proof of Possession. */ certificatenonce?: string; } /** - * @interface * An interface representing IotDpsClientOptions. - * @extends AzureServiceClientOptions */ export interface IotDpsClientOptions extends AzureServiceClientOptions { - /** - * @member {string} [baseUri] - */ baseUri?: string; } - /** * @interface - * An interface representing the OperationListResult. - * Result of the request to list IoT Hub operations. It contains a list of - * operations and a URL link to get the next set of results. - * + * Result of the request to list provisioning service operations. It contains a list of operations + * and a URL link to get the next set of results. * @extends Array */ export interface OperationListResult extends Array { /** - * @member {string} [nextLink] URL to get the next set of operation list - * results if there are any. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * URL to get the next set of operation list results if there are any. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly nextLink?: string; } /** * @interface - * An interface representing the ProvisioningServiceDescriptionListResult. * List of provisioning service descriptions. - * * @extends Array */ export interface ProvisioningServiceDescriptionListResult extends Array { /** - * @member {string} [nextLink] the next link - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * the next link + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly nextLink?: string; } /** * @interface - * An interface representing the IotDpsSkuDefinitionListResult. * List of available SKUs. - * * @extends Array */ export interface IotDpsSkuDefinitionListResult extends Array { /** - * @member {string} [nextLink] The next link. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The next link. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly nextLink?: string; } /** * @interface - * An interface representing the SharedAccessSignatureAuthorizationRuleListResult. * List of shared access keys. - * * @extends Array */ export interface SharedAccessSignatureAuthorizationRuleListResult extends Array { /** - * @member {string} [nextLink] The next link. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The next link. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly nextLink?: string; } @@ -871,6 +936,38 @@ export type IotDpsSku = 'S1'; */ export type State = 'Activating' | 'Active' | 'Deleting' | 'Deleted' | 'ActivationFailed' | 'DeletionFailed' | 'Transitioning' | 'Suspending' | 'Suspended' | 'Resuming' | 'FailingOver' | 'FailoverFailed'; +/** + * Defines values for PublicNetworkAccess. + * Possible values include: 'Enabled', 'Disabled' + * @readonly + * @enum {string} + */ +export type PublicNetworkAccess = 'Enabled' | 'Disabled'; + +/** + * Defines values for IpFilterActionType. + * Possible values include: 'Accept', 'Reject' + * @readonly + * @enum {string} + */ +export type IpFilterActionType = 'Accept' | 'Reject'; + +/** + * Defines values for IpFilterTargetType. + * Possible values include: 'all', 'serviceApi', 'deviceApi' + * @readonly + * @enum {string} + */ +export type IpFilterTargetType = 'all' | 'serviceApi' | 'deviceApi'; + +/** + * Defines values for PrivateLinkServiceConnectionStatus. + * Possible values include: 'Pending', 'Approved', 'Rejected', 'Disconnected' + * @readonly + * @enum {string} + */ +export type PrivateLinkServiceConnectionStatus = 'Pending' | 'Approved' | 'Rejected' | 'Disconnected'; + /** * Defines values for AllocationPolicy. * Possible values include: 'Hashed', 'GeoLatency', 'Static' @@ -916,6 +1013,7 @@ export type OperationsListResponse = OperationListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -935,6 +1033,7 @@ export type OperationsListNextResponse = OperationListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -954,6 +1053,7 @@ export type DpsCertificateGetResponse = CertificateResponse & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -973,6 +1073,7 @@ export type DpsCertificateCreateOrUpdateResponse = CertificateResponse & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -992,6 +1093,7 @@ export type DpsCertificateListResponse = CertificateListDescription & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1011,6 +1113,7 @@ export type DpsCertificateGenerateVerificationCodeResponse = VerificationCodeRes * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1030,6 +1133,7 @@ export type DpsCertificateVerifyCertificateResponse = CertificateResponse & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1049,6 +1153,7 @@ export type IotDpsResourceGetResponse = ProvisioningServiceDescription & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1068,6 +1173,7 @@ export type IotDpsResourceCreateOrUpdateResponse = ProvisioningServiceDescriptio * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1087,6 +1193,7 @@ export type IotDpsResourceUpdateResponse = ProvisioningServiceDescription & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1106,6 +1213,7 @@ export type IotDpsResourceListBySubscriptionResponse = ProvisioningServiceDescri * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1125,6 +1233,7 @@ export type IotDpsResourceListByResourceGroupResponse = ProvisioningServiceDescr * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1144,6 +1253,7 @@ export type IotDpsResourceGetOperationResultResponse = AsyncOperationResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1163,6 +1273,7 @@ export type IotDpsResourceListValidSkusResponse = IotDpsSkuDefinitionListResult * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1182,6 +1293,7 @@ export type IotDpsResourceCheckProvisioningServiceNameAvailabilityResponse = Nam * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1201,6 +1313,7 @@ export type IotDpsResourceListKeysResponse = SharedAccessSignatureAuthorizationR * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1220,6 +1333,7 @@ export type IotDpsResourceListKeysForKeyNameResponse = SharedAccessSignatureAuth * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1227,6 +1341,126 @@ export type IotDpsResourceListKeysForKeyNameResponse = SharedAccessSignatureAuth }; }; +/** + * Contains response data for the listPrivateLinkResources operation. + */ +export type IotDpsResourceListPrivateLinkResourcesResponse = PrivateLinkResources & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PrivateLinkResources; + }; +}; + +/** + * Contains response data for the getPrivateLinkResources operation. + */ +export type IotDpsResourceGetPrivateLinkResourcesResponse = GroupIdInformation & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: GroupIdInformation; + }; +}; + +/** + * Contains response data for the listPrivateEndpointConnections operation. + */ +export type IotDpsResourceListPrivateEndpointConnectionsResponse = Array & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PrivateEndpointConnection[]; + }; +}; + +/** + * Contains response data for the getPrivateEndpointConnection operation. + */ +export type IotDpsResourceGetPrivateEndpointConnectionResponse = PrivateEndpointConnection & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PrivateEndpointConnection; + }; +}; + +/** + * Contains response data for the createOrUpdatePrivateEndpointConnection operation. + */ +export type IotDpsResourceCreateOrUpdatePrivateEndpointConnectionResponse = PrivateEndpointConnection & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PrivateEndpointConnection; + }; +}; + +/** + * Contains response data for the deletePrivateEndpointConnection operation. + */ +export type IotDpsResourceDeletePrivateEndpointConnectionResponse = PrivateEndpointConnection & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PrivateEndpointConnection; + }; +}; + /** * Contains response data for the beginCreateOrUpdate operation. */ @@ -1239,6 +1473,7 @@ export type IotDpsResourceBeginCreateOrUpdateResponse = ProvisioningServiceDescr * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1258,6 +1493,7 @@ export type IotDpsResourceBeginUpdateResponse = ProvisioningServiceDescription & * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1265,6 +1501,46 @@ export type IotDpsResourceBeginUpdateResponse = ProvisioningServiceDescription & }; }; +/** + * Contains response data for the beginCreateOrUpdatePrivateEndpointConnection operation. + */ +export type IotDpsResourceBeginCreateOrUpdatePrivateEndpointConnectionResponse = PrivateEndpointConnection & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PrivateEndpointConnection; + }; +}; + +/** + * Contains response data for the beginDeletePrivateEndpointConnection operation. + */ +export type IotDpsResourceBeginDeletePrivateEndpointConnectionResponse = PrivateEndpointConnection & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PrivateEndpointConnection; + }; +}; + /** * Contains response data for the listBySubscriptionNext operation. */ @@ -1277,6 +1553,7 @@ export type IotDpsResourceListBySubscriptionNextResponse = ProvisioningServiceDe * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1296,6 +1573,7 @@ export type IotDpsResourceListByResourceGroupNextResponse = ProvisioningServiceD * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1315,6 +1593,7 @@ export type IotDpsResourceListValidSkusNextResponse = IotDpsSkuDefinitionListRes * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1334,6 +1613,7 @@ export type IotDpsResourceListKeysNextResponse = SharedAccessSignatureAuthorizat * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ diff --git a/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/src/models/iotDpsResourceMappers.ts b/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/src/models/iotDpsResourceMappers.ts index cad91fb75ceb..4a8ca235e4e3 100644 --- a/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/src/models/iotDpsResourceMappers.ts +++ b/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/src/models/iotDpsResourceMappers.ts @@ -1,35 +1,45 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - ProvisioningServiceDescription, - Resource, + ArmIdentity, + ArmUserIdentity, + AsyncOperationResult, BaseResource, - IotDpsPropertiesDescription, - IotHubDefinitionDescription, - SharedAccessSignatureAuthorizationRuleAccessRightsDescription, - IotDpsSkuInfo, - ErrorDetails, - TagsResource, + CertificateProperties, + CertificateResponse, CloudError, - ProvisioningServiceDescriptionListResult, - AsyncOperationResult, + EncryptionKeyIdentity, + EncryptionPropertiesDescription, + ErrorDetails, ErrorMesssage, - IotDpsSkuDefinitionListResult, + GroupIdInformation, + GroupIdInformationProperties, + IotDpsPropertiesDescription, IotDpsSkuDefinition, - OperationInputs, + IotDpsSkuDefinitionListResult, + IotDpsSkuInfo, + IotHubDefinitionDescription, + IpFilterRule, + KeyVaultKeyProperties, NameAvailabilityInfo, + OperationInputs, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionProperties, + PrivateLinkResources, + PrivateLinkServiceConnectionState, + ProvisioningServiceDescription, + ProvisioningServiceDescriptionListResult, + Resource, + SharedAccessSignatureAuthorizationRuleAccessRightsDescription, SharedAccessSignatureAuthorizationRuleListResult, - CertificateResponse, - CertificateProperties, + TagsResource, VerificationCodeResponse, VerificationCodeResponseProperties } from "../models/mappers"; - diff --git a/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/src/models/mappers.ts b/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/src/models/mappers.ts index 91c501da2866..2f0156155de9 100644 --- a/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/src/models/mappers.ts +++ b/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/src/models/mappers.ts @@ -1,11 +1,9 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ import { CloudErrorMapper, BaseResourceMapper } from "@azure/ms-rest-azure-js"; @@ -229,6 +227,233 @@ export const IotDpsSkuInfo: msRest.CompositeMapper = { } }; +export const KeyVaultKeyProperties: msRest.CompositeMapper = { + serializedName: "KeyVaultKeyProperties", + type: { + name: "Composite", + className: "KeyVaultKeyProperties", + modelProperties: { + keyIdentifier: { + serializedName: "keyIdentifier", + type: { + name: "String" + } + } + } + } +}; + +export const EncryptionKeyIdentity: msRest.CompositeMapper = { + serializedName: "EncryptionKeyIdentity", + type: { + name: "Composite", + className: "EncryptionKeyIdentity", + modelProperties: { + userAssignedIdentity: { + serializedName: "userAssignedIdentity", + type: { + name: "String" + } + } + } + } +}; + +export const EncryptionPropertiesDescription: msRest.CompositeMapper = { + serializedName: "EncryptionPropertiesDescription", + type: { + name: "Composite", + className: "EncryptionPropertiesDescription", + modelProperties: { + keySource: { + serializedName: "keySource", + type: { + name: "String" + } + }, + keyVaultProperties: { + serializedName: "keyVaultProperties", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "KeyVaultKeyProperties" + } + } + } + }, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "EncryptionKeyIdentity" + } + } + } + } +}; + +export const IpFilterRule: msRest.CompositeMapper = { + serializedName: "IpFilterRule", + type: { + name: "Composite", + className: "IpFilterRule", + modelProperties: { + filterName: { + required: true, + serializedName: "filterName", + type: { + name: "String" + } + }, + action: { + required: true, + serializedName: "action", + type: { + name: "Enum", + allowedValues: [ + "Accept", + "Reject" + ] + } + }, + ipMask: { + required: true, + serializedName: "ipMask", + type: { + name: "String" + } + }, + target: { + serializedName: "target", + type: { + name: "Enum", + allowedValues: [ + "all", + "serviceApi", + "deviceApi" + ] + } + } + } + } +}; + +export const PrivateEndpoint: msRest.CompositeMapper = { + serializedName: "PrivateEndpoint", + type: { + name: "Composite", + className: "PrivateEndpoint", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateLinkServiceConnectionState: msRest.CompositeMapper = { + serializedName: "PrivateLinkServiceConnectionState", + type: { + name: "Composite", + className: "PrivateLinkServiceConnectionState", + modelProperties: { + status: { + required: true, + serializedName: "status", + type: { + name: "String" + } + }, + description: { + required: true, + serializedName: "description", + type: { + name: "String" + } + }, + actionsRequired: { + serializedName: "actionsRequired", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateEndpointConnectionProperties: msRest.CompositeMapper = { + serializedName: "PrivateEndpointConnectionProperties", + type: { + name: "Composite", + className: "PrivateEndpointConnectionProperties", + modelProperties: { + privateEndpoint: { + serializedName: "privateEndpoint", + type: { + name: "Composite", + className: "PrivateEndpoint" + } + }, + privateLinkServiceConnectionState: { + required: true, + serializedName: "privateLinkServiceConnectionState", + type: { + name: "Composite", + className: "PrivateLinkServiceConnectionState" + } + } + } + } +}; + +export const PrivateEndpointConnection: msRest.CompositeMapper = { + serializedName: "PrivateEndpointConnection", + type: { + name: "Composite", + className: "PrivateEndpointConnection", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + constraints: { + Pattern: /^(?![0-9]+$)(?!-)[a-zA-Z0-9-]{2,49}[a-zA-Z0-9]$/ + }, + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + properties: { + required: true, + serializedName: "properties", + type: { + name: "Composite", + className: "PrivateEndpointConnectionProperties" + } + } + } + } +}; + export const IotHubDefinitionDescription: msRest.CompositeMapper = { serializedName: "IotHubDefinitionDescription", type: { @@ -320,6 +545,43 @@ export const IotDpsPropertiesDescription: msRest.CompositeMapper = { name: "String" } }, + encryption: { + serializedName: "encryption", + type: { + name: "Composite", + className: "EncryptionPropertiesDescription" + } + }, + publicNetworkAccess: { + serializedName: "publicNetworkAccess", + type: { + name: "String" + } + }, + ipFilterRules: { + serializedName: "ipFilterRules", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IpFilterRule" + } + } + } + }, + privateEndpointConnections: { + serializedName: "privateEndpointConnections", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateEndpointConnection" + } + } + } + }, provisioningState: { serializedName: "provisioningState", type: { @@ -381,6 +643,72 @@ export const IotDpsPropertiesDescription: msRest.CompositeMapper = { } }; +export const ArmUserIdentity: msRest.CompositeMapper = { + serializedName: "ArmUserIdentity", + type: { + name: "Composite", + className: "ArmUserIdentity", + modelProperties: { + principalId: { + readOnly: true, + serializedName: "principalId", + type: { + name: "String" + } + }, + clientId: { + readOnly: true, + serializedName: "clientId", + type: { + name: "String" + } + } + } + } +}; + +export const ArmIdentity: msRest.CompositeMapper = { + serializedName: "ArmIdentity", + type: { + name: "Composite", + className: "ArmIdentity", + modelProperties: { + principalId: { + readOnly: true, + serializedName: "principalId", + type: { + name: "String" + } + }, + tenantId: { + readOnly: true, + serializedName: "tenantId", + type: { + name: "String" + } + }, + identityType: { + serializedName: "identityType", + type: { + name: "String" + } + }, + userAssignedIdentities: { + serializedName: "userAssignedIdentities", + type: { + name: "Dictionary", + value: { + type: { + name: "Composite", + className: "ArmUserIdentity" + } + } + } + } + } + } +}; + export const Resource: msRest.CompositeMapper = { serializedName: "Resource", type: { @@ -461,6 +789,115 @@ export const ProvisioningServiceDescription: msRest.CompositeMapper = { name: "Composite", className: "IotDpsSkuInfo" } + }, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "ArmIdentity" + } + } + } + } +}; + +export const GroupIdInformationProperties: msRest.CompositeMapper = { + serializedName: "GroupIdInformationProperties", + type: { + name: "Composite", + className: "GroupIdInformationProperties", + modelProperties: { + groupId: { + serializedName: "groupId", + type: { + name: "String" + } + }, + requiredMembers: { + serializedName: "requiredMembers", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + requiredZoneNames: { + serializedName: "requiredZoneNames", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const GroupIdInformation: msRest.CompositeMapper = { + serializedName: "GroupIdInformation", + type: { + name: "Composite", + className: "GroupIdInformation", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + constraints: { + Pattern: /^(?![0-9]+$)(?!-)[a-zA-Z0-9-]{2,49}[a-zA-Z0-9]$/ + }, + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + properties: { + required: true, + serializedName: "properties", + type: { + name: "Composite", + className: "GroupIdInformationProperties" + } + } + } + } +}; + +export const PrivateLinkResources: msRest.CompositeMapper = { + serializedName: "PrivateLinkResources", + type: { + name: "Composite", + className: "PrivateLinkResources", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "GroupIdInformation" + } + } + } } } } diff --git a/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/src/models/operationsMappers.ts b/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/src/models/operationsMappers.ts index 50fee90a2573..b050cda5b1fc 100644 --- a/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/src/models/operationsMappers.ts +++ b/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/src/models/operationsMappers.ts @@ -1,17 +1,14 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - OperationListResult, + ErrorDetails, Operation, OperationDisplay, - ErrorDetails + OperationListResult } from "../models/mappers"; - diff --git a/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/src/models/parameters.ts b/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/src/models/parameters.ts index 9c52c58bd990..07d3749bb7cc 100644 --- a/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/src/models/parameters.ts +++ b/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/src/models/parameters.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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 @@ -160,6 +159,16 @@ export const certificaterawBytes: msRest.OperationQueryParameter = { } } }; +export const groupId: msRest.OperationURLParameter = { + parameterPath: "groupId", + mapper: { + required: true, + serializedName: "groupId", + type: { + name: "String" + } + } +}; export const ifMatch0: msRest.OperationParameter = { parameterPath: [ "options", @@ -213,6 +222,16 @@ export const operationId: msRest.OperationURLParameter = { } } }; +export const privateEndpointConnectionName: msRest.OperationURLParameter = { + parameterPath: "privateEndpointConnectionName", + mapper: { + required: true, + serializedName: "privateEndpointConnectionName", + type: { + name: "String" + } + } +}; export const provisioningServiceName: msRest.OperationURLParameter = { parameterPath: "provisioningServiceName", mapper: { @@ -233,6 +252,16 @@ export const resourceGroupName: msRest.OperationURLParameter = { } } }; +export const resourceName: msRest.OperationURLParameter = { + parameterPath: "resourceName", + mapper: { + required: true, + serializedName: "resourceName", + type: { + name: "String" + } + } +}; export const subscriptionId: msRest.OperationURLParameter = { parameterPath: "subscriptionId", mapper: { diff --git a/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/src/operations/dpsCertificate.ts b/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/src/operations/dpsCertificate.ts index 48dd486b2027..5026e644f4c1 100644 --- a/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/src/operations/dpsCertificate.ts +++ b/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/src/operations/dpsCertificate.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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 @@ -107,7 +106,7 @@ export class DpsCertificate { } /** - * Deletes the specified certificate assosciated with the Provisioning Service + * Deletes the specified certificate associated with the Provisioning Service * @summary Delete the Provisioning Service Certificate. * @param resourceGroupName Resource group identifier. * @param ifMatch ETag of the certificate diff --git a/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/src/operations/index.ts b/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/src/operations/index.ts index 1bae816c5e6e..6211da2d7df9 100644 --- a/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/src/operations/index.ts +++ b/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/src/operations/index.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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 diff --git a/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/src/operations/iotDpsResource.ts b/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/src/operations/iotDpsResource.ts index bacb4f4e1232..9c8f36ae9c57 100644 --- a/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/src/operations/iotDpsResource.ts +++ b/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/src/operations/iotDpsResource.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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 @@ -341,6 +340,175 @@ export class IotDpsResource { callback) as Promise; } + /** + * List private link resources for the given provisioning service + * @summary List private link resources + * @param resourceGroupName The name of the resource group that contains the provisioning service. + * @param resourceName The name of the provisioning service. + * @param [options] The optional parameters + * @returns Promise + */ + listPrivateLinkResources(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the provisioning service. + * @param resourceName The name of the provisioning service. + * @param callback The callback + */ + listPrivateLinkResources(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the provisioning service. + * @param resourceName The name of the provisioning service. + * @param options The optional parameters + * @param callback The callback + */ + listPrivateLinkResources(resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listPrivateLinkResources(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + options + }, + listPrivateLinkResourcesOperationSpec, + callback) as Promise; + } + + /** + * Get the specified private link resource for the given provisioning service + * @summary Get the specified private link resource + * @param resourceGroupName The name of the resource group that contains the provisioning service. + * @param resourceName The name of the provisioning service. + * @param groupId The name of the private link resource + * @param [options] The optional parameters + * @returns Promise + */ + getPrivateLinkResources(resourceGroupName: string, resourceName: string, groupId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the provisioning service. + * @param resourceName The name of the provisioning service. + * @param groupId The name of the private link resource + * @param callback The callback + */ + getPrivateLinkResources(resourceGroupName: string, resourceName: string, groupId: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the provisioning service. + * @param resourceName The name of the provisioning service. + * @param groupId The name of the private link resource + * @param options The optional parameters + * @param callback The callback + */ + getPrivateLinkResources(resourceGroupName: string, resourceName: string, groupId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getPrivateLinkResources(resourceGroupName: string, resourceName: string, groupId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + groupId, + options + }, + getPrivateLinkResourcesOperationSpec, + callback) as Promise; + } + + /** + * List private endpoint connection properties + * @summary List private endpoint connections + * @param resourceGroupName The name of the resource group that contains the provisioning service. + * @param resourceName The name of the provisioning service. + * @param [options] The optional parameters + * @returns Promise + */ + listPrivateEndpointConnections(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the provisioning service. + * @param resourceName The name of the provisioning service. + * @param callback The callback + */ + listPrivateEndpointConnections(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the provisioning service. + * @param resourceName The name of the provisioning service. + * @param options The optional parameters + * @param callback The callback + */ + listPrivateEndpointConnections(resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listPrivateEndpointConnections(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + options + }, + listPrivateEndpointConnectionsOperationSpec, + callback) as Promise; + } + + /** + * Get private endpoint connection properties + * @summary Get private endpoint connection + * @param resourceGroupName The name of the resource group that contains the provisioning service. + * @param resourceName The name of the provisioning service. + * @param privateEndpointConnectionName The name of the private endpoint connection + * @param [options] The optional parameters + * @returns Promise + */ + getPrivateEndpointConnection(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group that contains the provisioning service. + * @param resourceName The name of the provisioning service. + * @param privateEndpointConnectionName The name of the private endpoint connection + * @param callback The callback + */ + getPrivateEndpointConnection(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group that contains the provisioning service. + * @param resourceName The name of the provisioning service. + * @param privateEndpointConnectionName The name of the private endpoint connection + * @param options The optional parameters + * @param callback The callback + */ + getPrivateEndpointConnection(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getPrivateEndpointConnection(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + privateEndpointConnectionName, + options + }, + getPrivateEndpointConnectionOperationSpec, + callback) as Promise; + } + + /** + * Create or update the status of a private endpoint connection with the specified name + * @summary Create or update private endpoint connection + * @param resourceGroupName The name of the resource group that contains the provisioning service. + * @param resourceName The name of the provisioning service. + * @param privateEndpointConnectionName The name of the private endpoint connection + * @param privateEndpointConnection The private endpoint connection with updated properties + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdatePrivateEndpointConnection(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, privateEndpointConnection: Models.PrivateEndpointConnection, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdatePrivateEndpointConnection(resourceGroupName,resourceName,privateEndpointConnectionName,privateEndpointConnection,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Delete private endpoint connection with the specified name + * @summary Delete private endpoint connection + * @param resourceGroupName The name of the resource group that contains the provisioning service. + * @param resourceName The name of the provisioning service. + * @param privateEndpointConnectionName The name of the private endpoint connection + * @param [options] The optional parameters + * @returns Promise + */ + deletePrivateEndpointConnection(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeletePrivateEndpointConnection(resourceGroupName,resourceName,privateEndpointConnectionName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + /** * Create or update the metadata of the provisioning service. The usual pattern to modify a * property is to retrieve the provisioning service metadata and security metadata, and then @@ -406,6 +574,50 @@ export class IotDpsResource { options); } + /** + * Create or update the status of a private endpoint connection with the specified name + * @summary Create or update private endpoint connection + * @param resourceGroupName The name of the resource group that contains the provisioning service. + * @param resourceName The name of the provisioning service. + * @param privateEndpointConnectionName The name of the private endpoint connection + * @param privateEndpointConnection The private endpoint connection with updated properties + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdatePrivateEndpointConnection(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, privateEndpointConnection: Models.PrivateEndpointConnection, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + resourceName, + privateEndpointConnectionName, + privateEndpointConnection, + options + }, + beginCreateOrUpdatePrivateEndpointConnectionOperationSpec, + options); + } + + /** + * Delete private endpoint connection with the specified name + * @summary Delete private endpoint connection + * @param resourceGroupName The name of the resource group that contains the provisioning service. + * @param resourceName The name of the provisioning service. + * @param privateEndpointConnectionName The name of the private endpoint connection + * @param [options] The optional parameters + * @returns Promise + */ + beginDeletePrivateEndpointConnection(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + resourceName, + privateEndpointConnectionName, + options + }, + beginDeletePrivateEndpointConnectionOperationSpec, + options); + } + /** * List all the provisioning services for a given subscription id. * @summary Get all the provisioning services in a subscription. @@ -729,6 +941,119 @@ const listKeysForKeyNameOperationSpec: msRest.OperationSpec = { serializer }; +const listPrivateLinkResourcesOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/provisioningServices/{resourceName}/privateLinkResources", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResources + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + serializer +}; + +const getPrivateLinkResourcesOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/provisioningServices/{resourceName}/privateLinkResources/{groupId}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.groupId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.GroupIdInformation + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + serializer +}; + +const listPrivateEndpointConnectionsOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/provisioningServices/{resourceName}/privateEndpointConnections", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: { + serializedName: "parsedResponse", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateEndpointConnection" + } + } + } + } + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + serializer +}; + +const getPrivateEndpointConnectionOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/provisioningServices/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.privateEndpointConnectionName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + serializer +}; + const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/provisioningServices/{provisioningServiceName}", @@ -822,6 +1147,72 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { serializer }; +const beginCreateOrUpdatePrivateEndpointConnectionOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/provisioningServices/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.privateEndpointConnectionName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "privateEndpointConnection", + mapper: { + ...Mappers.PrivateEndpointConnection, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + 201: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + serializer +}; + +const beginDeletePrivateEndpointConnectionOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/provisioningServices/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.privateEndpointConnectionName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + 202: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + 204: {}, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + serializer +}; + const listBySubscriptionNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", @@ -829,6 +1220,9 @@ const listBySubscriptionNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], @@ -850,6 +1244,9 @@ const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], @@ -871,6 +1268,9 @@ const listValidSkusNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], @@ -892,6 +1292,9 @@ const listKeysNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/src/operations/operations.ts b/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/src/operations/operations.ts index a149deab0143..a8da44de9ea1 100644 --- a/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/src/operations/operations.ts +++ b/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/src/operations/operations.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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 @@ -108,6 +107,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/tsconfig.json b/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/tsconfig.json index 87bbf5b5fa49..422b584abd5e 100644 --- a/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/tsconfig.json +++ b/sdk/deviceprovisioningservices/arm-deviceprovisioningservices/tsconfig.json @@ -9,7 +9,7 @@ "esModuleInterop": true, "allowSyntheticDefaultImports": true, "forceConsistentCasingInFileNames": true, - "lib": ["es6"], + "lib": ["es6", "dom"], "declaration": true, "outDir": "./esm", "importHelpers": true