/* * 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. */ import { ServiceClientOptions, RequestOptions, ServiceCallback, HttpOperationResponse } from 'ms-rest'; import * as models from '../models'; /** * @class * Operations * __NOTE__: An instance of this class is automatically created for an * instance of the ManagementLinkClient. */ export interface Operations { /** * Lists all of the available Microsoft.Resources REST API operations. * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ listWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Lists all of the available Microsoft.Resources REST API operations. * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @param {ServiceCallback} [optionalCallback] - The optional callback. * * @returns {ServiceCallback|Promise} If a callback was passed as the last * parameter then it returns the callback else returns a Promise. * * {Promise} A promise is returned. * * @resolve {OperationListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * * {ServiceCallback} optionalCallback(err, result, request, response) * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * * {OperationListResult} [result] - The deserialized result object if an error did not occur. * See {@link OperationListResult} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ list(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; list(callback: ServiceCallback): void; list(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Lists all of the available Microsoft.Resources REST API operations. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Lists all of the available Microsoft.Resources REST API operations. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @param {ServiceCallback} [optionalCallback] - The optional callback. * * @returns {ServiceCallback|Promise} If a callback was passed as the last * parameter then it returns the callback else returns a Promise. * * {Promise} A promise is returned. * * @resolve {OperationListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * * {ServiceCallback} optionalCallback(err, result, request, response) * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * * {OperationListResult} [result] - The deserialized result object if an error did not occur. * See {@link OperationListResult} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; listNext(nextPageLink: string, callback: ServiceCallback): void; listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** * @class * ResourceLinks * __NOTE__: An instance of this class is automatically created for an * instance of the ManagementLinkClient. */ export interface ResourceLinks { /** * Deletes a resource link with the specified ID. * * @param {string} linkId The fully qualified ID of the resource link. Use the * format, * /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. * For example, * /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ deleteMethodWithHttpOperationResponse(linkId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Deletes a resource link with the specified ID. * * @param {string} linkId The fully qualified ID of the resource link. Use the * format, * /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. * For example, * /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @param {ServiceCallback} [optionalCallback] - The optional callback. * * @returns {ServiceCallback|Promise} If a callback was passed as the last * parameter then it returns the callback else returns a Promise. * * {Promise} A promise is returned. * * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * * {ServiceCallback} optionalCallback(err, result, request, response) * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ deleteMethod(linkId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; deleteMethod(linkId: string, callback: ServiceCallback): void; deleteMethod(linkId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Creates or updates a resource link between the specified resources. * * @param {string} linkId The fully qualified ID of the resource link. Use the * format, * /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. * For example, * /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink * * @param {object} parameters Parameters for creating or updating a resource * link. * * @param {object} [parameters.properties] Properties for resource link. * * @param {string} parameters.properties.targetId The fully qualified ID of the * target resource in the link. * * @param {string} [parameters.properties.notes] Notes about the resource link. * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ createOrUpdateWithHttpOperationResponse(linkId: string, parameters: models.ResourceLink, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Creates or updates a resource link between the specified resources. * * @param {string} linkId The fully qualified ID of the resource link. Use the * format, * /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. * For example, * /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink * * @param {object} parameters Parameters for creating or updating a resource * link. * * @param {object} [parameters.properties] Properties for resource link. * * @param {string} parameters.properties.targetId The fully qualified ID of the * target resource in the link. * * @param {string} [parameters.properties.notes] Notes about the resource link. * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @param {ServiceCallback} [optionalCallback] - The optional callback. * * @returns {ServiceCallback|Promise} If a callback was passed as the last * parameter then it returns the callback else returns a Promise. * * {Promise} A promise is returned. * * @resolve {ResourceLink} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * * {ServiceCallback} optionalCallback(err, result, request, response) * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * * {ResourceLink} [result] - The deserialized result object if an error did not occur. * See {@link ResourceLink} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ createOrUpdate(linkId: string, parameters: models.ResourceLink, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; createOrUpdate(linkId: string, parameters: models.ResourceLink, callback: ServiceCallback): void; createOrUpdate(linkId: string, parameters: models.ResourceLink, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Gets a resource link with the specified ID. * * @param {string} linkId The fully qualified Id of the resource link. For * example, * /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ getWithHttpOperationResponse(linkId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Gets a resource link with the specified ID. * * @param {string} linkId The fully qualified Id of the resource link. For * example, * /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @param {ServiceCallback} [optionalCallback] - The optional callback. * * @returns {ServiceCallback|Promise} If a callback was passed as the last * parameter then it returns the callback else returns a Promise. * * {Promise} A promise is returned. * * @resolve {ResourceLink} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * * {ServiceCallback} optionalCallback(err, result, request, response) * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * * {ResourceLink} [result] - The deserialized result object if an error did not occur. * See {@link ResourceLink} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ get(linkId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; get(linkId: string, callback: ServiceCallback): void; get(linkId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Gets all the linked resources for the subscription. * * @param {object} [options] Optional Parameters. * * @param {string} [options.filter] The filter to apply on the list resource * links operation. The supported filter for list resource links is targetId. * For example, $filter=targetId eq {value} * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ listAtSubscriptionWithHttpOperationResponse(options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Gets all the linked resources for the subscription. * * @param {object} [options] Optional Parameters. * * @param {string} [options.filter] The filter to apply on the list resource * links operation. The supported filter for list resource links is targetId. * For example, $filter=targetId eq {value} * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @param {ServiceCallback} [optionalCallback] - The optional callback. * * @returns {ServiceCallback|Promise} If a callback was passed as the last * parameter then it returns the callback else returns a Promise. * * {Promise} A promise is returned. * * @resolve {ResourceLinkResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * * {ServiceCallback} optionalCallback(err, result, request, response) * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * * {ResourceLinkResult} [result] - The deserialized result object if an error did not occur. * See {@link ResourceLinkResult} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ listAtSubscription(options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; listAtSubscription(callback: ServiceCallback): void; listAtSubscription(options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Gets a list of resource links at and below the specified source scope. * * @param {string} scope The fully qualified ID of the scope for getting the * resource links. For example, to list resource links at and under a resource * group, set the scope to * /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup. * * @param {object} [options] Optional Parameters. * * @param {string} [options.filter] The filter to apply when getting resource * links. To get links only at the specified scope (not below the scope), use * Filter.atScope(). Possible values include: 'atScope()' * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ listAtSourceScopeWithHttpOperationResponse(scope: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Gets a list of resource links at and below the specified source scope. * * @param {string} scope The fully qualified ID of the scope for getting the * resource links. For example, to list resource links at and under a resource * group, set the scope to * /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup. * * @param {object} [options] Optional Parameters. * * @param {string} [options.filter] The filter to apply when getting resource * links. To get links only at the specified scope (not below the scope), use * Filter.atScope(). Possible values include: 'atScope()' * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @param {ServiceCallback} [optionalCallback] - The optional callback. * * @returns {ServiceCallback|Promise} If a callback was passed as the last * parameter then it returns the callback else returns a Promise. * * {Promise} A promise is returned. * * @resolve {ResourceLinkResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * * {ServiceCallback} optionalCallback(err, result, request, response) * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * * {ResourceLinkResult} [result] - The deserialized result object if an error did not occur. * See {@link ResourceLinkResult} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ listAtSourceScope(scope: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; listAtSourceScope(scope: string, callback: ServiceCallback): void; listAtSourceScope(scope: string, options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Gets all the linked resources for the subscription. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ listAtSubscriptionNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Gets all the linked resources for the subscription. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @param {ServiceCallback} [optionalCallback] - The optional callback. * * @returns {ServiceCallback|Promise} If a callback was passed as the last * parameter then it returns the callback else returns a Promise. * * {Promise} A promise is returned. * * @resolve {ResourceLinkResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * * {ServiceCallback} optionalCallback(err, result, request, response) * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * * {ResourceLinkResult} [result] - The deserialized result object if an error did not occur. * See {@link ResourceLinkResult} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ listAtSubscriptionNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; listAtSubscriptionNext(nextPageLink: string, callback: ServiceCallback): void; listAtSubscriptionNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Gets a list of resource links at and below the specified source scope. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ listAtSourceScopeNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Gets a list of resource links at and below the specified source scope. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @param {ServiceCallback} [optionalCallback] - The optional callback. * * @returns {ServiceCallback|Promise} If a callback was passed as the last * parameter then it returns the callback else returns a Promise. * * {Promise} A promise is returned. * * @resolve {ResourceLinkResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * * {ServiceCallback} optionalCallback(err, result, request, response) * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * * {ResourceLinkResult} [result] - The deserialized result object if an error did not occur. * See {@link ResourceLinkResult} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ listAtSourceScopeNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; listAtSourceScopeNext(nextPageLink: string, callback: ServiceCallback): void; listAtSourceScopeNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; }