Skip to content
This repository was archived by the owner on May 5, 2023. It is now read-only.
Closed
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/relayManagement/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) 2019 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: 43 additions & 37 deletions lib/services/relayManagement/README.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,43 @@
# Microsoft Azure SDK for Node.js - RelayManagement

This project provides a Node.js package that makes it easy to manage Microsoft Azure Relay.
## Minimum node.js version >= 6.x.x

## How to Install

```bash
npm install azure-arm-relay
```

## How to Use

### Authentication, client creation and listing namespaces as an example

```javascript
const msRestAzure = require('ms-rest-azure');
const RelayManagement = require("azure-arm-relay");

// Interactive Login
// It provides a url and code that needs to be copied and pasted in a browser and authenticated over there. If successful,
// the user will get a DeviceTokenCredentials object.
msRestAzure.interactiveLogin().then((credentials) => {
let client = new RelayManagement(credentials, 'your-subscription-id');
return client.namespaces.list();
}).then((namespaces) => {
console.log('List of namespaces:');
console.dir(namespaces, {depth: null, colors: true});
}).catch((err) => {
console.log('An error ocurred');
console.dir(err, {depth: null, colors: true});
});
```

## Related projects

- [Microsoft Azure SDK for Node.js](https://github.com/Azure/azure-sdk-for-node)
---
uid: azure-arm-relay
summary: *content

---
**This SDK will be deprecated next year and will be replaced by a new TypeScript-based isomorphic SDK (found at https://github.com/Azure/azure-sdk-for-js) which works on Node.js and browsers.**
## Microsoft Azure SDK for Node.js - RelayManagementClient

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-relay
```

### How to use

#### Authentication, client creation, and list operations as an example.

```javascript
const msRestAzure = require("ms-rest-azure");
const RelayManagementClient = require("azure-arm-relay");
msRestAzure.interactiveLogin().then((creds) => {
const subscriptionId = "<Subscription_Id>";
const client = new RelayManagementClient(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)
13 changes: 7 additions & 6 deletions lib/services/relayManagement/lib/models/accessKeys.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,16 @@
class AccessKeys {
/**
* Create a AccessKeys.
* @member {string} [primaryConnectionString] Primary connection string of
* @property {string} [primaryConnectionString] Primary connection string of
* the created namespace authorization rule.
* @member {string} [secondaryConnectionString] Secondary connection string
* @property {string} [secondaryConnectionString] Secondary connection string
* of the created namespace authorization rule.
* @member {string} [primaryKey] A base64-encoded 256-bit primary key for
* @property {string} [primaryKey] A base64-encoded 256-bit primary key for
* signing and validating the SAS token.
* @member {string} [secondaryKey] A base64-encoded 256-bit secondary key for
* signing and validating the SAS token.
* @member {string} [keyName] A string that describes the authorization rule.
* @property {string} [secondaryKey] A base64-encoded 256-bit secondary key
* for signing and validating the SAS token.
* @property {string} [keyName] A string that describes the authorization
* rule.
*/
constructor() {
}
Expand Down
4 changes: 2 additions & 2 deletions lib/services/relayManagement/lib/models/authorizationRule.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const models = require('./index');
class AuthorizationRule extends models['Resource'] {
/**
* Create a AuthorizationRule.
* @member {array} [rights] The rights associated with the rule.
* @property {array} rights The rights associated with the rule.
*/
constructor() {
super();
Expand Down Expand Up @@ -65,7 +65,7 @@ class AuthorizationRule extends models['Resource'] {
}
},
rights: {
required: false,
required: true,
serializedName: 'properties.rights',
constraints: {
UniqueItems: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
class AuthorizationRuleListResult extends Array {
/**
* Create a AuthorizationRuleListResult.
* @member {string} [nextLink] Link to the next set of results. Not empty if
* value contains incomplete list of authorization rules.
* @property {string} [nextLink] Link to the next set of results. Not empty
* if value contains incomplete list of authorization rules.
*/
constructor() {
super();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
class CheckNameAvailability {
/**
* Create a CheckNameAvailability.
* @member {string} name The namespace name to check for availability. The
* @property {string} name The namespace name to check for availability. The
* namespace name can contain only letters, numbers, and hyphens. The
* namespace must start with a letter, and it must end with a letter or
* number.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
class CheckNameAvailabilityResult {
/**
* Create a CheckNameAvailabilityResult.
* @member {string} [message] The detailed info regarding the reason
* @property {string} [message] The detailed info regarding the reason
* associated with the namespace.
* @member {boolean} [nameAvailable] Value indicating namespace is available.
* Returns true if the namespace is available; otherwise, false.
* @member {string} [reason] The reason for unavailability of a namespace.
* @property {boolean} [nameAvailable] Value indicating namespace is
* available. Returns true if the namespace is available; otherwise, false.
* @property {string} [reason] The reason for unavailability of a namespace.
* Possible values include: 'None', 'InvalidName', 'SubscriptionIsDisabled',
* 'NameInUse', 'NameInLockdown', 'TooManyNamespaceInCurrentSubscription'
*/
Expand Down
6 changes: 3 additions & 3 deletions lib/services/relayManagement/lib/models/errorResponse.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
'use strict';

/**
* Error reponse indicates Relay service is not able to process the incoming
* Error response indicates Relay service is not able to process the incoming
* request. The reason is provided in the error message.
*
*/
class ErrorResponse {
/**
* Create a ErrorResponse.
* @member {string} [code] Error code.
* @member {string} [message] Error message indicating why the operation
* @property {string} [code] Error code.
* @property {string} [message] Error message indicating why the operation
* failed.
*/
constructor() {
Expand Down
18 changes: 9 additions & 9 deletions lib/services/relayManagement/lib/models/hybridConnection.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@ const models = require('./index');
class HybridConnection extends models['Resource'] {
/**
* Create a HybridConnection.
* @member {date} [createdAt] The time the hybrid connection was created.
* @member {date} [updatedAt] The time the namespace was updated.
* @member {number} [listenerCount] The number of listeners for this hybrid
* @property {date} [createdAt] The time the hybrid connection was created.
* @property {date} [updatedAt] The time the namespace was updated.
* @property {number} [listenerCount] The number of listeners for this hybrid
* connection. Note that min : 1 and max:25 are supported.
* @member {boolean} [requiresClientAuthorization] Returns true if client
* @property {boolean} [requiresClientAuthorization] Returns true if client
* authorization is needed for this hybrid connection; otherwise, false.
* @member {string} [userMetadata] The usermetadata is a placeholder to store
* user-defined string data for the hybrid connection endpoint. For example,
* it can be used to store descriptive data, such as a list of teams and
* their contact information. Also, user-defined configuration settings can
* be stored.
* @property {string} [userMetadata] The userMetadata is a placeholder to
* store user-defined string data for the hybrid connection endpoint. For
* example, it can be used to store descriptive data, such as a list of teams
* and their contact information. Also, user-defined configuration settings
* can be stored.
*/
constructor() {
super();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
class HybridConnectionListResult extends Array {
/**
* Create a HybridConnectionListResult.
* @member {string} [nextLink] Link to the next set of results. Not empty if
* value contains incomplete list hybrid connection operation.
* @property {string} [nextLink] Link to the next set of results. Not empty
* if value contains incomplete list hybrid connection operation.
*/
constructor() {
super();
Expand Down
Loading