Skip to content
This repository has been archived by the owner on May 5, 2023. It is now read-only.

Commit

Permalink
[AutoPR datafactory/resource-manager] [Datafactory] Add Webhook Activ…
Browse files Browse the repository at this point in the history
…ity to Azure Data Factory (#4523)

* Generated from 30ce8a5d068ff6b375d77746ce44810802593ade

remove timeout as required

* Generated from 0d3bebe04c8ee34399f725a3581ba55cebff214f

combine and update web auth definitions

* Generated from dafb0014942f618644438753c10df85ea504ccfa

revert auth type enum change
  • Loading branch information
AutorestCI authored Jan 10, 2019
1 parent 3868b16 commit a6e5698
Show file tree
Hide file tree
Showing 4 changed files with 327 additions and 0 deletions.
33 changes: 33 additions & 0 deletions lib/services/datafactoryManagement/lib/models/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7053,6 +7053,39 @@ export interface IfConditionActivity extends ControlActivity {
ifFalseActivities?: Activity[];
}

/**
* WebHook activity.
*/
export interface WebHookActivity extends ControlActivity {
/**
* WebHook activity target endpoint and path. Type: string (or Expression with resultType
* string).
*/
url: any;
/**
* Specifies the timeout within which the webhook should be called back. If there is no value
* specified, it takes the value of TimeSpan.FromMinutes(10) which is 10 minutes as default.
* Type: string (or Expression with resultType string), pattern:
* ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])).
*/
timeout?: any;
/**
* Represents the headers that will be sent to the request. For example, to set the language and
* type on a request: "headers" : { "Accept-Language": "en-us", "Content-Type":
* "application/json" }. Type: string (or Expression with resultType string).
*/
headers?: any;
/**
* Represents the payload that will be sent to the endpoint. Required for POST/PUT method, not
* allowed for GET method Type: string (or Expression with resultType string).
*/
body?: any;
/**
* Authentication method used for calling the endpoint.
*/
authentication?: WebActivityAuthentication;
}

/**
* Execute pipeline activity.
*/
Expand Down
2 changes: 2 additions & 0 deletions lib/services/datafactoryManagement/lib/models/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ exports.UntilActivity = require('./untilActivity');
exports.WaitActivity = require('./waitActivity');
exports.ForEachActivity = require('./forEachActivity');
exports.IfConditionActivity = require('./ifConditionActivity');
exports.WebHookActivity = require('./webHookActivity');
exports.ExecutePipelineActivity = require('./executePipelineActivity');
exports.LinkedIntegrationRuntime = require('./linkedIntegrationRuntime');
exports.SelfHostedIntegrationRuntimeNode = require('./selfHostedIntegrationRuntimeNode');
Expand Down Expand Up @@ -643,6 +644,7 @@ exports.discriminators = {
'Activity.Wait' : exports.WaitActivity,
'Activity.ForEach' : exports.ForEachActivity,
'Activity.IfCondition' : exports.IfConditionActivity,
'Activity.WebHook' : exports.WebHookActivity,
'Activity.ExecutePipeline' : exports.ExecutePipelineActivity,
'Activity.Container' : exports.ControlActivity,
'IntegrationRuntimeStatus.SelfHosted' : exports.SelfHostedIntegrationRuntimeStatus,
Expand Down
190 changes: 190 additions & 0 deletions lib/services/datafactoryManagement/lib/models/webHookActivity.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,190 @@
/*
* 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');

/**
* WebHook activity.
*
* @extends models['ControlActivity']
*/
class WebHookActivity extends models['ControlActivity'] {
/**
* Create a WebHookActivity.
* @property {object} url WebHook activity target endpoint and path. Type:
* string (or Expression with resultType string).
* @property {object} [timeout] Specifies the timeout within which the
* webhook should be called back. If there is no value specified, it takes
* the value of TimeSpan.FromMinutes(10) which is 10 minutes as default.
* Type: string (or Expression with resultType string), pattern:
* ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])).
* @property {object} [headers] Represents the headers that will be sent to
* the request. For example, to set the language and type on a request:
* "headers" : { "Accept-Language": "en-us", "Content-Type":
* "application/json" }. Type: string (or Expression with resultType string).
* @property {object} [body] Represents the payload that will be sent to the
* endpoint. Required for POST/PUT method, not allowed for GET method Type:
* string (or Expression with resultType string).
* @property {object} [authentication] Authentication method used for calling
* the endpoint.
* @property {string} [authentication.type] Web activity authentication
* (Basic/ClientCertificate/MSI)
* @property {object} [authentication.pfx] Base64-encoded contents of a PFX
* file.
* @property {string} [authentication.pfx.value] Value of secure string.
* @property {string} [authentication.username] Web activity authentication
* user name for basic authentication.
* @property {object} [authentication.password] Password for the PFX file or
* basic authentication.
* @property {string} [authentication.password.value] Value of secure string.
* @property {string} [authentication.resource] Resource for which Azure Auth
* token will be requested when using MSI Authentication.
*/
constructor() {
super();
}

/**
* Defines the metadata of WebHookActivity
*
* @returns {object} metadata of WebHookActivity
*
*/
mapper() {
return {
required: false,
serializedName: 'WebHook',
type: {
name: 'Composite',
polymorphicDiscriminator: {
serializedName: 'type',
clientName: 'type'
},
uberParent: 'Activity',
className: 'WebHookActivity',
modelProperties: {
name: {
required: true,
serializedName: 'name',
type: {
name: 'String'
}
},
description: {
required: false,
serializedName: 'description',
type: {
name: 'String'
}
},
dependsOn: {
required: false,
serializedName: 'dependsOn',
type: {
name: 'Sequence',
element: {
required: false,
serializedName: 'ActivityDependencyElementType',
type: {
name: 'Composite',
additionalProperties: {
type: {
name: 'Dictionary',
value: {
required: false,
serializedName: 'ObjectElementType',
type: {
name: 'Object'
}
}
}
},
className: 'ActivityDependency'
}
}
}
},
userProperties: {
required: false,
serializedName: 'userProperties',
type: {
name: 'Sequence',
element: {
required: false,
serializedName: 'UserPropertyElementType',
type: {
name: 'Composite',
className: 'UserProperty'
}
}
}
},
type: {
required: true,
serializedName: 'type',
isPolymorphicDiscriminator: true,
type: {
name: 'String'
}
},
method: {
required: true,
isConstant: true,
serializedName: 'typeProperties.method',
defaultValue: 'POST',
type: {
name: 'String'
}
},
url: {
required: true,
serializedName: 'typeProperties.url',
type: {
name: 'Object'
}
},
timeout: {
required: false,
serializedName: 'typeProperties.timeout',
type: {
name: 'Object'
}
},
headers: {
required: false,
serializedName: 'typeProperties.headers',
type: {
name: 'Object'
}
},
body: {
required: false,
serializedName: 'typeProperties.body',
type: {
name: 'Object'
}
},
authentication: {
required: false,
serializedName: 'typeProperties.authentication',
type: {
name: 'Composite',
className: 'WebActivityAuthentication'
}
}
}
}
};
}
}

module.exports = WebHookActivity;
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
/*
* 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';

/**
* WebHook activity authentication properties.
*
*/
class WebHookActivityAuthentication {
/**
* Create a WebHookActivityAuthentication.
* @property {string} type WebHook activity authentication
* (Basic/ClientCertificate/MSI)
* @property {object} [pfx] Base64-encoded contents of a PFX file.
* @property {string} [pfx.value] Value of secure string.
* @property {string} [username] WebHook activity authentication user name
* for basic authentication.
* @property {object} [password] Password for the PFX file or basic
* authentication.
* @property {string} [password.value] Value of secure string.
* @property {string} [resource] Resource for which Azure Auth token will be
* requested when using MSI Authentication.
*/
constructor() {
}

/**
* Defines the metadata of WebHookActivityAuthentication
*
* @returns {object} metadata of WebHookActivityAuthentication
*
*/
mapper() {
return {
required: false,
serializedName: 'WebHookActivityAuthentication',
type: {
name: 'Composite',
className: 'WebHookActivityAuthentication',
modelProperties: {
type: {
required: true,
serializedName: 'type',
type: {
name: 'String'
}
},
pfx: {
required: false,
serializedName: 'pfx',
type: {
name: 'Composite',
polymorphicDiscriminator: {
serializedName: 'type',
clientName: 'type'
},
uberParent: 'SecretBase',
className: 'SecureString'
}
},
username: {
required: false,
serializedName: 'username',
type: {
name: 'String'
}
},
password: {
required: false,
serializedName: 'password',
type: {
name: 'Composite',
polymorphicDiscriminator: {
serializedName: 'type',
clientName: 'type'
},
uberParent: 'SecretBase',
className: 'SecureString'
}
},
resource: {
required: false,
serializedName: 'resource',
type: {
name: 'String'
}
}
}
}
};
}
}

module.exports = WebHookActivityAuthentication;

0 comments on commit a6e5698

Please sign in to comment.