This repository has been archived by the owner on May 5, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 564
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2679 from Azure/daschult/eventHubManagement
Regenerate eventHubManagement and change version to 1.3.0
- Loading branch information
Showing
15 changed files
with
1,430 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,40 @@ | ||
# Microsoft Azure SDK for Node.js - EventHubManagement | ||
--- | ||
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 | ||
|
||
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); | ||
})); | ||
} | ||
}); | ||
}); | ||
``` | ||
## 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 ocurred:'); | ||
console.dir(err, {depth: null, colors: true}); | ||
}); | ||
|
||
## Related projects | ||
|
||
- [Microsoft Azure SDK for Node.js - All-up](https://github.com/WindowsAzure/azure-sdk-for-node) | ||
- [Microsoft Azure SDK for Node.js](https://github.com/Azure/azure-sdk-for-node) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
126 changes: 126 additions & 0 deletions
126
lib/services/eventHubManagement/lib/models/messagingPlan.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
/* | ||
* 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 | ||
* | ||
* @extends models['TrackedResource'] | ||
*/ | ||
class MessagingPlan extends models['TrackedResource'] { | ||
/** | ||
* Create a MessagingPlan. | ||
* @member {number} [sku] Sku type | ||
* @member {number} [selectedEventHubUnit] Selected event hub unit | ||
* @member {date} [updatedAt] The exact time the messaging plan was updated. | ||
* @member {number} [revision] revision number | ||
*/ | ||
constructor() { | ||
super(); | ||
} | ||
|
||
/** | ||
* Defines the metadata of MessagingPlan | ||
* | ||
* @returns {object} metadata of MessagingPlan | ||
* | ||
*/ | ||
mapper() { | ||
return { | ||
required: false, | ||
serializedName: 'MessagingPlan', | ||
type: { | ||
name: 'Composite', | ||
className: 'MessagingPlan', | ||
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' | ||
} | ||
} | ||
} | ||
}, | ||
sku: { | ||
required: false, | ||
serializedName: 'properties.sku', | ||
type: { | ||
name: 'Number' | ||
} | ||
}, | ||
selectedEventHubUnit: { | ||
required: false, | ||
serializedName: 'properties.selectedEventHubUnit', | ||
type: { | ||
name: 'Number' | ||
} | ||
}, | ||
updatedAt: { | ||
required: false, | ||
readOnly: true, | ||
serializedName: 'properties.updatedAt', | ||
type: { | ||
name: 'DateTime' | ||
} | ||
}, | ||
revision: { | ||
required: false, | ||
serializedName: 'properties.revision', | ||
type: { | ||
name: 'Number' | ||
} | ||
} | ||
} | ||
} | ||
}; | ||
} | ||
} | ||
|
||
module.exports = MessagingPlan; |
Oops, something went wrong.