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/searchManagement/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.
78 changes: 40 additions & 38 deletions lib/services/searchManagement/README.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,40 @@
# Microsoft Azure SDK for Node.js - SearchManagement

This project provides a Node.js package that makes it easy to manage Microsoft Azure Search.
## API-Version: 2015-08-19
## Minimum node.js version >= 6.x.x

## How to Install

```bash
npm install azure-arm-search
```

## How to Use

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

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

// 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 SearchManagement(credentials, 'your-subscription-id');
return client.services.listByResourceGroup('testrg');
}).then((services) => {
console.log('List of services:');
console.dir(services, {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-search
summary: *content

---
# Microsoft Azure SDK for Node.js - SearchManagementClient
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-search
```

## How to use

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

```javascript
const msRestAzure = require("ms-rest-azure");
const SearchManagementClient = require("azure-arm-search");
msRestAzure.interactiveLogin().then((creds) => {
const subscriptionId = "<Subscription_Id>";
const client = new SearchManagementClient(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)
71 changes: 71 additions & 0 deletions lib/services/searchManagement/lib/models/identity.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
/*
* 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';

/**
* Identity for the resource.
*
*/
class Identity {
/**
* Create a Identity.
* @member {string} [principalId] The principal ID of resource identity.
* @member {string} [tenantId] The tenant ID of resource.
*/
constructor() {
}

/**
* Defines the metadata of Identity
*
* @returns {object} metadata of Identity
*
*/
mapper() {
return {
required: false,
serializedName: 'Identity',
type: {
name: 'Composite',
className: 'Identity',
modelProperties: {
principalId: {
required: false,
readOnly: true,
serializedName: 'principalId',
type: {
name: 'String'
}
},
tenantId: {
required: false,
readOnly: true,
serializedName: 'tenantId',
type: {
name: 'String'
}
},
type: {
required: true,
isConstant: true,
serializedName: 'type',
defaultValue: 'SystemAssigned',
type: {
name: 'String'
}
}
}
}
};
}
}

module.exports = Identity;
91 changes: 84 additions & 7 deletions lib/services/searchManagement/lib/models/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,18 +116,24 @@ export interface Sku {
* Azure Resource Manager to link resources together.
* @member {string} [name] The name of the resource.
* @member {string} [type] The resource type.
* @member {string} location The geographic location of the resource. This must
* be one of the supported and registered Azure Geo Regions (for example, West
* US, East US, Southeast Asia, and so forth).
* @member {string} [location] The geographic location of the resource. This
* must be one of the supported and registered Azure Geo Regions (for example,
* West US, East US, Southeast Asia, and so forth). This property is required
* when creating a new resource.
* @member {object} [tags] Tags to help categorize the resource in the Azure
* portal.
* @member {object} [identity] The identity of the resource.
* @member {string} [identity.principalId] The principal ID of resource
* identity.
* @member {string} [identity.tenantId] The tenant ID of resource.
*/
export interface Resource extends BaseResource {
readonly id?: string;
readonly name?: string;
readonly type?: string;
location: string;
location?: string;
tags?: { [propertyName: string]: string };
identity?: Identity;
}

/**
Expand Down Expand Up @@ -176,8 +182,9 @@ export interface Resource extends BaseResource {
* the call to Create Search service. This is because the free service uses
* capacity that is already set up. Possible values include: 'succeeded',
* 'provisioning', 'failed'
* @member {object} sku The SKU of the Search Service, which determines price
* tier and capacity limits.
* @member {object} [sku] The SKU of the Search Service, which determines price
* tier and capacity limits. This property is required when creating a new
* Search Service.
* @member {string} [sku.name] The SKU of the Search service. Valid values
* include: 'free': Shared service. 'basic': Dedicated service with up to 3
* replicas. 'standard': Dedicated service with up to 12 partitions and 12
Expand All @@ -194,7 +201,63 @@ export interface SearchService extends Resource {
readonly status?: string;
readonly statusDetails?: string;
readonly provisioningState?: string;
sku: Sku;
sku?: Sku;
}

/**
* @class
* Initializes a new instance of the Identity class.
* @constructor
* Identity for the resource.
*
* @member {string} [principalId] The principal ID of resource identity.
* @member {string} [tenantId] The tenant ID of resource.
*/
export interface Identity {
readonly principalId?: string;
readonly tenantId?: string;
}

/**
* @class
* Initializes a new instance of the OperationDisplay class.
* @constructor
* The object that describes the operation.
*
* @member {string} [provider] The friendly name of the resource provider.
* @member {string} [operation] The operation type: read, write, delete,
* listKeys/action, etc.
* @member {string} [resource] The resource type on which the operation is
* performed.
* @member {string} [description] The friendly name of the operation.
*/
export interface OperationDisplay {
readonly provider?: string;
readonly operation?: string;
readonly resource?: string;
readonly description?: string;
}

/**
* @class
* Initializes a new instance of the Operation class.
* @constructor
* Describes a REST API operation.
*
* @member {string} [name] The name of the operation. This name is of the form
* {provider}/{resource}/{operation}.
* @member {object} [display] The object that describes the operation.
* @member {string} [display.provider] The friendly name of the resource
* provider.
* @member {string} [display.operation] The operation type: read, write,
* delete, listKeys/action, etc.
* @member {string} [display.resource] The resource type on which the operation
* is performed.
* @member {string} [display.description] The friendly name of the operation.
*/
export interface Operation {
readonly name?: string;
readonly display?: OperationDisplay;
}

/**
Expand All @@ -212,6 +275,20 @@ export interface SearchManagementRequestOptions {
}


/**
* @class
* Initializes a new instance of the OperationListResult class.
* @constructor
* The result of the request to list REST API operations. It contains a list of
* operations and a URL to get the next set of results.
*
* @member {string} [nextLink] The URL to get the next set of operation list
* results, if any.
*/
export interface OperationListResult extends Array<Operation> {
readonly nextLink?: string;
}

/**
* @class
* Initializes a new instance of the ListQueryKeysResult class.
Expand Down
4 changes: 4 additions & 0 deletions lib/services/searchManagement/lib/models/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ exports.QueryKey = require('./queryKey');
exports.Sku = require('./sku');
exports.Resource = require('./resource');
exports.SearchService = require('./searchService');
exports.Identity = require('./identity');
exports.OperationDisplay = require('./operationDisplay');
exports.Operation = require('./operation');
exports.SearchManagementRequestOptions = require('./searchManagementRequestOptions');
exports.OperationListResult = require('./operationListResult');
exports.ListQueryKeysResult = require('./listQueryKeysResult');
exports.SearchServiceListResult = require('./searchServiceListResult');
Loading