diff --git a/lib/services/datafactoryManagement/lib/models/index.d.ts b/lib/services/datafactoryManagement/lib/models/index.d.ts index 4ceca334e4..5c3079dab7 100644 --- a/lib/services/datafactoryManagement/lib/models/index.d.ts +++ b/lib/services/datafactoryManagement/lib/models/index.d.ts @@ -257,7 +257,7 @@ export interface IntegrationRuntimeReference { * integration runtime belong to. * @member {string} [state] The state of integration runtime. Possible values * include: 'Initial', 'Stopped', 'Started', 'Starting', 'Stopping', - * 'NeedRegistration', 'Online', 'Limited', 'Offline' + * 'NeedRegistration', 'Online', 'Limited', 'Offline', 'AccessDenied' * @member {string} type Polymorphic Discriminator */ export interface IntegrationRuntimeStatus { @@ -283,7 +283,8 @@ export interface IntegrationRuntimeStatus { * the integration runtime belong to. * @member {string} [properties.state] The state of integration runtime. * Possible values include: 'Initial', 'Stopped', 'Started', 'Starting', - * 'Stopping', 'NeedRegistration', 'Online', 'Limited', 'Offline' + * 'Stopping', 'NeedRegistration', 'Online', 'Limited', 'Offline', + * 'AccessDenied' * @member {string} [properties.type] Polymorphic Discriminator */ export interface IntegrationRuntimeStatusResponse { @@ -339,6 +340,19 @@ export interface UpdateIntegrationRuntimeNodeRequest { concurrentJobsLimit?: number; } +/** + * @class + * Initializes a new instance of the LinkedIntegrationRuntimeRequest class. + * @constructor + * Data factory name for linked integration runtime request. + * + * @member {string} linkedFactoryName The data factory name for linked + * integration runtime. + */ +export interface LinkedIntegrationRuntimeRequest { + linkedFactoryName: string; +} + /** * @class * Initializes a new instance of the ParameterSpecification class. @@ -6615,6 +6629,30 @@ export interface ExecutePipelineActivity extends ControlActivity { waitOnCompletion?: boolean; } +/** + * @class + * Initializes a new instance of the LinkedIntegrationRuntime class. + * @constructor + * The linked integration runtime information. + * + * @member {string} [name] The name of the linked integration runtime. + * @member {string} [subscriptionId] The subscription ID for which the linked + * integration runtime belong to. + * @member {string} [dataFactoryName] The name of the data factory for which + * the linked integration runtime belong to. + * @member {string} [dataFactoryLocation] The location of the data factory for + * which the linked integration runtime belong to. + * @member {date} [createTime] The creating time of the linked integration + * runtime. + */ +export interface LinkedIntegrationRuntime { + readonly name?: string; + readonly subscriptionId?: string; + readonly dataFactoryName?: string; + readonly dataFactoryLocation?: string; + readonly createTime?: Date; +} + /** * @class * Initializes a new instance of the SelfHostedIntegrationRuntimeNode class. @@ -6707,6 +6745,10 @@ export interface SelfHostedIntegrationRuntimeNode { * @member {string} [autoUpdate] Whether Self-hosted integration runtime auto * update has been turned on. Possible values include: 'On', 'Off' * @member {string} [versionStatus] Status of the integration runtime version. + * @member {array} [links] The list of linked integration runtimes that are + * created to share with this integration runtime. + * @member {array} [sharedWithFactories] The MSI-s of the data factories to + * which the integration runtime is shared. * @member {string} [pushedVersion] The version that the integration runtime is * going to update to. * @member {string} [latestVersion] The latest version on download center. @@ -6724,6 +6766,8 @@ export interface SelfHostedIntegrationRuntimeStatus extends IntegrationRuntimeSt readonly serviceUrls?: string[]; readonly autoUpdate?: string; readonly versionStatus?: string; + links?: LinkedIntegrationRuntime[]; + readonly sharedWithFactories?: string[]; readonly pushedVersion?: string; readonly latestVersion?: string; } @@ -6831,14 +6875,55 @@ export interface ManagedIntegrationRuntimeStatus extends IntegrationRuntimeStatu readonly lastOperation?: ManagedIntegrationRuntimeOperationResult; } +/** + * @class + * Initializes a new instance of the LinkedIntegrationRuntimeType class. + * @constructor + * The base definition of a linked integration runtime. + * + * @member {string} authorizationType Polymorphic Discriminator + */ +export interface LinkedIntegrationRuntimeType { + authorizationType: string; +} + +/** + * @class + * Initializes a new instance of the LinkedIntegrationRuntimeRbacAuthorization class. + * @constructor + * The role based access control (RBAC) authorization type integration runtime. + * + * @member {string} resourceId The resource identifier of the integration + * runtime to be shared. + */ +export interface LinkedIntegrationRuntimeRbacAuthorization extends LinkedIntegrationRuntimeType { + resourceId: string; +} + +/** + * @class + * Initializes a new instance of the LinkedIntegrationRuntimeKeyAuthorization class. + * @constructor + * The key authorization type integration runtime. + * + * @member {object} key The key used for authorization. + * @member {string} [key.value] Value of secure string. + */ +export interface LinkedIntegrationRuntimeKeyAuthorization extends LinkedIntegrationRuntimeType { + key: SecureString; +} + /** * @class * Initializes a new instance of the SelfHostedIntegrationRuntime class. * @constructor * Self-hosted integration runtime. * + * @member {object} [linkedInfo] + * @member {string} [linkedInfo.authorizationType] Polymorphic Discriminator */ export interface SelfHostedIntegrationRuntime extends IntegrationRuntime { + linkedInfo?: LinkedIntegrationRuntimeType; } /** @@ -6997,7 +7082,7 @@ export interface IntegrationRuntimeComputeProperties { * @member {string} [state] Integration runtime state, only valid for managed * dedicated integration runtime. Possible values include: 'Initial', * 'Stopped', 'Started', 'Starting', 'Stopping', 'NeedRegistration', 'Online', - * 'Limited', 'Offline' + * 'Limited', 'Offline', 'AccessDenied' * @member {object} [computeProperties] The compute resource for managed * integration runtime. * @member {string} [computeProperties.location] The location for managed diff --git a/lib/services/datafactoryManagement/lib/models/index.js b/lib/services/datafactoryManagement/lib/models/index.js index 3b376c98a4..aeb926a6c2 100644 --- a/lib/services/datafactoryManagement/lib/models/index.js +++ b/lib/services/datafactoryManagement/lib/models/index.js @@ -36,6 +36,7 @@ exports.IntegrationRuntimeStatusResponse = require('./integrationRuntimeStatusRe exports.IntegrationRuntimeStatusListResponse = require('./integrationRuntimeStatusListResponse'); exports.UpdateIntegrationRuntimeRequest = require('./updateIntegrationRuntimeRequest'); exports.UpdateIntegrationRuntimeNodeRequest = require('./updateIntegrationRuntimeNodeRequest'); +exports.LinkedIntegrationRuntimeRequest = require('./linkedIntegrationRuntimeRequest'); exports.ParameterSpecification = require('./parameterSpecification'); exports.LinkedService = require('./linkedService'); exports.LinkedServiceResource = require('./linkedServiceResource'); @@ -323,12 +324,16 @@ exports.WaitActivity = require('./waitActivity'); exports.ForEachActivity = require('./forEachActivity'); exports.IfConditionActivity = require('./ifConditionActivity'); exports.ExecutePipelineActivity = require('./executePipelineActivity'); +exports.LinkedIntegrationRuntime = require('./linkedIntegrationRuntime'); exports.SelfHostedIntegrationRuntimeNode = require('./selfHostedIntegrationRuntimeNode'); exports.SelfHostedIntegrationRuntimeStatus = require('./selfHostedIntegrationRuntimeStatus'); exports.ManagedIntegrationRuntimeOperationResult = require('./managedIntegrationRuntimeOperationResult'); exports.ManagedIntegrationRuntimeError = require('./managedIntegrationRuntimeError'); exports.ManagedIntegrationRuntimeNode = require('./managedIntegrationRuntimeNode'); exports.ManagedIntegrationRuntimeStatus = require('./managedIntegrationRuntimeStatus'); +exports.LinkedIntegrationRuntimeType = require('./linkedIntegrationRuntimeType'); +exports.LinkedIntegrationRuntimeRbacAuthorization = require('./linkedIntegrationRuntimeRbacAuthorization'); +exports.LinkedIntegrationRuntimeKeyAuthorization = require('./linkedIntegrationRuntimeKeyAuthorization'); exports.SelfHostedIntegrationRuntime = require('./selfHostedIntegrationRuntime'); exports.IntegrationRuntimeCustomSetupScriptProperties = require('./integrationRuntimeCustomSetupScriptProperties'); exports.IntegrationRuntimeSsisCatalogInfo = require('./integrationRuntimeSsisCatalogInfo'); @@ -599,6 +604,9 @@ exports.discriminators = { 'Activity.Container' : exports.ControlActivity, 'IntegrationRuntimeStatus.SelfHosted' : exports.SelfHostedIntegrationRuntimeStatus, 'IntegrationRuntimeStatus.Managed' : exports.ManagedIntegrationRuntimeStatus, + 'LinkedIntegrationRuntimeType.RBAC' : exports.LinkedIntegrationRuntimeRbacAuthorization, + 'LinkedIntegrationRuntimeType.Key' : exports.LinkedIntegrationRuntimeKeyAuthorization, + 'LinkedIntegrationRuntimeType' : exports.LinkedIntegrationRuntimeType, 'IntegrationRuntime.SelfHosted' : exports.SelfHostedIntegrationRuntime, 'IntegrationRuntime.Managed' : exports.ManagedIntegrationRuntime }; diff --git a/lib/services/datafactoryManagement/lib/models/integrationRuntimeStatus.js b/lib/services/datafactoryManagement/lib/models/integrationRuntimeStatus.js index d6fa960a23..4a86511a30 100644 --- a/lib/services/datafactoryManagement/lib/models/integrationRuntimeStatus.js +++ b/lib/services/datafactoryManagement/lib/models/integrationRuntimeStatus.js @@ -21,7 +21,7 @@ class IntegrationRuntimeStatus { * integration runtime belong to. * @member {string} [state] The state of integration runtime. Possible values * include: 'Initial', 'Stopped', 'Started', 'Starting', 'Stopping', - * 'NeedRegistration', 'Online', 'Limited', 'Offline' + * 'NeedRegistration', 'Online', 'Limited', 'Offline', 'AccessDenied' * @member {string} type Polymorphic Discriminator */ constructor() { diff --git a/lib/services/datafactoryManagement/lib/models/integrationRuntimeStatusResponse.js b/lib/services/datafactoryManagement/lib/models/integrationRuntimeStatusResponse.js index f52765aefa..62527efd0e 100644 --- a/lib/services/datafactoryManagement/lib/models/integrationRuntimeStatusResponse.js +++ b/lib/services/datafactoryManagement/lib/models/integrationRuntimeStatusResponse.js @@ -25,7 +25,8 @@ class IntegrationRuntimeStatusResponse { * the integration runtime belong to. * @member {string} [properties.state] The state of integration runtime. * Possible values include: 'Initial', 'Stopped', 'Started', 'Starting', - * 'Stopping', 'NeedRegistration', 'Online', 'Limited', 'Offline' + * 'Stopping', 'NeedRegistration', 'Online', 'Limited', 'Offline', + * 'AccessDenied' * @member {string} [properties.type] Polymorphic Discriminator */ constructor() { diff --git a/lib/services/datafactoryManagement/lib/models/linkedIntegrationRuntimeKey.js b/lib/services/datafactoryManagement/lib/models/linkedIntegrationRuntimeKey.js index 5d4e0ccce8..895c7503ae 100644 --- a/lib/services/datafactoryManagement/lib/models/linkedIntegrationRuntimeKey.js +++ b/lib/services/datafactoryManagement/lib/models/linkedIntegrationRuntimeKey.js @@ -13,14 +13,14 @@ const models = require('./index'); /** - * The base definition of a secret type. + * The key authorization type. * * @extends models['LinkedIntegrationRuntimeProperties'] */ class LinkedIntegrationRuntimeKey extends models['LinkedIntegrationRuntimeProperties'] { /** * Create a LinkedIntegrationRuntimeKey. - * @member {object} key Type of the secret. + * @member {object} key The key used for authorization. * @member {string} [key.value] Value of secure string. */ constructor() { diff --git a/lib/services/datafactoryManagement/lib/models/linkedIntegrationRuntimeKeyAuthorization.js b/lib/services/datafactoryManagement/lib/models/linkedIntegrationRuntimeKeyAuthorization.js new file mode 100644 index 0000000000..362bdd9254 --- /dev/null +++ b/lib/services/datafactoryManagement/lib/models/linkedIntegrationRuntimeKeyAuthorization.js @@ -0,0 +1,76 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * The key authorization type integration runtime. + * + * @extends models['LinkedIntegrationRuntimeType'] + */ +class LinkedIntegrationRuntimeKeyAuthorization extends models['LinkedIntegrationRuntimeType'] { + /** + * Create a LinkedIntegrationRuntimeKeyAuthorization. + * @member {object} key The key used for authorization. + * @member {string} [key.value] Value of secure string. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of LinkedIntegrationRuntimeKeyAuthorization + * + * @returns {object} metadata of LinkedIntegrationRuntimeKeyAuthorization + * + */ + mapper() { + return { + required: false, + serializedName: 'Key', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'authorizationType', + clientName: 'authorizationType' + }, + uberParent: 'LinkedIntegrationRuntimeType', + className: 'LinkedIntegrationRuntimeKeyAuthorization', + modelProperties: { + authorizationType: { + required: true, + serializedName: 'authorizationType', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + key: { + required: true, + serializedName: 'key', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'type', + clientName: 'type' + }, + uberParent: 'SecretBase', + className: 'SecureString' + } + } + } + } + }; + } +} + +module.exports = LinkedIntegrationRuntimeKeyAuthorization; diff --git a/lib/services/datafactoryManagement/lib/models/linkedIntegrationRuntimeProperties.js b/lib/services/datafactoryManagement/lib/models/linkedIntegrationRuntimeProperties.js index 5e9d9d3444..b9cb6afc50 100644 --- a/lib/services/datafactoryManagement/lib/models/linkedIntegrationRuntimeProperties.js +++ b/lib/services/datafactoryManagement/lib/models/linkedIntegrationRuntimeProperties.js @@ -11,7 +11,7 @@ 'use strict'; /** - * The base definition of a secret type. + * The base definition of a linked integration runtime properties. * */ class LinkedIntegrationRuntimeProperties { diff --git a/lib/services/datafactoryManagement/lib/models/linkedIntegrationRuntimeRbac.js b/lib/services/datafactoryManagement/lib/models/linkedIntegrationRuntimeRbac.js index 2393b48d1d..0bd6a452b6 100644 --- a/lib/services/datafactoryManagement/lib/models/linkedIntegrationRuntimeRbac.js +++ b/lib/services/datafactoryManagement/lib/models/linkedIntegrationRuntimeRbac.js @@ -13,15 +13,15 @@ const models = require('./index'); /** - * The base definition of a secret type. + * The role based access control (RBAC) authorization type. * * @extends models['LinkedIntegrationRuntimeProperties'] */ class LinkedIntegrationRuntimeRbac extends models['LinkedIntegrationRuntimeProperties'] { /** * Create a LinkedIntegrationRuntimeRbac. - * @member {string} resourceId The resource ID of the integration runtime to - * be shared. + * @member {string} resourceId The resource identifier of the integration + * runtime to be shared. */ constructor() { super(); diff --git a/lib/services/datafactoryManagement/lib/models/linkedIntegrationRuntimeRbacAuthorization.js b/lib/services/datafactoryManagement/lib/models/linkedIntegrationRuntimeRbacAuthorization.js new file mode 100644 index 0000000000..90fba529f6 --- /dev/null +++ b/lib/services/datafactoryManagement/lib/models/linkedIntegrationRuntimeRbacAuthorization.js @@ -0,0 +1,70 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * The role based access control (RBAC) authorization type integration runtime. + * + * @extends models['LinkedIntegrationRuntimeType'] + */ +class LinkedIntegrationRuntimeRbacAuthorization extends models['LinkedIntegrationRuntimeType'] { + /** + * Create a LinkedIntegrationRuntimeRbacAuthorization. + * @member {string} resourceId The resource identifier of the integration + * runtime to be shared. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of LinkedIntegrationRuntimeRbacAuthorization + * + * @returns {object} metadata of LinkedIntegrationRuntimeRbacAuthorization + * + */ + mapper() { + return { + required: false, + serializedName: 'RBAC', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'authorizationType', + clientName: 'authorizationType' + }, + uberParent: 'LinkedIntegrationRuntimeType', + className: 'LinkedIntegrationRuntimeRbacAuthorization', + modelProperties: { + authorizationType: { + required: true, + serializedName: 'authorizationType', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + resourceId: { + required: true, + serializedName: 'resourceId', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = LinkedIntegrationRuntimeRbacAuthorization; diff --git a/lib/services/datafactoryManagement/lib/models/linkedIntegrationRuntimeRequest.js b/lib/services/datafactoryManagement/lib/models/linkedIntegrationRuntimeRequest.js new file mode 100644 index 0000000000..fbb127a49e --- /dev/null +++ b/lib/services/datafactoryManagement/lib/models/linkedIntegrationRuntimeRequest.js @@ -0,0 +1,53 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Data factory name for linked integration runtime request. + * + */ +class LinkedIntegrationRuntimeRequest { + /** + * Create a LinkedIntegrationRuntimeRequest. + * @member {string} linkedFactoryName The data factory name for linked + * integration runtime. + */ + constructor() { + } + + /** + * Defines the metadata of LinkedIntegrationRuntimeRequest + * + * @returns {object} metadata of LinkedIntegrationRuntimeRequest + * + */ + mapper() { + return { + required: false, + serializedName: 'LinkedIntegrationRuntimeRequest', + type: { + name: 'Composite', + className: 'LinkedIntegrationRuntimeRequest', + modelProperties: { + linkedFactoryName: { + required: true, + serializedName: 'factoryName', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = LinkedIntegrationRuntimeRequest; diff --git a/lib/services/datafactoryManagement/lib/models/linkedIntegrationRuntimeType.js b/lib/services/datafactoryManagement/lib/models/linkedIntegrationRuntimeType.js new file mode 100644 index 0000000000..d17395999d --- /dev/null +++ b/lib/services/datafactoryManagement/lib/models/linkedIntegrationRuntimeType.js @@ -0,0 +1,58 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * The base definition of a linked integration runtime. + * + */ +class LinkedIntegrationRuntimeType { + /** + * Create a LinkedIntegrationRuntimeType. + * @member {string} authorizationType Polymorphic Discriminator + */ + constructor() { + } + + /** + * Defines the metadata of LinkedIntegrationRuntimeType + * + * @returns {object} metadata of LinkedIntegrationRuntimeType + * + */ + mapper() { + return { + required: false, + serializedName: 'LinkedIntegrationRuntimeType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'authorizationType', + clientName: 'authorizationType' + }, + uberParent: 'LinkedIntegrationRuntimeType', + className: 'LinkedIntegrationRuntimeType', + modelProperties: { + authorizationType: { + required: true, + serializedName: 'authorizationType', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = LinkedIntegrationRuntimeType; diff --git a/lib/services/datafactoryManagement/lib/models/managedIntegrationRuntime.js b/lib/services/datafactoryManagement/lib/models/managedIntegrationRuntime.js index 6ebe822d53..ab054421a2 100644 --- a/lib/services/datafactoryManagement/lib/models/managedIntegrationRuntime.js +++ b/lib/services/datafactoryManagement/lib/models/managedIntegrationRuntime.js @@ -24,7 +24,7 @@ class ManagedIntegrationRuntime extends models['IntegrationRuntime'] { * @member {string} [state] Integration runtime state, only valid for managed * dedicated integration runtime. Possible values include: 'Initial', * 'Stopped', 'Started', 'Starting', 'Stopping', 'NeedRegistration', - * 'Online', 'Limited', 'Offline' + * 'Online', 'Limited', 'Offline', 'AccessDenied' * @member {object} [computeProperties] The compute resource for managed * integration runtime. * @member {string} [computeProperties.location] The location for managed diff --git a/lib/services/datafactoryManagement/lib/models/selfHostedIntegrationRuntime.js b/lib/services/datafactoryManagement/lib/models/selfHostedIntegrationRuntime.js index 8cf307e4d9..b3d67f9fd0 100644 --- a/lib/services/datafactoryManagement/lib/models/selfHostedIntegrationRuntime.js +++ b/lib/services/datafactoryManagement/lib/models/selfHostedIntegrationRuntime.js @@ -20,6 +20,8 @@ const models = require('./index'); class SelfHostedIntegrationRuntime extends models['IntegrationRuntime'] { /** * Create a SelfHostedIntegrationRuntime. + * @member {object} [linkedInfo] + * @member {string} [linkedInfo.authorizationType] Polymorphic Discriminator */ constructor() { super(); @@ -58,6 +60,19 @@ class SelfHostedIntegrationRuntime extends models['IntegrationRuntime'] { type: { name: 'String' } + }, + linkedInfo: { + required: false, + serializedName: 'typeProperties.linkedInfo', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'authorizationType', + clientName: 'authorizationType' + }, + uberParent: 'LinkedIntegrationRuntimeType', + className: 'LinkedIntegrationRuntimeType' + } } } } diff --git a/lib/services/datafactoryManagement/lib/models/selfHostedIntegrationRuntimeStatus.js b/lib/services/datafactoryManagement/lib/models/selfHostedIntegrationRuntimeStatus.js index c23c431044..ce2d5c9a20 100644 --- a/lib/services/datafactoryManagement/lib/models/selfHostedIntegrationRuntimeStatus.js +++ b/lib/services/datafactoryManagement/lib/models/selfHostedIntegrationRuntimeStatus.js @@ -44,6 +44,10 @@ class SelfHostedIntegrationRuntimeStatus extends models['IntegrationRuntimeStatu * update has been turned on. Possible values include: 'On', 'Off' * @member {string} [versionStatus] Status of the integration runtime * version. + * @member {array} [links] The list of linked integration runtimes that are + * created to share with this integration runtime. + * @member {array} [sharedWithFactories] The MSI-s of the data factories to + * which the integration runtime is shared. * @member {string} [pushedVersion] The version that the integration runtime * is going to update to. * @member {string} [latestVersion] The latest version on download center. @@ -224,6 +228,36 @@ class SelfHostedIntegrationRuntimeStatus extends models['IntegrationRuntimeStatu name: 'String' } }, + links: { + required: false, + serializedName: 'typeProperties.links', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'LinkedIntegrationRuntimeElementType', + type: { + name: 'Composite', + className: 'LinkedIntegrationRuntime' + } + } + } + }, + sharedWithFactories: { + required: false, + readOnly: true, + serializedName: 'typeProperties.sharedWithFactories', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, pushedVersion: { required: false, readOnly: true, diff --git a/lib/services/datafactoryManagement/lib/operations/index.d.ts b/lib/services/datafactoryManagement/lib/operations/index.d.ts index c26a638686..948d9d23be 100644 --- a/lib/services/datafactoryManagement/lib/operations/index.d.ts +++ b/lib/services/datafactoryManagement/lib/operations/index.d.ts @@ -1757,6 +1757,82 @@ export interface IntegrationRuntimes { upgrade(resourceGroupName: string, factoryName: string, integrationRuntimeName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + /** + * Remove all linked integration runtimes under specific data factory in a + * self-hosted integration runtime. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} factoryName The factory name. + * + * @param {string} integrationRuntimeName The integration runtime name. + * + * @param {object} linkedIntegrationRuntimeRequest The data factory name for + * the linked integration runtime. + * + * @param {string} linkedIntegrationRuntimeRequest.linkedFactoryName The data + * factory name for linked integration runtime. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + removeLinksWithHttpOperationResponse(resourceGroupName: string, factoryName: string, integrationRuntimeName: string, linkedIntegrationRuntimeRequest: models.LinkedIntegrationRuntimeRequest, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Remove all linked integration runtimes under specific data factory in a + * self-hosted integration runtime. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} factoryName The factory name. + * + * @param {string} integrationRuntimeName The integration runtime name. + * + * @param {object} linkedIntegrationRuntimeRequest The data factory name for + * the linked integration runtime. + * + * @param {string} linkedIntegrationRuntimeRequest.linkedFactoryName The data + * factory name for linked integration runtime. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + removeLinks(resourceGroupName: string, factoryName: string, integrationRuntimeName: string, linkedIntegrationRuntimeRequest: models.LinkedIntegrationRuntimeRequest, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + removeLinks(resourceGroupName: string, factoryName: string, integrationRuntimeName: string, linkedIntegrationRuntimeRequest: models.LinkedIntegrationRuntimeRequest, callback: ServiceCallback): void; + removeLinks(resourceGroupName: string, factoryName: string, integrationRuntimeName: string, linkedIntegrationRuntimeRequest: models.LinkedIntegrationRuntimeRequest, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + /** * Starts a ManagedReserved type integration runtime. * diff --git a/lib/services/datafactoryManagement/lib/operations/integrationRuntimes.js b/lib/services/datafactoryManagement/lib/operations/integrationRuntimes.js index 830d176ec2..b4ed1c3ab9 100644 --- a/lib/services/datafactoryManagement/lib/operations/integrationRuntimes.js +++ b/lib/services/datafactoryManagement/lib/operations/integrationRuntimes.js @@ -2519,6 +2519,205 @@ function _upgrade(resourceGroupName, factoryName, integrationRuntimeName, option }); } +/** + * Remove all linked integration runtimes under specific data factory in a + * self-hosted integration runtime. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} factoryName The factory name. + * + * @param {string} integrationRuntimeName The integration runtime name. + * + * @param {object} linkedIntegrationRuntimeRequest The data factory name for + * the linked integration runtime. + * + * @param {string} linkedIntegrationRuntimeRequest.linkedFactoryName The data + * factory name for linked integration runtime. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _removeLinks(resourceGroupName, factoryName, integrationRuntimeName, linkedIntegrationRuntimeRequest, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length > 90) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MaxLength": 90'); + } + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + if (resourceGroupName.match(/^[-\w\._\(\)]+$/) === null) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._\(\)]+$/'); + } + } + if (factoryName === null || factoryName === undefined || typeof factoryName.valueOf() !== 'string') { + throw new Error('factoryName cannot be null or undefined and it must be of type string.'); + } + if (factoryName !== null && factoryName !== undefined) { + if (factoryName.length > 63) + { + throw new Error('"factoryName" should satisfy the constraint - "MaxLength": 63'); + } + if (factoryName.length < 3) + { + throw new Error('"factoryName" should satisfy the constraint - "MinLength": 3'); + } + if (factoryName.match(/^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$/) === null) + { + throw new Error('"factoryName" should satisfy the constraint - "Pattern": /^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$/'); + } + } + if (integrationRuntimeName === null || integrationRuntimeName === undefined || typeof integrationRuntimeName.valueOf() !== 'string') { + throw new Error('integrationRuntimeName cannot be null or undefined and it must be of type string.'); + } + if (integrationRuntimeName !== null && integrationRuntimeName !== undefined) { + if (integrationRuntimeName.length > 63) + { + throw new Error('"integrationRuntimeName" should satisfy the constraint - "MaxLength": 63'); + } + if (integrationRuntimeName.length < 3) + { + throw new Error('"integrationRuntimeName" should satisfy the constraint - "MinLength": 3'); + } + if (integrationRuntimeName.match(/^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$/) === null) + { + throw new Error('"integrationRuntimeName" should satisfy the constraint - "Pattern": /^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$/'); + } + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (linkedIntegrationRuntimeRequest === null || linkedIntegrationRuntimeRequest === undefined) { + throw new Error('linkedIntegrationRuntimeRequest cannot be null or undefined.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/removeLinks'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{factoryName}', encodeURIComponent(factoryName)); + requestUrl = requestUrl.replace('{integrationRuntimeName}', encodeURIComponent(integrationRuntimeName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'POST'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (linkedIntegrationRuntimeRequest !== null && linkedIntegrationRuntimeRequest !== undefined) { + let requestModelMapper = new client.models['LinkedIntegrationRuntimeRequest']().mapper(); + requestModel = client.serialize(requestModelMapper, linkedIntegrationRuntimeRequest, 'linkedIntegrationRuntimeRequest'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(linkedIntegrationRuntimeRequest, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + /** * Starts a ManagedReserved type integration runtime. * @@ -3038,6 +3237,7 @@ class IntegrationRuntimes { this._syncCredentials = _syncCredentials; this._getMonitoringData = _getMonitoringData; this._upgrade = _upgrade; + this._removeLinks = _removeLinks; this._beginStart = _beginStart; this._beginStop = _beginStop; this._listByFactoryNext = _listByFactoryNext; @@ -4391,6 +4591,109 @@ class IntegrationRuntimes { } } + /** + * Remove all linked integration runtimes under specific data factory in a + * self-hosted integration runtime. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} factoryName The factory name. + * + * @param {string} integrationRuntimeName The integration runtime name. + * + * @param {object} linkedIntegrationRuntimeRequest The data factory name for + * the linked integration runtime. + * + * @param {string} linkedIntegrationRuntimeRequest.linkedFactoryName The data + * factory name for linked integration runtime. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + removeLinksWithHttpOperationResponse(resourceGroupName, factoryName, integrationRuntimeName, linkedIntegrationRuntimeRequest, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._removeLinks(resourceGroupName, factoryName, integrationRuntimeName, linkedIntegrationRuntimeRequest, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Remove all linked integration runtimes under specific data factory in a + * self-hosted integration runtime. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} factoryName The factory name. + * + * @param {string} integrationRuntimeName The integration runtime name. + * + * @param {object} linkedIntegrationRuntimeRequest The data factory name for + * the linked integration runtime. + * + * @param {string} linkedIntegrationRuntimeRequest.linkedFactoryName The data + * factory name for linked integration runtime. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + removeLinks(resourceGroupName, factoryName, integrationRuntimeName, linkedIntegrationRuntimeRequest, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._removeLinks(resourceGroupName, factoryName, integrationRuntimeName, linkedIntegrationRuntimeRequest, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._removeLinks(resourceGroupName, factoryName, integrationRuntimeName, linkedIntegrationRuntimeRequest, options, optionalCallback); + } + } + /** * Starts a ManagedReserved type integration runtime. *