NH : Updated api-version and new SAS api

This commit is contained in:
smithab 2016-08-12 16:29:42 -07:00
Родитель e83832d890
Коммит 62cd12a977
37 изменённых файлов: 3126 добавлений и 2447 удалений

Просмотреть файл

@ -83,7 +83,7 @@ var mappings = {
}, },
'notificationHubs':{ 'notificationHubs':{
'dir': 'notificationHubsManagement/lib', 'dir': 'notificationHubsManagement/lib',
'source': 'arm-notificationhubs/2014-09-01/swagger/notificationhubs.json' 'source': 'arm-notificationhubs/2016-03-01/swagger/notificationhubs.json'
}, },
'powerbiembedded': { 'powerbiembedded': {
'dir': 'powerbiembedded/lib', 'dir': 'powerbiembedded/lib',
@ -140,7 +140,7 @@ var mappings = {
} }
}; };
var defaultAutoRestVersion = '0.17.0-Nightly20160630'; var defaultAutoRestVersion = '0.17.0-Nightly20160811';
var usingAutoRestVersion; var usingAutoRestVersion;
var specRoot = args['spec-root'] || "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master"; var specRoot = args['spec-root'] || "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master";
var project = args['project']; var project = args['project'];

Просмотреть файл

@ -10,23 +10,17 @@
'use strict'; 'use strict';
var models = require('./index');
/** /**
* @class * @class
* Initializes a new instance of the AdmCredential class. * Initializes a new instance of the AdmCredential class.
* @constructor * @constructor
* Description of a NotificationHub AdmCredential. * Description of a NotificationHub AdmCredential.
* @member {object} [properties] Gets or sets properties of NotificationHub *
* AdmCredential. * @member {string} [clientId] The client identifier.
* *
* @member {string} [properties.clientId] Gets or sets the client identifier. * @member {string} [clientSecret] The credential secret access key.
* *
* @member {string} [properties.clientSecret] Gets or sets the credential * @member {string} [authTokenUrl] The URL of the authorization token.
* secret access key.
*
* @member {string} [properties.authTokenUrl] Gets or sets the URL of the
* authorization token.
* *
*/ */
function AdmCredential() { function AdmCredential() {
@ -46,12 +40,25 @@ AdmCredential.prototype.mapper = function () {
name: 'Composite', name: 'Composite',
className: 'AdmCredential', className: 'AdmCredential',
modelProperties: { modelProperties: {
properties: { clientId: {
required: false, required: false,
serializedName: 'properties', serializedName: 'properties.clientId',
type: { type: {
name: 'Composite', name: 'String'
className: 'AdmCredentialProperties' }
},
clientSecret: {
required: false,
serializedName: 'properties.clientSecret',
type: {
name: 'String'
}
},
authTokenUrl: {
required: false,
serializedName: 'properties.authTokenUrl',
type: {
name: 'String'
} }
} }
} }

Просмотреть файл

@ -10,27 +10,19 @@
'use strict'; 'use strict';
var models = require('./index');
/** /**
* @class * @class
* Initializes a new instance of the ApnsCredential class. * Initializes a new instance of the ApnsCredential class.
* @constructor * @constructor
* Description of a NotificationHub ApnsCredential. * Description of a NotificationHub ApnsCredential.
* @member {object} [properties] Gets or sets properties of NotificationHub *
* ApnsCredential. * @member {string} [apnsCertificate] The APNS certificate.
* *
* @member {string} [properties.apnsCertificate] Gets or sets the APNS * @member {string} [certificateKey] The certificate key.
* certificate.
* *
* @member {string} [properties.certificateKey] Gets or sets the certificate * @member {string} [endpoint] The endpoint of this credential.
* key.
* *
* @member {string} [properties.endpoint] Gets or sets the endpoint of this * @member {string} [thumbprint] The Apns certificate Thumbprint
* credential.
*
* @member {string} [properties.thumbprint] Gets or sets the Apns certificate
* Thumbprint
* *
*/ */
function ApnsCredential() { function ApnsCredential() {
@ -50,12 +42,32 @@ ApnsCredential.prototype.mapper = function () {
name: 'Composite', name: 'Composite',
className: 'ApnsCredential', className: 'ApnsCredential',
modelProperties: { modelProperties: {
properties: { apnsCertificate: {
required: false, required: false,
serializedName: 'properties', serializedName: 'properties.apnsCertificate',
type: { type: {
name: 'Composite', name: 'String'
className: 'ApnsCredentialProperties' }
},
certificateKey: {
required: false,
serializedName: 'properties.certificateKey',
type: {
name: 'String'
}
},
endpoint: {
required: false,
serializedName: 'properties.endpoint',
type: {
name: 'String'
}
},
thumbprint: {
required: false,
serializedName: 'properties.thumbprint',
type: {
name: 'String'
} }
} }
} }

Просмотреть файл

@ -10,21 +10,17 @@
'use strict'; 'use strict';
var models = require('./index');
/** /**
* @class * @class
* Initializes a new instance of the BaiduCredential class. * Initializes a new instance of the BaiduCredential class.
* @constructor * @constructor
* Description of a NotificationHub BaiduCredential. * Description of a NotificationHub BaiduCredential.
* @member {object} [properties] Gets or sets properties of NotificationHub *
* BaiduCredential. * @member {string} [baiduApiKey] Baidu Api Key.
* *
* @member {string} [properties.baiduApiKey] Get or Set Baidu Api Key. * @member {string} [baiduEndPoint] Baidu Endpoint.
* *
* @member {string} [properties.baiduEndPoint] Get or Set Baidu Endpoint. * @member {string} [baiduSecretKey] Baidu Secret Key
*
* @member {string} [properties.baiduSecretKey] Get or Set Baidu Secret Key
* *
*/ */
function BaiduCredential() { function BaiduCredential() {
@ -44,12 +40,25 @@ BaiduCredential.prototype.mapper = function () {
name: 'Composite', name: 'Composite',
className: 'BaiduCredential', className: 'BaiduCredential',
modelProperties: { modelProperties: {
properties: { baiduApiKey: {
required: false, required: false,
serializedName: 'properties', serializedName: 'properties.baiduApiKey',
type: { type: {
name: 'Composite', name: 'String'
className: 'BaiduCredentialProperties' }
},
baiduEndPoint: {
required: false,
serializedName: 'properties.baiduEndPoint',
type: {
name: 'String'
}
},
baiduSecretKey: {
required: false,
serializedName: 'properties.baiduSecretKey',
type: {
name: 'String'
} }
} }
} }

Просмотреть файл

@ -10,25 +10,27 @@
'use strict'; 'use strict';
var models = require('./index');
var util = require('util');
/** /**
* @class * @class
* Initializes a new instance of the CheckAvailabilityParameters class. * Initializes a new instance of the CheckAvailabilityParameters class.
* @constructor * @constructor
* Parameters supplied to the Check Name Availability for Namespace and * Parameters supplied to the Check Name Availability for Namespace and
* NotificationHubs. * NotificationHubs.
* @member {string} name Gets or sets name *
* * @member {boolean} [isAvailiable] True if the name is available and can be
* @member {string} [location] Gets or sets location. * used to create new Namespace/NotificationHub. Otherwise false.
*
* @member {object} [tags] Gets or sets tags.
*
* @member {boolean} [isAvailiable] Gets or sets true if the name is available
* and can be used to create new Namespace/NotificationHub. Otherwise false.
* *
*/ */
function CheckAvailabilityParameters() { function CheckAvailabilityParameters() {
CheckAvailabilityParameters['super_'].call(this);
} }
util.inherits(CheckAvailabilityParameters, models['Resource']);
/** /**
* Defines the metadata of CheckAvailabilityParameters * Defines the metadata of CheckAvailabilityParameters
* *
@ -43,15 +45,32 @@ CheckAvailabilityParameters.prototype.mapper = function () {
name: 'Composite', name: 'Composite',
className: 'CheckAvailabilityParameters', className: 'CheckAvailabilityParameters',
modelProperties: { modelProperties: {
id: {
required: false,
readOnly: true,
serializedName: 'id',
type: {
name: 'String'
}
},
name: { name: {
required: true, required: false,
readOnly: true,
serializedName: 'name', serializedName: 'name',
type: { type: {
name: 'String' name: 'String'
} }
}, },
location: { type: {
required: false, required: false,
readOnly: true,
serializedName: 'type',
type: {
name: 'String'
}
},
location: {
required: true,
serializedName: 'location', serializedName: 'location',
type: { type: {
name: 'String' name: 'String'

Просмотреть файл

@ -0,0 +1,104 @@
/*
* 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';
var models = require('./index');
var util = require('util');
/**
* @class
* Initializes a new instance of the CheckAvailabilityResult class.
* @constructor
* Description of a CheckAvailibility resource.
*
* @member {boolean} [isAvailiable] True if the name is available and can be
* used to create new Namespace/NotificationHub. Otherwise false.
*
*/
function CheckAvailabilityResult() {
CheckAvailabilityResult['super_'].call(this);
}
util.inherits(CheckAvailabilityResult, models['Resource']);
/**
* Defines the metadata of CheckAvailabilityResult
*
* @returns {object} metadata of CheckAvailabilityResult
*
*/
CheckAvailabilityResult.prototype.mapper = function () {
return {
required: false,
serializedName: 'CheckAvailabilityResult',
type: {
name: 'Composite',
className: 'CheckAvailabilityResult',
modelProperties: {
id: {
required: false,
readOnly: true,
serializedName: 'id',
type: {
name: 'String'
}
},
name: {
required: false,
readOnly: true,
serializedName: 'name',
type: {
name: 'String'
}
},
type: {
required: false,
readOnly: true,
serializedName: 'type',
type: {
name: 'String'
}
},
location: {
required: true,
serializedName: 'location',
type: {
name: 'String'
}
},
tags: {
required: false,
serializedName: 'tags',
type: {
name: 'Dictionary',
value: {
required: false,
serializedName: 'StringElementType',
type: {
name: 'String'
}
}
}
},
isAvailiable: {
required: false,
serializedName: 'isAvailiable',
type: {
name: 'Boolean'
}
}
}
}
};
};
module.exports = CheckAvailabilityResult;

Просмотреть файл

@ -10,19 +10,15 @@
'use strict'; 'use strict';
var models = require('./index');
/** /**
* @class * @class
* Initializes a new instance of the GcmCredential class. * Initializes a new instance of the GcmCredential class.
* @constructor * @constructor
* Description of a NotificationHub GcmCredential. * Description of a NotificationHub GcmCredential.
* @member {object} [properties] Gets or sets properties of NotificationHub *
* GcmCredential. * @member {string} [gcmEndpoint] The GCM endpoint.
* *
* @member {string} [properties.gcmEndpoint] Gets or sets the GCM endpoint. * @member {string} [googleApiKey] The Google API key.
*
* @member {string} [properties.googleApiKey] Gets or sets the Google API key.
* *
*/ */
function GcmCredential() { function GcmCredential() {
@ -42,12 +38,18 @@ GcmCredential.prototype.mapper = function () {
name: 'Composite', name: 'Composite',
className: 'GcmCredential', className: 'GcmCredential',
modelProperties: { modelProperties: {
properties: { gcmEndpoint: {
required: false, required: false,
serializedName: 'properties', serializedName: 'properties.gcmEndpoint',
type: { type: {
name: 'Composite', name: 'String'
className: 'GcmCredentialProperties' }
},
googleApiKey: {
required: false,
serializedName: 'properties.googleApiKey',
type: {
name: 'String'
} }
} }
} }

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -18,31 +18,24 @@ var msRestAzure = require('ms-rest-azure');
exports.BaseResource = msRestAzure.BaseResource; exports.BaseResource = msRestAzure.BaseResource;
exports.CloudError = msRestAzure.CloudError; exports.CloudError = msRestAzure.CloudError;
exports.Resource = require('./resource');
exports.CheckAvailabilityParameters = require('./checkAvailabilityParameters'); exports.CheckAvailabilityParameters = require('./checkAvailabilityParameters');
exports.CheckAvailabilityResource = require('./checkAvailabilityResource'); exports.CheckAvailabilityResult = require('./checkAvailabilityResult');
exports.NamespaceProperties = require('./namespaceProperties');
exports.NamespaceCreateOrUpdateParameters = require('./namespaceCreateOrUpdateParameters'); exports.NamespaceCreateOrUpdateParameters = require('./namespaceCreateOrUpdateParameters');
exports.NamespaceResource = require('./namespaceResource'); exports.NamespaceResource = require('./namespaceResource');
exports.SharedAccessAuthorizationRuleProperties = require('./sharedAccessAuthorizationRuleProperties');
exports.SharedAccessAuthorizationRuleCreateOrUpdateParameters = require('./sharedAccessAuthorizationRuleCreateOrUpdateParameters'); exports.SharedAccessAuthorizationRuleCreateOrUpdateParameters = require('./sharedAccessAuthorizationRuleCreateOrUpdateParameters');
exports.SharedAccessAuthorizationRuleResource = require('./sharedAccessAuthorizationRuleResource'); exports.SharedAccessAuthorizationRuleResource = require('./sharedAccessAuthorizationRuleResource');
exports.ResourceListKeys = require('./resourceListKeys'); exports.ResourceListKeys = require('./resourceListKeys');
exports.ApnsCredentialProperties = require('./apnsCredentialProperties'); exports.PolicykeyResource = require('./policykeyResource');
exports.ApnsCredential = require('./apnsCredential'); exports.ApnsCredential = require('./apnsCredential');
exports.WnsCredentialProperties = require('./wnsCredentialProperties');
exports.WnsCredential = require('./wnsCredential'); exports.WnsCredential = require('./wnsCredential');
exports.GcmCredentialProperties = require('./gcmCredentialProperties');
exports.GcmCredential = require('./gcmCredential'); exports.GcmCredential = require('./gcmCredential');
exports.MpnsCredentialProperties = require('./mpnsCredentialProperties');
exports.MpnsCredential = require('./mpnsCredential'); exports.MpnsCredential = require('./mpnsCredential');
exports.AdmCredentialProperties = require('./admCredentialProperties');
exports.AdmCredential = require('./admCredential'); exports.AdmCredential = require('./admCredential');
exports.BaiduCredentialProperties = require('./baiduCredentialProperties');
exports.BaiduCredential = require('./baiduCredential'); exports.BaiduCredential = require('./baiduCredential');
exports.NotificationHubProperties = require('./notificationHubProperties');
exports.NotificationHubCreateOrUpdateParameters = require('./notificationHubCreateOrUpdateParameters'); exports.NotificationHubCreateOrUpdateParameters = require('./notificationHubCreateOrUpdateParameters');
exports.NotificationHubResource = require('./notificationHubResource'); exports.NotificationHubResource = require('./notificationHubResource');
exports.Resource = require('./resource'); exports.PnsCredentialsResource = require('./pnsCredentialsResource');
exports.SubResource = require('./subResource'); exports.SubResource = require('./subResource');
exports.NamespaceListResult = require('./namespaceListResult'); exports.NamespaceListResult = require('./namespaceListResult');
exports.SharedAccessAuthorizationRuleListResult = require('./sharedAccessAuthorizationRuleListResult'); exports.SharedAccessAuthorizationRuleListResult = require('./sharedAccessAuthorizationRuleListResult');

Просмотреть файл

@ -10,24 +10,17 @@
'use strict'; 'use strict';
var models = require('./index');
/** /**
* @class * @class
* Initializes a new instance of the MpnsCredential class. * Initializes a new instance of the MpnsCredential class.
* @constructor * @constructor
* Description of a NotificationHub MpnsCredential. * Description of a NotificationHub MpnsCredential.
* @member {object} [properties] Gets or sets properties of NotificationHub *
* MpnsCredential. * @member {string} [mpnsCertificate] The MPNS certificate.
* *
* @member {string} [properties.mpnsCertificate] Gets or sets the MPNS * @member {string} [certificateKey] The certificate key for this credential.
* certificate.
* *
* @member {string} [properties.certificateKey] Gets or sets the certificate * @member {string} [thumbprint] The Mpns certificate Thumbprint
* key for this credential.
*
* @member {string} [properties.thumbprint] Gets or sets the Mpns certificate
* Thumbprint
* *
*/ */
function MpnsCredential() { function MpnsCredential() {
@ -47,12 +40,25 @@ MpnsCredential.prototype.mapper = function () {
name: 'Composite', name: 'Composite',
className: 'MpnsCredential', className: 'MpnsCredential',
modelProperties: { modelProperties: {
properties: { mpnsCertificate: {
required: false, required: false,
serializedName: 'properties', serializedName: 'properties.mpnsCertificate',
type: { type: {
name: 'Composite', name: 'String'
className: 'MpnsCredentialProperties' }
},
certificateKey: {
required: false,
serializedName: 'properties.certificateKey',
type: {
name: 'String'
}
},
thumbprint: {
required: false,
serializedName: 'properties.thumbprint',
type: {
name: 'String'
} }
} }
} }

Просмотреть файл

@ -12,55 +12,54 @@
var models = require('./index'); var models = require('./index');
var util = require('util');
/** /**
* @class * @class
* Initializes a new instance of the NamespaceCreateOrUpdateParameters class. * Initializes a new instance of the NamespaceCreateOrUpdateParameters class.
* @constructor * @constructor
* Parameters supplied to the CreateOrUpdate Namespace operation. * Parameters supplied to the CreateOrUpdate Namespace operation.
* @member {string} location Gets or sets Namespace data center location. *
* @member {string} [namespaceCreateOrUpdateParametersName] The name of the
* namespace.
* *
* @member {object} [tags] Gets or sets Namespace tags. * @member {string} [provisioningState] Provisioning state of the Namespace.
* *
* @member {object} properties Gets or sets properties of the Namespace. * @member {string} [region] Specifies the targeted region in which the
* * namespace should be created. It can be any of the following values:
* @member {string} [properties.name] The name of the namespace.
*
* @member {string} [properties.provisioningState] Gets or sets provisioning
* state of the Namespace.
*
* @member {string} [properties.region] Specifies the targeted region in which
* the namespace should be created. It can be any of the following values:
* Australia EastAustralia SoutheastCentral USEast USEast US 2West USNorth * Australia EastAustralia SoutheastCentral USEast USEast US 2West USNorth
* Central USSouth Central USEast AsiaSoutheast AsiaBrazil SouthJapan * Central USSouth Central USEast AsiaSoutheast AsiaBrazil SouthJapan
* EastJapan WestNorth EuropeWest Europe * EastJapan WestNorth EuropeWest Europe
* *
* @member {string} [properties.status] Status of the namespace. It can be any * @member {string} [status] Status of the namespace. It can be any of these
* of these values:1 = Created/Active2 = Creating3 = Suspended4 = Deleting * values:1 = Created/Active2 = Creating3 = Suspended4 = Deleting
* *
* @member {date} [properties.createdAt] The time the namespace was created. * @member {date} [createdAt] The time the namespace was created.
* *
* @member {string} [properties.serviceBusEndpoint] Endpoint you can use to * @member {string} [serviceBusEndpoint] Endpoint you can use to perform
* perform NotificationHub operations. * NotificationHub operations.
* *
* @member {string} [properties.subscriptionId] The Id of the Azure * @member {string} [subscriptionId] The Id of the Azure subscription
* subscription associated with the namespace. * associated with the namespace.
* *
* @member {string} [properties.scaleUnit] ScaleUnit where the namespace gets * @member {string} [scaleUnit] ScaleUnit where the namespace gets created
* created
* *
* @member {boolean} [properties.enabled] Whether or not the namespace is * @member {boolean} [enabled] Whether or not the namespace is currently
* currently enabled. * enabled.
* *
* @member {boolean} [properties.critical] Whether or not the namespace is set * @member {boolean} [critical] Whether or not the namespace is set as
* as Critical. * Critical.
* *
* @member {string} [properties.namespaceType] Gets or sets the namespace * @member {string} [namespaceType] The namespace type. Possible values
* type. Possible values include: 'Messaging', 'NotificationHub' * include: 'Messaging', 'NotificationHub'
* *
*/ */
function NamespaceCreateOrUpdateParameters() { function NamespaceCreateOrUpdateParameters() {
NamespaceCreateOrUpdateParameters['super_'].call(this);
} }
util.inherits(NamespaceCreateOrUpdateParameters, models['Resource']);
/** /**
* Defines the metadata of NamespaceCreateOrUpdateParameters * Defines the metadata of NamespaceCreateOrUpdateParameters
* *
@ -75,6 +74,30 @@ NamespaceCreateOrUpdateParameters.prototype.mapper = function () {
name: 'Composite', name: 'Composite',
className: 'NamespaceCreateOrUpdateParameters', className: 'NamespaceCreateOrUpdateParameters',
modelProperties: { modelProperties: {
id: {
required: false,
readOnly: true,
serializedName: 'id',
type: {
name: 'String'
}
},
name: {
required: false,
readOnly: true,
serializedName: 'name',
type: {
name: 'String'
}
},
type: {
required: false,
readOnly: true,
serializedName: 'type',
type: {
name: 'String'
}
},
location: { location: {
required: true, required: true,
serializedName: 'location', serializedName: 'location',
@ -96,12 +119,82 @@ NamespaceCreateOrUpdateParameters.prototype.mapper = function () {
} }
} }
}, },
properties: { namespaceCreateOrUpdateParametersName: {
required: true, required: false,
serializedName: 'properties', serializedName: 'properties.name',
type: { type: {
name: 'Composite', name: 'String'
className: 'NamespaceProperties' }
},
provisioningState: {
required: false,
serializedName: 'properties.provisioningState',
type: {
name: 'String'
}
},
region: {
required: false,
serializedName: 'properties.region',
type: {
name: 'String'
}
},
status: {
required: false,
serializedName: 'properties.status',
type: {
name: 'String'
}
},
createdAt: {
required: false,
serializedName: 'properties.createdAt',
type: {
name: 'DateTime'
}
},
serviceBusEndpoint: {
required: false,
serializedName: 'properties.serviceBusEndpoint',
type: {
name: 'String'
}
},
subscriptionId: {
required: false,
serializedName: 'properties.subscriptionId',
type: {
name: 'String'
}
},
scaleUnit: {
required: false,
serializedName: 'properties.scaleUnit',
type: {
name: 'String'
}
},
enabled: {
required: false,
serializedName: 'properties.enabled',
type: {
name: 'Boolean'
}
},
critical: {
required: false,
serializedName: 'properties.critical',
type: {
name: 'Boolean'
}
},
namespaceType: {
required: false,
serializedName: 'properties.namespaceType',
type: {
name: 'Enum',
allowedValues: [ 'Messaging', 'NotificationHub' ]
} }
} }
} }

Просмотреть файл

@ -17,10 +17,10 @@ var util = require('util');
* Initializes a new instance of the NamespaceListResult class. * Initializes a new instance of the NamespaceListResult class.
* @constructor * @constructor
* The response of the List Namespace operation. * The response of the List Namespace operation.
* @member {array} [value] Gets or sets result of the List Namespace operation. * @member {array} [value] Result of the List Namespace operation.
* *
* @member {string} [nextLink] Gets or sets link to the next set of results. * @member {string} [nextLink] Link to the next set of results. Not empty if
* Not empty if Value contains incomplete list of Namespaces * Value contains incomplete list of Namespaces
* *
*/ */
function NamespaceListResult() { function NamespaceListResult() {

Просмотреть файл

@ -12,62 +12,53 @@
var models = require('./index'); var models = require('./index');
var util = require('util');
/** /**
* @class * @class
* Initializes a new instance of the NamespaceResource class. * Initializes a new instance of the NamespaceResource class.
* @constructor * @constructor
* Description of a Namespace resource. * Description of a Namespace resource.
* @member {string} [id] Gets or sets the id of the created Namespace. *
* @member {string} [namespaceResourceName] The name of the namespace.
* *
* @member {string} [location] Gets or sets datacenter location of the * @member {string} [provisioningState] Provisioning state of the Namespace.
* Namespace.
* *
* @member {string} [name] Gets or sets name of the Namespace. * @member {string} [region] Specifies the targeted region in which the
* * namespace should be created. It can be any of the following values:
* @member {string} [type] Gets or sets resource type of the Namespace.
*
* @member {object} [tags] Gets or sets tags of the Namespace.
*
* @member {object} [properties] Gets or sets properties of the Namespace.
*
* @member {string} [properties.name] The name of the namespace.
*
* @member {string} [properties.provisioningState] Gets or sets provisioning
* state of the Namespace.
*
* @member {string} [properties.region] Specifies the targeted region in which
* the namespace should be created. It can be any of the following values:
* Australia EastAustralia SoutheastCentral USEast USEast US 2West USNorth * Australia EastAustralia SoutheastCentral USEast USEast US 2West USNorth
* Central USSouth Central USEast AsiaSoutheast AsiaBrazil SouthJapan * Central USSouth Central USEast AsiaSoutheast AsiaBrazil SouthJapan
* EastJapan WestNorth EuropeWest Europe * EastJapan WestNorth EuropeWest Europe
* *
* @member {string} [properties.status] Status of the namespace. It can be any * @member {string} [status] Status of the namespace. It can be any of these
* of these values:1 = Created/Active2 = Creating3 = Suspended4 = Deleting * values:1 = Created/Active2 = Creating3 = Suspended4 = Deleting
* *
* @member {date} [properties.createdAt] The time the namespace was created. * @member {date} [createdAt] The time the namespace was created.
* *
* @member {string} [properties.serviceBusEndpoint] Endpoint you can use to * @member {string} [serviceBusEndpoint] Endpoint you can use to perform
* perform NotificationHub operations. * NotificationHub operations.
* *
* @member {string} [properties.subscriptionId] The Id of the Azure * @member {string} [subscriptionId] The Id of the Azure subscription
* subscription associated with the namespace. * associated with the namespace.
* *
* @member {string} [properties.scaleUnit] ScaleUnit where the namespace gets * @member {string} [scaleUnit] ScaleUnit where the namespace gets created
* created
* *
* @member {boolean} [properties.enabled] Whether or not the namespace is * @member {boolean} [enabled] Whether or not the namespace is currently
* currently enabled. * enabled.
* *
* @member {boolean} [properties.critical] Whether or not the namespace is set * @member {boolean} [critical] Whether or not the namespace is set as
* as Critical. * Critical.
* *
* @member {string} [properties.namespaceType] Gets or sets the namespace * @member {string} [namespaceType] The namespace type. Possible values
* type. Possible values include: 'Messaging', 'NotificationHub' * include: 'Messaging', 'NotificationHub'
* *
*/ */
function NamespaceResource() { function NamespaceResource() {
NamespaceResource['super_'].call(this);
} }
util.inherits(NamespaceResource, models['Resource']);
/** /**
* Defines the metadata of NamespaceResource * Defines the metadata of NamespaceResource
* *
@ -84,20 +75,15 @@ NamespaceResource.prototype.mapper = function () {
modelProperties: { modelProperties: {
id: { id: {
required: false, required: false,
readOnly: true,
serializedName: 'id', serializedName: 'id',
type: { type: {
name: 'String' name: 'String'
} }
}, },
location: {
required: false,
serializedName: 'location',
type: {
name: 'String'
}
},
name: { name: {
required: false, required: false,
readOnly: true,
serializedName: 'name', serializedName: 'name',
type: { type: {
name: 'String' name: 'String'
@ -105,11 +91,19 @@ NamespaceResource.prototype.mapper = function () {
}, },
type: { type: {
required: false, required: false,
readOnly: true,
serializedName: 'type', serializedName: 'type',
type: { type: {
name: 'String' name: 'String'
} }
}, },
location: {
required: true,
serializedName: 'location',
type: {
name: 'String'
}
},
tags: { tags: {
required: false, required: false,
serializedName: 'tags', serializedName: 'tags',
@ -124,12 +118,82 @@ NamespaceResource.prototype.mapper = function () {
} }
} }
}, },
properties: { namespaceResourceName: {
required: false, required: false,
serializedName: 'properties', serializedName: 'properties.name',
type: { type: {
name: 'Composite', name: 'String'
className: 'NamespaceProperties' }
},
provisioningState: {
required: false,
serializedName: 'properties.provisioningState',
type: {
name: 'String'
}
},
region: {
required: false,
serializedName: 'properties.region',
type: {
name: 'String'
}
},
status: {
required: false,
serializedName: 'properties.status',
type: {
name: 'String'
}
},
createdAt: {
required: false,
serializedName: 'properties.createdAt',
type: {
name: 'DateTime'
}
},
serviceBusEndpoint: {
required: false,
serializedName: 'properties.serviceBusEndpoint',
type: {
name: 'String'
}
},
subscriptionId: {
required: false,
serializedName: 'properties.subscriptionId',
type: {
name: 'String'
}
},
scaleUnit: {
required: false,
serializedName: 'properties.scaleUnit',
type: {
name: 'String'
}
},
enabled: {
required: false,
serializedName: 'properties.enabled',
type: {
name: 'Boolean'
}
},
critical: {
required: false,
serializedName: 'properties.critical',
type: {
name: 'Boolean'
}
},
namespaceType: {
required: false,
serializedName: 'properties.namespaceType',
type: {
name: 'Enum',
allowedValues: [ 'Messaging', 'NotificationHub' ]
} }
} }
} }

Просмотреть файл

@ -12,119 +12,89 @@
var models = require('./index'); var models = require('./index');
var util = require('util');
/** /**
* @class * @class
* Initializes a new instance of the NotificationHubCreateOrUpdateParameters class. * Initializes a new instance of the NotificationHubCreateOrUpdateParameters class.
* @constructor * @constructor
* Parameters supplied to the CreateOrUpdate NotificationHub operation. * Parameters supplied to the CreateOrUpdate NotificationHub operation.
* @member {string} location Gets or sets NotificationHub data center location. *
* @member {string} [notificationHubCreateOrUpdateParametersName] The
* NotificationHub name.
* *
* @member {object} [tags] Gets or sets NotificationHub tags. * @member {string} [registrationTtl] The RegistrationTtl of the created
* NotificationHub
* *
* @member {object} properties Gets or sets properties of the NotificationHub. * @member {array} [authorizationRules] The AuthorizationRules of the created
* NotificationHub
* *
* @member {string} [properties.name] The NotificationHub name. * @member {object} [apnsCredential] The ApnsCredential of the created
* NotificationHub
* *
* @member {string} [properties.registrationTtl] The RegistrationTtl of the * @member {string} [apnsCredential.apnsCertificate] The APNS certificate.
* created NotificationHub
* *
* @member {array} [properties.authorizationRules] The AuthorizationRules of * @member {string} [apnsCredential.certificateKey] The certificate key.
* the created NotificationHub
* *
* @member {object} [properties.apnsCredential] The ApnsCredential of the * @member {string} [apnsCredential.endpoint] The endpoint of this credential.
* created NotificationHub
* *
* @member {object} [properties.apnsCredential.properties] Gets or sets * @member {string} [apnsCredential.thumbprint] The Apns certificate Thumbprint
* properties of NotificationHub ApnsCredential.
* *
* @member {string} [properties.apnsCredential.properties.apnsCertificate] * @member {object} [wnsCredential] The WnsCredential of the created
* Gets or sets the APNS certificate. * NotificationHub
* *
* @member {string} [properties.apnsCredential.properties.certificateKey] Gets * @member {string} [wnsCredential.packageSid] The package ID for this
* or sets the certificate key. * credential.
* *
* @member {string} [properties.apnsCredential.properties.endpoint] Gets or * @member {string} [wnsCredential.secretKey] The secret key.
* sets the endpoint of this credential.
* *
* @member {string} [properties.apnsCredential.properties.thumbprint] Gets or * @member {string} [wnsCredential.windowsLiveEndpoint] The Windows Live
* sets the Apns certificate Thumbprint * endpoint.
* *
* @member {object} [properties.wnsCredential] The WnsCredential of the * @member {object} [gcmCredential] The GcmCredential of the created
* created NotificationHub * NotificationHub
* *
* @member {object} [properties.wnsCredential.properties] Gets or sets * @member {string} [gcmCredential.gcmEndpoint] The GCM endpoint.
* properties of NotificationHub WnsCredential.
* *
* @member {string} [properties.wnsCredential.properties.packageSid] Gets or * @member {string} [gcmCredential.googleApiKey] The Google API key.
* sets the package ID for this credential.
* *
* @member {string} [properties.wnsCredential.properties.secretKey] Gets or * @member {object} [mpnsCredential] The MpnsCredential of the created
* sets the secret key. * NotificationHub
* *
* @member {string} [properties.wnsCredential.properties.windowsLiveEndpoint] * @member {string} [mpnsCredential.mpnsCertificate] The MPNS certificate.
* Gets or sets the Windows Live endpoint.
* *
* @member {object} [properties.gcmCredential] The GcmCredential of the * @member {string} [mpnsCredential.certificateKey] The certificate key for
* created NotificationHub * this credential.
* *
* @member {object} [properties.gcmCredential.properties] Gets or sets * @member {string} [mpnsCredential.thumbprint] The Mpns certificate Thumbprint
* properties of NotificationHub GcmCredential.
* *
* @member {string} [properties.gcmCredential.properties.gcmEndpoint] Gets or * @member {object} [admCredential] The AdmCredential of the created
* sets the GCM endpoint. * NotificationHub
* *
* @member {string} [properties.gcmCredential.properties.googleApiKey] Gets or * @member {string} [admCredential.clientId] The client identifier.
* sets the Google API key.
* *
* @member {object} [properties.mpnsCredential] The MpnsCredential of the * @member {string} [admCredential.clientSecret] The credential secret access
* created NotificationHub * key.
* *
* @member {object} [properties.mpnsCredential.properties] Gets or sets * @member {string} [admCredential.authTokenUrl] The URL of the authorization
* properties of NotificationHub MpnsCredential. * token.
* *
* @member {string} [properties.mpnsCredential.properties.mpnsCertificate] * @member {object} [baiduCredential] The BaiduCredential of the created
* Gets or sets the MPNS certificate. * NotificationHub
* *
* @member {string} [properties.mpnsCredential.properties.certificateKey] Gets * @member {string} [baiduCredential.baiduApiKey] Baidu Api Key.
* or sets the certificate key for this credential.
* *
* @member {string} [properties.mpnsCredential.properties.thumbprint] Gets or * @member {string} [baiduCredential.baiduEndPoint] Baidu Endpoint.
* sets the Mpns certificate Thumbprint
* *
* @member {object} [properties.admCredential] The AdmCredential of the * @member {string} [baiduCredential.baiduSecretKey] Baidu Secret Key
* created NotificationHub
*
* @member {object} [properties.admCredential.properties] Gets or sets
* properties of NotificationHub AdmCredential.
*
* @member {string} [properties.admCredential.properties.clientId] Gets or
* sets the client identifier.
*
* @member {string} [properties.admCredential.properties.clientSecret] Gets or
* sets the credential secret access key.
*
* @member {string} [properties.admCredential.properties.authTokenUrl] Gets or
* sets the URL of the authorization token.
*
* @member {object} [properties.baiduCredential] The BaiduCredential of the
* created NotificationHub
*
* @member {object} [properties.baiduCredential.properties] Gets or sets
* properties of NotificationHub BaiduCredential.
*
* @member {string} [properties.baiduCredential.properties.baiduApiKey] Get or
* Set Baidu Api Key.
*
* @member {string} [properties.baiduCredential.properties.baiduEndPoint] Get
* or Set Baidu Endpoint.
*
* @member {string} [properties.baiduCredential.properties.baiduSecretKey] Get
* or Set Baidu Secret Key
* *
*/ */
function NotificationHubCreateOrUpdateParameters() { function NotificationHubCreateOrUpdateParameters() {
NotificationHubCreateOrUpdateParameters['super_'].call(this);
} }
util.inherits(NotificationHubCreateOrUpdateParameters, models['Resource']);
/** /**
* Defines the metadata of NotificationHubCreateOrUpdateParameters * Defines the metadata of NotificationHubCreateOrUpdateParameters
* *
@ -139,6 +109,30 @@ NotificationHubCreateOrUpdateParameters.prototype.mapper = function () {
name: 'Composite', name: 'Composite',
className: 'NotificationHubCreateOrUpdateParameters', className: 'NotificationHubCreateOrUpdateParameters',
modelProperties: { modelProperties: {
id: {
required: false,
readOnly: true,
serializedName: 'id',
type: {
name: 'String'
}
},
name: {
required: false,
readOnly: true,
serializedName: 'name',
type: {
name: 'String'
}
},
type: {
required: false,
readOnly: true,
serializedName: 'type',
type: {
name: 'String'
}
},
location: { location: {
required: true, required: true,
serializedName: 'location', serializedName: 'location',
@ -160,12 +154,81 @@ NotificationHubCreateOrUpdateParameters.prototype.mapper = function () {
} }
} }
}, },
properties: { notificationHubCreateOrUpdateParametersName: {
required: true, required: false,
serializedName: 'properties', serializedName: 'properties.name',
type: {
name: 'String'
}
},
registrationTtl: {
required: false,
serializedName: 'properties.registrationTtl',
type: {
name: 'String'
}
},
authorizationRules: {
required: false,
serializedName: 'properties.authorizationRules',
type: {
name: 'Sequence',
element: {
required: false,
serializedName: 'SharedAccessAuthorizationRulePropertiesElementType',
type: {
name: 'Composite',
className: 'SharedAccessAuthorizationRuleProperties'
}
}
}
},
apnsCredential: {
required: false,
serializedName: 'properties.apnsCredential',
type: { type: {
name: 'Composite', name: 'Composite',
className: 'NotificationHubProperties' className: 'ApnsCredential'
}
},
wnsCredential: {
required: false,
serializedName: 'properties.wnsCredential',
type: {
name: 'Composite',
className: 'WnsCredential'
}
},
gcmCredential: {
required: false,
serializedName: 'properties.gcmCredential',
type: {
name: 'Composite',
className: 'GcmCredential'
}
},
mpnsCredential: {
required: false,
serializedName: 'properties.mpnsCredential',
type: {
name: 'Composite',
className: 'MpnsCredential'
}
},
admCredential: {
required: false,
serializedName: 'properties.admCredential',
type: {
name: 'Composite',
className: 'AdmCredential'
}
},
baiduCredential: {
required: false,
serializedName: 'properties.baiduCredential',
type: {
name: 'Composite',
className: 'BaiduCredential'
} }
} }
} }

Просмотреть файл

@ -17,11 +17,10 @@ var util = require('util');
* Initializes a new instance of the NotificationHubListResult class. * Initializes a new instance of the NotificationHubListResult class.
* @constructor * @constructor
* The response of the List NotificationHub operation. * The response of the List NotificationHub operation.
* @member {array} [value] Gets or sets result of the List NotificationHub * @member {array} [value] Result of the List NotificationHub operation.
* operation.
* *
* @member {string} [nextLink] Gets or sets link to the next set of results. * @member {string} [nextLink] Link to the next set of results. Not empty if
* Not empty if Value contains incomplete list of NotificationHub * Value contains incomplete list of NotificationHub
* *
*/ */
function NotificationHubListResult() { function NotificationHubListResult() {

Просмотреть файл

@ -12,127 +12,88 @@
var models = require('./index'); var models = require('./index');
var util = require('util');
/** /**
* @class * @class
* Initializes a new instance of the NotificationHubResource class. * Initializes a new instance of the NotificationHubResource class.
* @constructor * @constructor
* Description of a NotificationHub Resource. * Description of a NotificationHub Resource.
* @member {string} [id] Gets or sets the id of the created NotificationHub. *
* @member {string} [notificationHubResourceName] The NotificationHub name.
* *
* @member {string} [location] Gets or sets datacenter location of the * @member {string} [registrationTtl] The RegistrationTtl of the created
* NotificationHub. * NotificationHub
* *
* @member {string} [name] Gets or sets name of the NotificationHub. * @member {array} [authorizationRules] The AuthorizationRules of the created
* NotificationHub
* *
* @member {string} [type] Gets or sets resource type of the NotificationHub. * @member {object} [apnsCredential] The ApnsCredential of the created
* NotificationHub
* *
* @member {object} [tags] Gets or sets tags of the NotificationHub. * @member {string} [apnsCredential.apnsCertificate] The APNS certificate.
* *
* @member {object} [properties] Gets or sets properties of the * @member {string} [apnsCredential.certificateKey] The certificate key.
* NotificationHub.
* *
* @member {string} [properties.name] The NotificationHub name. * @member {string} [apnsCredential.endpoint] The endpoint of this credential.
* *
* @member {string} [properties.registrationTtl] The RegistrationTtl of the * @member {string} [apnsCredential.thumbprint] The Apns certificate Thumbprint
* created NotificationHub
* *
* @member {array} [properties.authorizationRules] The AuthorizationRules of * @member {object} [wnsCredential] The WnsCredential of the created
* the created NotificationHub * NotificationHub
* *
* @member {object} [properties.apnsCredential] The ApnsCredential of the * @member {string} [wnsCredential.packageSid] The package ID for this
* created NotificationHub * credential.
* *
* @member {object} [properties.apnsCredential.properties] Gets or sets * @member {string} [wnsCredential.secretKey] The secret key.
* properties of NotificationHub ApnsCredential.
* *
* @member {string} [properties.apnsCredential.properties.apnsCertificate] * @member {string} [wnsCredential.windowsLiveEndpoint] The Windows Live
* Gets or sets the APNS certificate. * endpoint.
* *
* @member {string} [properties.apnsCredential.properties.certificateKey] Gets * @member {object} [gcmCredential] The GcmCredential of the created
* or sets the certificate key. * NotificationHub
* *
* @member {string} [properties.apnsCredential.properties.endpoint] Gets or * @member {string} [gcmCredential.gcmEndpoint] The GCM endpoint.
* sets the endpoint of this credential.
* *
* @member {string} [properties.apnsCredential.properties.thumbprint] Gets or * @member {string} [gcmCredential.googleApiKey] The Google API key.
* sets the Apns certificate Thumbprint
* *
* @member {object} [properties.wnsCredential] The WnsCredential of the * @member {object} [mpnsCredential] The MpnsCredential of the created
* created NotificationHub * NotificationHub
* *
* @member {object} [properties.wnsCredential.properties] Gets or sets * @member {string} [mpnsCredential.mpnsCertificate] The MPNS certificate.
* properties of NotificationHub WnsCredential.
* *
* @member {string} [properties.wnsCredential.properties.packageSid] Gets or * @member {string} [mpnsCredential.certificateKey] The certificate key for
* sets the package ID for this credential. * this credential.
* *
* @member {string} [properties.wnsCredential.properties.secretKey] Gets or * @member {string} [mpnsCredential.thumbprint] The Mpns certificate Thumbprint
* sets the secret key.
* *
* @member {string} [properties.wnsCredential.properties.windowsLiveEndpoint] * @member {object} [admCredential] The AdmCredential of the created
* Gets or sets the Windows Live endpoint. * NotificationHub
* *
* @member {object} [properties.gcmCredential] The GcmCredential of the * @member {string} [admCredential.clientId] The client identifier.
* created NotificationHub
* *
* @member {object} [properties.gcmCredential.properties] Gets or sets * @member {string} [admCredential.clientSecret] The credential secret access
* properties of NotificationHub GcmCredential. * key.
* *
* @member {string} [properties.gcmCredential.properties.gcmEndpoint] Gets or * @member {string} [admCredential.authTokenUrl] The URL of the authorization
* sets the GCM endpoint. * token.
* *
* @member {string} [properties.gcmCredential.properties.googleApiKey] Gets or * @member {object} [baiduCredential] The BaiduCredential of the created
* sets the Google API key. * NotificationHub
* *
* @member {object} [properties.mpnsCredential] The MpnsCredential of the * @member {string} [baiduCredential.baiduApiKey] Baidu Api Key.
* created NotificationHub
* *
* @member {object} [properties.mpnsCredential.properties] Gets or sets * @member {string} [baiduCredential.baiduEndPoint] Baidu Endpoint.
* properties of NotificationHub MpnsCredential.
* *
* @member {string} [properties.mpnsCredential.properties.mpnsCertificate] * @member {string} [baiduCredential.baiduSecretKey] Baidu Secret Key
* Gets or sets the MPNS certificate.
*
* @member {string} [properties.mpnsCredential.properties.certificateKey] Gets
* or sets the certificate key for this credential.
*
* @member {string} [properties.mpnsCredential.properties.thumbprint] Gets or
* sets the Mpns certificate Thumbprint
*
* @member {object} [properties.admCredential] The AdmCredential of the
* created NotificationHub
*
* @member {object} [properties.admCredential.properties] Gets or sets
* properties of NotificationHub AdmCredential.
*
* @member {string} [properties.admCredential.properties.clientId] Gets or
* sets the client identifier.
*
* @member {string} [properties.admCredential.properties.clientSecret] Gets or
* sets the credential secret access key.
*
* @member {string} [properties.admCredential.properties.authTokenUrl] Gets or
* sets the URL of the authorization token.
*
* @member {object} [properties.baiduCredential] The BaiduCredential of the
* created NotificationHub
*
* @member {object} [properties.baiduCredential.properties] Gets or sets
* properties of NotificationHub BaiduCredential.
*
* @member {string} [properties.baiduCredential.properties.baiduApiKey] Get or
* Set Baidu Api Key.
*
* @member {string} [properties.baiduCredential.properties.baiduEndPoint] Get
* or Set Baidu Endpoint.
*
* @member {string} [properties.baiduCredential.properties.baiduSecretKey] Get
* or Set Baidu Secret Key
* *
*/ */
function NotificationHubResource() { function NotificationHubResource() {
NotificationHubResource['super_'].call(this);
} }
util.inherits(NotificationHubResource, models['Resource']);
/** /**
* Defines the metadata of NotificationHubResource * Defines the metadata of NotificationHubResource
* *
@ -149,20 +110,15 @@ NotificationHubResource.prototype.mapper = function () {
modelProperties: { modelProperties: {
id: { id: {
required: false, required: false,
readOnly: true,
serializedName: 'id', serializedName: 'id',
type: { type: {
name: 'String' name: 'String'
} }
}, },
location: {
required: false,
serializedName: 'location',
type: {
name: 'String'
}
},
name: { name: {
required: false, required: false,
readOnly: true,
serializedName: 'name', serializedName: 'name',
type: { type: {
name: 'String' name: 'String'
@ -170,11 +126,19 @@ NotificationHubResource.prototype.mapper = function () {
}, },
type: { type: {
required: false, required: false,
readOnly: true,
serializedName: 'type', serializedName: 'type',
type: { type: {
name: 'String' name: 'String'
} }
}, },
location: {
required: true,
serializedName: 'location',
type: {
name: 'String'
}
},
tags: { tags: {
required: false, required: false,
serializedName: 'tags', serializedName: 'tags',
@ -189,12 +153,81 @@ NotificationHubResource.prototype.mapper = function () {
} }
} }
}, },
properties: { notificationHubResourceName: {
required: false, required: false,
serializedName: 'properties', serializedName: 'properties.name',
type: {
name: 'String'
}
},
registrationTtl: {
required: false,
serializedName: 'properties.registrationTtl',
type: {
name: 'String'
}
},
authorizationRules: {
required: false,
serializedName: 'properties.authorizationRules',
type: {
name: 'Sequence',
element: {
required: false,
serializedName: 'SharedAccessAuthorizationRulePropertiesElementType',
type: {
name: 'Composite',
className: 'SharedAccessAuthorizationRuleProperties'
}
}
}
},
apnsCredential: {
required: false,
serializedName: 'properties.apnsCredential',
type: { type: {
name: 'Composite', name: 'Composite',
className: 'NotificationHubProperties' className: 'ApnsCredential'
}
},
wnsCredential: {
required: false,
serializedName: 'properties.wnsCredential',
type: {
name: 'Composite',
className: 'WnsCredential'
}
},
gcmCredential: {
required: false,
serializedName: 'properties.gcmCredential',
type: {
name: 'Composite',
className: 'GcmCredential'
}
},
mpnsCredential: {
required: false,
serializedName: 'properties.mpnsCredential',
type: {
name: 'Composite',
className: 'MpnsCredential'
}
},
admCredential: {
required: false,
serializedName: 'properties.admCredential',
type: {
name: 'Composite',
className: 'AdmCredential'
}
},
baiduCredential: {
required: false,
serializedName: 'properties.baiduCredential',
type: {
name: 'Composite',
className: 'BaiduCredential'
} }
} }
} }

Просмотреть файл

@ -0,0 +1,201 @@
/*
* 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';
var models = require('./index');
var util = require('util');
/**
* @class
* Initializes a new instance of the PnsCredentialsResource class.
* @constructor
* Description of a NotificationHub PNS Credentials.
*
* @member {object} [apnsCredential] The ApnsCredential of the created
* NotificationHub
*
* @member {string} [apnsCredential.apnsCertificate] The APNS certificate.
*
* @member {string} [apnsCredential.certificateKey] The certificate key.
*
* @member {string} [apnsCredential.endpoint] The endpoint of this credential.
*
* @member {string} [apnsCredential.thumbprint] The Apns certificate Thumbprint
*
* @member {object} [wnsCredential] The WnsCredential of the created
* NotificationHub
*
* @member {string} [wnsCredential.packageSid] The package ID for this
* credential.
*
* @member {string} [wnsCredential.secretKey] The secret key.
*
* @member {string} [wnsCredential.windowsLiveEndpoint] The Windows Live
* endpoint.
*
* @member {object} [gcmCredential] The GcmCredential of the created
* NotificationHub
*
* @member {string} [gcmCredential.gcmEndpoint] The GCM endpoint.
*
* @member {string} [gcmCredential.googleApiKey] The Google API key.
*
* @member {object} [mpnsCredential] The MpnsCredential of the created
* NotificationHub
*
* @member {string} [mpnsCredential.mpnsCertificate] The MPNS certificate.
*
* @member {string} [mpnsCredential.certificateKey] The certificate key for
* this credential.
*
* @member {string} [mpnsCredential.thumbprint] The Mpns certificate Thumbprint
*
* @member {object} [admCredential] The AdmCredential of the created
* NotificationHub
*
* @member {string} [admCredential.clientId] The client identifier.
*
* @member {string} [admCredential.clientSecret] The credential secret access
* key.
*
* @member {string} [admCredential.authTokenUrl] The URL of the authorization
* token.
*
* @member {object} [baiduCredential] The BaiduCredential of the created
* NotificationHub
*
* @member {string} [baiduCredential.baiduApiKey] Baidu Api Key.
*
* @member {string} [baiduCredential.baiduEndPoint] Baidu Endpoint.
*
* @member {string} [baiduCredential.baiduSecretKey] Baidu Secret Key
*
*/
function PnsCredentialsResource() {
PnsCredentialsResource['super_'].call(this);
}
util.inherits(PnsCredentialsResource, models['Resource']);
/**
* Defines the metadata of PnsCredentialsResource
*
* @returns {object} metadata of PnsCredentialsResource
*
*/
PnsCredentialsResource.prototype.mapper = function () {
return {
required: false,
serializedName: 'PnsCredentialsResource',
type: {
name: 'Composite',
className: 'PnsCredentialsResource',
modelProperties: {
id: {
required: false,
readOnly: true,
serializedName: 'id',
type: {
name: 'String'
}
},
name: {
required: false,
readOnly: true,
serializedName: 'name',
type: {
name: 'String'
}
},
type: {
required: false,
readOnly: true,
serializedName: 'type',
type: {
name: 'String'
}
},
location: {
required: true,
serializedName: 'location',
type: {
name: 'String'
}
},
tags: {
required: false,
serializedName: 'tags',
type: {
name: 'Dictionary',
value: {
required: false,
serializedName: 'StringElementType',
type: {
name: 'String'
}
}
}
},
apnsCredential: {
required: false,
serializedName: 'properties.apnsCredential',
type: {
name: 'Composite',
className: 'ApnsCredential'
}
},
wnsCredential: {
required: false,
serializedName: 'properties.wnsCredential',
type: {
name: 'Composite',
className: 'WnsCredential'
}
},
gcmCredential: {
required: false,
serializedName: 'properties.gcmCredential',
type: {
name: 'Composite',
className: 'GcmCredential'
}
},
mpnsCredential: {
required: false,
serializedName: 'properties.mpnsCredential',
type: {
name: 'Composite',
className: 'MpnsCredential'
}
},
admCredential: {
required: false,
serializedName: 'properties.admCredential',
type: {
name: 'Composite',
className: 'AdmCredential'
}
},
baiduCredential: {
required: false,
serializedName: 'properties.baiduCredential',
type: {
name: 'Composite',
className: 'BaiduCredential'
}
}
}
}
};
};
module.exports = PnsCredentialsResource;

Просмотреть файл

@ -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';
/**
* @class
* Initializes a new instance of the PolicykeyResource class.
* @constructor
* Namespace/NotificationHub Regenerate Keys
*
* @member {string} [policyKey] Name of the key that has to be regenerated for
* the Namespace/Notification Hub Authorization Rule. The value can be
* Primary Key/Secondary Key.
*
*/
function PolicykeyResource() {
}
/**
* Defines the metadata of PolicykeyResource
*
* @returns {object} metadata of PolicykeyResource
*
*/
PolicykeyResource.prototype.mapper = function () {
return {
required: false,
serializedName: 'PolicykeyResource',
type: {
name: 'Composite',
className: 'PolicykeyResource',
modelProperties: {
policyKey: {
required: false,
serializedName: 'policyKey',
type: {
name: 'String'
}
}
}
}
};
};
module.exports = PolicykeyResource;

Просмотреть файл

@ -15,11 +15,19 @@
* Initializes a new instance of the ResourceListKeys class. * Initializes a new instance of the ResourceListKeys class.
* @constructor * @constructor
* Namespace/NotificationHub Connection String * Namespace/NotificationHub Connection String
* @member {string} [primaryConnectionString] Gets or sets the *
* primaryConnectionString of the created Namespace AuthorizationRule. * @member {string} [primaryConnectionString] PrimaryConnectionString of the
* AuthorizationRule.
* *
* @member {string} [secondaryConnectionString] Gets or sets the * @member {string} [secondaryConnectionString] SecondaryConnectionString of
* secondaryConnectionString of the created Namespace AuthorizationRule * the created AuthorizationRule
*
* @member {string} [primaryKey] PrimaryKey of the created AuthorizationRule.
*
* @member {string} [secondaryKey] SecondaryKey of the created
* AuthorizationRule
*
* @member {string} [keyName] KeyName of the created AuthorizationRule
* *
*/ */
function ResourceListKeys() { function ResourceListKeys() {
@ -52,6 +60,27 @@ ResourceListKeys.prototype.mapper = function () {
type: { type: {
name: 'String' name: 'String'
} }
},
primaryKey: {
required: false,
serializedName: 'primaryKey',
type: {
name: 'String'
}
},
secondaryKey: {
required: false,
serializedName: 'secondaryKey',
type: {
name: 'String'
}
},
keyName: {
required: false,
serializedName: 'keyName',
type: {
name: 'String'
}
} }
} }
} }

Просмотреть файл

@ -12,43 +12,23 @@
var models = require('./index'); var models = require('./index');
var util = require('util');
/** /**
* @class * @class
* Initializes a new instance of the SharedAccessAuthorizationRuleCreateOrUpdateParameters class. * Initializes a new instance of the SharedAccessAuthorizationRuleCreateOrUpdateParameters class.
* @constructor * @constructor
* Parameters supplied to the CreateOrUpdate Namespace AuthorizationRules. * Parameters supplied to the CreateOrUpdate Namespace AuthorizationRules.
* @member {string} [location] Gets or sets Namespace data center location. *
* * @member {array} [rights] The rights associated with the rule.
* @member {string} [name] Gets or sets Name of the Namespace
* AuthorizationRule.
*
* @member {object} properties Gets or sets properties of the Namespace
* AuthorizationRules.
*
* @member {string} [properties.primaryKey] The primary key that was used.
*
* @member {string} [properties.secondaryKey] The secondary key that was used.
*
* @member {string} [properties.keyName] The name of the key that was used.
*
* @member {string} [properties.claimType] The type of the claim.
*
* @member {string} [properties.claimValue] The value of the claim.
*
* @member {array} [properties.rights] The rights associated with the rule.
*
* @member {date} [properties.createdTime] The time at which the authorization
* rule was created.
*
* @member {date} [properties.modifiedTime] The most recent time the rule was
* updated.
*
* @member {number} [properties.revision] The revision number for the rule.
* *
*/ */
function SharedAccessAuthorizationRuleCreateOrUpdateParameters() { function SharedAccessAuthorizationRuleCreateOrUpdateParameters() {
SharedAccessAuthorizationRuleCreateOrUpdateParameters['super_'].call(this);
} }
util.inherits(SharedAccessAuthorizationRuleCreateOrUpdateParameters, models['Resource']);
/** /**
* Defines the metadata of SharedAccessAuthorizationRuleCreateOrUpdateParameters * Defines the metadata of SharedAccessAuthorizationRuleCreateOrUpdateParameters
* *
@ -63,26 +43,64 @@ SharedAccessAuthorizationRuleCreateOrUpdateParameters.prototype.mapper = functio
name: 'Composite', name: 'Composite',
className: 'SharedAccessAuthorizationRuleCreateOrUpdateParameters', className: 'SharedAccessAuthorizationRuleCreateOrUpdateParameters',
modelProperties: { modelProperties: {
location: { id: {
required: false, required: false,
serializedName: 'location', readOnly: true,
serializedName: 'id',
type: { type: {
name: 'String' name: 'String'
} }
}, },
name: { name: {
required: false, required: false,
readOnly: true,
serializedName: 'name', serializedName: 'name',
type: { type: {
name: 'String' name: 'String'
} }
}, },
properties: { type: {
required: true, required: false,
serializedName: 'properties', readOnly: true,
serializedName: 'type',
type: { type: {
name: 'Composite', name: 'String'
className: 'SharedAccessAuthorizationRuleProperties' }
},
location: {
required: true,
serializedName: 'location',
type: {
name: 'String'
}
},
tags: {
required: false,
serializedName: 'tags',
type: {
name: 'Dictionary',
value: {
required: false,
serializedName: 'StringElementType',
type: {
name: 'String'
}
}
}
},
rights: {
required: false,
serializedName: 'properties.rights',
type: {
name: 'Sequence',
element: {
required: false,
serializedName: 'AccessRightsElementType',
type: {
name: 'Enum',
allowedValues: [ 'Manage', 'Send', 'Listen' ]
}
}
} }
} }
} }

Просмотреть файл

@ -17,11 +17,10 @@ var util = require('util');
* Initializes a new instance of the SharedAccessAuthorizationRuleListResult class. * Initializes a new instance of the SharedAccessAuthorizationRuleListResult class.
* @constructor * @constructor
* The response of the List Namespace operation. * The response of the List Namespace operation.
* @member {array} [value] Gets or sets result of the List AuthorizationRules * @member {array} [value] Result of the List AuthorizationRules operation.
* operation.
* *
* @member {string} [nextLink] Gets or sets link to the next set of results. * @member {string} [nextLink] Link to the next set of results. Not empty if
* Not empty if Value contains incomplete list of AuthorizationRules * Value contains incomplete list of AuthorizationRules
* *
*/ */
function SharedAccessAuthorizationRuleListResult() { function SharedAccessAuthorizationRuleListResult() {

Просмотреть файл

@ -12,52 +12,23 @@
var models = require('./index'); var models = require('./index');
var util = require('util');
/** /**
* @class * @class
* Initializes a new instance of the SharedAccessAuthorizationRuleResource class. * Initializes a new instance of the SharedAccessAuthorizationRuleResource class.
* @constructor * @constructor
* Description of a Namespace AuthorizationRules. * Description of a Namespace AuthorizationRules.
* @member {string} [id] Gets or sets the id of the created Namespace *
* AuthorizationRules. * @member {array} [rights] The rights associated with the rule.
*
* @member {string} [location] Gets or sets datacenter location of the
* Namespace AuthorizationRules.
*
* @member {string} [name] Gets or sets name of the Namespace
* AuthorizationRules.
*
* @member {string} [type] Gets or sets resource type of the Namespace
* AuthorizationRules.
*
* @member {object} [tags] Gets or sets tags of the Namespace
* AuthorizationRules.
*
* @member {object} [properties] Gets or sets properties of the Namespace.
*
* @member {string} [properties.primaryKey] The primary key that was used.
*
* @member {string} [properties.secondaryKey] The secondary key that was used.
*
* @member {string} [properties.keyName] The name of the key that was used.
*
* @member {string} [properties.claimType] The type of the claim.
*
* @member {string} [properties.claimValue] The value of the claim.
*
* @member {array} [properties.rights] The rights associated with the rule.
*
* @member {date} [properties.createdTime] The time at which the authorization
* rule was created.
*
* @member {date} [properties.modifiedTime] The most recent time the rule was
* updated.
*
* @member {number} [properties.revision] The revision number for the rule.
* *
*/ */
function SharedAccessAuthorizationRuleResource() { function SharedAccessAuthorizationRuleResource() {
SharedAccessAuthorizationRuleResource['super_'].call(this);
} }
util.inherits(SharedAccessAuthorizationRuleResource, models['Resource']);
/** /**
* Defines the metadata of SharedAccessAuthorizationRuleResource * Defines the metadata of SharedAccessAuthorizationRuleResource
* *
@ -74,20 +45,15 @@ SharedAccessAuthorizationRuleResource.prototype.mapper = function () {
modelProperties: { modelProperties: {
id: { id: {
required: false, required: false,
readOnly: true,
serializedName: 'id', serializedName: 'id',
type: { type: {
name: 'String' name: 'String'
} }
}, },
location: {
required: false,
serializedName: 'location',
type: {
name: 'String'
}
},
name: { name: {
required: false, required: false,
readOnly: true,
serializedName: 'name', serializedName: 'name',
type: { type: {
name: 'String' name: 'String'
@ -95,11 +61,19 @@ SharedAccessAuthorizationRuleResource.prototype.mapper = function () {
}, },
type: { type: {
required: false, required: false,
readOnly: true,
serializedName: 'type', serializedName: 'type',
type: { type: {
name: 'String' name: 'String'
} }
}, },
location: {
required: true,
serializedName: 'location',
type: {
name: 'String'
}
},
tags: { tags: {
required: false, required: false,
serializedName: 'tags', serializedName: 'tags',
@ -114,12 +88,19 @@ SharedAccessAuthorizationRuleResource.prototype.mapper = function () {
} }
} }
}, },
properties: { rights: {
required: false, required: false,
serializedName: 'properties', serializedName: 'properties.rights',
type: { type: {
name: 'Composite', name: 'Sequence',
className: 'SharedAccessAuthorizationRuleProperties' element: {
required: false,
serializedName: 'AccessRightsElementType',
type: {
name: 'Enum',
allowedValues: [ 'Manage', 'Send', 'Listen' ]
}
}
} }
} }
} }

Просмотреть файл

@ -10,23 +10,17 @@
'use strict'; 'use strict';
var models = require('./index');
/** /**
* @class * @class
* Initializes a new instance of the WnsCredential class. * Initializes a new instance of the WnsCredential class.
* @constructor * @constructor
* Description of a NotificationHub WnsCredential. * Description of a NotificationHub WnsCredential.
* @member {object} [properties] Gets or sets properties of NotificationHub *
* WnsCredential. * @member {string} [packageSid] The package ID for this credential.
* *
* @member {string} [properties.packageSid] Gets or sets the package ID for * @member {string} [secretKey] The secret key.
* this credential.
* *
* @member {string} [properties.secretKey] Gets or sets the secret key. * @member {string} [windowsLiveEndpoint] The Windows Live endpoint.
*
* @member {string} [properties.windowsLiveEndpoint] Gets or sets the Windows
* Live endpoint.
* *
*/ */
function WnsCredential() { function WnsCredential() {
@ -46,12 +40,25 @@ WnsCredential.prototype.mapper = function () {
name: 'Composite', name: 'Composite',
className: 'WnsCredential', className: 'WnsCredential',
modelProperties: { modelProperties: {
properties: { packageSid: {
required: false, required: false,
serializedName: 'properties', serializedName: 'properties.packageSid',
type: { type: {
name: 'Composite', name: 'String'
className: 'WnsCredentialProperties' }
},
secretKey: {
required: false,
serializedName: 'properties.secretKey',
type: {
name: 'String'
}
},
windowsLiveEndpoint: {
required: false,
serializedName: 'properties.windowsLiveEndpoint',
type: {
name: 'String'
} }
} }
} }

Просмотреть файл

@ -17,7 +17,7 @@ declare class NotificationHubsManagementClient {
* Initializes a new instance of the NotificationHubsManagementClient class. * Initializes a new instance of the NotificationHubsManagementClient class.
* @constructor * @constructor
* *
* @param {credentials} credentials - Gets Azure subscription credentials. * @param {credentials} credentials - Credentials needed for the client to connect to Azure.
* *
* @param {string} subscriptionId - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. * @param {string} subscriptionId - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
* *

Просмотреть файл

@ -27,7 +27,7 @@ var operations = require('./operations');
* Initializes a new instance of the NotificationHubsManagementClient class. * Initializes a new instance of the NotificationHubsManagementClient class.
* @constructor * @constructor
* *
* @param {credentials} credentials - Gets Azure subscription credentials. * @param {credentials} credentials - Credentials needed for the client to connect to Azure.
* *
* @param {string} subscriptionId - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. * @param {string} subscriptionId - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
* *
@ -52,7 +52,7 @@ var operations = require('./operations');
* *
*/ */
function NotificationHubsManagementClient(credentials, subscriptionId, baseUri, options) { function NotificationHubsManagementClient(credentials, subscriptionId, baseUri, options) {
this.apiVersion = '2014-09-01'; this.apiVersion = '2016-03-01';
this.acceptLanguage = 'en-US'; this.acceptLanguage = 'en-US';
this.longRunningOperationRetryTimeout = 30; this.longRunningOperationRetryTimeout = 30;
this.generateClientRequestId = true; this.generateClientRequestId = true;

Просмотреть файл

@ -21,21 +21,18 @@ import * as models from '../models';
export interface Namespaces { export interface Namespaces {
/** /**
* Checks the availability of the given service namespace across all Windows * Checks the availability of the given service namespace across all Azure
* Azure subscriptions. This is useful because the domain name is created * subscriptions. This is useful because the domain name is created based on
* based on the service namespace name. * the service namespace name.
* *
* @param {object} parameters The namespace name. * @param {object} parameters The namespace name.
* *
* @param {string} [parameters.name] Gets or sets name * @param {boolean} [parameters.isAvailiable] True if the name is available
* and can be used to create new Namespace/NotificationHub. Otherwise false.
* *
* @param {string} [parameters.location] Gets or sets location. * @param {string} parameters.location Resource location
* *
* @param {object} [parameters.tags] Gets or sets tags. * @param {object} [parameters.tags] Resource tags
*
* @param {boolean} [parameters.isAvailiable] Gets or sets true if the name is
* available and can be used to create new Namespace/NotificationHub.
* Otherwise false.
* *
* @param {object} [options] Optional Parameters. * @param {object} [options] Optional Parameters.
* *
@ -45,8 +42,8 @@ export interface Namespaces {
* @param {ServiceCallback} [callback] callback function; see ServiceCallback * @param {ServiceCallback} [callback] callback function; see ServiceCallback
* doc in ms-rest index.d.ts for details * doc in ms-rest index.d.ts for details
*/ */
checkAvailability(parameters: models.CheckAvailabilityParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.CheckAvailabilityResource>): void; checkAvailability(parameters: models.CheckAvailabilityParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.CheckAvailabilityResult>): void;
checkAvailability(parameters: models.CheckAvailabilityParameters, callback: ServiceCallback<models.CheckAvailabilityResource>): void; checkAvailability(parameters: models.CheckAvailabilityParameters, callback: ServiceCallback<models.CheckAvailabilityResult>): void;
/** /**
* Creates/Updates a service namespace. Once created, this namespace's * Creates/Updates a service namespace. Once created, this namespace's
@ -59,49 +56,44 @@ export interface Namespaces {
* @param {object} parameters Parameters supplied to create a Namespace * @param {object} parameters Parameters supplied to create a Namespace
* Resource. * Resource.
* *
* @param {string} [parameters.location] Gets or sets Namespace data center * @param {string} [parameters.namespaceCreateOrUpdateParametersName] The name
* location. * of the namespace.
* *
* @param {object} [parameters.tags] Gets or sets Namespace tags. * @param {string} [parameters.provisioningState] Provisioning state of the
*
* @param {object} [parameters.properties] Gets or sets properties of the
* Namespace. * Namespace.
* *
* @param {string} [parameters.properties.name] The name of the namespace. * @param {string} [parameters.region] Specifies the targeted region in which
* the namespace should be created. It can be any of the following values:
* Australia EastAustralia SoutheastCentral USEast USEast US 2West USNorth
* Central USSouth Central USEast AsiaSoutheast AsiaBrazil SouthJapan
* EastJapan WestNorth EuropeWest Europe
* *
* @param {string} [parameters.properties.provisioningState] Gets or sets * @param {string} [parameters.status] Status of the namespace. It can be any
* provisioning state of the Namespace. * of these values:1 = Created/Active2 = Creating3 = Suspended4 = Deleting
* *
* @param {string} [parameters.properties.region] Specifies the targeted * @param {date} [parameters.createdAt] The time the namespace was created.
* region in which the namespace should be created. It can be any of the
* following values: Australia EastAustralia SoutheastCentral USEast USEast
* US 2West USNorth Central USSouth Central USEast AsiaSoutheast AsiaBrazil
* SouthJapan EastJapan WestNorth EuropeWest Europe
* *
* @param {string} [parameters.properties.status] Status of the namespace. It * @param {string} [parameters.serviceBusEndpoint] Endpoint you can use to
* can be any of these values:1 = Created/Active2 = Creating3 = Suspended4 = * perform NotificationHub operations.
* Deleting
* *
* @param {date} [parameters.properties.createdAt] The time the namespace was * @param {string} [parameters.subscriptionId] The Id of the Azure
* created.
*
* @param {string} [parameters.properties.serviceBusEndpoint] Endpoint you can
* use to perform NotificationHub operations.
*
* @param {string} [parameters.properties.subscriptionId] The Id of the Azure
* subscription associated with the namespace. * subscription associated with the namespace.
* *
* @param {string} [parameters.properties.scaleUnit] ScaleUnit where the * @param {string} [parameters.scaleUnit] ScaleUnit where the namespace gets
* namespace gets created * created
* *
* @param {boolean} [parameters.properties.enabled] Whether or not the * @param {boolean} [parameters.enabled] Whether or not the namespace is
* namespace is currently enabled. * currently enabled.
* *
* @param {boolean} [parameters.properties.critical] Whether or not the * @param {boolean} [parameters.critical] Whether or not the namespace is set
* namespace is set as Critical. * as Critical.
* *
* @param {string} [parameters.properties.namespaceType] Gets or sets the * @param {string} [parameters.namespaceType] The namespace type. Possible
* namespace type. Possible values include: 'Messaging', 'NotificationHub' * values include: 'Messaging', 'NotificationHub'
*
* @param {string} parameters.location Resource location
*
* @param {object} [parameters.tags] Resource tags
* *
* @param {object} [options] Optional Parameters. * @param {object} [options] Optional Parameters.
* *
@ -181,39 +173,11 @@ export interface Namespaces {
* *
* @param {object} parameters The shared access authorization rule. * @param {object} parameters The shared access authorization rule.
* *
* @param {string} [parameters.location] Gets or sets Namespace data center * @param {array} [parameters.rights] The rights associated with the rule.
* location.
* *
* @param {string} [parameters.name] Gets or sets Name of the Namespace * @param {string} parameters.location Resource location
* AuthorizationRule.
* *
* @param {object} [parameters.properties] Gets or sets properties of the * @param {object} [parameters.tags] Resource tags
* Namespace AuthorizationRules.
*
* @param {string} [parameters.properties.primaryKey] The primary key that was
* used.
*
* @param {string} [parameters.properties.secondaryKey] The secondary key that
* was used.
*
* @param {string} [parameters.properties.keyName] The name of the key that
* was used.
*
* @param {string} [parameters.properties.claimType] The type of the claim.
*
* @param {string} [parameters.properties.claimValue] The value of the claim.
*
* @param {array} [parameters.properties.rights] The rights associated with
* the rule.
*
* @param {date} [parameters.properties.createdTime] The time at which the
* authorization rule was created.
*
* @param {date} [parameters.properties.modifiedTime] The most recent time the
* rule was updated.
*
* @param {number} [parameters.properties.revision] The revision number for
* the rule.
* *
* @param {object} [options] Optional Parameters. * @param {object} [options] Optional Parameters.
* *
@ -266,26 +230,6 @@ export interface Namespaces {
getAuthorizationRule(resourceGroupName: string, namespaceName: string, authorizationRuleName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.SharedAccessAuthorizationRuleResource>): void; getAuthorizationRule(resourceGroupName: string, namespaceName: string, authorizationRuleName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.SharedAccessAuthorizationRuleResource>): void;
getAuthorizationRule(resourceGroupName: string, namespaceName: string, authorizationRuleName: string, callback: ServiceCallback<models.SharedAccessAuthorizationRuleResource>): void; getAuthorizationRule(resourceGroupName: string, namespaceName: string, authorizationRuleName: string, callback: ServiceCallback<models.SharedAccessAuthorizationRuleResource>): void;
/**
* The Get Operation Status operation returns the status of the specified
* operation. After calling an asynchronous operation, you can call Get
* Operation Status to determine whether the operation has succeeded, failed,
* or is still in progress.
*
* @param {string} operationStatusLink Location value returned by the Begin
* operation.
*
* @param {object} [options] Optional Parameters.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
*
* @param {ServiceCallback} [callback] callback function; see ServiceCallback
* doc in ms-rest index.d.ts for details
*/
getLongRunningOperationStatus(operationStatusLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<void>): void;
getLongRunningOperationStatus(operationStatusLink: string, callback: ServiceCallback<void>): void;
/** /**
* Lists the available namespaces within a resourceGroup. * Lists the available namespaces within a resourceGroup.
* *
@ -358,6 +302,34 @@ export interface Namespaces {
listKeys(resourceGroupName: string, namespaceName: string, authorizationRuleName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.ResourceListKeys>): void; listKeys(resourceGroupName: string, namespaceName: string, authorizationRuleName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.ResourceListKeys>): void;
listKeys(resourceGroupName: string, namespaceName: string, authorizationRuleName: string, callback: ServiceCallback<models.ResourceListKeys>): void; listKeys(resourceGroupName: string, namespaceName: string, authorizationRuleName: string, callback: ServiceCallback<models.ResourceListKeys>): void;
/**
* Regenerates the Primary/Secondary Keys to the Namespace Authorization Rule
*
* @param {string} resourceGroupName The name of the resource group.
*
* @param {string} namespaceName The namespace name.
*
* @param {string} authorizationRuleName The connection string of the
* namespace for the specified authorizationRule.
*
* @param {object} parameters Parameters supplied to regenerate the Namespace
* Authorization Rule Key.
*
* @param {string} [parameters.policyKey] Name of the key that has to be
* regenerated for the Namespace/Notification Hub Authorization Rule. The
* value can be Primary Key/Secondary Key.
*
* @param {object} [options] Optional Parameters.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
*
* @param {ServiceCallback} [callback] callback function; see ServiceCallback
* doc in ms-rest index.d.ts for details
*/
regenerateKeys(resourceGroupName: string, namespaceName: string, authorizationRuleName: string, parameters: models.PolicykeyResource, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.ResourceListKeys>): void;
regenerateKeys(resourceGroupName: string, namespaceName: string, authorizationRuleName: string, parameters: models.PolicykeyResource, callback: ServiceCallback<models.ResourceListKeys>): void;
/** /**
* Lists the available namespaces within a resourceGroup. * Lists the available namespaces within a resourceGroup.
* *
@ -428,15 +400,12 @@ export interface NotificationHubs {
* *
* @param {object} parameters The notificationHub name. * @param {object} parameters The notificationHub name.
* *
* @param {string} [parameters.name] Gets or sets name * @param {boolean} [parameters.isAvailiable] True if the name is available
* and can be used to create new Namespace/NotificationHub. Otherwise false.
* *
* @param {string} [parameters.location] Gets or sets location. * @param {string} parameters.location Resource location
* *
* @param {object} [parameters.tags] Gets or sets tags. * @param {object} [parameters.tags] Resource tags
*
* @param {boolean} [parameters.isAvailiable] Gets or sets true if the name is
* available and can be used to create new Namespace/NotificationHub.
* Otherwise false.
* *
* @param {object} [options] Optional Parameters. * @param {object} [options] Optional Parameters.
* *
@ -446,8 +415,8 @@ export interface NotificationHubs {
* @param {ServiceCallback} [callback] callback function; see ServiceCallback * @param {ServiceCallback} [callback] callback function; see ServiceCallback
* doc in ms-rest index.d.ts for details * doc in ms-rest index.d.ts for details
*/ */
checkAvailability(resourceGroupName: string, namespaceName: string, parameters: models.CheckAvailabilityParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.CheckAvailabilityResource>): void; checkAvailability(resourceGroupName: string, namespaceName: string, parameters: models.CheckAvailabilityParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.CheckAvailabilityResult>): void;
checkAvailability(resourceGroupName: string, namespaceName: string, parameters: models.CheckAvailabilityParameters, callback: ServiceCallback<models.CheckAvailabilityResource>): void; checkAvailability(resourceGroupName: string, namespaceName: string, parameters: models.CheckAvailabilityParameters, callback: ServiceCallback<models.CheckAvailabilityResult>): void;
/** /**
* Creates/Update a NotificationHub in a namespace. * Creates/Update a NotificationHub in a namespace.
@ -461,125 +430,83 @@ export interface NotificationHubs {
* @param {object} parameters Parameters supplied to the create/update a * @param {object} parameters Parameters supplied to the create/update a
* NotificationHub Resource. * NotificationHub Resource.
* *
* @param {string} [parameters.location] Gets or sets NotificationHub data * @param {string} [parameters.notificationHubCreateOrUpdateParametersName]
* center location. * The NotificationHub name.
* *
* @param {object} [parameters.tags] Gets or sets NotificationHub tags. * @param {string} [parameters.registrationTtl] The RegistrationTtl of the
* created NotificationHub
* *
* @param {object} [parameters.properties] Gets or sets properties of the * @param {array} [parameters.authorizationRules] The AuthorizationRules of
* NotificationHub.
*
* @param {string} [parameters.properties.name] The NotificationHub name.
*
* @param {string} [parameters.properties.registrationTtl] The RegistrationTtl
* of the created NotificationHub
*
* @param {array} [parameters.properties.authorizationRules] The
* AuthorizationRules of the created NotificationHub
*
* @param {object} [parameters.properties.apnsCredential] The ApnsCredential
* of the created NotificationHub
*
* @param {object} [parameters.properties.apnsCredential.properties] Gets or
* sets properties of NotificationHub ApnsCredential.
*
* @param {string}
* [parameters.properties.apnsCredential.properties.apnsCertificate] Gets or
* sets the APNS certificate.
*
* @param {string}
* [parameters.properties.apnsCredential.properties.certificateKey] Gets or
* sets the certificate key.
*
* @param {string} [parameters.properties.apnsCredential.properties.endpoint]
* Gets or sets the endpoint of this credential.
*
* @param {string}
* [parameters.properties.apnsCredential.properties.thumbprint] Gets or sets
* the Apns certificate Thumbprint
*
* @param {object} [parameters.properties.wnsCredential] The WnsCredential of
* the created NotificationHub * the created NotificationHub
* *
* @param {object} [parameters.properties.wnsCredential.properties] Gets or * @param {object} [parameters.apnsCredential] The ApnsCredential of the
* sets properties of NotificationHub WnsCredential. * created NotificationHub
* *
* @param {string} [parameters.properties.wnsCredential.properties.packageSid] * @param {string} [parameters.apnsCredential.apnsCertificate] The APNS
* Gets or sets the package ID for this credential. * certificate.
* *
* @param {string} [parameters.properties.wnsCredential.properties.secretKey] * @param {string} [parameters.apnsCredential.certificateKey] The certificate
* Gets or sets the secret key. * key.
* *
* @param {string} * @param {string} [parameters.apnsCredential.endpoint] The endpoint of this
* [parameters.properties.wnsCredential.properties.windowsLiveEndpoint] Gets * credential.
* or sets the Windows Live endpoint.
* *
* @param {object} [parameters.properties.gcmCredential] The GcmCredential of * @param {string} [parameters.apnsCredential.thumbprint] The Apns certificate
* the created NotificationHub * Thumbprint
* *
* @param {object} [parameters.properties.gcmCredential.properties] Gets or * @param {object} [parameters.wnsCredential] The WnsCredential of the created
* sets properties of NotificationHub GcmCredential. * NotificationHub
* *
* @param {string} * @param {string} [parameters.wnsCredential.packageSid] The package ID for
* [parameters.properties.gcmCredential.properties.gcmEndpoint] Gets or sets * this credential.
* the GCM endpoint.
* *
* @param {string} * @param {string} [parameters.wnsCredential.secretKey] The secret key.
* [parameters.properties.gcmCredential.properties.googleApiKey] Gets or sets
* the Google API key.
* *
* @param {object} [parameters.properties.mpnsCredential] The MpnsCredential * @param {string} [parameters.wnsCredential.windowsLiveEndpoint] The Windows
* of the created NotificationHub * Live endpoint.
* *
* @param {object} [parameters.properties.mpnsCredential.properties] Gets or * @param {object} [parameters.gcmCredential] The GcmCredential of the created
* sets properties of NotificationHub MpnsCredential. * NotificationHub
* *
* @param {string} * @param {string} [parameters.gcmCredential.gcmEndpoint] The GCM endpoint.
* [parameters.properties.mpnsCredential.properties.mpnsCertificate] Gets or
* sets the MPNS certificate.
* *
* @param {string} * @param {string} [parameters.gcmCredential.googleApiKey] The Google API key.
* [parameters.properties.mpnsCredential.properties.certificateKey] Gets or
* sets the certificate key for this credential.
* *
* @param {string} * @param {object} [parameters.mpnsCredential] The MpnsCredential of the
* [parameters.properties.mpnsCredential.properties.thumbprint] Gets or sets * created NotificationHub
* the Mpns certificate Thumbprint
* *
* @param {object} [parameters.properties.admCredential] The AdmCredential of * @param {string} [parameters.mpnsCredential.mpnsCertificate] The MPNS
* the created NotificationHub * certificate.
* *
* @param {object} [parameters.properties.admCredential.properties] Gets or * @param {string} [parameters.mpnsCredential.certificateKey] The certificate
* sets properties of NotificationHub AdmCredential. * key for this credential.
* *
* @param {string} [parameters.properties.admCredential.properties.clientId] * @param {string} [parameters.mpnsCredential.thumbprint] The Mpns certificate
* Gets or sets the client identifier. * Thumbprint
* *
* @param {string} * @param {object} [parameters.admCredential] The AdmCredential of the created
* [parameters.properties.admCredential.properties.clientSecret] Gets or sets * NotificationHub
* the credential secret access key.
* *
* @param {string} * @param {string} [parameters.admCredential.clientId] The client identifier.
* [parameters.properties.admCredential.properties.authTokenUrl] Gets or sets
* the URL of the authorization token.
* *
* @param {object} [parameters.properties.baiduCredential] The BaiduCredential * @param {string} [parameters.admCredential.clientSecret] The credential
* of the created NotificationHub * secret access key.
* *
* @param {object} [parameters.properties.baiduCredential.properties] Gets or * @param {string} [parameters.admCredential.authTokenUrl] The URL of the
* sets properties of NotificationHub BaiduCredential. * authorization token.
* *
* @param {string} * @param {object} [parameters.baiduCredential] The BaiduCredential of the
* [parameters.properties.baiduCredential.properties.baiduApiKey] Get or Set * created NotificationHub
* Baidu Api Key.
* *
* @param {string} * @param {string} [parameters.baiduCredential.baiduApiKey] Baidu Api Key.
* [parameters.properties.baiduCredential.properties.baiduEndPoint] Get or
* Set Baidu Endpoint.
* *
* @param {string} * @param {string} [parameters.baiduCredential.baiduEndPoint] Baidu Endpoint.
* [parameters.properties.baiduCredential.properties.baiduSecretKey] Get or *
* Set Baidu Secret Key * @param {string} [parameters.baiduCredential.baiduSecretKey] Baidu Secret Key
*
* @param {string} parameters.location Resource location
*
* @param {object} [parameters.tags] Resource tags
* *
* @param {object} [options] Optional Parameters. * @param {object} [options] Optional Parameters.
* *
@ -645,39 +572,11 @@ export interface NotificationHubs {
* *
* @param {object} parameters The shared access authorization rule. * @param {object} parameters The shared access authorization rule.
* *
* @param {string} [parameters.location] Gets or sets Namespace data center * @param {array} [parameters.rights] The rights associated with the rule.
* location.
* *
* @param {string} [parameters.name] Gets or sets Name of the Namespace * @param {string} parameters.location Resource location
* AuthorizationRule.
* *
* @param {object} [parameters.properties] Gets or sets properties of the * @param {object} [parameters.tags] Resource tags
* Namespace AuthorizationRules.
*
* @param {string} [parameters.properties.primaryKey] The primary key that was
* used.
*
* @param {string} [parameters.properties.secondaryKey] The secondary key that
* was used.
*
* @param {string} [parameters.properties.keyName] The name of the key that
* was used.
*
* @param {string} [parameters.properties.claimType] The type of the claim.
*
* @param {string} [parameters.properties.claimValue] The value of the claim.
*
* @param {array} [parameters.properties.rights] The rights associated with
* the rule.
*
* @param {date} [parameters.properties.createdTime] The time at which the
* authorization rule was created.
*
* @param {date} [parameters.properties.modifiedTime] The most recent time the
* rule was updated.
*
* @param {number} [parameters.properties.revision] The revision number for
* the rule.
* *
* @param {object} [options] Optional Parameters. * @param {object} [options] Optional Parameters.
* *
@ -795,6 +694,37 @@ export interface NotificationHubs {
listKeys(resourceGroupName: string, namespaceName: string, notificationHubName: string, authorizationRuleName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.ResourceListKeys>): void; listKeys(resourceGroupName: string, namespaceName: string, notificationHubName: string, authorizationRuleName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.ResourceListKeys>): void;
listKeys(resourceGroupName: string, namespaceName: string, notificationHubName: string, authorizationRuleName: string, callback: ServiceCallback<models.ResourceListKeys>): void; listKeys(resourceGroupName: string, namespaceName: string, notificationHubName: string, authorizationRuleName: string, callback: ServiceCallback<models.ResourceListKeys>): void;
/**
* Regenerates the Primary/Secondary Keys to the NotificationHub Authorization
* Rule
*
* @param {string} resourceGroupName The name of the resource group.
*
* @param {string} namespaceName The namespace name.
*
* @param {string} notificationHubName The notification hub name.
*
* @param {string} authorizationRuleName The connection string of the
* NotificationHub for the specified authorizationRule.
*
* @param {object} parameters Parameters supplied to regenerate the
* NotificationHub Authorization Rule Key.
*
* @param {string} [parameters.policyKey] Name of the key that has to be
* regenerated for the Namespace/Notification Hub Authorization Rule. The
* value can be Primary Key/Secondary Key.
*
* @param {object} [options] Optional Parameters.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
*
* @param {ServiceCallback} [callback] callback function; see ServiceCallback
* doc in ms-rest index.d.ts for details
*/
regenerateKeys(resourceGroupName: string, namespaceName: string, notificationHubName: string, authorizationRuleName: string, parameters: models.PolicykeyResource, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.ResourceListKeys>): void;
regenerateKeys(resourceGroupName: string, namespaceName: string, notificationHubName: string, authorizationRuleName: string, parameters: models.PolicykeyResource, callback: ServiceCallback<models.ResourceListKeys>): void;
/** /**
* Lists the PNS Credentials associated with a notification hub . * Lists the PNS Credentials associated with a notification hub .
* *
@ -812,8 +742,8 @@ export interface NotificationHubs {
* @param {ServiceCallback} [callback] callback function; see ServiceCallback * @param {ServiceCallback} [callback] callback function; see ServiceCallback
* doc in ms-rest index.d.ts for details * doc in ms-rest index.d.ts for details
*/ */
getPnsCredentials(resourceGroupName: string, namespaceName: string, notificationHubName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.NotificationHubResource>): void; getPnsCredentials(resourceGroupName: string, namespaceName: string, notificationHubName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.PnsCredentialsResource>): void;
getPnsCredentials(resourceGroupName: string, namespaceName: string, notificationHubName: string, callback: ServiceCallback<models.NotificationHubResource>): void; getPnsCredentials(resourceGroupName: string, namespaceName: string, notificationHubName: string, callback: ServiceCallback<models.PnsCredentialsResource>): void;
/** /**
* Lists the notification hubs associated with a namespace. * Lists the notification hubs associated with a namespace.

Просмотреть файл

@ -30,21 +30,18 @@ function Namespaces(client) {
} }
/** /**
* Checks the availability of the given service namespace across all Windows * Checks the availability of the given service namespace across all Azure
* Azure subscriptions. This is useful because the domain name is created * subscriptions. This is useful because the domain name is created based on
* based on the service namespace name. * the service namespace name.
* *
* @param {object} parameters The namespace name. * @param {object} parameters The namespace name.
* *
* @param {string} [parameters.name] Gets or sets name * @param {boolean} [parameters.isAvailiable] True if the name is available
* and can be used to create new Namespace/NotificationHub. Otherwise false.
* *
* @param {string} [parameters.location] Gets or sets location. * @param {string} parameters.location Resource location
* *
* @param {object} [parameters.tags] Gets or sets tags. * @param {object} [parameters.tags] Resource tags
*
* @param {boolean} [parameters.isAvailiable] Gets or sets true if the name is
* available and can be used to create new Namespace/NotificationHub.
* Otherwise false.
* *
* @param {object} [options] Optional Parameters. * @param {object} [options] Optional Parameters.
* *
@ -58,7 +55,7 @@ function Namespaces(client) {
* {Error} err - The Error object if an error occurred, null otherwise. * {Error} err - The Error object if an error occurred, null otherwise.
* *
* {object} [result] - The deserialized result object. * {object} [result] - The deserialized result object.
* See {@link CheckAvailabilityResource} for more * See {@link CheckAvailabilityResult} for more
* information. * information.
* *
* {object} [request] - The HTTP Request object if an error did not occur. * {object} [request] - The HTTP Request object if an error did not occur.
@ -96,14 +93,14 @@ Namespaces.prototype.checkAvailability = function (parameters, options, callback
var requestUrl = this.client.baseUri + var requestUrl = this.client.baseUri +
'//subscriptions/{subscriptionId}/providers/Microsoft.NotificationHubs/checkNamespaceAvailability'; '//subscriptions/{subscriptionId}/providers/Microsoft.NotificationHubs/checkNamespaceAvailability';
requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId));
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');
var queryParameters = []; var queryParameters = [];
queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion));
if (queryParameters.length > 0) { if (queryParameters.length > 0) {
requestUrl += '?' + queryParameters.join('&'); requestUrl += '?' + queryParameters.join('&');
} }
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');
// Create HTTP transport objects // Create HTTP transport objects
var httpRequest = new WebResource(); var httpRequest = new WebResource();
@ -181,7 +178,7 @@ Namespaces.prototype.checkAvailability = function (parameters, options, callback
parsedResponse = JSON.parse(responseBody); parsedResponse = JSON.parse(responseBody);
result = JSON.parse(responseBody); result = JSON.parse(responseBody);
if (parsedResponse !== null && parsedResponse !== undefined) { if (parsedResponse !== null && parsedResponse !== undefined) {
var resultMapper = new client.models['CheckAvailabilityResource']().mapper(); var resultMapper = new client.models['CheckAvailabilityResult']().mapper();
result = client.deserialize(resultMapper, parsedResponse, 'result'); result = client.deserialize(resultMapper, parsedResponse, 'result');
} }
} catch (error) { } catch (error) {
@ -207,49 +204,44 @@ Namespaces.prototype.checkAvailability = function (parameters, options, callback
* @param {object} parameters Parameters supplied to create a Namespace * @param {object} parameters Parameters supplied to create a Namespace
* Resource. * Resource.
* *
* @param {string} [parameters.location] Gets or sets Namespace data center * @param {string} [parameters.namespaceCreateOrUpdateParametersName] The name
* location. * of the namespace.
* *
* @param {object} [parameters.tags] Gets or sets Namespace tags. * @param {string} [parameters.provisioningState] Provisioning state of the
*
* @param {object} [parameters.properties] Gets or sets properties of the
* Namespace. * Namespace.
* *
* @param {string} [parameters.properties.name] The name of the namespace. * @param {string} [parameters.region] Specifies the targeted region in which
* the namespace should be created. It can be any of the following values:
* Australia EastAustralia SoutheastCentral USEast USEast US 2West USNorth
* Central USSouth Central USEast AsiaSoutheast AsiaBrazil SouthJapan
* EastJapan WestNorth EuropeWest Europe
* *
* @param {string} [parameters.properties.provisioningState] Gets or sets * @param {string} [parameters.status] Status of the namespace. It can be any
* provisioning state of the Namespace. * of these values:1 = Created/Active2 = Creating3 = Suspended4 = Deleting
* *
* @param {string} [parameters.properties.region] Specifies the targeted * @param {date} [parameters.createdAt] The time the namespace was created.
* region in which the namespace should be created. It can be any of the
* following values: Australia EastAustralia SoutheastCentral USEast USEast
* US 2West USNorth Central USSouth Central USEast AsiaSoutheast AsiaBrazil
* SouthJapan EastJapan WestNorth EuropeWest Europe
* *
* @param {string} [parameters.properties.status] Status of the namespace. It * @param {string} [parameters.serviceBusEndpoint] Endpoint you can use to
* can be any of these values:1 = Created/Active2 = Creating3 = Suspended4 = * perform NotificationHub operations.
* Deleting
* *
* @param {date} [parameters.properties.createdAt] The time the namespace was * @param {string} [parameters.subscriptionId] The Id of the Azure
* created.
*
* @param {string} [parameters.properties.serviceBusEndpoint] Endpoint you can
* use to perform NotificationHub operations.
*
* @param {string} [parameters.properties.subscriptionId] The Id of the Azure
* subscription associated with the namespace. * subscription associated with the namespace.
* *
* @param {string} [parameters.properties.scaleUnit] ScaleUnit where the * @param {string} [parameters.scaleUnit] ScaleUnit where the namespace gets
* namespace gets created * created
* *
* @param {boolean} [parameters.properties.enabled] Whether or not the * @param {boolean} [parameters.enabled] Whether or not the namespace is
* namespace is currently enabled. * currently enabled.
* *
* @param {boolean} [parameters.properties.critical] Whether or not the * @param {boolean} [parameters.critical] Whether or not the namespace is set
* namespace is set as Critical. * as Critical.
* *
* @param {string} [parameters.properties.namespaceType] Gets or sets the * @param {string} [parameters.namespaceType] The namespace type. Possible
* namespace type. Possible values include: 'Messaging', 'NotificationHub' * values include: 'Messaging', 'NotificationHub'
*
* @param {string} parameters.location Resource location
*
* @param {object} [parameters.tags] Resource tags
* *
* @param {object} [options] Optional Parameters. * @param {object} [options] Optional Parameters.
* *
@ -308,14 +300,14 @@ Namespaces.prototype.createOrUpdate = function (resourceGroupName, namespaceName
requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
requestUrl = requestUrl.replace('{namespaceName}', encodeURIComponent(namespaceName)); requestUrl = requestUrl.replace('{namespaceName}', encodeURIComponent(namespaceName));
requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId));
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');
var queryParameters = []; var queryParameters = [];
queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion));
if (queryParameters.length > 0) { if (queryParameters.length > 0) {
requestUrl += '?' + queryParameters.join('&'); requestUrl += '?' + queryParameters.join('&');
} }
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');
// Create HTTP transport objects // Create HTTP transport objects
var httpRequest = new WebResource(); var httpRequest = new WebResource();
@ -470,7 +462,7 @@ Namespaces.prototype.deleteMethod = function (resourceGroupName, namespaceName,
initialResult.request = httpRequest; initialResult.request = httpRequest;
initialResult.response = response; initialResult.response = response;
initialResult.body = response.body; initialResult.body = response.body;
client.getPostOrDeleteOperationResult(initialResult, options, function (err, pollingResult) { client.getLongRunningOperationResult(initialResult, options, function (err, pollingResult) {
if (err) return callback(err); if (err) return callback(err);
// Create Result // Create Result
@ -548,14 +540,14 @@ Namespaces.prototype.beginDeleteMethod = function (resourceGroupName, namespaceN
requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
requestUrl = requestUrl.replace('{namespaceName}', encodeURIComponent(namespaceName)); requestUrl = requestUrl.replace('{namespaceName}', encodeURIComponent(namespaceName));
requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId));
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');
var queryParameters = []; var queryParameters = [];
queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion));
if (queryParameters.length > 0) { if (queryParameters.length > 0) {
requestUrl += '?' + queryParameters.join('&'); requestUrl += '?' + queryParameters.join('&');
} }
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');
// Create HTTP transport objects // Create HTTP transport objects
var httpRequest = new WebResource(); var httpRequest = new WebResource();
@ -674,14 +666,14 @@ Namespaces.prototype.get = function (resourceGroupName, namespaceName, options,
requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
requestUrl = requestUrl.replace('{namespaceName}', encodeURIComponent(namespaceName)); requestUrl = requestUrl.replace('{namespaceName}', encodeURIComponent(namespaceName));
requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId));
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');
var queryParameters = []; var queryParameters = [];
queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion));
if (queryParameters.length > 0) { if (queryParameters.length > 0) {
requestUrl += '?' + queryParameters.join('&'); requestUrl += '?' + queryParameters.join('&');
} }
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');
// Create HTTP transport objects // Create HTTP transport objects
var httpRequest = new WebResource(); var httpRequest = new WebResource();
@ -771,39 +763,11 @@ Namespaces.prototype.get = function (resourceGroupName, namespaceName, options,
* *
* @param {object} parameters The shared access authorization rule. * @param {object} parameters The shared access authorization rule.
* *
* @param {string} [parameters.location] Gets or sets Namespace data center * @param {array} [parameters.rights] The rights associated with the rule.
* location.
* *
* @param {string} [parameters.name] Gets or sets Name of the Namespace * @param {string} parameters.location Resource location
* AuthorizationRule.
* *
* @param {object} [parameters.properties] Gets or sets properties of the * @param {object} [parameters.tags] Resource tags
* Namespace AuthorizationRules.
*
* @param {string} [parameters.properties.primaryKey] The primary key that was
* used.
*
* @param {string} [parameters.properties.secondaryKey] The secondary key that
* was used.
*
* @param {string} [parameters.properties.keyName] The name of the key that
* was used.
*
* @param {string} [parameters.properties.claimType] The type of the claim.
*
* @param {string} [parameters.properties.claimValue] The value of the claim.
*
* @param {array} [parameters.properties.rights] The rights associated with
* the rule.
*
* @param {date} [parameters.properties.createdTime] The time at which the
* authorization rule was created.
*
* @param {date} [parameters.properties.modifiedTime] The most recent time the
* rule was updated.
*
* @param {number} [parameters.properties.revision] The revision number for
* the rule.
* *
* @param {object} [options] Optional Parameters. * @param {object} [options] Optional Parameters.
* *
@ -867,14 +831,14 @@ Namespaces.prototype.createOrUpdateAuthorizationRule = function (resourceGroupNa
requestUrl = requestUrl.replace('{namespaceName}', encodeURIComponent(namespaceName)); requestUrl = requestUrl.replace('{namespaceName}', encodeURIComponent(namespaceName));
requestUrl = requestUrl.replace('{authorizationRuleName}', encodeURIComponent(authorizationRuleName)); requestUrl = requestUrl.replace('{authorizationRuleName}', encodeURIComponent(authorizationRuleName));
requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId));
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');
var queryParameters = []; var queryParameters = [];
queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion));
if (queryParameters.length > 0) { if (queryParameters.length > 0) {
requestUrl += '?' + queryParameters.join('&'); requestUrl += '?' + queryParameters.join('&');
} }
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');
// Create HTTP transport objects // Create HTTP transport objects
var httpRequest = new WebResource(); var httpRequest = new WebResource();
@ -1033,14 +997,14 @@ Namespaces.prototype.deleteAuthorizationRule = function (resourceGroupName, name
requestUrl = requestUrl.replace('{namespaceName}', encodeURIComponent(namespaceName)); requestUrl = requestUrl.replace('{namespaceName}', encodeURIComponent(namespaceName));
requestUrl = requestUrl.replace('{authorizationRuleName}', encodeURIComponent(authorizationRuleName)); requestUrl = requestUrl.replace('{authorizationRuleName}', encodeURIComponent(authorizationRuleName));
requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId));
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');
var queryParameters = []; var queryParameters = [];
queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion));
if (queryParameters.length > 0) { if (queryParameters.length > 0) {
requestUrl += '?' + queryParameters.join('&'); requestUrl += '?' + queryParameters.join('&');
} }
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');
// Create HTTP transport objects // Create HTTP transport objects
var httpRequest = new WebResource(); var httpRequest = new WebResource();
@ -1166,18 +1130,18 @@ Namespaces.prototype.getAuthorizationRule = function (resourceGroupName, namespa
requestUrl = requestUrl.replace('{namespaceName}', encodeURIComponent(namespaceName)); requestUrl = requestUrl.replace('{namespaceName}', encodeURIComponent(namespaceName));
requestUrl = requestUrl.replace('{authorizationRuleName}', encodeURIComponent(authorizationRuleName)); requestUrl = requestUrl.replace('{authorizationRuleName}', encodeURIComponent(authorizationRuleName));
requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId));
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');
var queryParameters = []; var queryParameters = [];
queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion));
if (queryParameters.length > 0) { if (queryParameters.length > 0) {
requestUrl += '?' + queryParameters.join('&'); requestUrl += '?' + queryParameters.join('&');
} }
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');
// Create HTTP transport objects // Create HTTP transport objects
var httpRequest = new WebResource(); var httpRequest = new WebResource();
httpRequest.method = 'POST'; httpRequest.method = 'GET';
httpRequest.headers = {}; httpRequest.headers = {};
httpRequest.url = requestUrl; httpRequest.url = requestUrl;
// Set Headers // Set Headers
@ -1252,121 +1216,6 @@ Namespaces.prototype.getAuthorizationRule = function (resourceGroupName, namespa
}); });
}; };
/**
* The Get Operation Status operation returns the status of the specified
* operation. After calling an asynchronous operation, you can call Get
* Operation Status to determine whether the operation has succeeded, failed,
* or is still in progress.
*
* @param {string} operationStatusLink Location value returned by the Begin
* operation.
*
* @param {object} [options] Optional Parameters.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
*
* @param {function} 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.
*
* {object} [request] - The HTTP Request object if an error did not occur.
*
* {stream} [response] - The HTTP Response stream if an error did not occur.
*/
Namespaces.prototype.getLongRunningOperationStatus = function (operationStatusLink, options, callback) {
var client = this.client;
if(!callback && typeof options === 'function') {
callback = options;
options = null;
}
if (!callback) {
throw new Error('callback cannot be null.');
}
// Validate
try {
if (operationStatusLink === null || operationStatusLink === undefined || typeof operationStatusLink.valueOf() !== 'string') {
throw new Error('operationStatusLink cannot be null or undefined and it must be of type string.');
}
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
var requestUrl = this.client.baseUri +
'//{operationStatusLink}';
requestUrl = requestUrl.replace('{operationStatusLink}', operationStatusLink);
var queryParameters = [];
if (queryParameters.length > 0) {
requestUrl += '?' + queryParameters.join('&');
}
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');
// Create HTTP transport objects
var httpRequest = new WebResource();
httpRequest.method = 'GET';
httpRequest.headers = {};
httpRequest.url = requestUrl;
// Set Headers
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(var headerName in options['customHeaders']) {
if (options['customHeaders'].hasOwnProperty(headerName)) {
httpRequest.headers[headerName] = options['customHeaders'][headerName];
}
}
}
httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
httpRequest.body = null;
// Send Request
return client.pipeline(httpRequest, function (err, response, responseBody) {
if (err) {
return callback(err);
}
var statusCode = response.statusCode;
if (statusCode !== 404 && statusCode !== 202 && statusCode !== 200) {
var error = new Error(responseBody);
error.statusCode = response.statusCode;
error.request = msRest.stripRequest(httpRequest);
error.response = msRest.stripResponse(response);
if (responseBody === '') responseBody = null;
var 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;
}
} catch (defaultError) {
error.message = util.format('Error "%s" occurred in deserializing the responseBody ' +
'- "%s" for the default response.', defaultError.message, responseBody);
return callback(error);
}
return callback(error);
}
// Create Result
var result = null;
if (responseBody === '') responseBody = null;
return callback(null, result, httpRequest, response);
});
};
/** /**
* Lists the available namespaces within a resourceGroup. * Lists the available namespaces within a resourceGroup.
* *
@ -1424,14 +1273,14 @@ Namespaces.prototype.list = function (resourceGroupName, options, callback) {
'//subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces'; '//subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces';
requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId));
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');
var queryParameters = []; var queryParameters = [];
queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion));
if (queryParameters.length > 0) { if (queryParameters.length > 0) {
requestUrl += '?' + queryParameters.join('&'); requestUrl += '?' + queryParameters.join('&');
} }
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');
// Create HTTP transport objects // Create HTTP transport objects
var httpRequest = new WebResource(); var httpRequest = new WebResource();
@ -1560,14 +1409,14 @@ Namespaces.prototype.listAll = function (options, callback) {
var requestUrl = this.client.baseUri + var requestUrl = this.client.baseUri +
'//subscriptions/{subscriptionId}/providers/Microsoft.NotificationHubs/namespaces'; '//subscriptions/{subscriptionId}/providers/Microsoft.NotificationHubs/namespaces';
requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId));
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');
var queryParameters = []; var queryParameters = [];
queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion));
if (queryParameters.length > 0) { if (queryParameters.length > 0) {
requestUrl += '?' + queryParameters.join('&'); requestUrl += '?' + queryParameters.join('&');
} }
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');
// Create HTTP transport objects // Create HTTP transport objects
var httpRequest = new WebResource(); var httpRequest = new WebResource();
@ -1708,18 +1557,18 @@ Namespaces.prototype.listAuthorizationRules = function (resourceGroupName, names
requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
requestUrl = requestUrl.replace('{namespaceName}', encodeURIComponent(namespaceName)); requestUrl = requestUrl.replace('{namespaceName}', encodeURIComponent(namespaceName));
requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId));
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');
var queryParameters = []; var queryParameters = [];
queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion));
if (queryParameters.length > 0) { if (queryParameters.length > 0) {
requestUrl += '?' + queryParameters.join('&'); requestUrl += '?' + queryParameters.join('&');
} }
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');
// Create HTTP transport objects // Create HTTP transport objects
var httpRequest = new WebResource(); var httpRequest = new WebResource();
httpRequest.method = 'POST'; httpRequest.method = 'GET';
httpRequest.headers = {}; httpRequest.headers = {};
httpRequest.url = requestUrl; httpRequest.url = requestUrl;
// Set Headers // Set Headers
@ -1862,14 +1711,14 @@ Namespaces.prototype.listKeys = function (resourceGroupName, namespaceName, auth
requestUrl = requestUrl.replace('{namespaceName}', encodeURIComponent(namespaceName)); requestUrl = requestUrl.replace('{namespaceName}', encodeURIComponent(namespaceName));
requestUrl = requestUrl.replace('{authorizationRuleName}', encodeURIComponent(authorizationRuleName)); requestUrl = requestUrl.replace('{authorizationRuleName}', encodeURIComponent(authorizationRuleName));
requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId));
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');
var queryParameters = []; var queryParameters = [];
queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion));
if (queryParameters.length > 0) { if (queryParameters.length > 0) {
requestUrl += '?' + queryParameters.join('&'); requestUrl += '?' + queryParameters.join('&');
} }
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');
// Create HTTP transport objects // Create HTTP transport objects
var httpRequest = new WebResource(); var httpRequest = new WebResource();
@ -1948,6 +1797,184 @@ Namespaces.prototype.listKeys = function (resourceGroupName, namespaceName, auth
}); });
}; };
/**
* Regenerates the Primary/Secondary Keys to the Namespace Authorization Rule
*
* @param {string} resourceGroupName The name of the resource group.
*
* @param {string} namespaceName The namespace name.
*
* @param {string} authorizationRuleName The connection string of the
* namespace for the specified authorizationRule.
*
* @param {object} parameters Parameters supplied to regenerate the Namespace
* Authorization Rule Key.
*
* @param {string} [parameters.policyKey] Name of the key that has to be
* regenerated for the Namespace/Notification Hub Authorization Rule. The
* value can be Primary Key/Secondary Key.
*
* @param {object} [options] Optional Parameters.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
*
* @param {function} callback
*
* @returns {function} callback(err, result, request, response)
*
* {Error} err - The Error object if an error occurred, null otherwise.
*
* {object} [result] - The deserialized result object.
* See {@link ResourceListKeys} for more information.
*
* {object} [request] - The HTTP Request object if an error did not occur.
*
* {stream} [response] - The HTTP Response stream if an error did not occur.
*/
Namespaces.prototype.regenerateKeys = function (resourceGroupName, namespaceName, authorizationRuleName, parameters, options, callback) {
var client = this.client;
if(!callback && typeof options === 'function') {
callback = options;
options = null;
}
if (!callback) {
throw new Error('callback cannot be null.');
}
// Validate
try {
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 (namespaceName === null || namespaceName === undefined || typeof namespaceName.valueOf() !== 'string') {
throw new Error('namespaceName cannot be null or undefined and it must be of type string.');
}
if (authorizationRuleName === null || authorizationRuleName === undefined || typeof authorizationRuleName.valueOf() !== 'string') {
throw new Error('authorizationRuleName cannot be null or undefined and it must be of type string.');
}
if (parameters === null || parameters === undefined) {
throw new Error('parameters cannot be null or undefined.');
}
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 (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 (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
var requestUrl = this.client.baseUri +
'//subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}/regenerateKeys';
requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
requestUrl = requestUrl.replace('{namespaceName}', encodeURIComponent(namespaceName));
requestUrl = requestUrl.replace('{authorizationRuleName}', encodeURIComponent(authorizationRuleName));
requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId));
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');
var queryParameters = [];
queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion));
if (queryParameters.length > 0) {
requestUrl += '?' + queryParameters.join('&');
}
// Create HTTP transport objects
var httpRequest = new WebResource();
httpRequest.method = 'POST';
httpRequest.headers = {};
httpRequest.url = requestUrl;
// Set Headers
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(var headerName in options['customHeaders']) {
if (options['customHeaders'].hasOwnProperty(headerName)) {
httpRequest.headers[headerName] = options['customHeaders'][headerName];
}
}
}
httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
// Serialize Request
var requestContent = null;
var requestModel = null;
try {
if (parameters !== null && parameters !== undefined) {
var requestModelMapper = new client.models['PolicykeyResource']().mapper();
requestModel = client.serialize(requestModelMapper, parameters, 'parameters');
requestContent = JSON.stringify(requestModel);
}
} catch (error) {
var serializationError = new Error(util.format('Error "%s" occurred in serializing the ' +
'payload - "%s"', error.message, util.inspect(parameters, {depth: null})));
return callback(serializationError);
}
httpRequest.body = requestContent;
// Send Request
return client.pipeline(httpRequest, function (err, response, responseBody) {
if (err) {
return callback(err);
}
var statusCode = response.statusCode;
if (statusCode !== 200) {
var error = new Error(responseBody);
error.statusCode = response.statusCode;
error.request = msRest.stripRequest(httpRequest);
error.response = msRest.stripResponse(response);
if (responseBody === '') responseBody = null;
var 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) {
var resultMapper = new client.models['CloudError']().mapper();
error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body');
}
} catch (defaultError) {
error.message = util.format('Error "%s" occurred in deserializing the responseBody ' +
'- "%s" for the default response.', defaultError.message, responseBody);
return callback(error);
}
return callback(error);
}
// Create Result
var result = null;
if (responseBody === '') responseBody = null;
// Deserialize Response
if (statusCode === 200) {
var parsedResponse = null;
try {
parsedResponse = JSON.parse(responseBody);
result = JSON.parse(responseBody);
if (parsedResponse !== null && parsedResponse !== undefined) {
var resultMapper = new client.models['ResourceListKeys']().mapper();
result = client.deserialize(resultMapper, parsedResponse, 'result');
}
} catch (error) {
var deserializationError = new Error(util.format('Error "%s" occurred in deserializing the responseBody - "%s"', error, responseBody));
deserializationError.request = msRest.stripRequest(httpRequest);
deserializationError.response = msRest.stripResponse(response);
return callback(deserializationError);
}
}
return callback(null, result, httpRequest, response);
});
};
/** /**
* Lists the available namespaces within a resourceGroup. * Lists the available namespaces within a resourceGroup.
* *
@ -2262,7 +2289,7 @@ Namespaces.prototype.listAuthorizationRulesNext = function (nextPageLink, option
// Create HTTP transport objects // Create HTTP transport objects
var httpRequest = new WebResource(); var httpRequest = new WebResource();
httpRequest.method = 'POST'; httpRequest.method = 'GET';
httpRequest.headers = {}; httpRequest.headers = {};
httpRequest.url = requestUrl; httpRequest.url = requestUrl;
// Set Headers // Set Headers

Просмотреть файл

@ -38,15 +38,12 @@ function NotificationHubs(client) {
* *
* @param {object} parameters The notificationHub name. * @param {object} parameters The notificationHub name.
* *
* @param {string} [parameters.name] Gets or sets name * @param {boolean} [parameters.isAvailiable] True if the name is available
* and can be used to create new Namespace/NotificationHub. Otherwise false.
* *
* @param {string} [parameters.location] Gets or sets location. * @param {string} parameters.location Resource location
* *
* @param {object} [parameters.tags] Gets or sets tags. * @param {object} [parameters.tags] Resource tags
*
* @param {boolean} [parameters.isAvailiable] Gets or sets true if the name is
* available and can be used to create new Namespace/NotificationHub.
* Otherwise false.
* *
* @param {object} [options] Optional Parameters. * @param {object} [options] Optional Parameters.
* *
@ -60,7 +57,7 @@ function NotificationHubs(client) {
* {Error} err - The Error object if an error occurred, null otherwise. * {Error} err - The Error object if an error occurred, null otherwise.
* *
* {object} [result] - The deserialized result object. * {object} [result] - The deserialized result object.
* See {@link CheckAvailabilityResource} for more * See {@link CheckAvailabilityResult} for more
* information. * information.
* *
* {object} [request] - The HTTP Request object if an error did not occur. * {object} [request] - The HTTP Request object if an error did not occur.
@ -106,14 +103,14 @@ NotificationHubs.prototype.checkAvailability = function (resourceGroupName, name
requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
requestUrl = requestUrl.replace('{namespaceName}', encodeURIComponent(namespaceName)); requestUrl = requestUrl.replace('{namespaceName}', encodeURIComponent(namespaceName));
requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId));
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');
var queryParameters = []; var queryParameters = [];
queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion));
if (queryParameters.length > 0) { if (queryParameters.length > 0) {
requestUrl += '?' + queryParameters.join('&'); requestUrl += '?' + queryParameters.join('&');
} }
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');
// Create HTTP transport objects // Create HTTP transport objects
var httpRequest = new WebResource(); var httpRequest = new WebResource();
@ -191,7 +188,7 @@ NotificationHubs.prototype.checkAvailability = function (resourceGroupName, name
parsedResponse = JSON.parse(responseBody); parsedResponse = JSON.parse(responseBody);
result = JSON.parse(responseBody); result = JSON.parse(responseBody);
if (parsedResponse !== null && parsedResponse !== undefined) { if (parsedResponse !== null && parsedResponse !== undefined) {
var resultMapper = new client.models['CheckAvailabilityResource']().mapper(); var resultMapper = new client.models['CheckAvailabilityResult']().mapper();
result = client.deserialize(resultMapper, parsedResponse, 'result'); result = client.deserialize(resultMapper, parsedResponse, 'result');
} }
} catch (error) { } catch (error) {
@ -218,125 +215,83 @@ NotificationHubs.prototype.checkAvailability = function (resourceGroupName, name
* @param {object} parameters Parameters supplied to the create/update a * @param {object} parameters Parameters supplied to the create/update a
* NotificationHub Resource. * NotificationHub Resource.
* *
* @param {string} [parameters.location] Gets or sets NotificationHub data * @param {string} [parameters.notificationHubCreateOrUpdateParametersName]
* center location. * The NotificationHub name.
* *
* @param {object} [parameters.tags] Gets or sets NotificationHub tags. * @param {string} [parameters.registrationTtl] The RegistrationTtl of the
* created NotificationHub
* *
* @param {object} [parameters.properties] Gets or sets properties of the * @param {array} [parameters.authorizationRules] The AuthorizationRules of
* NotificationHub.
*
* @param {string} [parameters.properties.name] The NotificationHub name.
*
* @param {string} [parameters.properties.registrationTtl] The RegistrationTtl
* of the created NotificationHub
*
* @param {array} [parameters.properties.authorizationRules] The
* AuthorizationRules of the created NotificationHub
*
* @param {object} [parameters.properties.apnsCredential] The ApnsCredential
* of the created NotificationHub
*
* @param {object} [parameters.properties.apnsCredential.properties] Gets or
* sets properties of NotificationHub ApnsCredential.
*
* @param {string}
* [parameters.properties.apnsCredential.properties.apnsCertificate] Gets or
* sets the APNS certificate.
*
* @param {string}
* [parameters.properties.apnsCredential.properties.certificateKey] Gets or
* sets the certificate key.
*
* @param {string} [parameters.properties.apnsCredential.properties.endpoint]
* Gets or sets the endpoint of this credential.
*
* @param {string}
* [parameters.properties.apnsCredential.properties.thumbprint] Gets or sets
* the Apns certificate Thumbprint
*
* @param {object} [parameters.properties.wnsCredential] The WnsCredential of
* the created NotificationHub * the created NotificationHub
* *
* @param {object} [parameters.properties.wnsCredential.properties] Gets or * @param {object} [parameters.apnsCredential] The ApnsCredential of the
* sets properties of NotificationHub WnsCredential. * created NotificationHub
* *
* @param {string} [parameters.properties.wnsCredential.properties.packageSid] * @param {string} [parameters.apnsCredential.apnsCertificate] The APNS
* Gets or sets the package ID for this credential. * certificate.
* *
* @param {string} [parameters.properties.wnsCredential.properties.secretKey] * @param {string} [parameters.apnsCredential.certificateKey] The certificate
* Gets or sets the secret key. * key.
* *
* @param {string} * @param {string} [parameters.apnsCredential.endpoint] The endpoint of this
* [parameters.properties.wnsCredential.properties.windowsLiveEndpoint] Gets * credential.
* or sets the Windows Live endpoint.
* *
* @param {object} [parameters.properties.gcmCredential] The GcmCredential of * @param {string} [parameters.apnsCredential.thumbprint] The Apns certificate
* the created NotificationHub * Thumbprint
* *
* @param {object} [parameters.properties.gcmCredential.properties] Gets or * @param {object} [parameters.wnsCredential] The WnsCredential of the created
* sets properties of NotificationHub GcmCredential. * NotificationHub
* *
* @param {string} * @param {string} [parameters.wnsCredential.packageSid] The package ID for
* [parameters.properties.gcmCredential.properties.gcmEndpoint] Gets or sets * this credential.
* the GCM endpoint.
* *
* @param {string} * @param {string} [parameters.wnsCredential.secretKey] The secret key.
* [parameters.properties.gcmCredential.properties.googleApiKey] Gets or sets
* the Google API key.
* *
* @param {object} [parameters.properties.mpnsCredential] The MpnsCredential * @param {string} [parameters.wnsCredential.windowsLiveEndpoint] The Windows
* of the created NotificationHub * Live endpoint.
* *
* @param {object} [parameters.properties.mpnsCredential.properties] Gets or * @param {object} [parameters.gcmCredential] The GcmCredential of the created
* sets properties of NotificationHub MpnsCredential. * NotificationHub
* *
* @param {string} * @param {string} [parameters.gcmCredential.gcmEndpoint] The GCM endpoint.
* [parameters.properties.mpnsCredential.properties.mpnsCertificate] Gets or
* sets the MPNS certificate.
* *
* @param {string} * @param {string} [parameters.gcmCredential.googleApiKey] The Google API key.
* [parameters.properties.mpnsCredential.properties.certificateKey] Gets or
* sets the certificate key for this credential.
* *
* @param {string} * @param {object} [parameters.mpnsCredential] The MpnsCredential of the
* [parameters.properties.mpnsCredential.properties.thumbprint] Gets or sets * created NotificationHub
* the Mpns certificate Thumbprint
* *
* @param {object} [parameters.properties.admCredential] The AdmCredential of * @param {string} [parameters.mpnsCredential.mpnsCertificate] The MPNS
* the created NotificationHub * certificate.
* *
* @param {object} [parameters.properties.admCredential.properties] Gets or * @param {string} [parameters.mpnsCredential.certificateKey] The certificate
* sets properties of NotificationHub AdmCredential. * key for this credential.
* *
* @param {string} [parameters.properties.admCredential.properties.clientId] * @param {string} [parameters.mpnsCredential.thumbprint] The Mpns certificate
* Gets or sets the client identifier. * Thumbprint
* *
* @param {string} * @param {object} [parameters.admCredential] The AdmCredential of the created
* [parameters.properties.admCredential.properties.clientSecret] Gets or sets * NotificationHub
* the credential secret access key.
* *
* @param {string} * @param {string} [parameters.admCredential.clientId] The client identifier.
* [parameters.properties.admCredential.properties.authTokenUrl] Gets or sets
* the URL of the authorization token.
* *
* @param {object} [parameters.properties.baiduCredential] The BaiduCredential * @param {string} [parameters.admCredential.clientSecret] The credential
* of the created NotificationHub * secret access key.
* *
* @param {object} [parameters.properties.baiduCredential.properties] Gets or * @param {string} [parameters.admCredential.authTokenUrl] The URL of the
* sets properties of NotificationHub BaiduCredential. * authorization token.
* *
* @param {string} * @param {object} [parameters.baiduCredential] The BaiduCredential of the
* [parameters.properties.baiduCredential.properties.baiduApiKey] Get or Set * created NotificationHub
* Baidu Api Key.
* *
* @param {string} * @param {string} [parameters.baiduCredential.baiduApiKey] Baidu Api Key.
* [parameters.properties.baiduCredential.properties.baiduEndPoint] Get or
* Set Baidu Endpoint.
* *
* @param {string} * @param {string} [parameters.baiduCredential.baiduEndPoint] Baidu Endpoint.
* [parameters.properties.baiduCredential.properties.baiduSecretKey] Get or *
* Set Baidu Secret Key * @param {string} [parameters.baiduCredential.baiduSecretKey] Baidu Secret Key
*
* @param {string} parameters.location Resource location
*
* @param {object} [parameters.tags] Resource tags
* *
* @param {object} [options] Optional Parameters. * @param {object} [options] Optional Parameters.
* *
@ -400,14 +355,14 @@ NotificationHubs.prototype.createOrUpdate = function (resourceGroupName, namespa
requestUrl = requestUrl.replace('{namespaceName}', encodeURIComponent(namespaceName)); requestUrl = requestUrl.replace('{namespaceName}', encodeURIComponent(namespaceName));
requestUrl = requestUrl.replace('{notificationHubName}', encodeURIComponent(notificationHubName)); requestUrl = requestUrl.replace('{notificationHubName}', encodeURIComponent(notificationHubName));
requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId));
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');
var queryParameters = []; var queryParameters = [];
queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion));
if (queryParameters.length > 0) { if (queryParameters.length > 0) {
requestUrl += '?' + queryParameters.join('&'); requestUrl += '?' + queryParameters.join('&');
} }
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');
// Create HTTP transport objects // Create HTTP transport objects
var httpRequest = new WebResource(); var httpRequest = new WebResource();
@ -583,14 +538,14 @@ NotificationHubs.prototype.deleteMethod = function (resourceGroupName, namespace
requestUrl = requestUrl.replace('{namespaceName}', encodeURIComponent(namespaceName)); requestUrl = requestUrl.replace('{namespaceName}', encodeURIComponent(namespaceName));
requestUrl = requestUrl.replace('{notificationHubName}', encodeURIComponent(notificationHubName)); requestUrl = requestUrl.replace('{notificationHubName}', encodeURIComponent(notificationHubName));
requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId));
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');
var queryParameters = []; var queryParameters = [];
queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion));
if (queryParameters.length > 0) { if (queryParameters.length > 0) {
requestUrl += '?' + queryParameters.join('&'); requestUrl += '?' + queryParameters.join('&');
} }
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');
// Create HTTP transport objects // Create HTTP transport objects
var httpRequest = new WebResource(); var httpRequest = new WebResource();
@ -716,14 +671,14 @@ NotificationHubs.prototype.get = function (resourceGroupName, namespaceName, not
requestUrl = requestUrl.replace('{namespaceName}', encodeURIComponent(namespaceName)); requestUrl = requestUrl.replace('{namespaceName}', encodeURIComponent(namespaceName));
requestUrl = requestUrl.replace('{notificationHubName}', encodeURIComponent(notificationHubName)); requestUrl = requestUrl.replace('{notificationHubName}', encodeURIComponent(notificationHubName));
requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId));
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');
var queryParameters = []; var queryParameters = [];
queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion));
if (queryParameters.length > 0) { if (queryParameters.length > 0) {
requestUrl += '?' + queryParameters.join('&'); requestUrl += '?' + queryParameters.join('&');
} }
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');
// Create HTTP transport objects // Create HTTP transport objects
var httpRequest = new WebResource(); var httpRequest = new WebResource();
@ -815,39 +770,11 @@ NotificationHubs.prototype.get = function (resourceGroupName, namespaceName, not
* *
* @param {object} parameters The shared access authorization rule. * @param {object} parameters The shared access authorization rule.
* *
* @param {string} [parameters.location] Gets or sets Namespace data center * @param {array} [parameters.rights] The rights associated with the rule.
* location.
* *
* @param {string} [parameters.name] Gets or sets Name of the Namespace * @param {string} parameters.location Resource location
* AuthorizationRule.
* *
* @param {object} [parameters.properties] Gets or sets properties of the * @param {object} [parameters.tags] Resource tags
* Namespace AuthorizationRules.
*
* @param {string} [parameters.properties.primaryKey] The primary key that was
* used.
*
* @param {string} [parameters.properties.secondaryKey] The secondary key that
* was used.
*
* @param {string} [parameters.properties.keyName] The name of the key that
* was used.
*
* @param {string} [parameters.properties.claimType] The type of the claim.
*
* @param {string} [parameters.properties.claimValue] The value of the claim.
*
* @param {array} [parameters.properties.rights] The rights associated with
* the rule.
*
* @param {date} [parameters.properties.createdTime] The time at which the
* authorization rule was created.
*
* @param {date} [parameters.properties.modifiedTime] The most recent time the
* rule was updated.
*
* @param {number} [parameters.properties.revision] The revision number for
* the rule.
* *
* @param {object} [options] Optional Parameters. * @param {object} [options] Optional Parameters.
* *
@ -915,14 +842,14 @@ NotificationHubs.prototype.createOrUpdateAuthorizationRule = function (resourceG
requestUrl = requestUrl.replace('{notificationHubName}', encodeURIComponent(notificationHubName)); requestUrl = requestUrl.replace('{notificationHubName}', encodeURIComponent(notificationHubName));
requestUrl = requestUrl.replace('{authorizationRuleName}', encodeURIComponent(authorizationRuleName)); requestUrl = requestUrl.replace('{authorizationRuleName}', encodeURIComponent(authorizationRuleName));
requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId));
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');
var queryParameters = []; var queryParameters = [];
queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion));
if (queryParameters.length > 0) { if (queryParameters.length > 0) {
requestUrl += '?' + queryParameters.join('&'); requestUrl += '?' + queryParameters.join('&');
} }
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');
// Create HTTP transport objects // Create HTTP transport objects
var httpRequest = new WebResource(); var httpRequest = new WebResource();
@ -1087,14 +1014,14 @@ NotificationHubs.prototype.deleteAuthorizationRule = function (resourceGroupName
requestUrl = requestUrl.replace('{notificationHubName}', encodeURIComponent(notificationHubName)); requestUrl = requestUrl.replace('{notificationHubName}', encodeURIComponent(notificationHubName));
requestUrl = requestUrl.replace('{authorizationRuleName}', encodeURIComponent(authorizationRuleName)); requestUrl = requestUrl.replace('{authorizationRuleName}', encodeURIComponent(authorizationRuleName));
requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId));
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');
var queryParameters = []; var queryParameters = [];
queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion));
if (queryParameters.length > 0) { if (queryParameters.length > 0) {
requestUrl += '?' + queryParameters.join('&'); requestUrl += '?' + queryParameters.join('&');
} }
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');
// Create HTTP transport objects // Create HTTP transport objects
var httpRequest = new WebResource(); var httpRequest = new WebResource();
@ -1226,18 +1153,18 @@ NotificationHubs.prototype.getAuthorizationRule = function (resourceGroupName, n
requestUrl = requestUrl.replace('{notificationHubName}', encodeURIComponent(notificationHubName)); requestUrl = requestUrl.replace('{notificationHubName}', encodeURIComponent(notificationHubName));
requestUrl = requestUrl.replace('{authorizationRuleName}', encodeURIComponent(authorizationRuleName)); requestUrl = requestUrl.replace('{authorizationRuleName}', encodeURIComponent(authorizationRuleName));
requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId));
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');
var queryParameters = []; var queryParameters = [];
queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion));
if (queryParameters.length > 0) { if (queryParameters.length > 0) {
requestUrl += '?' + queryParameters.join('&'); requestUrl += '?' + queryParameters.join('&');
} }
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');
// Create HTTP transport objects // Create HTTP transport objects
var httpRequest = new WebResource(); var httpRequest = new WebResource();
httpRequest.method = 'POST'; httpRequest.method = 'GET';
httpRequest.headers = {}; httpRequest.headers = {};
httpRequest.url = requestUrl; httpRequest.url = requestUrl;
// Set Headers // Set Headers
@ -1374,14 +1301,14 @@ NotificationHubs.prototype.list = function (resourceGroupName, namespaceName, op
requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
requestUrl = requestUrl.replace('{namespaceName}', encodeURIComponent(namespaceName)); requestUrl = requestUrl.replace('{namespaceName}', encodeURIComponent(namespaceName));
requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId));
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');
var queryParameters = []; var queryParameters = [];
queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion));
if (queryParameters.length > 0) { if (queryParameters.length > 0) {
requestUrl += '?' + queryParameters.join('&'); requestUrl += '?' + queryParameters.join('&');
} }
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');
// Create HTTP transport objects // Create HTTP transport objects
var httpRequest = new WebResource(); var httpRequest = new WebResource();
@ -1528,18 +1455,18 @@ NotificationHubs.prototype.listAuthorizationRules = function (resourceGroupName,
requestUrl = requestUrl.replace('{namespaceName}', encodeURIComponent(namespaceName)); requestUrl = requestUrl.replace('{namespaceName}', encodeURIComponent(namespaceName));
requestUrl = requestUrl.replace('{notificationHubName}', encodeURIComponent(notificationHubName)); requestUrl = requestUrl.replace('{notificationHubName}', encodeURIComponent(notificationHubName));
requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId));
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');
var queryParameters = []; var queryParameters = [];
queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion));
if (queryParameters.length > 0) { if (queryParameters.length > 0) {
requestUrl += '?' + queryParameters.join('&'); requestUrl += '?' + queryParameters.join('&');
} }
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');
// Create HTTP transport objects // Create HTTP transport objects
var httpRequest = new WebResource(); var httpRequest = new WebResource();
httpRequest.method = 'POST'; httpRequest.method = 'GET';
httpRequest.headers = {}; httpRequest.headers = {};
httpRequest.url = requestUrl; httpRequest.url = requestUrl;
// Set Headers // Set Headers
@ -1688,14 +1615,14 @@ NotificationHubs.prototype.listKeys = function (resourceGroupName, namespaceName
requestUrl = requestUrl.replace('{notificationHubName}', encodeURIComponent(notificationHubName)); requestUrl = requestUrl.replace('{notificationHubName}', encodeURIComponent(notificationHubName));
requestUrl = requestUrl.replace('{authorizationRuleName}', encodeURIComponent(authorizationRuleName)); requestUrl = requestUrl.replace('{authorizationRuleName}', encodeURIComponent(authorizationRuleName));
requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId));
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');
var queryParameters = []; var queryParameters = [];
queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion));
if (queryParameters.length > 0) { if (queryParameters.length > 0) {
requestUrl += '?' + queryParameters.join('&'); requestUrl += '?' + queryParameters.join('&');
} }
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');
// Create HTTP transport objects // Create HTTP transport objects
var httpRequest = new WebResource(); var httpRequest = new WebResource();
@ -1774,6 +1701,191 @@ NotificationHubs.prototype.listKeys = function (resourceGroupName, namespaceName
}); });
}; };
/**
* Regenerates the Primary/Secondary Keys to the NotificationHub Authorization
* Rule
*
* @param {string} resourceGroupName The name of the resource group.
*
* @param {string} namespaceName The namespace name.
*
* @param {string} notificationHubName The notification hub name.
*
* @param {string} authorizationRuleName The connection string of the
* NotificationHub for the specified authorizationRule.
*
* @param {object} parameters Parameters supplied to regenerate the
* NotificationHub Authorization Rule Key.
*
* @param {string} [parameters.policyKey] Name of the key that has to be
* regenerated for the Namespace/Notification Hub Authorization Rule. The
* value can be Primary Key/Secondary Key.
*
* @param {object} [options] Optional Parameters.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
*
* @param {function} callback
*
* @returns {function} callback(err, result, request, response)
*
* {Error} err - The Error object if an error occurred, null otherwise.
*
* {object} [result] - The deserialized result object.
* See {@link ResourceListKeys} for more information.
*
* {object} [request] - The HTTP Request object if an error did not occur.
*
* {stream} [response] - The HTTP Response stream if an error did not occur.
*/
NotificationHubs.prototype.regenerateKeys = function (resourceGroupName, namespaceName, notificationHubName, authorizationRuleName, parameters, options, callback) {
var client = this.client;
if(!callback && typeof options === 'function') {
callback = options;
options = null;
}
if (!callback) {
throw new Error('callback cannot be null.');
}
// Validate
try {
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 (namespaceName === null || namespaceName === undefined || typeof namespaceName.valueOf() !== 'string') {
throw new Error('namespaceName cannot be null or undefined and it must be of type string.');
}
if (notificationHubName === null || notificationHubName === undefined || typeof notificationHubName.valueOf() !== 'string') {
throw new Error('notificationHubName cannot be null or undefined and it must be of type string.');
}
if (authorizationRuleName === null || authorizationRuleName === undefined || typeof authorizationRuleName.valueOf() !== 'string') {
throw new Error('authorizationRuleName cannot be null or undefined and it must be of type string.');
}
if (parameters === null || parameters === undefined) {
throw new Error('parameters cannot be null or undefined.');
}
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 (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 (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
var requestUrl = this.client.baseUri +
'//subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}/AuthorizationRules/{authorizationRuleName}/regenerateKeys';
requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName));
requestUrl = requestUrl.replace('{namespaceName}', encodeURIComponent(namespaceName));
requestUrl = requestUrl.replace('{notificationHubName}', encodeURIComponent(notificationHubName));
requestUrl = requestUrl.replace('{authorizationRuleName}', encodeURIComponent(authorizationRuleName));
requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId));
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');
var queryParameters = [];
queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion));
if (queryParameters.length > 0) {
requestUrl += '?' + queryParameters.join('&');
}
// Create HTTP transport objects
var httpRequest = new WebResource();
httpRequest.method = 'POST';
httpRequest.headers = {};
httpRequest.url = requestUrl;
// Set Headers
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(var headerName in options['customHeaders']) {
if (options['customHeaders'].hasOwnProperty(headerName)) {
httpRequest.headers[headerName] = options['customHeaders'][headerName];
}
}
}
httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
// Serialize Request
var requestContent = null;
var requestModel = null;
try {
if (parameters !== null && parameters !== undefined) {
var requestModelMapper = new client.models['PolicykeyResource']().mapper();
requestModel = client.serialize(requestModelMapper, parameters, 'parameters');
requestContent = JSON.stringify(requestModel);
}
} catch (error) {
var serializationError = new Error(util.format('Error "%s" occurred in serializing the ' +
'payload - "%s"', error.message, util.inspect(parameters, {depth: null})));
return callback(serializationError);
}
httpRequest.body = requestContent;
// Send Request
return client.pipeline(httpRequest, function (err, response, responseBody) {
if (err) {
return callback(err);
}
var statusCode = response.statusCode;
if (statusCode !== 200) {
var error = new Error(responseBody);
error.statusCode = response.statusCode;
error.request = msRest.stripRequest(httpRequest);
error.response = msRest.stripResponse(response);
if (responseBody === '') responseBody = null;
var 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) {
var resultMapper = new client.models['CloudError']().mapper();
error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body');
}
} catch (defaultError) {
error.message = util.format('Error "%s" occurred in deserializing the responseBody ' +
'- "%s" for the default response.', defaultError.message, responseBody);
return callback(error);
}
return callback(error);
}
// Create Result
var result = null;
if (responseBody === '') responseBody = null;
// Deserialize Response
if (statusCode === 200) {
var parsedResponse = null;
try {
parsedResponse = JSON.parse(responseBody);
result = JSON.parse(responseBody);
if (parsedResponse !== null && parsedResponse !== undefined) {
var resultMapper = new client.models['ResourceListKeys']().mapper();
result = client.deserialize(resultMapper, parsedResponse, 'result');
}
} catch (error) {
var deserializationError = new Error(util.format('Error "%s" occurred in deserializing the responseBody - "%s"', error, responseBody));
deserializationError.request = msRest.stripRequest(httpRequest);
deserializationError.response = msRest.stripResponse(response);
return callback(deserializationError);
}
}
return callback(null, result, httpRequest, response);
});
};
/** /**
* Lists the PNS Credentials associated with a notification hub . * Lists the PNS Credentials associated with a notification hub .
* *
@ -1795,7 +1907,7 @@ NotificationHubs.prototype.listKeys = function (resourceGroupName, namespaceName
* {Error} err - The Error object if an error occurred, null otherwise. * {Error} err - The Error object if an error occurred, null otherwise.
* *
* {object} [result] - The deserialized result object. * {object} [result] - The deserialized result object.
* See {@link NotificationHubResource} for more * See {@link PnsCredentialsResource} for more
* information. * information.
* *
* {object} [request] - The HTTP Request object if an error did not occur. * {object} [request] - The HTTP Request object if an error did not occur.
@ -1842,14 +1954,14 @@ NotificationHubs.prototype.getPnsCredentials = function (resourceGroupName, name
requestUrl = requestUrl.replace('{namespaceName}', encodeURIComponent(namespaceName)); requestUrl = requestUrl.replace('{namespaceName}', encodeURIComponent(namespaceName));
requestUrl = requestUrl.replace('{notificationHubName}', encodeURIComponent(notificationHubName)); requestUrl = requestUrl.replace('{notificationHubName}', encodeURIComponent(notificationHubName));
requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId));
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');
var queryParameters = []; var queryParameters = [];
queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion));
if (queryParameters.length > 0) { if (queryParameters.length > 0) {
requestUrl += '?' + queryParameters.join('&'); requestUrl += '?' + queryParameters.join('&');
} }
// trim all duplicate forward slashes in the url
var regex = /([^:]\/)\/+/gi;
requestUrl = requestUrl.replace(regex, '$1');
// Create HTTP transport objects // Create HTTP transport objects
var httpRequest = new WebResource(); var httpRequest = new WebResource();
@ -1913,7 +2025,7 @@ NotificationHubs.prototype.getPnsCredentials = function (resourceGroupName, name
parsedResponse = JSON.parse(responseBody); parsedResponse = JSON.parse(responseBody);
result = JSON.parse(responseBody); result = JSON.parse(responseBody);
if (parsedResponse !== null && parsedResponse !== undefined) { if (parsedResponse !== null && parsedResponse !== undefined) {
var resultMapper = new client.models['NotificationHubResource']().mapper(); var resultMapper = new client.models['PnsCredentialsResource']().mapper();
result = client.deserialize(resultMapper, parsedResponse, 'result'); result = client.deserialize(resultMapper, parsedResponse, 'result');
} }
} catch (error) { } catch (error) {
@ -2113,7 +2225,7 @@ NotificationHubs.prototype.listAuthorizationRulesNext = function (nextPageLink,
// Create HTTP transport objects // Create HTTP transport objects
var httpRequest = new WebResource(); var httpRequest = new WebResource();
httpRequest.method = 'POST'; httpRequest.method = 'GET';
httpRequest.headers = {}; httpRequest.headers = {};
httpRequest.url = requestUrl; httpRequest.url = requestUrl;
// Set Headers // Set Headers

Просмотреть файл

@ -303,6 +303,7 @@
<Compile Include="lib\services\notificationHubsManagement\lib\models\baiduCredentialProperties.js" /> <Compile Include="lib\services\notificationHubsManagement\lib\models\baiduCredentialProperties.js" />
<Compile Include="lib\services\notificationHubsManagement\lib\models\checkAvailabilityParameters.js" /> <Compile Include="lib\services\notificationHubsManagement\lib\models\checkAvailabilityParameters.js" />
<Compile Include="lib\services\notificationHubsManagement\lib\models\checkAvailabilityResource.js" /> <Compile Include="lib\services\notificationHubsManagement\lib\models\checkAvailabilityResource.js" />
<Compile Include="lib\services\notificationHubsManagement\lib\models\checkAvailabilityResult.js" />
<Compile Include="lib\services\notificationHubsManagement\lib\models\gcmCredential.js" /> <Compile Include="lib\services\notificationHubsManagement\lib\models\gcmCredential.js" />
<Compile Include="lib\services\notificationHubsManagement\lib\models\gcmCredentialProperties.js" /> <Compile Include="lib\services\notificationHubsManagement\lib\models\gcmCredentialProperties.js" />
<Compile Include="lib\services\notificationHubsManagement\lib\models\index.js" /> <Compile Include="lib\services\notificationHubsManagement\lib\models\index.js" />
@ -316,6 +317,8 @@
<Compile Include="lib\services\notificationHubsManagement\lib\models\notificationHubListResult.js" /> <Compile Include="lib\services\notificationHubsManagement\lib\models\notificationHubListResult.js" />
<Compile Include="lib\services\notificationHubsManagement\lib\models\notificationHubProperties.js" /> <Compile Include="lib\services\notificationHubsManagement\lib\models\notificationHubProperties.js" />
<Compile Include="lib\services\notificationHubsManagement\lib\models\notificationHubResource.js" /> <Compile Include="lib\services\notificationHubsManagement\lib\models\notificationHubResource.js" />
<Compile Include="lib\services\notificationHubsManagement\lib\models\pnsCredentialsResource.js" />
<Compile Include="lib\services\notificationHubsManagement\lib\models\policykeyResource.js" />
<Compile Include="lib\services\notificationHubsManagement\lib\models\resource.js" /> <Compile Include="lib\services\notificationHubsManagement\lib\models\resource.js" />
<Compile Include="lib\services\notificationHubsManagement\lib\models\resourceListKeys.js" /> <Compile Include="lib\services\notificationHubsManagement\lib\models\resourceListKeys.js" />
<Compile Include="lib\services\notificationHubsManagement\lib\models\sharedAccessAuthorizationRuleCreateOrUpdateParameters.js" /> <Compile Include="lib\services\notificationHubsManagement\lib\models\sharedAccessAuthorizationRuleCreateOrUpdateParameters.js" />

Просмотреть файл

@ -9,379 +9,457 @@ exports.scopes = [[function (nock) {
var result = var result =
nock('http://management.azure.com:443') nock('http://management.azure.com:443')
.filteringRequestBody(function (path) { return '*';}) .filteringRequestBody(function (path) { return '*';})
.put('/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup2973/providers/Microsoft.NotificationHubs/namespaces/testNS570/notificationHubs/testHub1901?api-version=2014-09-01', '*') .put('/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup4845/providers/Microsoft.NotificationHubs/namespaces/testNS9332/notificationHubs/testHub9507?api-version=2016-03-01', '*')
.reply(201, "{\"id\":null,\"name\":null,\"type\":null,\"location\":\"South Central US\",\"tags\":null,\"properties\":{\"registrationTtl\":\"10675199.02:48:05.4775807\"}}", { 'cache-control': 'no-cache', .reply(201, "{\"id\":\"/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup4845/providers/Microsoft.NotificationHubs/namespaces/testNS9332/notificationHubs/testHub9507\",\"name\":\"testHub9507\",\"type\":\"Microsoft.NotificationHubs/namespaces/notificationHubs\",\"location\":\"South Central US\",\"tags\":null,\"properties\":{\"registrationTtl\":\"10675199.02:48:05.4775807\"}}", { 'cache-control': 'no-cache',
pragma: 'no-cache', pragma: 'no-cache',
'content-length': '138', 'content-length': '369',
'content-type': 'application/json; charset=utf-8', 'content-type': 'application/json; charset=utf-8',
expires: '-1', expires: '-1',
'x-ms-request-id': 'a1cc3657-9129-4065-bd7e-7f0d97fb1eb8_M0_M0', 'x-ms-request-id': '9ad08ca8-e372-43c3-9de1-3a19873d6039_M4_M4',
'server-sb': 'Service-Bus-Resource-Provider/SN1', 'server-sb': 'Service-Bus-Resource-Provider/SN1',
server: 'Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0', server: 'Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0',
'x-ms-ratelimit-remaining-subscription-writes': '1198', 'x-ms-ratelimit-remaining-subscription-writes': '1199',
'x-ms-correlation-request-id': '692b9584-b9b2-422d-9fbe-5118c40ed6af', 'x-ms-correlation-request-id': 'ef1b872b-42a0-4956-ac16-a9c0c39e0a94',
'x-ms-routing-request-id': 'WESTUS:20160518T013619Z:692b9584-b9b2-422d-9fbe-5118c40ed6af', 'x-ms-routing-request-id': 'WESTUS2:20160812T230245Z:ef1b872b-42a0-4956-ac16-a9c0c39e0a94',
'strict-transport-security': 'max-age=31536000; includeSubDomains', 'strict-transport-security': 'max-age=31536000; includeSubDomains',
date: 'Wed, 18 May 2016 01:36:18 GMT', date: 'Fri, 12 Aug 2016 23:02:45 GMT',
connection: 'close' }); connection: 'close' });
return result; }, return result; },
function (nock) { function (nock) {
var result = var result =
nock('https://management.azure.com:443') nock('https://management.azure.com:443')
.filteringRequestBody(function (path) { return '*';}) .filteringRequestBody(function (path) { return '*';})
.put('/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup2973/providers/Microsoft.NotificationHubs/namespaces/testNS570/notificationHubs/testHub1901?api-version=2014-09-01', '*') .put('/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup4845/providers/Microsoft.NotificationHubs/namespaces/testNS9332/notificationHubs/testHub9507?api-version=2016-03-01', '*')
.reply(201, "{\"id\":null,\"name\":null,\"type\":null,\"location\":\"South Central US\",\"tags\":null,\"properties\":{\"registrationTtl\":\"10675199.02:48:05.4775807\"}}", { 'cache-control': 'no-cache', .reply(201, "{\"id\":\"/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup4845/providers/Microsoft.NotificationHubs/namespaces/testNS9332/notificationHubs/testHub9507\",\"name\":\"testHub9507\",\"type\":\"Microsoft.NotificationHubs/namespaces/notificationHubs\",\"location\":\"South Central US\",\"tags\":null,\"properties\":{\"registrationTtl\":\"10675199.02:48:05.4775807\"}}", { 'cache-control': 'no-cache',
pragma: 'no-cache', pragma: 'no-cache',
'content-length': '138', 'content-length': '369',
'content-type': 'application/json; charset=utf-8', 'content-type': 'application/json; charset=utf-8',
expires: '-1', expires: '-1',
'x-ms-request-id': 'a1cc3657-9129-4065-bd7e-7f0d97fb1eb8_M0_M0', 'x-ms-request-id': '9ad08ca8-e372-43c3-9de1-3a19873d6039_M4_M4',
'server-sb': 'Service-Bus-Resource-Provider/SN1', 'server-sb': 'Service-Bus-Resource-Provider/SN1',
server: 'Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0', server: 'Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0',
'x-ms-ratelimit-remaining-subscription-writes': '1198', 'x-ms-ratelimit-remaining-subscription-writes': '1199',
'x-ms-correlation-request-id': '692b9584-b9b2-422d-9fbe-5118c40ed6af', 'x-ms-correlation-request-id': 'ef1b872b-42a0-4956-ac16-a9c0c39e0a94',
'x-ms-routing-request-id': 'WESTUS:20160518T013619Z:692b9584-b9b2-422d-9fbe-5118c40ed6af', 'x-ms-routing-request-id': 'WESTUS2:20160812T230245Z:ef1b872b-42a0-4956-ac16-a9c0c39e0a94',
'strict-transport-security': 'max-age=31536000; includeSubDomains', 'strict-transport-security': 'max-age=31536000; includeSubDomains',
date: 'Wed, 18 May 2016 01:36:18 GMT', date: 'Fri, 12 Aug 2016 23:02:45 GMT',
connection: 'close' }); connection: 'close' });
return result; }, return result; },
function (nock) { function (nock) {
var result = var result =
nock('http://management.azure.com:443') nock('http://management.azure.com:443')
.get('/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup2973/providers/Microsoft.NotificationHubs/namespaces/testNS570/notificationHubs/testHub1901?api-version=2014-09-01') .get('/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup4845/providers/Microsoft.NotificationHubs/namespaces/testNS9332/notificationHubs/testHub9507?api-version=2016-03-01')
.reply(200, "{\"id\":\"/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup2973/providers/Microsoft.NotificationHubs/namespaces/testNS570/notificationHubs/testHub1901\",\"name\":\"testHub1901\",\"type\":\"Microsoft.NotificationHubs/namespaces/notificationHubs\",\"location\":\"South Central US\",\"tags\":null,\"properties\":{\"registrationTtl\":\"10675199.02:48:05.4775807\",\"authorizationRules\":[]}}", { 'cache-control': 'no-cache', .reply(200, "{\"id\":\"/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup4845/providers/Microsoft.NotificationHubs/namespaces/testNS9332/notificationHubs/testHub9507\",\"name\":\"testHub9507\",\"type\":\"Microsoft.NotificationHubs/namespaces/notificationHubs\",\"location\":\"South Central US\",\"tags\":null,\"properties\":{\"registrationTtl\":\"10675199.02:48:05.4775807\",\"authorizationRules\":[]}}", { 'cache-control': 'no-cache',
pragma: 'no-cache', pragma: 'no-cache',
'content-length': '392', 'content-length': '393',
'content-type': 'application/json; charset=utf-8', 'content-type': 'application/json; charset=utf-8',
expires: '-1', expires: '-1',
'x-ms-request-id': 'ffa678ca-c050-4152-8530-17336e22167d_M1_M1', 'x-ms-request-id': 'af856406-c9d4-48e5-b29b-d3362ad89874_M0_M0',
'server-sb': 'Service-Bus-Resource-Provider/SN1', 'server-sb': 'Service-Bus-Resource-Provider/SN1',
server: 'Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0', server: 'Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0',
'x-ms-ratelimit-remaining-subscription-reads': '14998', 'x-ms-ratelimit-remaining-subscription-reads': '14995',
'x-ms-correlation-request-id': '5496a52e-9603-4666-8ec2-bedffbbca5c1', 'x-ms-correlation-request-id': '2f747e99-33ca-427a-ac88-49e82a031b24',
'x-ms-routing-request-id': 'WESTUS:20160518T013620Z:5496a52e-9603-4666-8ec2-bedffbbca5c1', 'x-ms-routing-request-id': 'WESTUS2:20160812T230246Z:2f747e99-33ca-427a-ac88-49e82a031b24',
'strict-transport-security': 'max-age=31536000; includeSubDomains', 'strict-transport-security': 'max-age=31536000; includeSubDomains',
date: 'Wed, 18 May 2016 01:36:20 GMT', date: 'Fri, 12 Aug 2016 23:02:45 GMT',
connection: 'close' }); connection: 'close' });
return result; }, return result; },
function (nock) { function (nock) {
var result = var result =
nock('https://management.azure.com:443') nock('https://management.azure.com:443')
.get('/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup2973/providers/Microsoft.NotificationHubs/namespaces/testNS570/notificationHubs/testHub1901?api-version=2014-09-01') .get('/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup4845/providers/Microsoft.NotificationHubs/namespaces/testNS9332/notificationHubs/testHub9507?api-version=2016-03-01')
.reply(200, "{\"id\":\"/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup2973/providers/Microsoft.NotificationHubs/namespaces/testNS570/notificationHubs/testHub1901\",\"name\":\"testHub1901\",\"type\":\"Microsoft.NotificationHubs/namespaces/notificationHubs\",\"location\":\"South Central US\",\"tags\":null,\"properties\":{\"registrationTtl\":\"10675199.02:48:05.4775807\",\"authorizationRules\":[]}}", { 'cache-control': 'no-cache', .reply(200, "{\"id\":\"/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup4845/providers/Microsoft.NotificationHubs/namespaces/testNS9332/notificationHubs/testHub9507\",\"name\":\"testHub9507\",\"type\":\"Microsoft.NotificationHubs/namespaces/notificationHubs\",\"location\":\"South Central US\",\"tags\":null,\"properties\":{\"registrationTtl\":\"10675199.02:48:05.4775807\",\"authorizationRules\":[]}}", { 'cache-control': 'no-cache',
pragma: 'no-cache', pragma: 'no-cache',
'content-length': '392', 'content-length': '393',
'content-type': 'application/json; charset=utf-8', 'content-type': 'application/json; charset=utf-8',
expires: '-1', expires: '-1',
'x-ms-request-id': 'ffa678ca-c050-4152-8530-17336e22167d_M1_M1', 'x-ms-request-id': 'af856406-c9d4-48e5-b29b-d3362ad89874_M0_M0',
'server-sb': 'Service-Bus-Resource-Provider/SN1', 'server-sb': 'Service-Bus-Resource-Provider/SN1',
server: 'Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0', server: 'Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0',
'x-ms-ratelimit-remaining-subscription-reads': '14998', 'x-ms-ratelimit-remaining-subscription-reads': '14995',
'x-ms-correlation-request-id': '5496a52e-9603-4666-8ec2-bedffbbca5c1', 'x-ms-correlation-request-id': '2f747e99-33ca-427a-ac88-49e82a031b24',
'x-ms-routing-request-id': 'WESTUS:20160518T013620Z:5496a52e-9603-4666-8ec2-bedffbbca5c1', 'x-ms-routing-request-id': 'WESTUS2:20160812T230246Z:2f747e99-33ca-427a-ac88-49e82a031b24',
'strict-transport-security': 'max-age=31536000; includeSubDomains', 'strict-transport-security': 'max-age=31536000; includeSubDomains',
date: 'Wed, 18 May 2016 01:36:20 GMT', date: 'Fri, 12 Aug 2016 23:02:45 GMT',
connection: 'close' }); connection: 'close' });
return result; }, return result; },
function (nock) { function (nock) {
var result = var result =
nock('http://management.azure.com:443') nock('http://management.azure.com:443')
.get('/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup2973/providers/Microsoft.NotificationHubs/namespaces/testNS570/notificationHubs?api-version=2014-09-01') .get('/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup4845/providers/Microsoft.NotificationHubs/namespaces/testNS9332/notificationHubs?api-version=2016-03-01')
.reply(200, "{\"value\":[{\"id\":\"/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup2973/providers/Microsoft.NotificationHubs/namespaces/testNS570/notificationHubs/testhub1901\",\"name\":\"testhub1901\",\"type\":\"Microsoft.NotificationHubs/namespaces/notificationHubs\",\"location\":\"South Central US\",\"tags\":null,\"properties\":{\"registrationTtl\":\"10675199.02:48:05.4775807\",\"authorizationRules\":[]}}],\"nextLink\":null}", { 'cache-control': 'no-cache', .reply(200, "{\"value\":[{\"id\":\"/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup4845/providers/Microsoft.NotificationHubs/namespaces/testNS9332/notificationHubs/testhub9507\",\"name\":\"testhub9507\",\"type\":\"Microsoft.NotificationHubs/namespaces/notificationHubs\",\"location\":\"South Central US\",\"tags\":null,\"properties\":{\"registrationTtl\":\"10675199.02:48:05.4775807\",\"authorizationRules\":[]}}],\"nextLink\":null}", { 'cache-control': 'no-cache',
pragma: 'no-cache', pragma: 'no-cache',
'content-length': '420', 'content-length': '421',
'content-type': 'application/json; charset=utf-8', 'content-type': 'application/json; charset=utf-8',
expires: '-1', expires: '-1',
'x-ms-request-id': '10d8b690-e801-40b8-bd53-1d785908456a_M3_M3', 'x-ms-request-id': '3c61c7ef-ff3c-49ca-9d80-cef5dbfae372_M1_M1',
'server-sb': 'Service-Bus-Resource-Provider/SN1', 'server-sb': 'Service-Bus-Resource-Provider/SN1',
server: 'Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0', server: 'Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0',
'x-ms-ratelimit-remaining-subscription-reads': '14998', 'x-ms-ratelimit-remaining-subscription-reads': '14995',
'x-ms-correlation-request-id': 'b1998eae-2fe5-4bdc-932d-9c5812878987', 'x-ms-correlation-request-id': 'c128ced6-c0bc-463e-b48f-ac39a2be1381',
'x-ms-routing-request-id': 'WESTUS:20160518T013621Z:b1998eae-2fe5-4bdc-932d-9c5812878987', 'x-ms-routing-request-id': 'WESTUS2:20160812T230247Z:c128ced6-c0bc-463e-b48f-ac39a2be1381',
'strict-transport-security': 'max-age=31536000; includeSubDomains', 'strict-transport-security': 'max-age=31536000; includeSubDomains',
date: 'Wed, 18 May 2016 01:36:21 GMT', date: 'Fri, 12 Aug 2016 23:02:46 GMT',
connection: 'close' }); connection: 'close' });
return result; }, return result; },
function (nock) { function (nock) {
var result = var result =
nock('https://management.azure.com:443') nock('https://management.azure.com:443')
.get('/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup2973/providers/Microsoft.NotificationHubs/namespaces/testNS570/notificationHubs?api-version=2014-09-01') .get('/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup4845/providers/Microsoft.NotificationHubs/namespaces/testNS9332/notificationHubs?api-version=2016-03-01')
.reply(200, "{\"value\":[{\"id\":\"/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup2973/providers/Microsoft.NotificationHubs/namespaces/testNS570/notificationHubs/testhub1901\",\"name\":\"testhub1901\",\"type\":\"Microsoft.NotificationHubs/namespaces/notificationHubs\",\"location\":\"South Central US\",\"tags\":null,\"properties\":{\"registrationTtl\":\"10675199.02:48:05.4775807\",\"authorizationRules\":[]}}],\"nextLink\":null}", { 'cache-control': 'no-cache', .reply(200, "{\"value\":[{\"id\":\"/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup4845/providers/Microsoft.NotificationHubs/namespaces/testNS9332/notificationHubs/testhub9507\",\"name\":\"testhub9507\",\"type\":\"Microsoft.NotificationHubs/namespaces/notificationHubs\",\"location\":\"South Central US\",\"tags\":null,\"properties\":{\"registrationTtl\":\"10675199.02:48:05.4775807\",\"authorizationRules\":[]}}],\"nextLink\":null}", { 'cache-control': 'no-cache',
pragma: 'no-cache', pragma: 'no-cache',
'content-length': '420', 'content-length': '421',
'content-type': 'application/json; charset=utf-8', 'content-type': 'application/json; charset=utf-8',
expires: '-1', expires: '-1',
'x-ms-request-id': '10d8b690-e801-40b8-bd53-1d785908456a_M3_M3', 'x-ms-request-id': '3c61c7ef-ff3c-49ca-9d80-cef5dbfae372_M1_M1',
'server-sb': 'Service-Bus-Resource-Provider/SN1', 'server-sb': 'Service-Bus-Resource-Provider/SN1',
server: 'Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0', server: 'Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0',
'x-ms-ratelimit-remaining-subscription-reads': '14998', 'x-ms-ratelimit-remaining-subscription-reads': '14995',
'x-ms-correlation-request-id': 'b1998eae-2fe5-4bdc-932d-9c5812878987', 'x-ms-correlation-request-id': 'c128ced6-c0bc-463e-b48f-ac39a2be1381',
'x-ms-routing-request-id': 'WESTUS:20160518T013621Z:b1998eae-2fe5-4bdc-932d-9c5812878987', 'x-ms-routing-request-id': 'WESTUS2:20160812T230247Z:c128ced6-c0bc-463e-b48f-ac39a2be1381',
'strict-transport-security': 'max-age=31536000; includeSubDomains', 'strict-transport-security': 'max-age=31536000; includeSubDomains',
date: 'Wed, 18 May 2016 01:36:21 GMT', date: 'Fri, 12 Aug 2016 23:02:46 GMT',
connection: 'close' }); connection: 'close' });
return result; }, return result; },
function (nock) { function (nock) {
var result = var result =
nock('http://management.azure.com:443') nock('http://management.azure.com:443')
.post('/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup2973/providers/Microsoft.NotificationHubs/namespaces/testNS570/notificationHubs/testHub1901/pnsCredentials?api-version=2014-09-01') .post('/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup4845/providers/Microsoft.NotificationHubs/namespaces/testNS9332/notificationHubs/testHub9507/pnsCredentials?api-version=2016-03-01')
.reply(200, "{\"id\":\"/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup2973/providers/Microsoft.NotificationHubs/namespaces/testNS570/notificationHubs/testHub1901/pnsCredentials\",\"name\":\"testHub1901\",\"type\":\"Microsoft.NotificationHubs/namespaces/notificationHubs/pnsCredentials\",\"location\":null,\"tags\":null,\"properties\":{}}", { 'cache-control': 'no-cache', .reply(200, "{\"id\":\"/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup4845/providers/Microsoft.NotificationHubs/namespaces/testNS9332/notificationHubs/testHub9507/pnsCredentials\",\"name\":\"testHub9507\",\"type\":\"Microsoft.NotificationHubs/namespaces/notificationHubs/pnsCredentials\",\"location\":null,\"tags\":null,\"properties\":{\"wnsCredential\":{\"properties\":{\"packageSid\":\"ms-app://s-1-15-2-1817505189-427745171-3213743798-2985869298-800724128-1004923984-4143860699\",\"secretKey\":\"w7TBprR-9tJxn9mUOdK4PPHLCAzSYFhp\",\"windowsLiveEndpoint\":\"http://pushtestservice.cloudapp.net/LiveID/accesstoken.srf\"}}}}", { 'cache-control': 'no-cache',
pragma: 'no-cache', pragma: 'no-cache',
'content-length': '339', 'content-length': '610',
'content-type': 'application/json; charset=utf-8', 'content-type': 'application/json; charset=utf-8',
expires: '-1', expires: '-1',
'x-ms-request-id': '73bfbb15-4f66-472d-8037-f1ac5e27ce2f_M1_M1', 'x-ms-request-id': '8b303a70-0f44-459e-8baa-8dc5055ca45e_M2_M2',
'server-sb': 'Service-Bus-Resource-Provider/SN1', 'server-sb': 'Service-Bus-Resource-Provider/SN1',
server: 'Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0', server: 'Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0',
'x-ms-ratelimit-remaining-subscription-writes': '1198', 'x-ms-ratelimit-remaining-subscription-writes': '1198',
'x-ms-correlation-request-id': 'ccd3d77f-78e3-4447-a0fd-bb224b1c3e2e', 'x-ms-correlation-request-id': 'db7d8e83-2302-434e-bc34-f584c78ef298',
'x-ms-routing-request-id': 'WESTUS:20160518T013622Z:ccd3d77f-78e3-4447-a0fd-bb224b1c3e2e', 'x-ms-routing-request-id': 'WESTUS2:20160812T230247Z:db7d8e83-2302-434e-bc34-f584c78ef298',
'strict-transport-security': 'max-age=31536000; includeSubDomains', 'strict-transport-security': 'max-age=31536000; includeSubDomains',
date: 'Wed, 18 May 2016 01:36:22 GMT', date: 'Fri, 12 Aug 2016 23:02:47 GMT',
connection: 'close' }); connection: 'close' });
return result; }, return result; },
function (nock) { function (nock) {
var result = var result =
nock('https://management.azure.com:443') nock('https://management.azure.com:443')
.post('/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup2973/providers/Microsoft.NotificationHubs/namespaces/testNS570/notificationHubs/testHub1901/pnsCredentials?api-version=2014-09-01') .post('/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup4845/providers/Microsoft.NotificationHubs/namespaces/testNS9332/notificationHubs/testHub9507/pnsCredentials?api-version=2016-03-01')
.reply(200, "{\"id\":\"/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup2973/providers/Microsoft.NotificationHubs/namespaces/testNS570/notificationHubs/testHub1901/pnsCredentials\",\"name\":\"testHub1901\",\"type\":\"Microsoft.NotificationHubs/namespaces/notificationHubs/pnsCredentials\",\"location\":null,\"tags\":null,\"properties\":{}}", { 'cache-control': 'no-cache', .reply(200, "{\"id\":\"/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup4845/providers/Microsoft.NotificationHubs/namespaces/testNS9332/notificationHubs/testHub9507/pnsCredentials\",\"name\":\"testHub9507\",\"type\":\"Microsoft.NotificationHubs/namespaces/notificationHubs/pnsCredentials\",\"location\":null,\"tags\":null,\"properties\":{\"wnsCredential\":{\"properties\":{\"packageSid\":\"ms-app://s-1-15-2-1817505189-427745171-3213743798-2985869298-800724128-1004923984-4143860699\",\"secretKey\":\"w7TBprR-9tJxn9mUOdK4PPHLCAzSYFhp\",\"windowsLiveEndpoint\":\"http://pushtestservice.cloudapp.net/LiveID/accesstoken.srf\"}}}}", { 'cache-control': 'no-cache',
pragma: 'no-cache', pragma: 'no-cache',
'content-length': '339', 'content-length': '610',
'content-type': 'application/json; charset=utf-8', 'content-type': 'application/json; charset=utf-8',
expires: '-1', expires: '-1',
'x-ms-request-id': '73bfbb15-4f66-472d-8037-f1ac5e27ce2f_M1_M1', 'x-ms-request-id': '8b303a70-0f44-459e-8baa-8dc5055ca45e_M2_M2',
'server-sb': 'Service-Bus-Resource-Provider/SN1', 'server-sb': 'Service-Bus-Resource-Provider/SN1',
server: 'Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0', server: 'Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0',
'x-ms-ratelimit-remaining-subscription-writes': '1198', 'x-ms-ratelimit-remaining-subscription-writes': '1198',
'x-ms-correlation-request-id': 'ccd3d77f-78e3-4447-a0fd-bb224b1c3e2e', 'x-ms-correlation-request-id': 'db7d8e83-2302-434e-bc34-f584c78ef298',
'x-ms-routing-request-id': 'WESTUS:20160518T013622Z:ccd3d77f-78e3-4447-a0fd-bb224b1c3e2e', 'x-ms-routing-request-id': 'WESTUS2:20160812T230247Z:db7d8e83-2302-434e-bc34-f584c78ef298',
'strict-transport-security': 'max-age=31536000; includeSubDomains', 'strict-transport-security': 'max-age=31536000; includeSubDomains',
date: 'Wed, 18 May 2016 01:36:22 GMT', date: 'Fri, 12 Aug 2016 23:02:47 GMT',
connection: 'close' }); connection: 'close' });
return result; }, return result; },
function (nock) { function (nock) {
var result = var result =
nock('http://management.azure.com:443') nock('http://management.azure.com:443')
.filteringRequestBody(function (path) { return '*';}) .filteringRequestBody(function (path) { return '*';})
.put('/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup2973/providers/Microsoft.NotificationHubs/namespaces/testNS570/notificationHubs/testHub1901/AuthorizationRules/testAuth7859?api-version=2014-09-01', '*') .put('/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup4845/providers/Microsoft.NotificationHubs/namespaces/testNS9332/notificationHubs/testHub9507/AuthorizationRules/testAuth3570?api-version=2016-03-01', '*')
.reply(200, "{\"id\":\"/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup2973/providers/Microsoft.NotificationHubs/namespaces/testNS570/notificationHubs/testHub1901/AuthorizationRules/testAuth7859\",\"name\":\"testAuth7859\",\"type\":\"Microsoft.NotificationHubs/namespaces/notificationHubs/authorizationRules\",\"location\":null,\"tags\":null,\"properties\":{\"keyName\":\"testAuth7859\",\"primaryKey\":\"IR4qH02MB2yXjlekt5fhlgMR9YAoMsXHTkUqarUkATU=\",\"secondaryKey\":\"aVpieJX6Ot7PUnC9N4wUAWbpB6wfX+s893SwXW9WCeQ=\",\"claimType\":\"SharedAccessKey\",\"claimValue\":\"None\",\"rights\":[\"Listen\",\"Send\"],\"createdTime\":\"2016-05-18T01:36:24.0584314Z\",\"modifiedTime\":\"2016-05-18T01:36:24.0584314Z\"}}", { 'cache-control': 'no-cache', .reply(200, "{\"id\":\"/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup4845/providers/Microsoft.NotificationHubs/namespaces/testNS9332/notificationHubs/testHub9507/AuthorizationRules/testAuth3570\",\"name\":\"testAuth3570\",\"type\":\"Microsoft.NotificationHubs/namespaces/notificationHubs/authorizationRules\",\"location\":null,\"tags\":null,\"properties\":{\"rights\":[\"Listen\",\"Send\"]}}", { 'cache-control': 'no-cache',
pragma: 'no-cache', pragma: 'no-cache',
'content-length': '675', 'content-length': '388',
'content-type': 'application/json; charset=utf-8', 'content-type': 'application/json; charset=utf-8',
expires: '-1', expires: '-1',
'x-ms-request-id': 'dd2071a4-8a2a-4836-8ad1-4638261f43ae_M0_M0', 'x-ms-request-id': 'c1a6c9d7-8abd-4fc5-a32f-5f5cea1a9940_M2_M2',
'server-sb': 'Service-Bus-Resource-Provider/SN1', 'server-sb': 'Service-Bus-Resource-Provider/SN1',
server: 'Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0', server: 'Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0',
'x-ms-ratelimit-remaining-subscription-writes': '1199', 'x-ms-ratelimit-remaining-subscription-writes': '1199',
'x-ms-correlation-request-id': '1b950752-8d74-4c62-922b-33adbd5c4077', 'x-ms-correlation-request-id': '1d69c725-ea73-4996-904c-26d2a68800f3',
'x-ms-routing-request-id': 'WESTUS:20160518T013623Z:1b950752-8d74-4c62-922b-33adbd5c4077', 'x-ms-routing-request-id': 'WESTUS2:20160812T230248Z:1d69c725-ea73-4996-904c-26d2a68800f3',
'strict-transport-security': 'max-age=31536000; includeSubDomains', 'strict-transport-security': 'max-age=31536000; includeSubDomains',
date: 'Wed, 18 May 2016 01:36:23 GMT', date: 'Fri, 12 Aug 2016 23:02:48 GMT',
connection: 'close' }); connection: 'close' });
return result; }, return result; },
function (nock) { function (nock) {
var result = var result =
nock('https://management.azure.com:443') nock('https://management.azure.com:443')
.filteringRequestBody(function (path) { return '*';}) .filteringRequestBody(function (path) { return '*';})
.put('/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup2973/providers/Microsoft.NotificationHubs/namespaces/testNS570/notificationHubs/testHub1901/AuthorizationRules/testAuth7859?api-version=2014-09-01', '*') .put('/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup4845/providers/Microsoft.NotificationHubs/namespaces/testNS9332/notificationHubs/testHub9507/AuthorizationRules/testAuth3570?api-version=2016-03-01', '*')
.reply(200, "{\"id\":\"/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup2973/providers/Microsoft.NotificationHubs/namespaces/testNS570/notificationHubs/testHub1901/AuthorizationRules/testAuth7859\",\"name\":\"testAuth7859\",\"type\":\"Microsoft.NotificationHubs/namespaces/notificationHubs/authorizationRules\",\"location\":null,\"tags\":null,\"properties\":{\"keyName\":\"testAuth7859\",\"primaryKey\":\"IR4qH02MB2yXjlekt5fhlgMR9YAoMsXHTkUqarUkATU=\",\"secondaryKey\":\"aVpieJX6Ot7PUnC9N4wUAWbpB6wfX+s893SwXW9WCeQ=\",\"claimType\":\"SharedAccessKey\",\"claimValue\":\"None\",\"rights\":[\"Listen\",\"Send\"],\"createdTime\":\"2016-05-18T01:36:24.0584314Z\",\"modifiedTime\":\"2016-05-18T01:36:24.0584314Z\"}}", { 'cache-control': 'no-cache', .reply(200, "{\"id\":\"/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup4845/providers/Microsoft.NotificationHubs/namespaces/testNS9332/notificationHubs/testHub9507/AuthorizationRules/testAuth3570\",\"name\":\"testAuth3570\",\"type\":\"Microsoft.NotificationHubs/namespaces/notificationHubs/authorizationRules\",\"location\":null,\"tags\":null,\"properties\":{\"rights\":[\"Listen\",\"Send\"]}}", { 'cache-control': 'no-cache',
pragma: 'no-cache', pragma: 'no-cache',
'content-length': '675', 'content-length': '388',
'content-type': 'application/json; charset=utf-8', 'content-type': 'application/json; charset=utf-8',
expires: '-1', expires: '-1',
'x-ms-request-id': 'dd2071a4-8a2a-4836-8ad1-4638261f43ae_M0_M0', 'x-ms-request-id': 'c1a6c9d7-8abd-4fc5-a32f-5f5cea1a9940_M2_M2',
'server-sb': 'Service-Bus-Resource-Provider/SN1', 'server-sb': 'Service-Bus-Resource-Provider/SN1',
server: 'Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0', server: 'Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0',
'x-ms-ratelimit-remaining-subscription-writes': '1199', 'x-ms-ratelimit-remaining-subscription-writes': '1199',
'x-ms-correlation-request-id': '1b950752-8d74-4c62-922b-33adbd5c4077', 'x-ms-correlation-request-id': '1d69c725-ea73-4996-904c-26d2a68800f3',
'x-ms-routing-request-id': 'WESTUS:20160518T013623Z:1b950752-8d74-4c62-922b-33adbd5c4077', 'x-ms-routing-request-id': 'WESTUS2:20160812T230248Z:1d69c725-ea73-4996-904c-26d2a68800f3',
'strict-transport-security': 'max-age=31536000; includeSubDomains', 'strict-transport-security': 'max-age=31536000; includeSubDomains',
date: 'Wed, 18 May 2016 01:36:23 GMT', date: 'Fri, 12 Aug 2016 23:02:48 GMT',
connection: 'close' }); connection: 'close' });
return result; }, return result; },
function (nock) { function (nock) {
var result = var result =
nock('http://management.azure.com:443') nock('http://management.azure.com:443')
.post('/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup2973/providers/Microsoft.NotificationHubs/namespaces/testNS570/notificationHubs/testHub1901/AuthorizationRules/testAuth7859?api-version=2014-09-01') .get('/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup4845/providers/Microsoft.NotificationHubs/namespaces/testNS9332/notificationHubs/testHub9507/AuthorizationRules/testAuth3570?api-version=2016-03-01')
.reply(200, "{\"id\":\"/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup2973/providers/Microsoft.NotificationHubs/namespaces/testNS570/notificationHubs/testHub1901/AuthorizationRules/testAuth7859\",\"name\":\"testAuth7859\",\"type\":\"Microsoft.NotificationHubs/namespaces/notificationHubs/authorizationRules\",\"location\":null,\"tags\":null,\"properties\":{\"keyName\":\"testAuth7859\",\"primaryKey\":\"IR4qH02MB2yXjlekt5fhlgMR9YAoMsXHTkUqarUkATU=\",\"secondaryKey\":\"aVpieJX6Ot7PUnC9N4wUAWbpB6wfX+s893SwXW9WCeQ=\",\"claimType\":\"SharedAccessKey\",\"claimValue\":\"None\",\"rights\":[\"Listen\",\"Send\"],\"createdTime\":\"2016-05-18T01:36:24.0584314Z\",\"modifiedTime\":\"2016-05-18T01:36:24.0584314Z\"}}", { 'cache-control': 'no-cache', .reply(200, "{\"id\":\"/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup4845/providers/Microsoft.NotificationHubs/namespaces/testNS9332/notificationHubs/testHub9507/AuthorizationRules/testAuth3570\",\"name\":\"testAuth3570\",\"type\":\"Microsoft.NotificationHubs/namespaces/notificationHubs/authorizationRules\",\"location\":null,\"tags\":null,\"properties\":{\"rights\":[\"Listen\",\"Send\"]}}", { 'cache-control': 'no-cache',
pragma: 'no-cache', pragma: 'no-cache',
'content-length': '675', 'content-length': '388',
'content-type': 'application/json; charset=utf-8', 'content-type': 'application/json; charset=utf-8',
expires: '-1', expires: '-1',
'x-ms-request-id': '5b3d4ec4-0637-4d49-abc6-9053d4cb6b9e_M6_M6', 'x-ms-request-id': '31b59a09-31b7-4649-a652-e48c85acf796_M6_M6',
'server-sb': 'Service-Bus-Resource-Provider/SN1', 'server-sb': 'Service-Bus-Resource-Provider/SN1',
server: 'Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0', server: 'Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0',
'x-ms-ratelimit-remaining-subscription-writes': '1199', 'x-ms-ratelimit-remaining-subscription-reads': '14998',
'x-ms-correlation-request-id': '96652709-ac65-41b4-8580-2bc8216f6bf1', 'x-ms-correlation-request-id': '6e291825-ba3a-4f9a-81f0-351e56494db0',
'x-ms-routing-request-id': 'WESTUS:20160518T013645Z:96652709-ac65-41b4-8580-2bc8216f6bf1', 'x-ms-routing-request-id': 'WESTUS2:20160812T230249Z:6e291825-ba3a-4f9a-81f0-351e56494db0',
'strict-transport-security': 'max-age=31536000; includeSubDomains', 'strict-transport-security': 'max-age=31536000; includeSubDomains',
date: 'Wed, 18 May 2016 01:36:44 GMT', date: 'Fri, 12 Aug 2016 23:02:48 GMT',
connection: 'close' }); connection: 'close' });
return result; }, return result; },
function (nock) { function (nock) {
var result = var result =
nock('https://management.azure.com:443') nock('https://management.azure.com:443')
.post('/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup2973/providers/Microsoft.NotificationHubs/namespaces/testNS570/notificationHubs/testHub1901/AuthorizationRules/testAuth7859?api-version=2014-09-01') .get('/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup4845/providers/Microsoft.NotificationHubs/namespaces/testNS9332/notificationHubs/testHub9507/AuthorizationRules/testAuth3570?api-version=2016-03-01')
.reply(200, "{\"id\":\"/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup2973/providers/Microsoft.NotificationHubs/namespaces/testNS570/notificationHubs/testHub1901/AuthorizationRules/testAuth7859\",\"name\":\"testAuth7859\",\"type\":\"Microsoft.NotificationHubs/namespaces/notificationHubs/authorizationRules\",\"location\":null,\"tags\":null,\"properties\":{\"keyName\":\"testAuth7859\",\"primaryKey\":\"IR4qH02MB2yXjlekt5fhlgMR9YAoMsXHTkUqarUkATU=\",\"secondaryKey\":\"aVpieJX6Ot7PUnC9N4wUAWbpB6wfX+s893SwXW9WCeQ=\",\"claimType\":\"SharedAccessKey\",\"claimValue\":\"None\",\"rights\":[\"Listen\",\"Send\"],\"createdTime\":\"2016-05-18T01:36:24.0584314Z\",\"modifiedTime\":\"2016-05-18T01:36:24.0584314Z\"}}", { 'cache-control': 'no-cache', .reply(200, "{\"id\":\"/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup4845/providers/Microsoft.NotificationHubs/namespaces/testNS9332/notificationHubs/testHub9507/AuthorizationRules/testAuth3570\",\"name\":\"testAuth3570\",\"type\":\"Microsoft.NotificationHubs/namespaces/notificationHubs/authorizationRules\",\"location\":null,\"tags\":null,\"properties\":{\"rights\":[\"Listen\",\"Send\"]}}", { 'cache-control': 'no-cache',
pragma: 'no-cache', pragma: 'no-cache',
'content-length': '675', 'content-length': '388',
'content-type': 'application/json; charset=utf-8', 'content-type': 'application/json; charset=utf-8',
expires: '-1', expires: '-1',
'x-ms-request-id': '5b3d4ec4-0637-4d49-abc6-9053d4cb6b9e_M6_M6', 'x-ms-request-id': '31b59a09-31b7-4649-a652-e48c85acf796_M6_M6',
'server-sb': 'Service-Bus-Resource-Provider/SN1', 'server-sb': 'Service-Bus-Resource-Provider/SN1',
server: 'Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0', server: 'Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0',
'x-ms-ratelimit-remaining-subscription-writes': '1199', 'x-ms-ratelimit-remaining-subscription-reads': '14998',
'x-ms-correlation-request-id': '96652709-ac65-41b4-8580-2bc8216f6bf1', 'x-ms-correlation-request-id': '6e291825-ba3a-4f9a-81f0-351e56494db0',
'x-ms-routing-request-id': 'WESTUS:20160518T013645Z:96652709-ac65-41b4-8580-2bc8216f6bf1', 'x-ms-routing-request-id': 'WESTUS2:20160812T230249Z:6e291825-ba3a-4f9a-81f0-351e56494db0',
'strict-transport-security': 'max-age=31536000; includeSubDomains', 'strict-transport-security': 'max-age=31536000; includeSubDomains',
date: 'Wed, 18 May 2016 01:36:44 GMT', date: 'Fri, 12 Aug 2016 23:02:48 GMT',
connection: 'close' }); connection: 'close' });
return result; }, return result; },
function (nock) { function (nock) {
var result = var result =
nock('http://management.azure.com:443') nock('http://management.azure.com:443')
.post('/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup2973/providers/Microsoft.NotificationHubs/namespaces/testNS570/notificationHubs/testHub1901/AuthorizationRules?api-version=2014-09-01') .get('/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup4845/providers/Microsoft.NotificationHubs/namespaces/testNS9332/notificationHubs/testHub9507/AuthorizationRules?api-version=2016-03-01')
.reply(200, "{\"value\":[{\"id\":\"/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup2973/providers/Microsoft.NotificationHubs/namespaces/testNS570/notificationHubs/testHub1901/AuthorizationRules/DefaultListenSharedAccessSignature\",\"name\":\"DefaultListenSharedAccessSignature\",\"type\":\"Microsoft.NotificationHubs/namespaces/notificationHubs/authorizationRules\",\"location\":null,\"tags\":null,\"properties\":{\"keyName\":\"DefaultListenSharedAccessSignature\",\"primaryKey\":\"lcimblVWlDnpAKpnUYBpukueo7+1DpRQmcGAVeOilDQ=\",\"secondaryKey\":\"BmLKtmGBmfiTx/aeaD+nTroWAMWbKi2bIcYPPWXnTFY=\",\"claimType\":\"SharedAccessKey\",\"claimValue\":\"None\",\"rights\":[\"Listen\"],\"createdTime\":\"2016-05-18T01:36:19.0553766Z\",\"modifiedTime\":\"2016-05-18T01:36:19.0553766Z\"}},{\"id\":\"/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup2973/providers/Microsoft.NotificationHubs/namespaces/testNS570/notificationHubs/testHub1901/AuthorizationRules/DefaultFullSharedAccessSignature\",\"name\":\"DefaultFullSharedAccessSignature\",\"type\":\"Microsoft.NotificationHubs/namespaces/notificationHubs/authorizationRules\",\"location\":null,\"tags\":null,\"properties\":{\"keyName\":\"DefaultFullSharedAccessSignature\",\"primaryKey\":\"EunwSBHt63UvG3LBb1I4LfHIvaHFCDoSM33/6PsPpP8=\",\"secondaryKey\":\"nuCpfitFUXTc9drX3E0BPymlBaKP69PoqPc9H0/Zh28=\",\"claimType\":\"SharedAccessKey\",\"claimValue\":\"None\",\"rights\":[\"Listen\",\"Manage\",\"Send\"],\"createdTime\":\"2016-05-18T01:36:19.0553766Z\",\"modifiedTime\":\"2016-05-18T01:36:19.0553766Z\"}},{\"id\":\"/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup2973/providers/Microsoft.NotificationHubs/namespaces/testNS570/notificationHubs/testHub1901/AuthorizationRules/testAuth7859\",\"name\":\"testAuth7859\",\"type\":\"Microsoft.NotificationHubs/namespaces/notificationHubs/authorizationRules\",\"location\":null,\"tags\":null,\"properties\":{\"keyName\":\"testAuth7859\",\"primaryKey\":\"IR4qH02MB2yXjlekt5fhlgMR9YAoMsXHTkUqarUkATU=\",\"secondaryKey\":\"aVpieJX6Ot7PUnC9N4wUAWbpB6wfX+s893SwXW9WCeQ=\",\"claimType\":\"SharedAccessKey\",\"claimValue\":\"None\",\"rights\":[\"Listen\",\"Send\"],\"createdTime\":\"2016-05-18T01:36:24.0584314Z\",\"modifiedTime\":\"2016-05-18T01:36:24.0584314Z\"}}],\"nextLink\":null}", { 'cache-control': 'no-cache', .reply(200, "{\"value\":[{\"id\":\"/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup4845/providers/Microsoft.NotificationHubs/namespaces/testNS9332/notificationHubs/testHub9507/AuthorizationRules/DefaultListenSharedAccessSignature\",\"name\":\"DefaultListenSharedAccessSignature\",\"type\":\"Microsoft.NotificationHubs/namespaces/notificationHubs/authorizationRules\",\"location\":null,\"tags\":null,\"properties\":{\"rights\":[\"Listen\"]}},{\"id\":\"/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup4845/providers/Microsoft.NotificationHubs/namespaces/testNS9332/notificationHubs/testHub9507/AuthorizationRules/DefaultFullSharedAccessSignature\",\"name\":\"DefaultFullSharedAccessSignature\",\"type\":\"Microsoft.NotificationHubs/namespaces/notificationHubs/authorizationRules\",\"location\":null,\"tags\":null,\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}},{\"id\":\"/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup4845/providers/Microsoft.NotificationHubs/namespaces/testNS9332/notificationHubs/testHub9507/AuthorizationRules/testAuth3570\",\"name\":\"testAuth3570\",\"type\":\"Microsoft.NotificationHubs/namespaces/notificationHubs/authorizationRules\",\"location\":null,\"tags\":null,\"properties\":{\"rights\":[\"Listen\",\"Send\"]}}],\"nextLink\":null}", { 'cache-control': 'no-cache',
pragma: 'no-cache', pragma: 'no-cache',
'content-length': '2183', 'content-length': '1280',
'content-type': 'application/json; charset=utf-8', 'content-type': 'application/json; charset=utf-8',
expires: '-1', expires: '-1',
'x-ms-request-id': 'ecac5cd7-cbbf-48cb-bdfa-c29f902cbc7b_M1_M1', 'x-ms-request-id': '541431f5-eecd-48c9-8481-546e95fe7ac3_M0_M0',
'server-sb': 'Service-Bus-Resource-Provider/SN1', 'server-sb': 'Service-Bus-Resource-Provider/SN1',
server: 'Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0', server: 'Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0',
'x-ms-ratelimit-remaining-subscription-writes': '1199', 'x-ms-ratelimit-remaining-subscription-reads': '14998',
'x-ms-correlation-request-id': 'daf81b64-c46e-465c-b61d-b3b9f6cedd33', 'x-ms-correlation-request-id': 'e34cf37e-e6fc-4bc6-abea-5faed9d161c6',
'x-ms-routing-request-id': 'WESTUS:20160518T013654Z:daf81b64-c46e-465c-b61d-b3b9f6cedd33', 'x-ms-routing-request-id': 'WESTUS2:20160812T230249Z:e34cf37e-e6fc-4bc6-abea-5faed9d161c6',
'strict-transport-security': 'max-age=31536000; includeSubDomains', 'strict-transport-security': 'max-age=31536000; includeSubDomains',
date: 'Wed, 18 May 2016 01:36:53 GMT', date: 'Fri, 12 Aug 2016 23:02:48 GMT',
connection: 'close' }); connection: 'close' });
return result; }, return result; },
function (nock) { function (nock) {
var result = var result =
nock('https://management.azure.com:443') nock('https://management.azure.com:443')
.post('/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup2973/providers/Microsoft.NotificationHubs/namespaces/testNS570/notificationHubs/testHub1901/AuthorizationRules?api-version=2014-09-01') .get('/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup4845/providers/Microsoft.NotificationHubs/namespaces/testNS9332/notificationHubs/testHub9507/AuthorizationRules?api-version=2016-03-01')
.reply(200, "{\"value\":[{\"id\":\"/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup2973/providers/Microsoft.NotificationHubs/namespaces/testNS570/notificationHubs/testHub1901/AuthorizationRules/DefaultListenSharedAccessSignature\",\"name\":\"DefaultListenSharedAccessSignature\",\"type\":\"Microsoft.NotificationHubs/namespaces/notificationHubs/authorizationRules\",\"location\":null,\"tags\":null,\"properties\":{\"keyName\":\"DefaultListenSharedAccessSignature\",\"primaryKey\":\"lcimblVWlDnpAKpnUYBpukueo7+1DpRQmcGAVeOilDQ=\",\"secondaryKey\":\"BmLKtmGBmfiTx/aeaD+nTroWAMWbKi2bIcYPPWXnTFY=\",\"claimType\":\"SharedAccessKey\",\"claimValue\":\"None\",\"rights\":[\"Listen\"],\"createdTime\":\"2016-05-18T01:36:19.0553766Z\",\"modifiedTime\":\"2016-05-18T01:36:19.0553766Z\"}},{\"id\":\"/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup2973/providers/Microsoft.NotificationHubs/namespaces/testNS570/notificationHubs/testHub1901/AuthorizationRules/DefaultFullSharedAccessSignature\",\"name\":\"DefaultFullSharedAccessSignature\",\"type\":\"Microsoft.NotificationHubs/namespaces/notificationHubs/authorizationRules\",\"location\":null,\"tags\":null,\"properties\":{\"keyName\":\"DefaultFullSharedAccessSignature\",\"primaryKey\":\"EunwSBHt63UvG3LBb1I4LfHIvaHFCDoSM33/6PsPpP8=\",\"secondaryKey\":\"nuCpfitFUXTc9drX3E0BPymlBaKP69PoqPc9H0/Zh28=\",\"claimType\":\"SharedAccessKey\",\"claimValue\":\"None\",\"rights\":[\"Listen\",\"Manage\",\"Send\"],\"createdTime\":\"2016-05-18T01:36:19.0553766Z\",\"modifiedTime\":\"2016-05-18T01:36:19.0553766Z\"}},{\"id\":\"/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup2973/providers/Microsoft.NotificationHubs/namespaces/testNS570/notificationHubs/testHub1901/AuthorizationRules/testAuth7859\",\"name\":\"testAuth7859\",\"type\":\"Microsoft.NotificationHubs/namespaces/notificationHubs/authorizationRules\",\"location\":null,\"tags\":null,\"properties\":{\"keyName\":\"testAuth7859\",\"primaryKey\":\"IR4qH02MB2yXjlekt5fhlgMR9YAoMsXHTkUqarUkATU=\",\"secondaryKey\":\"aVpieJX6Ot7PUnC9N4wUAWbpB6wfX+s893SwXW9WCeQ=\",\"claimType\":\"SharedAccessKey\",\"claimValue\":\"None\",\"rights\":[\"Listen\",\"Send\"],\"createdTime\":\"2016-05-18T01:36:24.0584314Z\",\"modifiedTime\":\"2016-05-18T01:36:24.0584314Z\"}}],\"nextLink\":null}", { 'cache-control': 'no-cache', .reply(200, "{\"value\":[{\"id\":\"/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup4845/providers/Microsoft.NotificationHubs/namespaces/testNS9332/notificationHubs/testHub9507/AuthorizationRules/DefaultListenSharedAccessSignature\",\"name\":\"DefaultListenSharedAccessSignature\",\"type\":\"Microsoft.NotificationHubs/namespaces/notificationHubs/authorizationRules\",\"location\":null,\"tags\":null,\"properties\":{\"rights\":[\"Listen\"]}},{\"id\":\"/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup4845/providers/Microsoft.NotificationHubs/namespaces/testNS9332/notificationHubs/testHub9507/AuthorizationRules/DefaultFullSharedAccessSignature\",\"name\":\"DefaultFullSharedAccessSignature\",\"type\":\"Microsoft.NotificationHubs/namespaces/notificationHubs/authorizationRules\",\"location\":null,\"tags\":null,\"properties\":{\"rights\":[\"Listen\",\"Manage\",\"Send\"]}},{\"id\":\"/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup4845/providers/Microsoft.NotificationHubs/namespaces/testNS9332/notificationHubs/testHub9507/AuthorizationRules/testAuth3570\",\"name\":\"testAuth3570\",\"type\":\"Microsoft.NotificationHubs/namespaces/notificationHubs/authorizationRules\",\"location\":null,\"tags\":null,\"properties\":{\"rights\":[\"Listen\",\"Send\"]}}],\"nextLink\":null}", { 'cache-control': 'no-cache',
pragma: 'no-cache', pragma: 'no-cache',
'content-length': '2183', 'content-length': '1280',
'content-type': 'application/json; charset=utf-8', 'content-type': 'application/json; charset=utf-8',
expires: '-1', expires: '-1',
'x-ms-request-id': 'ecac5cd7-cbbf-48cb-bdfa-c29f902cbc7b_M1_M1', 'x-ms-request-id': '541431f5-eecd-48c9-8481-546e95fe7ac3_M0_M0',
'server-sb': 'Service-Bus-Resource-Provider/SN1', 'server-sb': 'Service-Bus-Resource-Provider/SN1',
server: 'Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0', server: 'Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0',
'x-ms-ratelimit-remaining-subscription-writes': '1199', 'x-ms-ratelimit-remaining-subscription-reads': '14998',
'x-ms-correlation-request-id': 'daf81b64-c46e-465c-b61d-b3b9f6cedd33', 'x-ms-correlation-request-id': 'e34cf37e-e6fc-4bc6-abea-5faed9d161c6',
'x-ms-routing-request-id': 'WESTUS:20160518T013654Z:daf81b64-c46e-465c-b61d-b3b9f6cedd33', 'x-ms-routing-request-id': 'WESTUS2:20160812T230249Z:e34cf37e-e6fc-4bc6-abea-5faed9d161c6',
'strict-transport-security': 'max-age=31536000; includeSubDomains', 'strict-transport-security': 'max-age=31536000; includeSubDomains',
date: 'Wed, 18 May 2016 01:36:53 GMT', date: 'Fri, 12 Aug 2016 23:02:48 GMT',
connection: 'close' }); connection: 'close' });
return result; }, return result; },
function (nock) { function (nock) {
var result = var result =
nock('http://management.azure.com:443') nock('http://management.azure.com:443')
.post('/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup2973/providers/Microsoft.NotificationHubs/namespaces/testNS570/notificationHubs/testHub1901/AuthorizationRules/testAuth7859/listKeys?api-version=2014-09-01') .post('/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup4845/providers/Microsoft.NotificationHubs/namespaces/testNS9332/notificationHubs/testHub9507/AuthorizationRules/testAuth3570/listKeys?api-version=2016-03-01')
.reply(200, "{\"primaryConnectionString\":\"Endpoint=sb://testns570.servicebus.windows.net/;SharedAccessKeyName=testAuth7859;SharedAccessKey=IR4qH02MB2yXjlekt5fhlgMR9YAoMsXHTkUqarUkATU=\",\"secondaryConnectionString\":\"Endpoint=sb://testns570.servicebus.windows.net/;SharedAccessKeyName=testAuth7859;SharedAccessKey=aVpieJX6Ot7PUnC9N4wUAWbpB6wfX+s893SwXW9WCeQ=\",\"primaryKey\":null,\"secondaryKey\":null,\"keyName\":null}", { 'cache-control': 'no-cache', .reply(200, "{\"primaryConnectionString\":\"Endpoint=sb://testns9332.servicebus.windows.net/;SharedAccessKeyName=testAuth3570;SharedAccessKey=OYfkz5iBezc5WLZR0PEgOUw/Zbu2o8+sWCZQJgF07vo=\",\"secondaryConnectionString\":\"Endpoint=sb://testns9332.servicebus.windows.net/;SharedAccessKeyName=testAuth3570;SharedAccessKey=4BPzigde3hbyWd17spIT3bDBeSStcHltCijpKq7SeNY=\",\"primaryKey\":\"OYfkz5iBezc5WLZR0PEgOUw/Zbu2o8+sWCZQJgF07vo=\",\"secondaryKey\":\"4BPzigde3hbyWd17spIT3bDBeSStcHltCijpKq7SeNY=\",\"keyName\":\"testAuth3570\"}", { 'cache-control': 'no-cache',
pragma: 'no-cache', pragma: 'no-cache',
'content-length': '396', 'content-length': '492',
'content-type': 'application/json; charset=utf-8', 'content-type': 'application/json; charset=utf-8',
expires: '-1', expires: '-1',
'x-ms-request-id': '8a5dc4b9-d640-4063-9e19-5bfaf6e10ad5_M4_M4', 'x-ms-request-id': '8e5bbd32-f463-48d3-9c52-5c4cee62cccd_M6_M6',
'server-sb': 'Service-Bus-Resource-Provider/SN1', 'server-sb': 'Service-Bus-Resource-Provider/SN1',
server: 'Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0', server: 'Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0',
'x-ms-ratelimit-remaining-subscription-writes': '1197', 'x-ms-ratelimit-remaining-subscription-writes': '1197',
'x-ms-correlation-request-id': '208b7e3d-d8c9-496e-9215-7b625d9748dc', 'x-ms-correlation-request-id': '67c746e2-3b86-4e0e-8b59-5ff2106fc622',
'x-ms-routing-request-id': 'WESTUS:20160518T013655Z:208b7e3d-d8c9-496e-9215-7b625d9748dc', 'x-ms-routing-request-id': 'CENTRALUS:20160812T230250Z:67c746e2-3b86-4e0e-8b59-5ff2106fc622',
'strict-transport-security': 'max-age=31536000; includeSubDomains', 'strict-transport-security': 'max-age=31536000; includeSubDomains',
date: 'Wed, 18 May 2016 01:36:55 GMT', date: 'Fri, 12 Aug 2016 23:02:49 GMT',
connection: 'close' }); connection: 'close' });
return result; }, return result; },
function (nock) { function (nock) {
var result = var result =
nock('https://management.azure.com:443') nock('https://management.azure.com:443')
.post('/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup2973/providers/Microsoft.NotificationHubs/namespaces/testNS570/notificationHubs/testHub1901/AuthorizationRules/testAuth7859/listKeys?api-version=2014-09-01') .post('/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup4845/providers/Microsoft.NotificationHubs/namespaces/testNS9332/notificationHubs/testHub9507/AuthorizationRules/testAuth3570/listKeys?api-version=2016-03-01')
.reply(200, "{\"primaryConnectionString\":\"Endpoint=sb://testns570.servicebus.windows.net/;SharedAccessKeyName=testAuth7859;SharedAccessKey=IR4qH02MB2yXjlekt5fhlgMR9YAoMsXHTkUqarUkATU=\",\"secondaryConnectionString\":\"Endpoint=sb://testns570.servicebus.windows.net/;SharedAccessKeyName=testAuth7859;SharedAccessKey=aVpieJX6Ot7PUnC9N4wUAWbpB6wfX+s893SwXW9WCeQ=\",\"primaryKey\":null,\"secondaryKey\":null,\"keyName\":null}", { 'cache-control': 'no-cache', .reply(200, "{\"primaryConnectionString\":\"Endpoint=sb://testns9332.servicebus.windows.net/;SharedAccessKeyName=testAuth3570;SharedAccessKey=OYfkz5iBezc5WLZR0PEgOUw/Zbu2o8+sWCZQJgF07vo=\",\"secondaryConnectionString\":\"Endpoint=sb://testns9332.servicebus.windows.net/;SharedAccessKeyName=testAuth3570;SharedAccessKey=4BPzigde3hbyWd17spIT3bDBeSStcHltCijpKq7SeNY=\",\"primaryKey\":\"OYfkz5iBezc5WLZR0PEgOUw/Zbu2o8+sWCZQJgF07vo=\",\"secondaryKey\":\"4BPzigde3hbyWd17spIT3bDBeSStcHltCijpKq7SeNY=\",\"keyName\":\"testAuth3570\"}", { 'cache-control': 'no-cache',
pragma: 'no-cache', pragma: 'no-cache',
'content-length': '396', 'content-length': '492',
'content-type': 'application/json; charset=utf-8', 'content-type': 'application/json; charset=utf-8',
expires: '-1', expires: '-1',
'x-ms-request-id': '8a5dc4b9-d640-4063-9e19-5bfaf6e10ad5_M4_M4', 'x-ms-request-id': '8e5bbd32-f463-48d3-9c52-5c4cee62cccd_M6_M6',
'server-sb': 'Service-Bus-Resource-Provider/SN1', 'server-sb': 'Service-Bus-Resource-Provider/SN1',
server: 'Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0', server: 'Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0',
'x-ms-ratelimit-remaining-subscription-writes': '1197', 'x-ms-ratelimit-remaining-subscription-writes': '1197',
'x-ms-correlation-request-id': '208b7e3d-d8c9-496e-9215-7b625d9748dc', 'x-ms-correlation-request-id': '67c746e2-3b86-4e0e-8b59-5ff2106fc622',
'x-ms-routing-request-id': 'WESTUS:20160518T013655Z:208b7e3d-d8c9-496e-9215-7b625d9748dc', 'x-ms-routing-request-id': 'CENTRALUS:20160812T230250Z:67c746e2-3b86-4e0e-8b59-5ff2106fc622',
'strict-transport-security': 'max-age=31536000; includeSubDomains', 'strict-transport-security': 'max-age=31536000; includeSubDomains',
date: 'Wed, 18 May 2016 01:36:55 GMT', date: 'Fri, 12 Aug 2016 23:02:49 GMT',
connection: 'close' }); connection: 'close' });
return result; }, return result; },
function (nock) { function (nock) {
var result = var result =
nock('http://management.azure.com:443') nock('http://management.azure.com:443')
.delete('/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup2973/providers/Microsoft.NotificationHubs/namespaces/testNS570/notificationHubs/testHub1901/AuthorizationRules/testAuth7859?api-version=2014-09-01') .filteringRequestBody(function (path) { return '*';})
.post('/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup4845/providers/Microsoft.NotificationHubs/namespaces/testNS9332/notificationHubs/testHub9507/AuthorizationRules/testAuth3570/regenerateKeys?api-version=2016-03-01', '*')
.reply(200, "{\"primaryConnectionString\":\"Endpoint=sb://testns9332.servicebus.windows.net/;SharedAccessKeyName=testAuth3570;SharedAccessKey=gUVXAIsAw6kjzLeB7JzKX5cKMCuP9P0FtfSLxX2OOqY=;EntityPath=testHub9507\",\"secondaryConnectionString\":\"Endpoint=sb://testns9332.servicebus.windows.net/;SharedAccessKeyName=testAuth3570;SharedAccessKey=4BPzigde3hbyWd17spIT3bDBeSStcHltCijpKq7SeNY=;EntityPath=testHub9507\",\"primaryKey\":\"gUVXAIsAw6kjzLeB7JzKX5cKMCuP9P0FtfSLxX2OOqY=\",\"secondaryKey\":\"4BPzigde3hbyWd17spIT3bDBeSStcHltCijpKq7SeNY=\",\"keyName\":\"testAuth3570\"}", { 'cache-control': 'no-cache',
pragma: 'no-cache',
'content-length': '538',
'content-type': 'application/json; charset=utf-8',
expires: '-1',
'x-ms-request-id': '9835e3c0-0ad7-4d0c-8a72-bc165e2f9e45_M0_M0',
'server-sb': 'Service-Bus-Resource-Provider/SN1',
server: 'Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0',
'x-ms-ratelimit-remaining-subscription-writes': '1199',
'x-ms-correlation-request-id': '62ae9d38-b481-475e-9727-c8393bb17beb',
'x-ms-routing-request-id': 'CENTRALUS:20160812T230250Z:62ae9d38-b481-475e-9727-c8393bb17beb',
'strict-transport-security': 'max-age=31536000; includeSubDomains',
date: 'Fri, 12 Aug 2016 23:02:50 GMT',
connection: 'close' });
return result; },
function (nock) {
var result =
nock('https://management.azure.com:443')
.filteringRequestBody(function (path) { return '*';})
.post('/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup4845/providers/Microsoft.NotificationHubs/namespaces/testNS9332/notificationHubs/testHub9507/AuthorizationRules/testAuth3570/regenerateKeys?api-version=2016-03-01', '*')
.reply(200, "{\"primaryConnectionString\":\"Endpoint=sb://testns9332.servicebus.windows.net/;SharedAccessKeyName=testAuth3570;SharedAccessKey=gUVXAIsAw6kjzLeB7JzKX5cKMCuP9P0FtfSLxX2OOqY=;EntityPath=testHub9507\",\"secondaryConnectionString\":\"Endpoint=sb://testns9332.servicebus.windows.net/;SharedAccessKeyName=testAuth3570;SharedAccessKey=4BPzigde3hbyWd17spIT3bDBeSStcHltCijpKq7SeNY=;EntityPath=testHub9507\",\"primaryKey\":\"gUVXAIsAw6kjzLeB7JzKX5cKMCuP9P0FtfSLxX2OOqY=\",\"secondaryKey\":\"4BPzigde3hbyWd17spIT3bDBeSStcHltCijpKq7SeNY=\",\"keyName\":\"testAuth3570\"}", { 'cache-control': 'no-cache',
pragma: 'no-cache',
'content-length': '538',
'content-type': 'application/json; charset=utf-8',
expires: '-1',
'x-ms-request-id': '9835e3c0-0ad7-4d0c-8a72-bc165e2f9e45_M0_M0',
'server-sb': 'Service-Bus-Resource-Provider/SN1',
server: 'Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0',
'x-ms-ratelimit-remaining-subscription-writes': '1199',
'x-ms-correlation-request-id': '62ae9d38-b481-475e-9727-c8393bb17beb',
'x-ms-routing-request-id': 'CENTRALUS:20160812T230250Z:62ae9d38-b481-475e-9727-c8393bb17beb',
'strict-transport-security': 'max-age=31536000; includeSubDomains',
date: 'Fri, 12 Aug 2016 23:02:50 GMT',
connection: 'close' });
return result; },
function (nock) {
var result =
nock('http://management.azure.com:443')
.post('/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup4845/providers/Microsoft.NotificationHubs/namespaces/testNS9332/notificationHubs/testHub9507/AuthorizationRules/testAuth3570/listKeys?api-version=2016-03-01')
.reply(200, "{\"primaryConnectionString\":\"Endpoint=sb://testns9332.servicebus.windows.net/;SharedAccessKeyName=testAuth3570;SharedAccessKey=gUVXAIsAw6kjzLeB7JzKX5cKMCuP9P0FtfSLxX2OOqY=\",\"secondaryConnectionString\":\"Endpoint=sb://testns9332.servicebus.windows.net/;SharedAccessKeyName=testAuth3570;SharedAccessKey=4BPzigde3hbyWd17spIT3bDBeSStcHltCijpKq7SeNY=\",\"primaryKey\":\"gUVXAIsAw6kjzLeB7JzKX5cKMCuP9P0FtfSLxX2OOqY=\",\"secondaryKey\":\"4BPzigde3hbyWd17spIT3bDBeSStcHltCijpKq7SeNY=\",\"keyName\":\"testAuth3570\"}", { 'cache-control': 'no-cache',
pragma: 'no-cache',
'content-length': '492',
'content-type': 'application/json; charset=utf-8',
expires: '-1',
'x-ms-request-id': 'f7ed1095-f8bb-4fbd-b2fa-81afbaf7cb9d_M1_M1',
'server-sb': 'Service-Bus-Resource-Provider/SN1',
server: 'Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0',
'x-ms-ratelimit-remaining-subscription-writes': '1199',
'x-ms-correlation-request-id': 'be54b012-0f5e-4b1f-89c2-23985994d911',
'x-ms-routing-request-id': 'CENTRALUS:20160812T230251Z:be54b012-0f5e-4b1f-89c2-23985994d911',
'strict-transport-security': 'max-age=31536000; includeSubDomains',
date: 'Fri, 12 Aug 2016 23:02:51 GMT',
connection: 'close' });
return result; },
function (nock) {
var result =
nock('https://management.azure.com:443')
.post('/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup4845/providers/Microsoft.NotificationHubs/namespaces/testNS9332/notificationHubs/testHub9507/AuthorizationRules/testAuth3570/listKeys?api-version=2016-03-01')
.reply(200, "{\"primaryConnectionString\":\"Endpoint=sb://testns9332.servicebus.windows.net/;SharedAccessKeyName=testAuth3570;SharedAccessKey=gUVXAIsAw6kjzLeB7JzKX5cKMCuP9P0FtfSLxX2OOqY=\",\"secondaryConnectionString\":\"Endpoint=sb://testns9332.servicebus.windows.net/;SharedAccessKeyName=testAuth3570;SharedAccessKey=4BPzigde3hbyWd17spIT3bDBeSStcHltCijpKq7SeNY=\",\"primaryKey\":\"gUVXAIsAw6kjzLeB7JzKX5cKMCuP9P0FtfSLxX2OOqY=\",\"secondaryKey\":\"4BPzigde3hbyWd17spIT3bDBeSStcHltCijpKq7SeNY=\",\"keyName\":\"testAuth3570\"}", { 'cache-control': 'no-cache',
pragma: 'no-cache',
'content-length': '492',
'content-type': 'application/json; charset=utf-8',
expires: '-1',
'x-ms-request-id': 'f7ed1095-f8bb-4fbd-b2fa-81afbaf7cb9d_M1_M1',
'server-sb': 'Service-Bus-Resource-Provider/SN1',
server: 'Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0',
'x-ms-ratelimit-remaining-subscription-writes': '1199',
'x-ms-correlation-request-id': 'be54b012-0f5e-4b1f-89c2-23985994d911',
'x-ms-routing-request-id': 'CENTRALUS:20160812T230251Z:be54b012-0f5e-4b1f-89c2-23985994d911',
'strict-transport-security': 'max-age=31536000; includeSubDomains',
date: 'Fri, 12 Aug 2016 23:02:51 GMT',
connection: 'close' });
return result; },
function (nock) {
var result =
nock('http://management.azure.com:443')
.delete('/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup4845/providers/Microsoft.NotificationHubs/namespaces/testNS9332/notificationHubs/testHub9507/AuthorizationRules/testAuth3570?api-version=2016-03-01')
.reply(200, "", { 'cache-control': 'no-cache', .reply(200, "", { 'cache-control': 'no-cache',
pragma: 'no-cache', pragma: 'no-cache',
'content-length': '0', 'content-length': '0',
expires: '-1', expires: '-1',
'x-ms-request-id': 'b468fe0b-e8b5-4c3b-b0a6-1e3148e429df_M0_M0', 'x-ms-request-id': 'f2b3833e-ae99-43f5-8104-92a86955dea4_M6_M6',
'server-sb': 'Service-Bus-Resource-Provider/SN1', 'server-sb': 'Service-Bus-Resource-Provider/SN1',
server: 'Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0', server: 'Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0',
'x-ms-ratelimit-remaining-subscription-writes': '1197', 'x-ms-ratelimit-remaining-subscription-writes': '1196',
'x-ms-correlation-request-id': 'e68bcaf6-6285-4263-8f72-ef1bae808083', 'x-ms-correlation-request-id': '58ee5186-69c3-4791-9cf9-64886abf3143',
'x-ms-routing-request-id': 'WESTUS:20160518T013656Z:e68bcaf6-6285-4263-8f72-ef1bae808083', 'x-ms-routing-request-id': 'CENTRALUS:20160812T230252Z:58ee5186-69c3-4791-9cf9-64886abf3143',
'strict-transport-security': 'max-age=31536000; includeSubDomains', 'strict-transport-security': 'max-age=31536000; includeSubDomains',
date: 'Wed, 18 May 2016 01:36:56 GMT', date: 'Fri, 12 Aug 2016 23:02:52 GMT',
connection: 'close' }); connection: 'close' });
return result; }, return result; },
function (nock) { function (nock) {
var result = var result =
nock('https://management.azure.com:443') nock('https://management.azure.com:443')
.delete('/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup2973/providers/Microsoft.NotificationHubs/namespaces/testNS570/notificationHubs/testHub1901/AuthorizationRules/testAuth7859?api-version=2014-09-01') .delete('/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup4845/providers/Microsoft.NotificationHubs/namespaces/testNS9332/notificationHubs/testHub9507/AuthorizationRules/testAuth3570?api-version=2016-03-01')
.reply(200, "", { 'cache-control': 'no-cache', .reply(200, "", { 'cache-control': 'no-cache',
pragma: 'no-cache', pragma: 'no-cache',
'content-length': '0', 'content-length': '0',
expires: '-1', expires: '-1',
'x-ms-request-id': 'b468fe0b-e8b5-4c3b-b0a6-1e3148e429df_M0_M0', 'x-ms-request-id': 'f2b3833e-ae99-43f5-8104-92a86955dea4_M6_M6',
'server-sb': 'Service-Bus-Resource-Provider/SN1', 'server-sb': 'Service-Bus-Resource-Provider/SN1',
server: 'Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0', server: 'Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0',
'x-ms-ratelimit-remaining-subscription-writes': '1197', 'x-ms-ratelimit-remaining-subscription-writes': '1196',
'x-ms-correlation-request-id': 'e68bcaf6-6285-4263-8f72-ef1bae808083', 'x-ms-correlation-request-id': '58ee5186-69c3-4791-9cf9-64886abf3143',
'x-ms-routing-request-id': 'WESTUS:20160518T013656Z:e68bcaf6-6285-4263-8f72-ef1bae808083', 'x-ms-routing-request-id': 'CENTRALUS:20160812T230252Z:58ee5186-69c3-4791-9cf9-64886abf3143',
'strict-transport-security': 'max-age=31536000; includeSubDomains', 'strict-transport-security': 'max-age=31536000; includeSubDomains',
date: 'Wed, 18 May 2016 01:36:56 GMT', date: 'Fri, 12 Aug 2016 23:02:52 GMT',
connection: 'close' }); connection: 'close' });
return result; }, return result; },
function (nock) { function (nock) {
var result = var result =
nock('http://management.azure.com:443') nock('http://management.azure.com:443')
.delete('/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup2973/providers/Microsoft.NotificationHubs/namespaces/testNS570/notificationHubs/testHub1901?api-version=2014-09-01') .delete('/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup4845/providers/Microsoft.NotificationHubs/namespaces/testNS9332/notificationHubs/testHub9507?api-version=2016-03-01')
.reply(200, "", { 'cache-control': 'no-cache', .reply(200, "", { 'cache-control': 'no-cache',
pragma: 'no-cache', pragma: 'no-cache',
'content-length': '0', 'content-length': '0',
expires: '-1', expires: '-1',
'x-ms-request-id': '46b72c9c-30f8-4217-8dc6-0e77aa1276ed_M6_M6', 'x-ms-request-id': 'caaab360-b284-494f-b94a-4c82e6d56757_M0_M0',
'server-sb': 'Service-Bus-Resource-Provider/SN1', 'server-sb': 'Service-Bus-Resource-Provider/SN1',
server: 'Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0', server: 'Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0',
'x-ms-ratelimit-remaining-subscription-writes': '1198', 'x-ms-ratelimit-remaining-subscription-writes': '1198',
'x-ms-correlation-request-id': '7148924d-9b9f-4191-b303-715fa4125ff1', 'x-ms-correlation-request-id': '6d477d9f-843d-4f7b-89f7-d0477015fb20',
'x-ms-routing-request-id': 'WESTUS:20160518T013659Z:7148924d-9b9f-4191-b303-715fa4125ff1', 'x-ms-routing-request-id': 'CENTRALUS:20160812T230254Z:6d477d9f-843d-4f7b-89f7-d0477015fb20',
'strict-transport-security': 'max-age=31536000; includeSubDomains', 'strict-transport-security': 'max-age=31536000; includeSubDomains',
date: 'Wed, 18 May 2016 01:36:59 GMT', date: 'Fri, 12 Aug 2016 23:02:54 GMT',
connection: 'close' }); connection: 'close' });
return result; }, return result; },
function (nock) { function (nock) {
var result = var result =
nock('https://management.azure.com:443') nock('https://management.azure.com:443')
.delete('/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup2973/providers/Microsoft.NotificationHubs/namespaces/testNS570/notificationHubs/testHub1901?api-version=2014-09-01') .delete('/subscriptions/111c36dc-4047-4c69-acd5-301072ff1fc2/resourceGroups/nodeTestGroup4845/providers/Microsoft.NotificationHubs/namespaces/testNS9332/notificationHubs/testHub9507?api-version=2016-03-01')
.reply(200, "", { 'cache-control': 'no-cache', .reply(200, "", { 'cache-control': 'no-cache',
pragma: 'no-cache', pragma: 'no-cache',
'content-length': '0', 'content-length': '0',
expires: '-1', expires: '-1',
'x-ms-request-id': '46b72c9c-30f8-4217-8dc6-0e77aa1276ed_M6_M6', 'x-ms-request-id': 'caaab360-b284-494f-b94a-4c82e6d56757_M0_M0',
'server-sb': 'Service-Bus-Resource-Provider/SN1', 'server-sb': 'Service-Bus-Resource-Provider/SN1',
server: 'Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0', server: 'Service-Bus-Resource-Provider/SN1, Microsoft-HTTPAPI/2.0',
'x-ms-ratelimit-remaining-subscription-writes': '1198', 'x-ms-ratelimit-remaining-subscription-writes': '1198',
'x-ms-correlation-request-id': '7148924d-9b9f-4191-b303-715fa4125ff1', 'x-ms-correlation-request-id': '6d477d9f-843d-4f7b-89f7-d0477015fb20',
'x-ms-routing-request-id': 'WESTUS:20160518T013659Z:7148924d-9b9f-4191-b303-715fa4125ff1', 'x-ms-routing-request-id': 'CENTRALUS:20160812T230254Z:6d477d9f-843d-4f7b-89f7-d0477015fb20',
'strict-transport-security': 'max-age=31536000; includeSubDomains', 'strict-transport-security': 'max-age=31536000; includeSubDomains',
date: 'Wed, 18 May 2016 01:36:59 GMT', date: 'Fri, 12 Aug 2016 23:02:54 GMT',
connection: 'close' }); connection: 'close' });
return result; }]]; return result; }]];

Просмотреть файл

@ -7,4 +7,4 @@ exports.setEnvironment = function() {
exports.scopes = []; exports.scopes = [];
exports.randomTestIdsGenerated = function() { return ['nodeTestGroup2973','testNS570','testHub1901','testAuth7859'];}; exports.randomTestIdsGenerated = function() { return ['nodeTestGroup4845','testNS9332','testHub9507','testAuth3570'];};

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Просмотреть файл

@ -7,4 +7,4 @@ exports.setEnvironment = function() {
exports.scopes = []; exports.scopes = [];
exports.randomTestIdsGenerated = function() { return ['nodeTestGroup4300','testNS4663','testAuth6622'];}; exports.randomTestIdsGenerated = function() { return ['nodeTestGroup5503','testNS5114','testAuth6630'];};

Просмотреть файл

@ -1,7 +1,7 @@
// This file has been autogenerated. // This file has been autogenerated.
exports.setEnvironment = function() { exports.setEnvironment = function() {
process.env['AZURE_SUBSCRIPTION_ID'] = '3d1cd7a8-b035-4563-9288-dbe706cd672e'; process.env['AZURE_SUBSCRIPTION_ID'] = '111c36dc-4047-4c69-acd5-301072ff1fc2';
}; };
exports.scopes = [[]]; exports.scopes = [[]];

Просмотреть файл

@ -1,7 +1,7 @@
// This file has been autogenerated. // This file has been autogenerated.
exports.setEnvironment = function() { exports.setEnvironment = function() {
process.env['AZURE_SUBSCRIPTION_ID'] = '3d1cd7a8-b035-4563-9288-dbe706cd672e'; process.env['AZURE_SUBSCRIPTION_ID'] = '111c36dc-4047-4c69-acd5-301072ff1fc2';
}; };
exports.scopes = []; exports.scopes = [];

Просмотреть файл

@ -27,7 +27,6 @@ var testPrefix = 'notificationhubsservice-NS-tests';
var groupPrefix = 'nodeTestGroup'; var groupPrefix = 'nodeTestGroup';
var namespacePrefix = 'testNS'; var namespacePrefix = 'testNS';
var authPrefix = 'testAuth'; var authPrefix = 'testAuth';
var namespaceType = 'NotificationHub';
var createdGroups = []; var createdGroups = [];
var createdAccounts = []; var createdAccounts = [];
@ -43,6 +42,7 @@ var groupName;
var namespaceLocation; var namespaceLocation;
var createNamespaceParameters; var createNamespaceParameters;
var authRuleParameter; var authRuleParameter;
var regenerateKeyParameter;
describe('Notification Hubs Management :', function () { describe('Notification Hubs Management :', function () {
@ -59,22 +59,18 @@ describe('Notification Hubs Management :', function () {
tags: { tags: {
tag1: 'value1', tag1: 'value1',
tag2: 'value2' tag2: 'value2'
},
properties: {
namespaceType : namespaceType
} }
}; };
authRuleParameter = { authRuleParameter = {
location: namespaceLocation, location: namespaceLocation,
properties: { name: authorizationRuleName,
keyName : authorizationRuleName, rights : ['Listen', 'Send']
rights : ['Listen', 'Send'], };
primaryKey : 'IR4qH02MB2yXjlekt5fhlgMR9YAoMsXHTkUqarUkATU=',
secondaryKey : 'aVpieJX6Ot7PUnC9N4wUAWbpB6wfX+s893SwXW9WCeQ=', regenerateKeyParameter =
claimType : 'SharedAccessKey', {
claimValue : 'None' policyKey : 'primary KEY'
}
}; };
if (suite.isPlayback) { if (suite.isPlayback) {
@ -109,7 +105,7 @@ describe('Notification Hubs Management :', function () {
it('CRUD', function (done) { it('CRUD', function (done) {
//console.log("Create Namespace : " + namespaceName); //console.log("Create Namespace : " + namespaceName);
client.namespaces.createOrUpdate(groupName, namespaceName, createNamespaceParameters, function (err, result, request, response) { client.namespaces.createOrUpdate(groupName, namespaceName, createNamespaceParameters, function (err, result, request, response) {
should.not.exist(err); should.not.exist(err);
should.exist(result); should.exist(result);
@ -138,16 +134,16 @@ describe('Notification Hubs Management :', function () {
namespaceList.some(function (ns) { return ns.name === namespaceName }).should.be.true; namespaceList.some(function (ns) { return ns.name === namespaceName }).should.be.true;
//console.log("Create Namespace Authorization rule : " + authorizationRuleName); //console.log("Create Namespace Authorization rule : " + authorizationRuleName);
//console.log(authRuleParameter);
client.namespaces.createOrUpdateAuthorizationRule(groupName, namespaceName, authorizationRuleName, authRuleParameter, function (err, result, request, response) { client.namespaces.createOrUpdateAuthorizationRule(groupName, namespaceName, authorizationRuleName, authRuleParameter, function (err, result, request, response) {
should.not.exist(err); should.not.exist(err);
should.exist(result); should.exist(result);
response.statusCode.should.equal(200); response.statusCode.should.equal(200);
var authRule = result; var authRule = result;
authRule.name.should.equal(authorizationRuleName); authRule.name.should.equal(authorizationRuleName);
authRule.properties.primaryKey.should.equal(authRuleParameter.properties.primaryKey); authRule.rights.length.should.be.equal(2);
authRule.properties.rights.length.should.be.equal(2); authRule.rights.indexOf('Listen') > -1;
authRule.properties.rights.indexOf('Listen') > -1; authRule.rights.indexOf('Send') > -1;
authRule.properties.rights.indexOf('Send') > -1;
//console.log("Get created Namespace Authorization rule"); //console.log("Get created Namespace Authorization rule");
client.namespaces.getAuthorizationRule(groupName, namespaceName, authorizationRuleName, function (err, result, request, response) { client.namespaces.getAuthorizationRule(groupName, namespaceName, authorizationRuleName, function (err, result, request, response) {
@ -156,10 +152,9 @@ describe('Notification Hubs Management :', function () {
response.statusCode.should.equal(200); response.statusCode.should.equal(200);
var authRule = result; var authRule = result;
authRule.name.should.equal(authorizationRuleName); authRule.name.should.equal(authorizationRuleName);
authRule.properties.primaryKey.should.equal(authRuleParameter.properties.primaryKey); authRule.rights.length.should.be.equal(2);
authRule.properties.rights.length.should.be.equal(2); authRule.rights.indexOf('Listen') > -1;
authRule.properties.rights.indexOf('Listen') > -1; authRule.rights.indexOf('Send') > -1;
authRule.properties.rights.indexOf('Send') > -1;
//console.log("Get all Namespace Authorizations rules"); //console.log("Get all Namespace Authorizations rules");
client.namespaces.listAuthorizationRules(groupName, namespaceName, authorizationRuleName, function (err, result, request, response) { client.namespaces.listAuthorizationRules(groupName, namespaceName, authorizationRuleName, function (err, result, request, response) {
@ -176,21 +171,50 @@ describe('Notification Hubs Management :', function () {
should.exist(result); should.exist(result);
response.statusCode.should.equal(200); response.statusCode.should.equal(200);
var authKey = result; var authKey = result;
authKey.primaryConnectionString.indexOf(authRuleParameter.properties.primaryKey) > -1; authKey.primaryConnectionString.indexOf(authKey.primaryKey) > -1;
authKey.secondaryConnectionString.indexOf(authRuleParameter.properties.secondaryKey) > -1; authKey.secondaryConnectionString.indexOf(authKey.secondaryKey) > -1;
//console.log("Delete Namespace Authorization Rule"); //console.log("Namespace regenerateKey");
client.namespaces.deleteAuthorizationRule(groupName, namespaceName, authorizationRuleName, function (err, result, request, response) { client.namespaces.regenerateKeys(groupName, namespaceName, authorizationRuleName, regenerateKeyParameter, function (err, result, request, response) {
should.not.exist(err); should.not.exist(err);
should.exist(result);
response.statusCode.should.equal(200); response.statusCode.should.equal(200);
var authregenerateKey = result;
authregenerateKey.primaryConnectionString.indexOf(authregenerateKey.primaryKey) > -1;
authregenerateKey.secondaryConnectionString.indexOf(authregenerateKey.secondaryKey) > -1;
authregenerateKey.secondaryKey.should.equal(authKey.secondaryKey);
authregenerateKey.primaryKey.should.not.equal(authKey.primaryKey);
//There is a bug in the RP Delete call. Will uncomment this once the fix is in //console.log("Namespace listKeys after regenerateKey");
//console.log("Delete created Namespace"); client.namespaces.listKeys(groupName, namespaceName, authorizationRuleName, function (err, result, request, response) {
//client.namespaces.deleteMethod(groupName, namespaceName, function (err, result, request, response) { should.not.exist(err);
// should.not.exist(err); should.exist(result);
// response.statusCode.should.equal(200) || response.statusCode.should.equal(204); response.statusCode.should.equal(200);
done(); var authKeyAfterRegenerate = result;
//});
authKeyAfterRegenerate.primaryConnectionString.indexOf(authKeyAfterRegenerate.primaryKey) > -1;
authKeyAfterRegenerate.secondaryConnectionString.indexOf(authKeyAfterRegenerate.secondaryKey) > -1;
//A bug in our service. will fix it an uncomment this . Need to add EntityPath everywhere
//authKeyAfterRegenerate.primaryConnectionString.should.equal(authregenerateKey.primaryConnectionString);
//authKeyAfterRegenerate.secondaryConnectionString.should.equal(authregenerateKey.secondaryConnectionString);
authKeyAfterRegenerate.secondaryKey.should.equal(authregenerateKey.secondaryKey);
authKeyAfterRegenerate.primaryKey.should.equal(authregenerateKey.primaryKey);
//console.log("Delete Namespace Authorization Rule");
client.namespaces.deleteAuthorizationRule(groupName, namespaceName, authorizationRuleName, function (err, result, request, response) {
should.not.exist(err);
response.statusCode.should.equal(200);
//There is a bug in the RP Delete call. Will uncomment this once the fix is in
//console.log("Delete created Namespace");
//client.namespaces.deleteMethod(groupName, namespaceName, function (err, result, request, response) {
//should.not.exist(err);
//response.statusCode.should.equal(200) || response.statusCode.should.equal(204) || response.statusCode.should.equal(202);
done();
//});
});
});
}); });
}); });
}); });
@ -214,10 +238,9 @@ describe('Notification Hubs Management :', function () {
namespace = result; namespace = result;
namespace.name.should.equal(namespaceName); namespace.name.should.equal(namespaceName);
namespace.location.should.equal(namespaceLocation); namespace.location.should.equal(namespaceLocation);
namespace.properties.namespaceType.should.equal(namespaceType); //console.log("State : " + namespace.provisioningState);
//console.log("State : " + namespace.properties.provisioningState);
//console.log(namespace); //console.log(namespace);
if (namespace.properties.provisioningState === "Succeeded") if (namespace.provisioningState === "Succeeded")
return callback(null, true); return callback(null, true);
else else
return IsNamespaceActive(groupName, namespaceName, callback); return IsNamespaceActive(groupName, namespaceName, callback);

Просмотреть файл

@ -44,6 +44,7 @@ var namespaceLocation;
var createNamespaceParameters; var createNamespaceParameters;
var createNotificationHubParameters; var createNotificationHubParameters;
var authRuleParameter; var authRuleParameter;
var regenerateKeyParameter;
describe('Notification Hubs Management', function () { describe('Notification Hubs Management', function () {
@ -61,38 +62,29 @@ describe('Notification Hubs Management', function () {
tags: { tags: {
tag1: 'value1', tag1: 'value1',
tag2: 'value2' tag2: 'value2'
},
properties: {
namespaceType : namespaceType
} }
}; };
createNotificationHubParameters = { createNotificationHubParameters = {
location: namespaceLocation, location: namespaceLocation,
properties: { wnsCredential : {
WnsCredential : { packageSid : 'ms-app://s-1-15-2-1817505189-427745171-3213743798-2985869298-800724128-1004923984-4143860699',
properties: { secretKey : 'w7TBprR-9tJxn9mUOdK4PPHLCAzSYFhp',
PackageSid : 'ms-app://s-1-15-2-1817505189-427745171-3213743798-2985869298-800724128-1004923984-4143860699', windowsLiveEndpoint : 'http://pushtestservice.cloudapp.net/LiveID/accesstoken.srf'
SecretKey : 'w7TBprR-9tJxn9mUOdK4PPHLCAzSYFhp',
WindowsLiveEndpoint : 'http://pushtestservice.cloudapp.net/LiveID/accesstoken.srf'
}
}
} }
}; };
authRuleParameter = { authRuleParameter = {
location: namespaceLocation, location: namespaceLocation,
properties: { name : authorizationRuleName,
keyName : authorizationRuleName, rights : ['Listen', 'Send']
rights : ['Listen', 'Send'],
primaryKey : 'IR4qH02MB2yXjlekt5fhlgMR9YAoMsXHTkUqarUkATU=',
secondaryKey : 'aVpieJX6Ot7PUnC9N4wUAWbpB6wfX+s893SwXW9WCeQ=',
claimType : 'SharedAccessKey',
claimValue : 'None'
}
}; };
regenerateKeyParameter =
{
policyKey : 'primary KEY'
};
if (suite.isPlayback) { if (suite.isPlayback) {
client.longRunningOperationRetryTimeoutInSeconds = 0; client.longRunningOperationRetryTimeoutInSeconds = 0;
} }
@ -181,11 +173,10 @@ describe('Notification Hubs Management', function () {
should.exist(result); should.exist(result);
response.statusCode.should.equal(200); response.statusCode.should.equal(200);
var nhub = result; var nhub = result;
//Uncomment after fixing this bug . nhub.wnsCredential.secretKey.should.equal(createNotificationHubParameters.wnsCredential.secretKey);
//nhub.properties.WnsCredential.properties.SecretKey.should.equal(createNotificationHubParameters.properties.WnsCredential.properties.SecretKey); nhub.wnsCredential.packageSid.should.equal(createNotificationHubParameters.wnsCredential.packageSid);
//nhub.properties.WnsCredential.properties.PackageSid.should.equal(createNotificationHubParameters.properties.WnsCredential.properties.PackageSid); nhub.wnsCredential.windowsLiveEndpoint.should.equal(createNotificationHubParameters.wnsCredential.windowsLiveEndpoint);
//nhub.properties.WnsCredential.properties.WindowsLiveEndpoint.should.equal(createNotificationHubParameters.properties.WnsCredential.properties.WindowsLiveEndpoint);
//console.log("Create Notification Hub Authorization Rules : " + authorizationRuleName); //console.log("Create Notification Hub Authorization Rules : " + authorizationRuleName);
client.notificationHubs.createOrUpdateAuthorizationRule(groupName, namespaceName, notificationHubName, authorizationRuleName, authRuleParameter, function (err, result, request, response) { client.notificationHubs.createOrUpdateAuthorizationRule(groupName, namespaceName, notificationHubName, authorizationRuleName, authRuleParameter, function (err, result, request, response) {
@ -194,10 +185,9 @@ describe('Notification Hubs Management', function () {
response.statusCode.should.equal(200); response.statusCode.should.equal(200);
var authRule = result; var authRule = result;
authRule.name.should.equal(authorizationRuleName); authRule.name.should.equal(authorizationRuleName);
authRule.properties.primaryKey.should.equal(authRuleParameter.properties.primaryKey); authRule.rights.length.should.be.equal(2);
authRule.properties.rights.length.should.be.equal(2); authRule.rights.indexOf('Listen') > -1;
authRule.properties.rights.indexOf('Listen') > -1; authRule.rights.indexOf('Send') > -1;
authRule.properties.rights.indexOf('Send') > -1;
//console.log("Get Created Authorization Rules"); //console.log("Get Created Authorization Rules");
client.notificationHubs.getAuthorizationRule(groupName, namespaceName, notificationHubName, authorizationRuleName, function (err, result, request, response) { client.notificationHubs.getAuthorizationRule(groupName, namespaceName, notificationHubName, authorizationRuleName, function (err, result, request, response) {
@ -206,10 +196,9 @@ describe('Notification Hubs Management', function () {
response.statusCode.should.equal(200); response.statusCode.should.equal(200);
var authRule = result; var authRule = result;
authRule.name.should.equal(authorizationRuleName); authRule.name.should.equal(authorizationRuleName);
authRule.properties.primaryKey.should.equal(authRuleParameter.properties.primaryKey); authRule.rights.length.should.be.equal(2);
authRule.properties.rights.length.should.be.equal(2); authRule.rights.indexOf('Listen') > -1;
authRule.properties.rights.indexOf('Listen') > -1; authRule.rights.indexOf('Send') > -1;
authRule.properties.rights.indexOf('Send') > -1;
//console.log("Get all the Notification Hub Authoirzation Rules"); //console.log("Get all the Notification Hub Authoirzation Rules");
client.notificationHubs.listAuthorizationRules(groupName, namespaceName, notificationHubName, function (err, result, request, response) { client.notificationHubs.listAuthorizationRules(groupName, namespaceName, notificationHubName, function (err, result, request, response) {
@ -226,19 +215,47 @@ describe('Notification Hubs Management', function () {
should.exist(result); should.exist(result);
response.statusCode.should.equal(200); response.statusCode.should.equal(200);
var authKey = result; var authKey = result;
authKey.primaryConnectionString.indexOf(authRuleParameter.properties.primaryKey) > -1; authKey.primaryConnectionString.indexOf(authKey.primaryKey) > -1;
authKey.secondaryConnectionString.indexOf(authRuleParameter.properties.secondaryKey) > -1; authKey.secondaryConnectionString.indexOf(authKey.secondaryKey) > -1;
//console.log("Delete the Created Authorization Rule"); //console.log("NotificationHub regenerateKey");
client.notificationHubs.deleteAuthorizationRule(groupName, namespaceName, notificationHubName, authorizationRuleName, function (err, result, request, response) { client.notificationHubs.regenerateKeys(groupName, namespaceName, notificationHubName, authorizationRuleName, regenerateKeyParameter, function (err, result, request, response) {
should.not.exist(err); should.not.exist(err);
should.exist(result);
response.statusCode.should.equal(200); response.statusCode.should.equal(200);
var authregenerateKey = result;
authregenerateKey.primaryConnectionString.indexOf(authregenerateKey.primaryKey) > -1;
authregenerateKey.secondaryConnectionString.indexOf(authregenerateKey.secondaryKey) > -1;
authregenerateKey.secondaryKey.should.equal(authKey.secondaryKey);
authregenerateKey.primaryKey.should.not.equal(authKey.primaryKey);
//console.log("Delete the Created Notification Hub"); //console.log("NotificationHub listKeys after regenerateKey");
client.notificationHubs.deleteMethod(groupName, namespaceName, notificationHubName, function (err, result, request, response) { client.notificationHubs.listKeys(groupName, namespaceName, notificationHubName, authorizationRuleName, function (err, result, request, response) {
should.not.exist(err); should.not.exist(err);
should.exist(result);
response.statusCode.should.equal(200); response.statusCode.should.equal(200);
done(); var authKeyAfterRegenerate = result;
authKeyAfterRegenerate.primaryConnectionString.indexOf(authKeyAfterRegenerate.primaryKey) > -1;
authKeyAfterRegenerate.secondaryConnectionString.indexOf(authKeyAfterRegenerate.secondaryKey) > -1;
//A bug in our service. will fix it an uncomment this . Need to add EntityPath everywhere
//authKeyAfterRegenerate.primaryConnectionString.should.equal(authregenerateKey.primaryConnectionString);
//authKeyAfterRegenerate.secondaryConnectionString.should.equal(authregenerateKey.secondaryConnectionString);
authKeyAfterRegenerate.secondaryKey.should.equal(authregenerateKey.secondaryKey);
authKeyAfterRegenerate.primaryKey.should.equal(authregenerateKey.primaryKey);
//console.log("Delete the Created Authorization Rule");
client.notificationHubs.deleteAuthorizationRule(groupName, namespaceName, notificationHubName, authorizationRuleName, function (err, result, request, response) {
should.not.exist(err);
response.statusCode.should.equal(200);
//console.log("Delete the Created Notification Hub");
client.notificationHubs.deleteMethod(groupName, namespaceName, notificationHubName, function (err, result, request, response) {
should.not.exist(err);
response.statusCode.should.equal(200);
done();
});
});
}); });
}); });
}); });
@ -264,10 +281,9 @@ describe('Notification Hubs Management', function () {
namespace = result; namespace = result;
namespace.name.should.equal(namespaceName); namespace.name.should.equal(namespaceName);
namespace.location.should.equal(namespaceLocation); namespace.location.should.equal(namespaceLocation);
namespace.properties.namespaceType.should.equal(namespaceType); //console.log("State : " + namespace.provisioningState);
//console.log("State : " + namespace.properties.provisioningState);
//console.log(namespace); //console.log(namespace);
if (namespace.properties.provisioningState === "Succeeded") if (namespace.provisioningState === "Succeeded")
return callback(null, true); return callback(null, true);
else else
return IsNamespaceActive(groupName, namespaceName, callback); return IsNamespaceActive(groupName, namespaceName, callback);