Skip to content
This repository was archived by the owner on May 5, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 21 additions & 21 deletions lib/services/eventHubManagement/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
The MIT License (MIT)

Copyright (c) 2017 Microsoft

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
The MIT License (MIT)
Copyright (c) 2018 Microsoft
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
80 changes: 40 additions & 40 deletions lib/services/eventHubManagement/README.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
# Microsoft Azure SDK for Node.js - EventHubManagement

This project provides a Node.js package that makes it easy to manage Azure EventHub Resources. Right now it supports:
- **Node.js version: 6.0.0 or higher**

## How to Install

```bash
npm install azure-arm-eventhub
```

## How to Use

### Authentication, client creation and getting information about an eventhub as an example

```javascript
var msRestAzure = require('ms-rest-azure');
var EventHubManagement = require('azure-arm-eventhub');
// Interactive Login
msRestAzure.interactiveLogin(function(err, credentials) {
var client = new EventHubManagement(credentials, 'your-subscription-id');
var resourceGroupName = 'testRG';
var namespaceName = 'testNS';
var eventHubName = 'testEH';
client.eventHubs.get(resourceGroupName, namespaceName, eventHubName, function(err, eventHubs, request, response) {
if (err) {
console.log(err);
} else {
eventHubs.map(function (hub, index, array) {
console.log('found hub :' + hub.name);
}));
}
});
});
```

## Related projects

- [Microsoft Azure SDK for Node.js - All-up](https://github.com/WindowsAzure/azure-sdk-for-node)
---
uid: azure-arm-eventhub
summary: *content
---
# Microsoft Azure SDK for Node.js - EventHubManagementClient
This project provides a Node.js package for accessing Azure. Right now it supports:
- **Node.js version 6.x.x or higher**
## Features
## How to Install
```bash
npm install azure-arm-eventhub
```
## How to use
### Authentication, client creation and list operations as an example.
```javascript
const msRestAzure = require("ms-rest-azure");
const EventHubManagementClient = require("azure-arm-eventhub");
msRestAzure.interactiveLogin().then((creds) => {
const subscriptionId = "<Subscription_Id>";
const client = new EventHubManagementClient(creds, subscriptionId);
return client.operations.list().then((result) => {
console.log("The result is:");
console.log(result);
});
}).catch((err) => {
console.log('An error occurred:');
console.dir(err, {depth: null, colors: true});
});
## Related projects
- [Microsoft Azure SDK for Node.js](https://github.com/Azure/azure-sdk-for-node)
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@

import { ServiceClientCredentials } from 'ms-rest';
import { AzureServiceClient, AzureServiceClientOptions } from 'ms-rest-azure';
import * as models from "./models";
import * as operations from "./operations";

declare class EventHubManagementClient extends AzureServiceClient {
export default class EventHubManagementClient extends AzureServiceClient {
/**
* Initializes a new instance of the EventHubManagementClient class.
* @constructor
Expand Down Expand Up @@ -60,6 +61,7 @@ declare class EventHubManagementClient extends AzureServiceClient {
disasterRecoveryConfigs: operations.DisasterRecoveryConfigs;
eventHubs: operations.EventHubs;
consumerGroups: operations.ConsumerGroups;
regions: operations.Regions;
}

export = EventHubManagementClient;
export { EventHubManagementClient, models as EventHubManagementModels };
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,14 @@ class EventHubManagementClient extends ServiceClient {
this.disasterRecoveryConfigs = new operations.DisasterRecoveryConfigs(this);
this.eventHubs = new operations.EventHubs(this);
this.consumerGroups = new operations.ConsumerGroups(this);
this.regions = new operations.Regions(this);
this.models = models;
msRest.addSerializationMixin(this);
}

}

module.exports = EventHubManagementClient;
module.exports['default'] = EventHubManagementClient;
module.exports.EventHubManagementClient = EventHubManagementClient;
module.exports.EventHubManagementModels = models;
39 changes: 39 additions & 0 deletions lib/services/eventHubManagement/lib/models/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,32 @@ export interface ArmDisasterRecovery extends Resource {
readonly role?: string;
}

/**
* @class
* Initializes a new instance of the MessagingRegionsProperties class.
* @constructor
* @member {string} [code] Region code
* @member {string} [fullName] Full name of the region
*/
export interface MessagingRegionsProperties {
readonly code?: string;
readonly fullName?: string;
}

/**
* @class
* Initializes a new instance of the MessagingRegions class.
* @constructor
* Messaging Region
*
* @member {object} [properties]
* @member {string} [properties.code] Region code
* @member {string} [properties.fullName] Full name of the region
*/
export interface MessagingRegions extends TrackedResource {
properties?: MessagingRegionsProperties;
}


/**
* @class
Expand Down Expand Up @@ -481,3 +507,16 @@ export interface EventHubListResult extends Array<Eventhub> {
export interface ConsumerGroupListResult extends Array<ConsumerGroup> {
nextLink?: string;
}

/**
* @class
* Initializes a new instance of the MessagingRegionsListResult class.
* @constructor
* The response of the List MessagingRegions operation.
*
* @member {string} [nextLink] Link to the next set of results. Not empty if
* Value contains incomplete list of MessagingRegions.
*/
export interface MessagingRegionsListResult extends Array<MessagingRegions> {
readonly nextLink?: string;
}
3 changes: 3 additions & 0 deletions lib/services/eventHubManagement/lib/models/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,12 @@ exports.OperationDisplay = require('./operationDisplay');
exports.Operation = require('./operation');
exports.ErrorResponse = require('./errorResponse');
exports.ArmDisasterRecovery = require('./armDisasterRecovery');
exports.MessagingRegionsProperties = require('./messagingRegionsProperties');
exports.MessagingRegions = require('./messagingRegions');
exports.OperationListResult = require('./operationListResult');
exports.EHNamespaceListResult = require('./eHNamespaceListResult');
exports.AuthorizationRuleListResult = require('./authorizationRuleListResult');
exports.ArmDisasterRecoveryListResult = require('./armDisasterRecoveryListResult');
exports.EventHubListResult = require('./eventHubListResult');
exports.ConsumerGroupListResult = require('./consumerGroupListResult');
exports.MessagingRegionsListResult = require('./messagingRegionsListResult');
104 changes: 104 additions & 0 deletions lib/services/eventHubManagement/lib/models/messagingRegions.js
Original file line number Diff line number Diff line change
@@ -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';

const models = require('./index');

/**
* Messaging Region
*
* @extends models['TrackedResource']
*/
class MessagingRegions extends models['TrackedResource'] {
/**
* Create a MessagingRegions.
* @member {object} [properties]
* @member {string} [properties.code] Region code
* @member {string} [properties.fullName] Full name of the region
*/
constructor() {
super();
}

/**
* Defines the metadata of MessagingRegions
*
* @returns {object} metadata of MessagingRegions
*
*/
mapper() {
return {
required: false,
serializedName: 'MessagingRegions',
type: {
name: 'Composite',
className: 'MessagingRegions',
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: false,
serializedName: 'location',
type: {
name: 'String'
}
},
tags: {
required: false,
serializedName: 'tags',
type: {
name: 'Dictionary',
value: {
required: false,
serializedName: 'StringElementType',
type: {
name: 'String'
}
}
}
},
properties: {
required: false,
serializedName: 'properties',
type: {
name: 'Composite',
className: 'MessagingRegionsProperties'
}
}
}
}
};
}
}

module.exports = MessagingRegions;
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/

'use strict';

/**
* The response of the List MessagingRegions operation.
*/
class MessagingRegionsListResult extends Array {
/**
* Create a MessagingRegionsListResult.
* @member {string} [nextLink] Link to the next set of results. Not empty if
* Value contains incomplete list of MessagingRegions.
*/
constructor() {
super();
}

/**
* Defines the metadata of MessagingRegionsListResult
*
* @returns {object} metadata of MessagingRegionsListResult
*
*/
mapper() {
return {
required: false,
serializedName: 'MessagingRegionsListResult',
type: {
name: 'Composite',
className: 'MessagingRegionsListResult',
modelProperties: {
value: {
required: false,
serializedName: '',
type: {
name: 'Sequence',
element: {
required: false,
serializedName: 'MessagingRegionsElementType',
type: {
name: 'Composite',
className: 'MessagingRegions'
}
}
}
},
nextLink: {
required: false,
readOnly: true,
serializedName: 'nextLink',
type: {
name: 'String'
}
}
}
}
};
}
}

module.exports = MessagingRegionsListResult;
Loading